* src/widgets/modest-folder-view.c:
authorJose Dapena Paz <jdapena@igalia.com>
Fri, 1 Feb 2008 10:33:22 +0000 (10:33 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Fri, 1 Feb 2008 10:33:22 +0000 (10:33 +0000)
* Now we properly set back the destination folder of a folder
  move. It gets focused. Problem was an early memory free.
  Partially fixes NB#78939.

pmo-trunk-r4124

src/widgets/modest-folder-view.c

index 68ed0bb..34ef4a2 100644 (file)
@@ -1977,16 +1977,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);
 }