Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webtoolbar.py
diff options
context:
space:
mode:
authorManuel Kaufmann <humitos@gmail.com>2012-05-02 15:33:18 (GMT)
committer Manuel QuiƱones <manuq@laptop.org>2012-06-21 17:02:05 (GMT)
commitba233cf653a7b6b801bfdfb42aebe3723c1e5673 (patch)
treee96c0cd4c0e9055dde0ec342fb162161a2412d52 /webtoolbar.py
parentd42f58a18bb26337dcbc59b1c7b49623fa724d4f (diff)
Use UNICODE string to search into places SL #2830
Decode (using 'utf-8') the string inserted by the user in the URL address bar to search with SQLite into places' database. This is the proper thing to do in Python 2, as this wiki page states: http://python-gtk-3-tutorial.readthedocs.org/en/latest/unicode.html#unicode-in-gtk Signed-off-by: Manuel Kaufmann <humitos@gmail.com> Acked-by: Manuel QuiƱones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'webtoolbar.py')
-rw-r--r--webtoolbar.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/webtoolbar.py b/webtoolbar.py
index c24aa87..28bc015 100644
--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -121,7 +121,8 @@ class WebEntry(iconentry.IconEntry):
def _search_update(self):
list_store = Gtk.ListStore(str, str)
- for place in places.get_store().search(self.props.text):
+ search_text = self.props.text.decode('utf-8')
+ for place in places.get_store().search(search_text):
list_store.append([place.uri, place.title])
self._search_view.set_model(list_store)