From 8ca5792b97f766704fc7f3506bf8d5f28a610848 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Fri, 21 Nov 2008 14:41:32 +0000 Subject: [PATCH] Fix of issue 2504, sorting in WinXP. svn: r11326 --- src/DisplayModels/_BaseModel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DisplayModels/_BaseModel.py b/src/DisplayModels/_BaseModel.py index e1ff27b01..aef66ca1e 100644 --- a/src/DisplayModels/_BaseModel.py +++ b/src/DisplayModels/_BaseModel.py @@ -265,9 +265,9 @@ class BaseModel(gtk.GenericTreeModel): (self.search and self.search.match(handle, self.db)): data = self.map(handle) - key = locale.strxfrm(self.sort_func(data)) - self.sort_data.append((key, handle)) - self.sort_data.sort(reverse=self.reverse) + self.sort_data.append((self.sort_func(data), handle)) + self.sort_data.sort(lambda x, y: locale.strcoll(x[0], y[0]), + reverse=self.reverse) self.node_map.set_path_map([ x[1] for x in self.sort_data ]) index = self.node_map.get_path(handle)