Skip to content

Commit

Permalink
[core] Added confirmation window when deleting a contact, how could i…
Browse files Browse the repository at this point in the history
… forget??
  • Loading branch information
luckyluke committed Aug 3, 2009
1 parent 78777dc commit 07b1222
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion amsn2/core/contactlist_manager.py
Expand Up @@ -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)
Expand Down

0 comments on commit 07b1222

Please sign in to comment.