summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-07-11 15:42:58 +0000
committerChris Lumens <clumens@redhat.com>2006-07-11 15:42:58 +0000
commitdd10eaa60c6b6e0903d1e1977339eb6d61b0e770 (patch)
tree3b7ce5836b35aa06a22065864ca4dfd80fda4185
parent6725624ecc1284120c475edabb38f7ecfc1dbb72 (diff)
downloadanaconda-dd10eaa60c6b6e0903d1e1977339eb6d61b0e770.tar.gz
anaconda-dd10eaa60c6b6e0903d1e1977339eb6d61b0e770.tar.xz
anaconda-dd10eaa60c6b6e0903d1e1977339eb6d61b0e770.zip
Check the UTC box on the text interface automatically if there's no Windows
partitions.
-rw-r--r--ChangeLog6
-rw-r--r--bootloader.py9
-rw-r--r--iw/timezone_gui.py10
-rw-r--r--textw/timezone_text.py4
4 files changed, 21 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a5303951..d7fb57a27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,12 @@
2006-07-11 Chris Lumens <clumens@redhat.com>
+ * bootloader.py (hasWindows): Add a function to check all the
+ bootloader entries for Windows.
+ * iw/timezone_gui.py (TimezoneWindow.getScreen): Use hasWindows.
+ * textw/timezone_text.py (TimezoneWindow.__call): Use hasWindows to
+ automatically check the UTC box like the GUI does.
+
* yuminstall.py (YumBackend.doPreInstall): Remove call to deprecated
method.
diff --git a/bootloader.py b/bootloader.py
index 692a18c49..41934f121 100644
--- a/bootloader.py
+++ b/bootloader.py
@@ -204,3 +204,12 @@ def getBootloader():
return booty.getBootloader()
else:
return bootloaderInfo.isolinuxBootloaderInfo()
+
+def hasWindows(bl):
+ foundWindows = False
+ for (k,v) in bl.images.getImages().iteritems():
+ if v[0].lower() == 'other' and v[2] in dosFilesystems:
+ foundWindows = True
+ break
+
+ return foundWindows
diff --git a/iw/timezone_gui.py b/iw/timezone_gui.py
index 5deea8c75..b27c7d599 100644
--- a/iw/timezone_gui.py
+++ b/iw/timezone_gui.py
@@ -25,6 +25,7 @@ from timezone_map_gui import TimezoneMap
from rhpl.translate import _, textdomain
from iw_gui import *
from bootloaderInfo import dosFilesystems
+from bootloader import hasWindows
try:
import gnomecanvas
@@ -104,14 +105,7 @@ class TimezoneWindow(InstallWindow):
self.tz.setCurrent(self.zonetab.findEntryByTZ(self.default))
self.utcCheckbox.set_active(asUTC)
- # As long as we don't find a Windows partition, check the UTC box.
- foundWindows = False
- for (k,v) in anaconda.id.bootloader.images.getImages().iteritems():
- if v[0].lower() == 'other' and v[2] in dosFilesystems:
- foundWindows = True
- break
-
- self.utcCheckbox.set_active(not foundWindows)
+ self.utcCheckbox.set_active(not hasWindows(anaconda.id.bootloader))
self.notebook.remove(self.vbox)
return self.vbox
diff --git a/textw/timezone_text.py b/textw/timezone_text.py
index ee6f10cc0..37a368d0a 100644
--- a/textw/timezone_text.py
+++ b/textw/timezone_text.py
@@ -19,6 +19,7 @@ from time import *
from snack import *
from constants_text import *
from rhpl.translate import _, textdomain
+from bootloader import hasWindows
textdomain("system-config-date")
@@ -71,6 +72,9 @@ class TimezoneWindow:
t = TextboxReflowed(30,
_("What time zone are you located in?"))
+ if not hasWindows(anaconda.id.bootloader):
+ asUtc = True
+
#
# disabling this for now
#