[Sugar-devel] [PATCH Browse] Use UNICODE string to search into places SL #2830
Manuel Kaufmann
humitos at gmail.com
Wed May 2 11:36:35 EDT 2012
Decode (using 'utf-8') the string inserted by the user in the URL address bar
to search with SQLite into places' database.
Signed-off-by: Manuel Kaufmann <humitos at gmail.com>
---
webtoolbar.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/webtoolbar.py b/webtoolbar.py
index d0f2dc9..c595206 100644
--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -120,7 +120,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)
--
1.7.10
More information about the Sugar-devel
mailing list