From eb10d38708a6c4ff3dd24c2dd696991be9ba318f Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 19 Feb 2006 23:05:00 +0000 Subject: [PATCH] do not allow to move a contact to transport or not in roster group. Fixes #1571 --- src/roster_window.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/roster_window.py b/src/roster_window.py index 3ae4dcc28..2c5723baf 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -2742,6 +2742,8 @@ _('If "%s" accepts this request you will know his or her status.') % jid) # Get destination group if type_dest == 'group': grp_dest = model[iter_dest][C_JID].decode('utf-8') + if grp_dest == _('Transports') or grp_dest == _('Not in Roster'): + return if context.action == gtk.gdk.ACTION_COPY: self.on_drop_in_group(None, account, c_source, grp_dest, context, etime) @@ -2751,7 +2753,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid) return else: it = iter_dest - while model[it][C_TYPE] == 'contact': + while model[it][C_TYPE] != 'group': it = model.iter_parent(it) grp_dest = model[it][C_JID].decode('utf-8') if grp_dest == _('Transports') or grp_dest == _('Not in Roster'):