From 6db39b590d5dd3692686582b8421fbaa1ea10877 Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Tue, 9 May 2006 13:07:33 +0000 Subject: [PATCH] sort texts in completion list --- src/dialogs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dialogs.py b/src/dialogs.py index 30c84d0ff..80f9b1d03 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -1002,7 +1002,9 @@ class NewChatDialog(InputDialog): liststore = gtkgui_helpers.get_completion_liststore(self.input_entry) self.completion_dict = helpers.get_contact_dict_for_account(account) # add all contacts to the model - for jid in self.completion_dict.keys(): + keys = self.completion_dict.keys() + keys.sort() + for jid in keys: contact = self.completion_dict[jid] img = gajim.interface.roster.jabber_state_images['16'][contact.show] liststore.append((img.get_pixbuf(), jid)) @@ -1246,7 +1248,9 @@ class SingleMessageWindow: if to == '': liststore = gtkgui_helpers.get_completion_liststore(self.to_entry) self.completion_dict = helpers.get_contact_dict_for_account(account) - for jid in self.completion_dict.keys(): + keys = self.completion_dict.keys() + keys.sort() + for jid in keys: contact = self.completion_dict[jid] img = gajim.interface.roster.jabber_state_images['16'][ contact.show]