We want to have a sane default for the UTC checkbox so we need to fixup hasWindows() rather then removing it. --- bootloader.py | 9 +++++++++ iw/timezone_gui.py | 4 ++++ textw/timezone_text.py | 4 ++++ 3 files changed, 17 insertions(+), 0 deletions(-) diff --git a/bootloader.py b/bootloader.py index 2cb9741..e2b06a8 100644 --- a/bootloader.py +++ b/bootloader.py @@ -230,3 +230,12 @@ def writeBootloader(anaconda): "will not be changed.")) dosync() + +def hasWindows(bl): + foundWindows = False + for (k,v) in bl.images.getImages().iteritems(): + if v[0].lower() == 'other' and v[2] in bootloaderInfo.dosFilesystems: + foundWindows = True + break + + return foundWindows diff --git a/iw/timezone_gui.py b/iw/timezone_gui.py index 1a821b7..c5ecd88 100644 --- a/iw/timezone_gui.py +++ b/iw/timezone_gui.py @@ -30,6 +30,7 @@ import sys from timezone_map_gui import TimezoneMap, Enum from iw_gui import * from booty.bootloaderInfo import dosFilesystems +from bootloader import hasWindows from constants import * import gettext @@ -103,6 +104,9 @@ class TimezoneWindow(InstallWindow): self.tz.setCurrent(self.zonetab.findEntryByTZ(self.default)) self.utcCheckbox.set_active(asUTC) + if not anaconda.ksdata: + self.utcCheckbox.set_active(not hasWindows(anaconda.bootloader)) + self.notebook.remove(self.vbox) return self.vbox diff --git a/textw/timezone_text.py b/textw/timezone_text.py index d274d8c..c78442a 100644 --- a/textw/timezone_text.py +++ b/textw/timezone_text.py @@ -24,6 +24,7 @@ import iutil from time import * from snack import * from constants_text import * +from bootloader import hasWindows from scdate.core import zonetab from constants import * @@ -72,6 +73,9 @@ class TimezoneWindow: t = TextboxReflowed(30, _("In which time zone are you located?")) + if not anaconda.ksdata and not hasWindows(anaconda.bootloader): + asUtc = True + # # disabling this for now # -- 1.7.0.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list