replace refs to locale.strcoll with refs to locale.strxfrm

svn: r12712
This commit is contained in:
Gerald Britton 2009-06-25 21:09:49 +00:00
parent 3a41651e50
commit b0a6f7c854
4 changed files with 8 additions and 8 deletions

View File

@ -93,7 +93,7 @@ class NodeTreeMap(object):
self.temp_sname_sub = {}
def build_toplevel(self):
self.temp_top_path2iter = sorted(self.temp_sname_sub, locale.strcoll)
self.temp_top_path2iter = sorted(self.temp_sname_sub, key=locale.strxfrm)
for name in self.temp_top_path2iter:
self.build_sub_entry(name)

View File

@ -91,11 +91,12 @@ class ShowResults(ManagedWindow.ManagedWindow):
self.get_widget('close').connect('clicked', self.close)
new_list = [self.sort_val_from_handle(h) for h in handle_list]
new_list.sort(lambda x, y: locale.strcoll(x[0], y[0]))
handle_list = [ h[1] for h in new_list ]
new_list = sorted(
(self.sort_val_from_handle(h) for h in handle_list),
key=lambda x: locale.strxfrm(x[0])
)
for handle in handle_list:
for s_, handle in new_list:
name, gid = self.get_name_id(handle)
model.append(row=[name, gid])

View File

@ -1911,7 +1911,7 @@ class GrampsDbBase(Callback):
raise NotImplementedError
def sort_surname_list(self):
self.surname_list.sort(locale.strcoll)
self.surname_list.sort(key=locale.strxfrm)
def add_to_surname_list(self, person, batch_transaction):
if batch_transaction:

View File

@ -77,8 +77,7 @@ class ChangeTypes(Tool.BatchTool, ManagedWindow.ManagedWindow):
# Need to display localized event names
etype = EventType()
event_names = etype.get_standard_names()
event_names.sort(locale.strcoll)
event_names = sorted(etype.get_standard_names(), key=locale.strxfrm)
AutoComp.fill_combo(self.auto1,event_names)
AutoComp.fill_combo(self.auto2,event_names)