Re: [PATCH 1/2] Revert commit 27a4c7df871744454d1ca8979a576f9f45c67189

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ack.

On Tue, 4 May 2010, Hans de Goede wrote:

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
#


- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvgRjAACgkQ5hsjjIy1Vknz9wCgpFUwTcLFmtgibpJFtrtuCMpE
cbUAnRpS44rUNyuU3mbPVdbvFq1osZab
=ImGc
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux