Fix of issue 2504, sorting in WinXP.

svn: r11330
This commit is contained in:
Peter Landgren 2008-11-21 15:25:00 +00:00
parent 4b68b7a9e0
commit 0f34e8d6b6
2 changed files with 5 additions and 5 deletions

View File

@ -265,9 +265,9 @@ class BaseModel(gtk.GenericTreeModel):
(self.search and self.search.match(handle, self.db)): (self.search and self.search.match(handle, self.db)):
data = self.map(handle) data = self.map(handle)
key = locale.strxfrm(self.sort_func(data)) self.sort_data.append((self.sort_func(data), handle))
self.sort_data.append((key, handle)) self.sort_data.sort(lambda x, y: locale.strcoll(x[0], y[0]),
self.sort_data.sort(reverse=self.reverse) reverse=self.reverse)
self.node_map.set_path_map([ x[1] for x in self.sort_data ]) self.node_map.set_path_map([ x[1] for x in self.sort_data ])
index = self.node_map.get_path(handle) index = self.node_map.get_path(handle)

View File

@ -191,9 +191,9 @@ class NodeTreeMap:
return None return None
def build_sub_entry(self, name): def build_sub_entry(self, name):
slist = [ (locale.strxfrm(self.sortnames[x]), x) \ slist = [ (self.sortnames[x], x) \
for x in self.temp_sname_sub[name] ] for x in self.temp_sname_sub[name] ]
slist.sort() slist.sort(lambda x, y: locale.strcoll(x[0], y[0]))
val = 0 val = 0
for (junk, person_handle) in slist: for (junk, person_handle) in slist: