[PATCH 13/14] Make timezone map and related comboboxes consistent

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

 



---
 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@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