GTK currently does not suppoort search-as-you-type comboboxes, so this is
an alternative functionality, where we try to guess (using difflib) what
the user meant.
Cons: if he types 'Brno' which s-c-date doesn't know about, then 'Prague'
is not suggested automatically.
Pros: if you know your 'timezone city' you can just type it in quickly
(I'd argue most people in Europe know what their 'timezone city' is).
diff --git a/pyanaconda/iw/timezone_gui.py b/pyanaconda/iw/timezone_gui.py
index ca237bc..4a8798b 100644
--- a/pyanaconda/iw/timezone_gui.py
+++ b/pyanaconda/iw/timezone_gui.py
@@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+ # Add a searchbar
+ search_hbox = gtk.HBox()
+ label = gtk.Label(_("Type the name of a big city near you:"))
+ self.tz_search_bar = gtk.Entry()
+ self.tz_search_bar.set_width_chars(30)
+ self.tz_search_bar.connect("changed", self.search_changed)
+ search_hbox.pack_start(label, False, False)
+ search_hbox.pack_start(self.tz_search_bar, False, False)
+
# Add the ListStore to the sorted model after the list has been
# populated, since otherwise we end up resorting on every addition.
self.tzSorted = gtk.TreeModelSort(self.tzStore)
@@ -157,6 +193,7 @@ class AnacondaTZMap(TimezoneMap):
self.tzCombo.connect("changed", self.selectionChanged)
self.hbox.pack_start(self.tzCombo, False, False)
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
10-19-2010, 04:56 PM
Ales Kozumplik
timezone: allow the user to type it in.
On 10/19/2010 06:51 PM, Ales Kozumplik wrote:
GTK currently does not suppoort search-as-you-type comboboxes, so this is
an alternative functionality, where we try to guess (using difflib) what
the user meant.
Cons: if he types 'Brno' which s-c-date doesn't know about, then 'Prague'
is not suggested automatically.
Pros: if you know your 'timezone city' you can just type it in quickly
(I'd argue most people in Europe know what their 'timezone city' is).
Related: rhbz#520631
---
I just want an "yes this is better than what we had before" kind of ack.
Then a patch putting the searchbar and the combobox below into a nice
table will follow.
A screenshot: http://akozumpl.fedorapeople.org/guess_tz.png
Ales
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list