From: Jose Dapena Paz Date: Thu, 19 Jul 2007 15:13:51 +0000 (+0000) Subject: * src/modest-ui-actions.c: X-Git-Tag: git_migration_finished~2787 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=515cdbfe21f95958818325f61e72d454222ed8c5 * src/modest-ui-actions.c: * (folder_refreshed_cb): Now I check if the folder refreshed message corresponds to the currently selected folder in header view. This should prevent showing the empty folder message for a populated folder when other folder request finishes later. pmo-trunk-r2754 --- diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 29c1280..e144aa4 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -1671,6 +1671,7 @@ folder_refreshed_cb (ModestMailOperation *mail_op, { ModestMainWindow *win = NULL; GtkWidget *header_view; + TnyFolder *current_folder; g_return_if_fail (TNY_IS_FOLDER (folder)); @@ -1678,6 +1679,13 @@ folder_refreshed_cb (ModestMailOperation *mail_op, header_view = modest_main_window_get_child_widget(win, MODEST_WIDGET_TYPE_HEADER_VIEW); + if (header_view) { + current_folder = modest_header_view_get_folder (MODEST_HEADER_VIEW (header_view)); + if (current_folder != NULL && folder != current_folder) { + return; + } + } + /* Check if folder is empty and set headers view contents style */ if (tny_folder_get_all_count (folder) == 0) { printf ("DEBUG: %s: tny_folder_get_all_count() returned 0.\n", __FUNCTION__);