[PATCH 11/14] Add region_changed callback and sort filtered cities

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

 



---
 pyanaconda/ui/gui/spokes/datetime_spoke.py |    5 ++++-
 pyanaconda/ui/gui/spokes/datetime_spoke.ui |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index e757d2e..b269fd1 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -96,6 +96,9 @@ class DatetimeSpoke(NormalSpoke):
         self._citiesFilter = self.builder.get_object("citiesFilter")
         self._citiesFilter.set_visible_func(self.city_in_region, None)
 
+        self._citiesSort = self.builder.get_object("citiesSort")
+        self._citiesSort.set_sort_column_id(0, 0) #column 0, Ascending
+
         self._tzmap.set_timezone("Europe/Prague")
 
     @property
@@ -162,7 +165,7 @@ class DatetimeSpoke(NormalSpoke):
         pass
 
     def on_region_changed(self, *args):
-        pass
+        self._citiesFilter.refilter()
 
     def on_city_changed(self, *args):
         pass
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.ui b/pyanaconda/ui/gui/spokes/datetime_spoke.ui
index 5ea959c..fda2c9f 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.ui
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.ui
@@ -114,7 +114,7 @@
                               <object class="GtkComboBox" id="cityCombobox">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="model">citiesFilter</property>
+                                <property name="model">citiesSort</property>
                                 <signal name="changed" handler="on_city_changed" swapped="no"/>
                                 <child>
                                   <object class="GtkCellRendererText" id="citiesComboRenderer"/>
-- 
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