From 7dfef4ad7aec59b4d33ab7294f2c2f527681f3aa Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Fri, 9 Jan 2009 12:00:50 +0000 Subject: [PATCH] * Fixed NB#97137, set the progress hint to false when the mail operation finishes pmo-trunk-r7088 --- src/hildon2/modest-header-window.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/hildon2/modest-header-window.c b/src/hildon2/modest-header-window.c index 65e2973..d523dfb 100644 --- a/src/hildon2/modest-header-window.c +++ b/src/hildon2/modest-header-window.c @@ -803,15 +803,25 @@ on_mail_operation_finished (ModestMailOperation *mail_op, { ModestHeaderWindow *self; ModestMailOperationTypeOperation op_type; - + GSList *operations = NULL; + ModestMailOperationQueue *queue; + self = MODEST_HEADER_WINDOW (user_data); op_type = modest_mail_operation_get_type_operation (mail_op); - - /* If no more operations are being observed, NORMAL mode is enabled again */ - if (modest_mail_operation_queue_num_elements (modest_runtime_get_mail_operation_queue ()) == 0) { + + queue = modest_runtime_get_mail_operation_queue (); + operations = modest_mail_operation_queue_get_by_source (queue, user_data); + + /* There should be at least the current one */ + if (!operations) + g_return_if_reached (); + + /* Don't disable the progress hint if there are more pending + operations from this window */ + if (g_slist_length (operations) == 1) set_progress_hint (self, FALSE); - } - + + g_slist_free (operations); modest_ui_actions_check_menu_dimming_rules (MODEST_WINDOW (self)); } -- 1.7.9.5