just delete the iter without sending anything to the server when we delete the server contact
This commit is contained in:
parent
4d661b5042
commit
8bc5c2fe04
|
@ -688,6 +688,13 @@ class RosterWindow:
|
||||||
|
|
||||||
def on_remove_agent(self, widget, contact, account):
|
def on_remove_agent(self, widget, contact, account):
|
||||||
'''When an agent is requested to log in or off'''
|
'''When an agent is requested to log in or off'''
|
||||||
|
if gajim.config.get_per('accounts', account, 'hostname') == contact.jid:
|
||||||
|
# We remove the server contact
|
||||||
|
# remove it from treeview
|
||||||
|
self.remove_contact(contact, account)
|
||||||
|
del gajim.contacts[account][contact.jid]
|
||||||
|
return
|
||||||
|
|
||||||
window = dialogs.ConfirmationDialog(_('Transport "%s" will be removed') % contact.jid, _('You will no longer be able to send and receive messages to contacts from %s.' % contact.jid))
|
window = dialogs.ConfirmationDialog(_('Transport "%s" will be removed') % contact.jid, _('You will no longer be able to send and receive messages to contacts from %s.' % contact.jid))
|
||||||
if window.get_response() == gtk.RESPONSE_OK:
|
if window.get_response() == gtk.RESPONSE_OK:
|
||||||
gajim.connections[account].unsubscribe_agent(contact.jid + '/' \
|
gajim.connections[account].unsubscribe_agent(contact.jid + '/' \
|
||||||
|
|
Loading…
Reference in New Issue