From 71b5ef7609550410f7e0ffeb1e8471fcdf9af511 Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Tue, 17 Mar 2009 20:45:54 +0000 Subject: [PATCH] Show also "device memory full" banner in view attachments case. pmo-trunk-r8128 --- src/hildon2/modest-msg-view-window.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/hildon2/modest-msg-view-window.c b/src/hildon2/modest-msg-view-window.c index d8526de..49598d3 100644 --- a/src/hildon2/modest-msg-view-window.c +++ b/src/hildon2/modest-msg-view-window.c @@ -2426,8 +2426,17 @@ on_decode_to_stream_async_handler (TnyMimePart *mime_part, gchar *filepath = (gchar *) user_data; if (cancelled || err) { - modest_platform_information_banner (NULL, NULL, - _("mail_ib_file_operation_failed")); + if (err) { + if ((err->domain == TNY_ERROR_DOMAIN) && + (err->code == TNY_IO_ERROR_WRITE) && + (errno == ENOSPC)) { + modest_platform_information_banner (NULL, NULL, + _KR("cerm_device_memory_full")); + } else { + modest_platform_information_banner (NULL, NULL, + _("mail_ib_file_operation_failed")); + } + } goto free; } @@ -2633,7 +2642,7 @@ save_mime_part_to_file (SaveMimePartInfo *info) g_warning ("modest: could not save attachment %s: %d (%s)\n", pair->filename, error?error->code:-1, error?error->message:"Unknown error"); if ((error->domain == TNY_ERROR_DOMAIN) && - (error->code = TNY_IO_ERROR_WRITE) && + (error->code == TNY_IO_ERROR_WRITE) && (errno == ENOSPC)) { info->result = GNOME_VFS_ERROR_NO_SPACE; } else { -- 1.7.9.5