Sort contacts when showing results.
[hermes] / package / src / org / maemo / hermes / gui / contactview.py
index f941cbb..0728d50 100644 (file)
@@ -45,7 +45,7 @@ class ContactView(hildon.PannableArea):
 
         # -- Build the tree model...
         #
-        for contact in self.contacts:
+        for contact in sorted(self.contacts, cmp = lambda a, b: cmp(a.get_name(), b.get_name())):
             if not contact.get_name():
                 continue