Provide search-as-you-type in the mapping dialogues.
[hermes] / package / src / org / maemo / hermes / gui / contactview.py
index 98f8ef1..87db9ac 100644 (file)
@@ -4,8 +4,9 @@ import gobject
 import evolution
 from ctypes import *
 from pygobject import *
+from org.maemo.hermes.gui.searchablelist import SearchableList
 
-class ContactView(hildon.PannableArea):
+class ContactView(SearchableList):
     """Widget which shows a list of contacts in a pannable area.
          
        Copyright (c) Andrew Flegg <andrew@bleb.org> 2009.
@@ -16,7 +17,7 @@ class ContactView(hildon.PannableArea):
     def __init__(self, contacts):
         """Constructor. Passed a list of Contacts."""
         
-        hildon.PannableArea.__init__(self)
+        SearchableList.__init__(self, 1)
         self.contacts = contacts
         
         columns = [gtk.gdk.Pixbuf,         # 0. Photo
@@ -86,7 +87,6 @@ class ContactView(hildon.PannableArea):
         
         self.treeview.connect('row-activated', self._activated)
         self.add(self.treeview)
-        self.set_size_request_policy(hildon.SIZE_REQUEST_CHILDREN)
 
 
     # -----------------------------------------------------------------------
@@ -114,5 +114,3 @@ class ContactView(hildon.PannableArea):
 
 _contact_activated = gobject.signal_new('contact-activated', ContactView, gobject.SIGNAL_ACTION, gobject.TYPE_NONE, [gobject.TYPE_PYOBJECT])
 
-
-