[evolution] Bug #670445 - Folder deletion in offline shows strange behavior
- From: Vibha Yadav <yvibha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #670445 - Folder deletion in offline shows strange behavior
- Date: Thu, 29 Mar 2012 06:48:20 +0000 (UTC)
commit 954b3f1cc496f469ce0472db87caafccbfa947da
Author: Vibha Yadav <yvibha suse com>
Date: Thu Mar 29 12:15:06 2012 +0530
Bug #670445 - Folder deletion in offline shows strange behavior
Providing a check for online backend before proceeding for the operation.
mail/e-mail-reader-utils.c | 12 ++++++++++++
mail/mail.error.xml | 5 +++++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index 5956ab2..54c588b 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -195,6 +195,7 @@ e_mail_reader_delete_folder (EMailReader *reader,
{
EMailBackend *backend;
EMailSession *session;
+ EShell *shell;
EAlertSink *alert_sink;
CamelStore *parent_store;
MailFolderCache *folder_cache;
@@ -231,6 +232,17 @@ e_mail_reader_delete_folder (EMailReader *reader,
return;
}
+ shell = e_shell_backend_get_shell (E_SHELL_BACKEND (backend));
+
+ if(!store_is_local && !e_shell_get_online (shell))
+ {
+ e_alert_submit (
+ alert_sink, "mail:online-operation",
+ display_name, NULL);
+ return;
+ }
+
+
have_flags = mail_folder_cache_get_folder_info_flags (
folder_cache, folder, &flags);
diff --git a/mail/mail.error.xml b/mail/mail.error.xml
index b5a714f..3a9dab5 100644
--- a/mail/mail.error.xml
+++ b/mail/mail.error.xml
@@ -525,5 +525,10 @@ An mbox account will be created to preserve the old mbox folders. You can delete
<_secondary>The printer replied "{0}".</_secondary>
</error>
+ <error id="online-operation" type="error">
+ <_primary>Could not perform this operation on {0}.</_primary>
+ <_secondary xml:space="preserve">You must be working online to complete this operation.</_secondary>
+ </error>
+
</error-list>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]