From 12c7e41b1f6d3bdf37ad740320cd25f9222a2256 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Mon, 5 Nov 2007 12:03:32 +0000 Subject: [PATCH] * Added some code, that allows the folder view to unref its reference to the selected folder before trying to move it using the move to dialog. The problem was that the handler of unselect_all was not happening before the mail operation pmo-trunk-r3639 --- src/modest-ui-actions.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 79f2118..8c9b693 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -4356,6 +4356,15 @@ modest_ui_actions_on_main_window_move_to (GtkAction *action, sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (folder_view)); gtk_tree_selection_unselect_all (sel); + /* Let gtk events run. We need that the folder + view frees its reference to the source + folder *before* issuing the mail operation + so we need the signal handler of selection + changed to happen before the mail + operation */ + while (gtk_events_pending ()) + gtk_main_iteration (); + mail_op = modest_mail_operation_new_with_error_handling (G_OBJECT(win), modest_ui_actions_move_folder_error_handler, -- 1.7.9.5