From 8e43419e3de0dc6b9afde4f309c3fe25b1e12286 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Fri, 19 Oct 2007 16:51:22 +0000 Subject: [PATCH] * Remove some invalid code from the D-Bus callback, the refresh of the current folder was automatically done by the ui acti on * Do not refresh the current folder when send&receive unless we're viewing any window * Reverted a method to static pmo-trunk-r3542 --- src/dbus_api/modest-dbus-callbacks.c | 5 ----- src/modest-ui-actions.c | 8 +++++--- src/modest-ui-actions.h | 3 --- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/dbus_api/modest-dbus-callbacks.c b/src/dbus_api/modest-dbus-callbacks.c index 51cc6d1..83c8dbd 100644 --- a/src/dbus_api/modest-dbus-callbacks.c +++ b/src/dbus_api/modest-dbus-callbacks.c @@ -790,11 +790,6 @@ on_idle_send_receive(gpointer user_data) /* Pick the main window if it exists */ win = modest_window_mgr_get_main_window (modest_runtime_get_window_mgr ()); - /* This seems to be necessary to show new messages in the current window. - * I would expect this to be after the send_receive, but maybe - * this makes a connection too. murrayc. */ - modest_do_refresh_current_folder (win); - /* Send & receive all if "Update automatically" is set */ /* TODO: check the auto-update parameter in the configuration */ modest_ui_actions_do_send_receive_all (win); diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index a5a0e5d..8099700 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -1815,8 +1815,8 @@ modest_ui_actions_do_send_receive_all (ModestWindow *win) account_names = NULL; } -void -modest_do_refresh_current_folder(ModestWindow *win) +static void +refresh_current_folder(ModestWindow *win) { /* Refresh currently selected folder. Note that if we only want to retreive the headers, then the refresh only will @@ -1870,7 +1870,9 @@ modest_ui_actions_on_send_receive (GtkAction *action, ModestWindow *win) if (!accounts_exist) modest_ui_actions_on_accounts (NULL, win); - modest_do_refresh_current_folder (win); + /* Refresh the current folder if we're viewing a window */ + if (win) + refresh_current_folder (win); /* Refresh the active account */ modest_ui_actions_do_send_receive (NULL, win); diff --git a/src/modest-ui-actions.h b/src/modest-ui-actions.h index c2a7073..7206eab 100644 --- a/src/modest-ui-actions.h +++ b/src/modest-ui-actions.h @@ -214,9 +214,6 @@ void modest_ui_actions_do_send_receive_all (ModestWindow *win); void modest_ui_actions_do_send_receive (const gchar *account_name, ModestWindow *win); -void -modest_do_refresh_current_folder(ModestWindow *win); - /** * modest_ui_actions_on_send_receive: * @action: a #GtkAction -- 1.7.9.5