FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 03-30-2012, 07:55 PM
Vratislav Podzimek
 
Default Populate cities and regions with real values from pytz

---
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-02-2012, 03:13 PM
Vratislav Podzimek
 
Default Populate cities and regions with real values from pytz

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

diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index b1d193f..353e9a1 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.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):
@@ -56,6 +58,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)

@@ -65,13 +69,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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 03:53 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org