Fix sort order in flat person view

svn: r14672
This commit is contained in:
Nick Hall 2010-03-07 17:27:53 +00:00
parent a3b52f5878
commit 665e62edd1
2 changed files with 3 additions and 3 deletions

View File

@ -516,8 +516,8 @@ class FlatBaseModel(gtk.GenericTreeModel):
# use cursor as a context manager # use cursor as a context manager
with self.gen_cursor() as cursor: with self.gen_cursor() as cursor:
#loop over database and store the sort field, and the handle #loop over database and store the sort field, and the handle
return sorted( (conv_unicode_tosrtkey_ongtk(self.sort_func(data)), return sorted((map(conv_unicode_tosrtkey_ongtk,
key) for key, data in cursor ) self.sort_func(data)), key) for key, data in cursor)
def _rebuild_search(self, ignore=None): def _rebuild_search(self, ignore=None):
""" function called when view must be build, given a search text """ function called when view must be build, given a search text

View File

@ -178,7 +178,7 @@ class PeopleBaseModel(object):
def sort_name(self, data): def sort_name(self, data):
n = Name() n = Name()
n.unserialize(data[COLUMN_NAME]) n.unserialize(data[COLUMN_NAME])
return name_displayer.sort_string(n) return (n.get_group_name(), n.get_first_name())
def column_name(self, data): def column_name(self, data):
handle = data[0] handle = data[0]