Proper error message on saving attachments on plugins (fix 2/3 NB#139404).
authorJose Dapena Paz <jdapena@igalia.com>
Fri, 18 Sep 2009 14:10:50 +0000 (16:10 +0200)
committerJose Dapena Paz <jdapena@igalia.com>
Fri, 18 Sep 2009 15:22:27 +0000 (17:22 +0200)
src/hildon2/modest-msg-view-window.c

index d7719ed..adf3b08 100644 (file)
@@ -2584,7 +2584,14 @@ on_decode_to_stream_async_handler (TnyMimePart *mime_part,
 
        if (cancelled || err) {
                if (err) {
-                       gchar *msg = g_strdup_printf (_KR("cerm_device_memory_full"), "");
+                       gchar *msg;
+                       if ((err->domain == TNY_ERROR_DOMAIN) && 
+                           (err->code == TNY_IO_ERROR_WRITE) &&
+                           (errno == ENOSPC)) {
+                               msg = g_strdup_printf (_KR("cerm_device_memory_full"), "");
+                       } else {
+                               msg = g_strdup (_("mail_ib_file_operation_failed"));
+                       }
                        modest_platform_information_banner (NULL, NULL, msg);
                        g_free (msg);
                }