[evolution] Bug 609404 - Quick search filter should work on current message list view



commit 22326b6d336dfb52f7ef85f5e5ab339b95f966de
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue Feb 9 12:22:04 2010 -0500

    Bug 609404 - Quick search filter should work on current message list view

 modules/mail/e-mail-shell-view.c |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index ce3c285..b85d146 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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]