aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor/eab-editor.c
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2005-05-09 17:23:14 +0800
committerSushma Rai <rsushma@src.gnome.org>2005-05-09 17:23:14 +0800
commit2b7464339fdfb4fea0e829a09820254f31bfce5b (patch)
tree6f39747cebb18d83a550035a6ea5f6cdecead89c /addressbook/gui/contact-editor/eab-editor.c
parent1b1a7588bd0ed2b4a32c4f05bcdfadd70c980f97 (diff)
downloadgsoc2013-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/contact-editor/eab-editor.c')
-rw-r--r--addressbook/gui/contact-editor/eab-editor.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c
index 8f03352af0..65b985c153 100644
--- a/addressbook/gui/contact-editor/eab-editor.c
+++ b/addressbook/gui/contact-editor/eab-editor.c
@@ -311,23 +311,35 @@ eab_editor_get_all_editors (void)
}
gboolean
-eab_editor_confirm_delete (GtkWindow *parent)
+eab_editor_confirm_delete (GtkWindow *parent, gboolean plural, gboolean is_list, char *name)
{
GtkWidget *dialog;
gint result;
+ char *msg;
+
+ if (is_list) {
+ /* contact list(s) */
+ if (!plural)
+ msg = g_strdup_printf (_("Are you sure you want\nto delete contact list (%s) ?"),
+ name);
+ else
+ msg = g_strdup (_("Are you sure you want\nto delete these contact lists?"));
+ }
+ else {
+ /* contact(s) */
+ if (!plural)
+ msg = g_strdup_printf (_("Are you sure you want\nto delete contact (%s) ?"),
+ name);
+ else
+ msg = g_strdup (_("Are you sure you want\nto delete these contacts?"));
+ }
dialog = gtk_message_dialog_new (parent,
0,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_NONE,
-#if notyet
- /* XXX we really need to handle the plural case here.. */
- (plural
- ? _("Are you sure you want\n"
- "to delete these contacts?"))
-#endif
- _("Are you sure you want\n"
- "to delete this contact?"));
+ msg);
+ g_free (msg);
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,