From 8785fd3315996dffceec133f94096577a5547cbc Mon Sep 17 00:00:00 2001 From: Viswanath Sivakumar Date: Mon, 22 Feb 2010 16:29:23 +0530 Subject: Bug 546551 - Dialog for deleting mail folders always mentions subfolders. --- mail/em-folder-utils.c | 10 +++++++++- mail/mail.error.xml | 13 +++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'mail') diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index 5544d03e70..2ab31e3827 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -460,9 +460,17 @@ em_folder_utils_delete_folder (CamelFolder *folder) camel_object_ref (folder); - dialog = e_alert_dialog_new_for_args (parent, + if (mail_folder_cache_get_folder_info_flags (mail_folder_cache_get_default (), folder, &flags) && (flags & CAMEL_FOLDER_CHILDREN)) { + dialog = e_alert_dialog_new_for_args (parent, (folder->parent_store && CAMEL_IS_VEE_STORE(folder->parent_store))?"mail:ask-delete-vfolder":"mail:ask-delete-folder", folder->full_name, NULL); + } + else { + dialog = e_alert_dialog_new_for_args (parent, + (folder->parent_store && CAMEL_IS_VEE_STORE(folder->parent_store))?"mail:ask-delete-vfolder-nochild":"mail:ask-delete-folder-nochild", + folder->full_name, NULL); + } + g_object_set_data_full ((GObject *) dialog, "folder", folder, camel_object_unref); g_signal_connect (dialog, "response", G_CALLBACK (emfu_delete_response), NULL); gtk_widget_show (dialog); diff --git a/mail/mail.error.xml b/mail/mail.error.xml index 6f7b62b615..ef1b5dac94 100644 --- a/mail/mail.error.xml +++ b/mail/mail.error.xml @@ -203,6 +203,19 @@ Many email systems add an Apparently-To header to messages that only have BCC re