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 Add region_changed callback and sort filtered cities

---
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_r egion, 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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 04-02-2012, 03:13 PM
Vratislav Podzimek
 
Default Add region_changed callback and sort filtered cities

---
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_r egion, 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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 08:18 AM.

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