* Fixes NB#80917, added wimax support
[modest] / src / widgets / modest-folder-view.c
index 68ed0bb..bf6455b 100644 (file)
@@ -1192,22 +1192,6 @@ modest_folder_view_set_account_store (TnyAccountStoreView *self, TnyAccountStore
 }
 
 static void
-on_connection_status_changed (TnyAccount *self, 
-                             TnyConnectionStatus status, 
-                             gpointer user_data)
-{
-       /* If the account becomes online then refresh it */
-       if (status == TNY_CONNECTION_STATUS_CONNECTED) {
-               const gchar *acc_name;
-               GtkWidget *my_window;
-
-               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, FALSE, MODEST_WINDOW (my_window));
-       }
-}
-
-static void
 on_account_inserted (TnyAccountStore *account_store, 
                     TnyAccount *account,
                     gpointer user_data)
@@ -1238,12 +1222,6 @@ on_account_inserted (TnyAccountStore *account_store,
        tny_list_append (TNY_LIST (gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (sort_model))),
                         G_OBJECT (account));
 
-
-       /* When the store account gets online refresh it */
-       g_signal_connect (account, "connection_status_changed", 
-                         G_CALLBACK (on_connection_status_changed), 
-                         MODEST_FOLDER_VIEW (user_data));
-
        /* Refilter the model */
        gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (filter_model));
 }
@@ -1977,16 +1955,19 @@ xfer_folder_cb (ModestMailOperation *mail_op,
                gpointer user_data)
 {
        DndHelper *helper;
+       GtkWidget *folder_view;
 
        helper = (DndHelper *) user_data;
+       folder_view = g_object_ref (helper->folder_view);
 
        /* Common part */
        xfer_cb (mail_op, user_data);
 
        /* Select the folder */
        if (new_folder)
-               modest_folder_view_select_folder (MODEST_FOLDER_VIEW (helper->folder_view),
+               modest_folder_view_select_folder (MODEST_FOLDER_VIEW (folder_view),
                                                  new_folder, FALSE);
+       g_object_unref (folder_view);
 }