[PATCH 04/14] Populate cities and regions with real values from pytz

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

 



---
 pyanaconda/ui/gui/spokes/datetime.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/datetime.py b/pyanaconda/ui/gui/spokes/datetime.py
index bba7cc6..e7aa955 100644
--- a/pyanaconda/ui/gui/spokes/datetime.py
+++ b/pyanaconda/ui/gui/spokes/datetime.py
@@ -29,6 +29,8 @@ from pyanaconda.ui.gui import UIObject
 from pyanaconda.ui.gui.spokes import NormalSpoke
 from pyanaconda.ui.gui.categories.localization import LocalizationCategory
 
+from pyanaconda import localization
+
 __all__ = ["DatetimeSpoke"]
 
 class DatetimeSpoke(NormalSpoke):
@@ -54,6 +56,8 @@ class DatetimeSpoke(NormalSpoke):
         self._citiesStore = self.builder.get_object("cities")
         self._tzmap = self.builder.get_object("tzmap")
 
+        self._regions_zones = localization.get_all_regions_and_timezones()
+
         for day in xrange(1, 32):
             self.add_to_store(self._daysStore, day)
 
@@ -63,13 +67,10 @@ class DatetimeSpoke(NormalSpoke):
         for year in xrange(1990, 2051):
             self.add_to_store(self._yearsStore, year)
 
-        #TODO: replace by regions from pytz
-        for region in ["America", "Europe"]:
-            self.add_to_store(self._regionsStore, region)
-
-        #TODO: replace by cities from pytz
-        for city in ["Westford", "Brno"]:
+        for region in self._regions_zones.keys():
             self.add_to_store(self._regionsStore, region)
+            for city in self._regions_zones[region]:
+                self.add_to_store(self._citiesStore, city)
 
         self._tzmap.set_timezone("Europe/Prague")
 
-- 
1.7.4.4

_______________________________________________
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