[evolution] Bug #564820 - Search filter persists when changing folders
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #564820 - Search filter persists when changing folders
- Date: Mon, 23 Apr 2012 10:51:00 +0000 (UTC)
commit e4cce2eeae7889b82ff9a1da5d4062a83f2cbdf7
Author: Milan Crha <mcrha redhat com>
Date: Mon Apr 23 12:49:46 2012 +0200
Bug #564820 - Search filter persists when changing folders
mail/message-list.c | 6 ++++++
modules/mail/e-mail-shell-view-private.c | 7 ++++++-
2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/mail/message-list.c b/mail/message-list.c
index 14ef44f..154080e 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3850,6 +3850,12 @@ message_list_set_folder (MessageList *message_list,
if (message_list->folder == folder)
return;
+ g_free (message_list->search);
+ message_list->search = NULL;
+
+ g_free (message_list->frozen_search);
+ message_list->frozen_search = NULL;
+
if (message_list->seen_id) {
g_source_remove (message_list->seen_id);
message_list->seen_id = 0;
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index 9a58f9d..e043d7d 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -852,8 +852,13 @@ e_mail_shell_view_restore_state (EMailShellView *mail_shell_view)
reader = E_MAIL_READER (mail_view);
folder = e_mail_reader_get_folder (reader);
- if (folder == NULL)
+ if (folder == NULL) {
+ if (e_shell_searchbar_get_state_group (searchbar)) {
+ e_shell_searchbar_set_state_group (searchbar, NULL);
+ e_shell_searchbar_load_state (searchbar);
+ }
return;
+ }
/* Do not restore state if we're running a "Current Account"
* or "All Accounts" search, since we don't want the search
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]