/* 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);
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
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);
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