From 6e28ab71050d755e650637a224dffd5ccbeb5729 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Fri, 16 Oct 2009 12:37:26 +0200 Subject: [PATCH] Fixes NB#139404, download remote message attachments and open them from modest --- src/hildon2/modest-msg-view-window.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/hildon2/modest-msg-view-window.c b/src/hildon2/modest-msg-view-window.c index 19dcb68..b45d4f6 100644 --- a/src/hildon2/modest-msg-view-window.c +++ b/src/hildon2/modest-msg-view-window.c @@ -2580,10 +2580,6 @@ on_decode_to_stream_async_handler (TnyMimePart *mime_part, DecodeAsyncHelper *helper = (DecodeAsyncHelper *) user_data; const gchar *content_type; - /* It could happen that the window was closed */ - if (GTK_WIDGET_VISIBLE (helper->self)) - set_progress_hint (helper->self, FALSE); - if (cancelled || err) { if (err) { gchar *msg; @@ -2600,6 +2596,14 @@ on_decode_to_stream_async_handler (TnyMimePart *mime_part, goto free; } + /* It could happen that the window was closed. So we + assume it is a cancelation */ + if (!GTK_WIDGET_VISIBLE (helper->self)) + goto free; + + /* Remove the progress hint */ + set_progress_hint (helper->self, FALSE); + content_type = tny_mime_part_get_content_type (mime_part); if (g_str_has_prefix (content_type, "message/rfc822")) { ModestWindowMgr *mgr; -- 1.7.9.5