* Modest no longer automatically reconnect when an automatic send&receive is issued...
authorSergio Villar Senin <svillar@igalia.com>
Mon, 14 Jan 2008 12:53:58 +0000 (12:53 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 14 Jan 2008 12:53:58 +0000 (12:53 +0000)
pmo-trunk-r4034

src/dbus_api/modest-dbus-callbacks.c
src/maemo/modest-main-window.c
src/modest-ui-actions.c
src/modest-ui-actions.h
src/widgets/modest-folder-view.c

index 071d159..db2375c 100644 (file)
@@ -713,7 +713,7 @@ on_idle_send_receive(gpointer user_data)
 
        if (auto_update)
                /* Do send receive */
-               modest_ui_actions_do_send_receive_all (main_win);
+               modest_ui_actions_do_send_receive_all (main_win, FALSE);
        else
                /* Disable auto update */
                modest_platform_set_update_interval (0);
index f258c6e..0f0b135 100644 (file)
@@ -2440,9 +2440,9 @@ refresh_account (const gchar *account_name)
        
        /* 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);
        
 }
 
index 432e45b..410748c 100644 (file)
@@ -818,7 +818,7 @@ modest_ui_actions_on_new_msg_or_folder (GtkAction *action, ModestWindow *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),
@@ -1758,6 +1758,7 @@ do_send_receive_performer (gboolean canceled,
  */
 void
 modest_ui_actions_do_send_receive (const gchar *account_name, 
+                                  gboolean force_connection,
                                   ModestWindow *win)
 {
        gchar *acc_name = NULL;
@@ -1790,7 +1791,7 @@ modest_ui_actions_do_send_receive (const gchar *account_name,
 
        /* 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);
 }
 
@@ -1869,7 +1870,8 @@ modest_ui_actions_cancel_send (GtkAction *action,  ModestWindow *win)
  * 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;
 
@@ -1878,7 +1880,7 @@ modest_ui_actions_do_send_receive_all (ModestWindow *win)
 
        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);
        }
 
@@ -1919,8 +1921,8 @@ modest_ui_actions_on_send_receive (GtkAction *action, ModestWindow *win)
                        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);
 }
 
 
index 76ebeaa..1071ef9 100644 (file)
@@ -201,7 +201,8 @@ void     modest_ui_actions_cancel_send (GtkAction *action,  ModestWindow *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:
@@ -214,6 +215,7 @@ void    modest_ui_actions_do_send_receive_all          (ModestWindow *win);
  * default account
  **/
 void    modest_ui_actions_do_send_receive              (const gchar *account_name,
+                                                       gboolean force_connection,
                                                        ModestWindow *win);
 
 /**
index 02bfd2b..e3e4af6 100644 (file)
@@ -1199,7 +1199,7 @@ on_connection_status_changed (TnyAccount *self,
 
                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));
        }
 }