diff options
author | Sushma Rai <rsushma@src.gnome.org> | 2005-05-09 17:23:14 +0800 |
---|---|---|
committer | Sushma Rai <rsushma@src.gnome.org> | 2005-05-09 17:23:14 +0800 |
commit | 2b7464339fdfb4fea0e829a09820254f31bfce5b (patch) | |
tree | 6f39747cebb18d83a550035a6ea5f6cdecead89c /addressbook/gui/widgets | |
parent | 1b1a7588bd0ed2b4a32c4f05bcdfadd70c980f97 (diff) | |
download | gsoc2013-evolution-2b7464339fdfb4fea0e829a09820254f31bfce5b.tar.gz gsoc2013-evolution-2b7464339fdfb4fea0e829a09820254f31bfce5b.tar.zst gsoc2013-evolution-2b7464339fdfb4fea0e829a09820254f31bfce5b.zip |
Forming contact deletion confirmation message based on contact(s) or
contact list(s) being deleted. Fixes #222599
svn path=/trunk/; revision=29317
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index d98c328cc6..dd36b03ee2 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1854,11 +1854,27 @@ void eab_view_delete_selection(EABView *view) { GList *list, *l; + gboolean plural = FALSE, is_list = FALSE; + EContact *contact; + char *name = NULL; + + list = get_selected_contacts (view); + contact = list->data; + + if (g_list_next(list)) + plural = TRUE; + else + name = e_contact_get (contact, E_CONTACT_FILE_AS); + + if (e_contact_get (contact, E_CONTACT_IS_LIST)) + is_list = TRUE; - if (!eab_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(view->widget)))) + if (!eab_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(view->widget)), + plural, is_list, name)) { + g_free (name); return; + } - list = get_selected_contacts(view); if (e_book_check_static_capability (view->book, "bulk-remove")) { GList *ids = NULL; |