diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | iw/timezone_gui.py | 40 | ||||
-rw-r--r-- | textw/timezone_text.py | 2 |
3 files changed, 28 insertions, 20 deletions
@@ -1,3 +1,9 @@ +2006-07-20 Chris Lumens <clumens@redhat.com> + + * iw/timezone_gui.py: Make GMT offset timezones available in the UI + (#199076). + * textw/timezone_text.py: Likewise. + 2006-07-20 Jeremy Katz <katzj@redhat.com> * iw/partition_ui_helpers_gui.py (createAllowedDrivesStore): Reset diff --git a/iw/timezone_gui.py b/iw/timezone_gui.py index b27c7d599..22bc23cd7 100644 --- a/iw/timezone_gui.py +++ b/iw/timezone_gui.py @@ -114,10 +114,15 @@ class TimezoneWindow(InstallWindow): # currently selected. def tzFilterFunc (model, iter, user_data): (longmin, latmin, longmax, latmax) = user_data.get_shown_region_long_lat() - curlat = model.get_value(iter, 2) - curlong = model.get_value(iter, 3) - if curlat >= latmin and curlat <= latmax and curlong >= longmin and curlong <= longmax: + tz = user_data.zonetab.findEntryByTZ(model.get_value(iter, 1)) + + # Allow the NoGeo timezones in all the time. No good reason for this, + # but it has to be one way or the other. + if tz.lat is None and tz.long is None: + return True + + if tz.lat >= latmin and tz.lat <= latmax and tz.long >= longmin and tz.long <= longmax: return True elif user_data.currentEntry == None: if model.get_value(iter, 1) == "America/New_York": @@ -137,27 +142,24 @@ class AnacondaTZMap(TimezoneMap): iter = self.tzStore.get_iter_first() for entry in self.zonetab.getEntries(): - if entry.lat is None or entry.long is None: - continue - - x, y = self.map2canvas(entry.lat, entry.long) - marker = root.add(gnomecanvas.CanvasText, x=x, y=y, - text=u'\u00B7', fill_color='yellow', - anchor=gtk.ANCHOR_CENTER, - weight=pango.WEIGHT_BOLD) - self.markers[entry.tz] = marker + if entry.lat is not None and entry.long is not None: + x, y = self.map2canvas(entry.lat, entry.long) + marker = root.add(gnomecanvas.CanvasText, x=x, y=y, + text=u'\u00B7', fill_color='yellow', + anchor=gtk.ANCHOR_CENTER, + weight=pango.WEIGHT_BOLD) + self.markers[entry.tz] = marker - if entry.tz == "America/New_York": - #In case the /etc/sysconfig/clock is messed up, use New York as default - self.fallbackEntry = entry + if entry.tz == "America/New_York": + # In case the /etc/sysconfig/clock is messed up, use New + # York as the default. + self.fallbackEntry = entry - iter = self.tzStore.insert_after(iter, [_(entry.tz), entry.tz, - entry.lat, entry.long]) + iter = self.tzStore.insert_after(iter, [_(entry.tz), entry.tz]) def timezone_list_init (self, default): self.hbox = gtk.HBox() - self.tzStore = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, - gobject.TYPE_INT, gobject.TYPE_INT) + self.tzStore = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING) root = self.canvas.root() diff --git a/textw/timezone_text.py b/textw/timezone_text.py index e9aa9f7d2..e49b30a2b 100644 --- a/textw/timezone_text.py +++ b/textw/timezone_text.py @@ -31,7 +31,7 @@ class TimezoneWindow: import zonetab zt = zonetab.ZoneTab() - zoneList = [ x.tz for x in zt.getEntries() if x.lat != None and x.long != None ] + zoneList = [ x.tz for x in zt.getEntries() ] zoneList.sort() return zoneList |