diff --git a/amsn2/core/contactlist_manager.py b/amsn2/core/contactlist_manager.py index 2806d4a2..6bf9f9b7 100644 --- a/amsn2/core/contactlist_manager.py +++ b/amsn2/core/contactlist_manager.py @@ -85,8 +85,13 @@ def onContactAdded(self, contact): self._core._gui.gui.aMSNNotificationWindow("Contact %s added!" % contact.account) def removeContact(self, uid): - self._papyon_addressbook.delete_contact(self._papyon_addressbook.contacts. + def cb_ok(): + self._papyon_addressbook.delete_contact(self._papyon_addressbook.contacts. search_by('id', uid)[0]) + # call the UImanager for all the dialogs + self._core._gui.gui.aMSNDialogWindow('Are you sure you want to remove the contact %s?' + % self._papyon_addressbook.contacts.search_by('id', uid)[0].account, + (('OK', cb_ok), ('Cancel', lambda : ''))) def onContactRemoved(self, contact): self._removeContactFromGroups(contact.id)