From 732e5a039a74024b353936e3626f6180db3516f5 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Mon, 26 May 2008 09:53:09 +0000 Subject: [PATCH 1/1] * Fixes NB#85819, block in information banner when retrieving from global search fails pmo-trunk-r4565 --- src/dbus_api/modest-dbus-callbacks.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/dbus_api/modest-dbus-callbacks.c b/src/dbus_api/modest-dbus-callbacks.c index a1186eb..0c155b3 100644 --- a/src/dbus_api/modest-dbus-callbacks.c +++ b/src/dbus_api/modest-dbus-callbacks.c @@ -71,7 +71,6 @@ typedef struct static gboolean notify_error_in_dbus_callback (gpointer user_data); -static gboolean notify_msg_not_found_in_idle (gpointer user_data); static gboolean on_idle_compose_mail(gpointer user_data); static gboolean on_idle_top_application (gpointer user_data); @@ -448,7 +447,8 @@ find_msg_async_cb (TnyFolder *folder, OpenMsgPerformerInfo *info = (OpenMsgPerformerInfo *) user_data; if (err || cancelled) { - g_idle_add (notify_msg_not_found_in_idle, NULL); + modest_platform_run_information_dialog (NULL, _("mail_ni_ui_folder_get_msg_folder_error"), TRUE); + g_idle_add (notify_error_in_dbus_callback, NULL); goto end; } @@ -456,7 +456,8 @@ find_msg_async_cb (TnyFolder *folder, if (header && (tny_header_get_flags (header) & TNY_HEADER_FLAG_DELETED)) { g_object_unref (header); g_object_unref (msg); - g_idle_add (notify_msg_not_found_in_idle, NULL); + modest_platform_run_information_dialog (NULL, _("mail_ni_ui_folder_get_msg_folder_error"), TRUE); + g_idle_add (notify_error_in_dbus_callback, NULL); goto end; } @@ -577,7 +578,8 @@ on_open_message_performer (gboolean canceled, info = (OpenMsgPerformerInfo *) user_data; if (canceled || err) { - g_idle_add (notify_msg_not_found_in_idle, NULL); + modest_platform_run_information_dialog (NULL, _("mail_ni_ui_folder_get_msg_folder_error"), TRUE); + g_idle_add (notify_error_in_dbus_callback, NULL); on_find_msg_async_destroy (info); return; } @@ -596,7 +598,8 @@ on_open_message_performer (gboolean canceled, folder = tny_store_account_find_folder (TNY_STORE_ACCOUNT (account), info->uri, NULL); } if (!folder) { - g_idle_add (notify_msg_not_found_in_idle, NULL); + modest_platform_run_information_dialog (NULL, _("mail_ni_ui_folder_get_msg_folder_error"), TRUE); + g_idle_add (notify_error_in_dbus_callback, NULL); on_find_msg_async_destroy (info); return; } @@ -1868,13 +1871,3 @@ notify_error_in_dbus_callback (gpointer user_data) return FALSE; } - -static gboolean -notify_msg_not_found_in_idle (gpointer user_data) -{ - modest_platform_run_information_dialog (NULL, _("mail_ni_ui_folder_get_msg_folder_error"), FALSE); - - g_idle_add (notify_error_in_dbus_callback, NULL); - - return FALSE; -} -- 1.7.9.5