/* If account_name == NULL, we must update all (option All) */
if (!account_name)
- modest_ui_actions_do_send_receive_all (win);
+ modest_ui_actions_do_send_receive_all (win, FALSE);
else
- modest_ui_actions_do_send_receive (account_name, win);
+ modest_ui_actions_do_send_receive (account_name, FALSE, win);
}
{
g_return_if_fail (MODEST_IS_WINDOW (win));
- /* Check first if the header view has the focus */
+ /* Check first if the folder view has the focus */
if (MODEST_IS_MAIN_WINDOW (win)) {
GtkWidget *w;
w = modest_main_window_get_child_widget (MODEST_MAIN_WINDOW (win),
*/
void
modest_ui_actions_do_send_receive (const gchar *account_name,
+ gboolean force_connection,
ModestWindow *win)
{
gchar *acc_name = NULL;
/* Invoke the connect and perform */
modest_platform_connect_and_perform ((win) ? GTK_WINDOW (win) : NULL,
- (win) ? TRUE : FALSE, info->account,
+ force_connection, info->account,
do_send_receive_performer, info);
}
* updates
*/
void
-modest_ui_actions_do_send_receive_all (ModestWindow *win)
+modest_ui_actions_do_send_receive_all (ModestWindow *win,
+ gboolean force_connection)
{
GSList *account_names, *iter;
iter = account_names;
while (iter) {
- modest_ui_actions_do_send_receive ((const char*) iter->data, win);
+ modest_ui_actions_do_send_receive ((const char*) iter->data, force_connection, win);
iter = g_slist_next (iter);
}
g_object_unref (folder_store);
}
- /* Refresh the active account */
- modest_ui_actions_do_send_receive (NULL, win);
+ /* Refresh the active account. Force the connection if needed */
+ modest_ui_actions_do_send_receive (NULL, TRUE, win);
}
*
* Refreshes all the accounts
**/
-void modest_ui_actions_do_send_receive_all (ModestWindow *win);
+void modest_ui_actions_do_send_receive_all (ModestWindow *win,
+ gboolean force_connection);
/**
* modest_ui_actions_do_send_receive:
* default account
**/
void modest_ui_actions_do_send_receive (const gchar *account_name,
+ gboolean force_connection,
ModestWindow *win);
/**
my_window = gtk_widget_get_ancestor (GTK_WIDGET (user_data), MODEST_TYPE_WINDOW);
acc_name = modest_tny_account_get_parent_modest_account_name_for_server_account (self);
- modest_ui_actions_do_send_receive (acc_name, MODEST_WINDOW (my_window));
+ modest_ui_actions_do_send_receive (acc_name, FALSE, MODEST_WINDOW (my_window));
}
}