Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Edubuntu User (http://www.linux-archive.org/edubuntu-user/)
-   -   Make timezone map and related comboboxes consistent (http://www.linux-archive.org/edubuntu-user/651774-make-timezone-map-related-comboboxes-consistent.html)

Vratislav Podzimek 04-02-2012 03:13 PM

Make timezone map and related comboboxes consistent
 
---
pyanaconda/ui/gui/spokes/datetime_spoke.py | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index 488642e..546ceba 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -224,8 +224,29 @@ class DatetimeSpoke(NormalSpoke):
def on_year_changed(self, *args):
self._daysFilter.refilter()

- def on_timezone_changed(self, *args):
- pass
+ def on_timezone_changed(self, tz_map, timezone):
+ fields = timezone.split("/", 1)
+ if len(fields) == 1:
+ #initial ""
+ return
+ else:
+ region, city = fields
+
+ itr = self._regionsStore.get_iter_first()
+ while itr:
+ if self._regionsStore[itr][0] == region:
+ self._regionCombo.set_active_iter(itr)
+ break
+
+ itr = self._regionsStore.iter_next(itr)
+
+ itr = self._citiesSort.get_iter_first()
+ while itr:
+ if self._citiesSort[itr][0] == city:
+ self._cityCombo.set_active_iter(itr)
+ break
+
+ itr = self._citiesSort.iter_next(itr)

def on_timeformat_changed(self, *args):
pass
--
1.7.4.4

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


All times are GMT. The time now is 01:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.