changeset d0ffcb0c86f0 in /home/hg/repos/gajim
author: Yann Leboulanger asterix@lagaule.org branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=d0ffcb0c86f0 description: don't allow to delete contacts from an offline account. Fixes #7822
diffstat:
src/roster_window.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diffs (17 lines):
diff -r f5e94ba22b4c -r d0ffcb0c86f0 src/roster_window.py --- a/src/roster_window.py Mon Sep 15 14:03:52 2014 +0200 +++ b/src/roster_window.py Fri Oct 03 22:48:14 2014 +0200 @@ -3441,9 +3441,13 @@ return jid = model[path][C_JID].decode('utf-8') account = model[path][C_ACCOUNT].decode('utf-8') + if not gajim.account_is_connected(account): + continue contact = gajim.contacts.get_contact_with_highest_priority( account, jid) list_.append((contact, account)) + if not list_: + return if type_ == 'contact': self.on_req_usub(widget, list_) elif type_ == 'agent':