From 22326b6d336dfb52f7ef85f5e5ab339b95f966de Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 9 Feb 2010 12:22:04 -0500 Subject: Bug 609404 - Quick search filter should work on current message list view --- modules/mail/e-mail-shell-view.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index ce3c285a37..b85d146828 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -497,10 +497,15 @@ all_accounts: priv->search_account_cancel = NULL; } - /* Simulate a folder tree selection change, so the - * message list is reset to the correct folder via - * our EMFolderTree::folder-selected handler. */ - g_signal_emit_by_name (selection, "changed"); + /* Reset the message list to the current folder tree + * selection. This needs to happen synchronously to + * avoid search conflicts, so we can't just grab the + * folder URI and let the asynchronous callbacks run + * after we've already kicked off the search. */ + folder = em_folder_tree_get_selected_folder (folder_tree); + uri = em_folder_tree_get_selected_uri (folder_tree); + e_mail_reader_set_folder (reader, folder, uri); + g_free (uri); gtk_widget_set_sensitive (GTK_WIDGET (combo_box), TRUE); @@ -619,10 +624,15 @@ current_account: priv->search_account_cancel = NULL; } - /* Simulate a folder tree selection change, so the - * message list is reset to the correct folder via - * our EMFolderTree::folder-selected handler. */ - g_signal_emit_by_name (selection, "changed"); + /* Reset the message list to the current folder tree + * selection. This needs to happen synchronously to + * avoid search conflicts, so we can't just grab the + * folder URI and let the asynchronous callbacks run + * after we've already kicked off the search. */ + folder = em_folder_tree_get_selected_folder (folder_tree); + uri = em_folder_tree_get_selected_uri (folder_tree); + e_mail_reader_set_folder (reader, folder, uri); + g_free (uri); gtk_widget_set_sensitive (GTK_WIDGET (combo_box), TRUE); -- cgit v1.2.3