[PATCH 09/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 |    7 ++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index e69b91d..1ff500d 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -95,6 +95,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
@@ -168,7 +171,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 0cc0425..ec20eb3 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.ui
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.ui
@@ -81,7 +81,7 @@
                               <object class="GtkComboBox" id="regionCombobox">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="model">regionsSort</property>
+                                <property name="model">regions</property>
                                 <signal name="changed" handler="on_region_changed" swapped="no"/>
                                 <child>
                                   <object class="GtkCellRendererText" id="regionsComboRenderer"/>
@@ -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"/>
@@ -602,9 +602,6 @@
       <column type="gchararray"/>
     </columns>
   </object>
-  <object class="GtkTreeModelSort" id="regionsSort">
-    <property name="model">regions</property>
-  </object>
   <object class="GtkImage" id="upImage">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-- 
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