* Remove some invalid code from the D-Bus callback, the refresh of the curren...
authorSergio Villar Senin <svillar@igalia.com>
Fri, 19 Oct 2007 16:51:22 +0000 (16:51 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Fri, 19 Oct 2007 16:51:22 +0000 (16:51 +0000)
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
src/modest-ui-actions.c
src/modest-ui-actions.h

index 51cc6d1..83c8dbd 100644 (file)
@@ -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);
index a5a0e5d..8099700 100644 (file)
@@ -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);
index c2a7073..7206eab 100644 (file)
@@ -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