diff options
author | Viswanath Sivakumar <viswanathgs@gmail.com> | 2010-02-22 18:59:23 +0800 |
---|---|---|
committer | Bharath Acharya <abharath@novell.com> | 2010-02-22 18:59:23 +0800 |
commit | 8785fd3315996dffceec133f94096577a5547cbc (patch) | |
tree | ea567426ee8289d16c06255271b528c137cefeb5 /mail | |
parent | 6c56bea75fb7915b9634af52e82a79be98658265 (diff) | |
download | gsoc2013-evolution-8785fd3315996dffceec133f94096577a5547cbc.tar gsoc2013-evolution-8785fd3315996dffceec133f94096577a5547cbc.tar.gz gsoc2013-evolution-8785fd3315996dffceec133f94096577a5547cbc.tar.bz2 gsoc2013-evolution-8785fd3315996dffceec133f94096577a5547cbc.tar.lz gsoc2013-evolution-8785fd3315996dffceec133f94096577a5547cbc.tar.xz gsoc2013-evolution-8785fd3315996dffceec133f94096577a5547cbc.tar.zst gsoc2013-evolution-8785fd3315996dffceec133f94096577a5547cbc.zip |
Bug 546551 - Dialog for deleting mail folders always mentions subfolders.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/em-folder-utils.c | 10 | ||||
-rw-r--r-- | mail/mail.error.xml | 13 |
2 files changed, 22 insertions, 1 deletions
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 <button stock="gtk-delete" response="GTK_RESPONSE_OK"/> </error> + <error id="ask-delete-folder-nochild" type="question" default="GTK_RESPONSE_CANCEL"> + <_primary>Really delete folder "{0}"?</_primary> + <_secondary xml:space="preserve">If you delete the folder, all of its contents will be deleted permanently.</_secondary> + <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/> + <button stock="gtk-delete" response="GTK_RESPONSE_OK"/> + </error> + + <error id="ask-delete-vfolder-nochild" type="question" default="GTK_RESPONSE_CANCEL"> + <_primary>Really delete folder "{0}"?</_primary> + <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/> + <button stock="gtk-delete" response="GTK_RESPONSE_OK"/> + </error> + <error id="ask-delete-vfolder-msg" type="question" default="GTK_RESPONSE_CANCEL"> <_primary>Delete messages in Search Folder "{0}"?</_primary> <_secondary xml:space="preserve">Warning: Deleting messages from a Search Folder will delete the actual message from one of your local or remote folders. |