* Do not show error messages when the message retrieval is canceled
pmo-trunk-r4312
}
/* If canceled by the user, ignore the error given by Tinymail */
}
/* If canceled by the user, ignore the error given by Tinymail */
- if (priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED) {
+ if (priv->status == MODEST_MAIL_OPERATION_STATUS_CANCELED || canceled) {
canceled = TRUE;
finished = TRUE;
canceled = TRUE;
finished = TRUE;
- } else if (canceled || err) {
priv->status = MODEST_MAIL_OPERATION_STATUS_FINISHED_WITH_ERRORS;
if (err) {
priv->error = g_error_copy ((const GError *) err);
priv->status = MODEST_MAIL_OPERATION_STATUS_FINISHED_WITH_ERRORS;
if (err) {
priv->error = g_error_copy ((const GError *) err);
/* Notify the observers */
g_signal_emit (G_OBJECT (self), signals [ACCOUNT_REMOVED_SIGNAL],
0, account);
/* Notify the observers */
g_signal_emit (G_OBJECT (self), signals [ACCOUNT_REMOVED_SIGNAL],
0, account);
-
- /* Unref the extra reference added by get_server_account */
- g_object_unref (account);
/* Cancel all pending operations */
tny_account_cancel (TNY_ACCOUNT (account));
/* Cancel all pending operations */
tny_account_cancel (TNY_ACCOUNT (account));
+
+ /* Unref the extra reference added by get_server_account */
+ g_object_unref (account);
/* Clear the cache if it's an store account */
if (TNY_IS_STORE_ACCOUNT (account))
/* Clear the cache if it's an store account */
if (TNY_IS_STORE_ACCOUNT (account))
/* If there was any problem creating the account, for example,
with the configuration system this could not exist */
if (store_account) {
/* If there was any problem creating the account, for example,
with the configuration system this could not exist */
if (store_account) {
+ /* Cancel all pending operations */
+ tny_account_cancel (TNY_ACCOUNT (store_account));
+
/* Disconnect before deleting the cache, because the
disconnection will rewrite the cache to the
disk */
/* Disconnect before deleting the cache, because the
disconnection will rewrite the cache to the
disk */
g_warning ("Removing a transport account that has no outbox");
}
g_warning ("Removing a transport account that has no outbox");
}
+ /* Cancel all pending operations */
+ tny_account_cancel (TNY_ACCOUNT (transport_account));
+
/* Disconnect and notify the observers. The callback will free the reference */
tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (transport_account), FALSE,
on_account_disconnect_when_removing, self);
/* Disconnect and notify the observers. The callback will free the reference */
tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (transport_account), FALSE,
on_account_disconnect_when_removing, self);
{
const GError *error;
GObject *win = NULL;
{
const GError *error;
GObject *win = NULL;
+ ModestMailOperationStatus status;
win = modest_mail_operation_get_source (mail_op);
error = modest_mail_operation_get_error (mail_op);
win = modest_mail_operation_get_source (mail_op);
error = modest_mail_operation_get_error (mail_op);
+ status = modest_mail_operation_get_status (mail_op);
- /* Show error */
- if (error->code == TNY_SYSTEM_ERROR_MEMORY ||
- error->code == TNY_IO_ERROR_WRITE ||
- error->code == TNY_IO_ERROR_READ) {
- ModestMailOperationStatus st = modest_mail_operation_get_status (mail_op);
- /* If the mail op has been cancelled then it's not an error: don't show any message */
- if (st != MODEST_MAIL_OPERATION_STATUS_CANCELED) {
+ /* If the mail op has been cancelled then it's not an error:
+ don't show any message */
+ if (status != MODEST_MAIL_OPERATION_STATUS_CANCELED) {
+ /* Show error */
+ if (error->code == TNY_SYSTEM_ERROR_MEMORY ||
+ error->code == TNY_IO_ERROR_WRITE ||
+ error->code == TNY_IO_ERROR_READ) {
modest_platform_information_banner ((GtkWidget *) win,
NULL, dgettext("ke-recv",
"cerm_device_memory_full"));
modest_platform_information_banner ((GtkWidget *) win,
NULL, dgettext("ke-recv",
"cerm_device_memory_full"));
+ } else if (user_data) {
+ modest_platform_information_banner ((GtkWidget *) win,
+ NULL, user_data);
- } else if (user_data) {
- modest_platform_information_banner ((GtkWidget *) win,
- NULL, user_data);