Bug #670445 - Folder deletion in offline shows strange behavior

Providing a check for online backend before proceeding for the operation.
This commit is contained in:
Vibha Yadav
2012-03-29 12:15:06 +05:30
parent afb3db076d
commit 954b3f1cc4
2 changed files with 17 additions and 0 deletions
+12
View File
@@ -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);
+5
View File
@@ -525,5 +525,10 @@ An mbox account will be created to preserve the old mbox folders. You can delete
<_secondary>The printer replied &quot;{0}&quot;.</_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>