From: Sergio Villar Senin Date: Wed, 21 May 2008 07:31:27 +0000 (+0000) Subject: * Partially fixes NB#85461, do not unload the folder before synchronizing it X-Git-Tag: git_migration_finished~1362 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=537099bbfb23c90bd7770f0fc3cbcedaf1c54faa * Partially fixes NB#85461, do not unload the folder before synchronizing it pmo-trunk-r4549 --- diff --git a/src/widgets/modest-folder-view.c b/src/widgets/modest-folder-view.c index e04d468..da8e834 100644 --- a/src/widgets/modest-folder-view.c +++ b/src/widgets/modest-folder-view.c @@ -1465,14 +1465,18 @@ on_selection_changed (GtkTreeSelection *sel, gpointer user_data) /* Current folder was unselected */ if (priv->cur_folder_store) { - g_signal_emit (G_OBJECT(tree_view), signals[FOLDER_SELECTION_CHANGED_SIGNAL], 0, - priv->cur_folder_store, FALSE); - + /* We must do this firstly because a libtinymail-camel + implementation detail. If we issue the signal + before doing the sync_async, then that signal could + cause (and it actually does it) a free of the + summary of the folder (because the main window will + clear the headers view */ if (TNY_IS_FOLDER(priv->cur_folder_store)) tny_folder_sync_async (TNY_FOLDER(priv->cur_folder_store), FALSE, NULL, NULL, NULL); - /* FALSE --> don't expunge the messages */ + g_signal_emit (G_OBJECT(tree_view), signals[FOLDER_SELECTION_CHANGED_SIGNAL], 0, + priv->cur_folder_store, FALSE); g_object_unref (priv->cur_folder_store); priv->cur_folder_store = NULL; diff --git a/src/widgets/modest-header-view.c b/src/widgets/modest-header-view.c index 2df0fd7..aeddf0c 100644 --- a/src/widgets/modest-header-view.c +++ b/src/widgets/modest-header-view.c @@ -1268,8 +1268,10 @@ modest_header_view_set_folder (ModestHeaderView *self, } if (priv->folder) { - if (priv->status_timeout) + if (priv->status_timeout) { g_source_remove (priv->status_timeout); + priv->status_timeout = 0; + } g_mutex_lock (priv->observers_lock); tny_folder_remove_observer (priv->folder, TNY_FOLDER_OBSERVER (self)); @@ -1989,6 +1991,10 @@ static void notify_filter_change_destroy (gpointer data) { NotifyFilterInfo *info = (NotifyFilterInfo *) data; + ModestHeaderViewPrivate *priv; + + priv = MODEST_HEADER_VIEW_GET_PRIVATE (info->self); + priv->status_timeout = 0; g_object_unref (info->self); g_object_unref (info->folder);