aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-reader-utils.c
diff options
context:
space:
mode:
authorVibha Yadav <yvibha@suse.com>2012-03-29 14:45:06 +0800
committerVibha Yadav <yvibha@suse.com>2012-03-29 14:45:06 +0800
commit954b3f1cc496f469ce0472db87caafccbfa947da (patch)
tree3047d85f272254b41ffd02536aa565a3bc0964a2 /mail/e-mail-reader-utils.c
parentafb3db076d573e52d634c7d5e2d40d8da9785941 (diff)
downloadgsoc2013-evolution-954b3f1cc496f469ce0472db87caafccbfa947da.tar
gsoc2013-evolution-954b3f1cc496f469ce0472db87caafccbfa947da.tar.gz
gsoc2013-evolution-954b3f1cc496f469ce0472db87caafccbfa947da.tar.bz2
gsoc2013-evolution-954b3f1cc496f469ce0472db87caafccbfa947da.tar.lz
gsoc2013-evolution-954b3f1cc496f469ce0472db87caafccbfa947da.tar.xz
gsoc2013-evolution-954b3f1cc496f469ce0472db87caafccbfa947da.tar.zst
gsoc2013-evolution-954b3f1cc496f469ce0472db87caafccbfa947da.zip
Bug #670445 - Folder deletion in offline shows strange behavior
Providing a check for online backend before proceeding for the operation.
Diffstat (limited to 'mail/e-mail-reader-utils.c')
-rw-r--r--mail/e-mail-reader-utils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index 5956ab209d..54c588b9c9 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);