* src/modest-ui-actions.c:
authorAlberto Garcia <agarcia@igalia.com>
Wed, 13 Feb 2008 18:30:10 +0000 (18:30 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Wed, 13 Feb 2008 18:30:10 +0000 (18:30 +0000)
(modest_ui_actions_get_msgs_full_error_handler)
* src/widgets/modest-header-view.c:
(refresh_folder_error_handler)
Don't show an error message if the mail operation has been
cancelled, because that's not an error.

pmo-trunk-r4172

src/modest-ui-actions.c
src/widgets/modest-header-view.c

index f5ecd14..d3cd601 100644 (file)
@@ -978,9 +978,13 @@ modest_ui_actions_get_msgs_full_error_handler (ModestMailOperation *mail_op,
        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"));
+               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) {
+                       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);
index 3080d94..0d93336 100644 (file)
@@ -1194,9 +1194,13 @@ refresh_folder_error_handler (ModestMailOperation *mail_op,
        if (error->code == TNY_SYSTEM_ERROR_MEMORY ||
            error->code == TNY_IO_ERROR_WRITE ||
            error->code == TNY_IO_ERROR_READ) {
-               modest_platform_information_banner (NULL, NULL, 
-                                                   dgettext("ke-recv", 
-                                                            "cerm_device_memory_full"));
+               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) {
+                       modest_platform_information_banner (NULL, NULL,
+                                                           dgettext("ke-recv",
+                                                                    "cerm_device_memory_full"));
+               }
        }
 }