From 2ca94a530a68c8aa3b60b3602bf99b11d52ca7dc Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard <jim@lapin.org> Date: Mon, 20 Nov 2006 22:22:30 +0000 Subject: [PATCH] Fix send message to group. Delete duplicate code --- src/roster_window.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 98fa0906b8..be4cfcb216 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1064,17 +1064,9 @@ def add_bookmarks_list(self, gc_sub_menu, account): gc_sub_menu.append(item) def _change_style(self, model, path, iter, option): - if option is None: + if option is None or model[iter][C_TYPE] == option: + # We changed style for this type of row model[iter][C_NAME] = model[iter][C_NAME] - elif model[iter][C_TYPE] == 'account': - if option == 'account': - model[iter][C_NAME] = model[iter][C_NAME] - elif model[iter][C_TYPE] == 'group': - if option == 'group': - model[iter][C_NAME] = model[iter][C_NAME] - elif model[iter][C_TYPE] == 'contact': - if option == 'contact': - model[iter][C_NAME] = model[iter][C_NAME] def change_roster_style(self, option): model = self.tree.get_model() @@ -2067,7 +2059,7 @@ def make_group_menu(self, event, iter): list_ = [] # list of (jid, account) tuples list_online = [] # list of (jid, account) tuples - group = model[iter][C_NAME] + group = model[iter][C_JID] for jid in gajim.contacts.get_jid_list(account): contact = gajim.contacts.get_contact_with_highest_priority(account, jid) -- GitLab