[evolution/gnome-3-4] Bug #564820 - Search filter persists when changing folders
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-4] Bug #564820 - Search filter persists when changing folders
- Date: Mon, 23 Apr 2012 10:52:15 +0000 (UTC)
commit 9f5fd34ba53e314bf77cd1fd9b023ac245e053d8
Author: Milan Crha <mcrha redhat com>
Date: Mon Apr 23 12:51:43 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 6e0e5f2..2b77c96 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 8838f1a..c9daf47 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -926,8 +926,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]