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:
@@ -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);
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user