2007-11-14 [colin] 3.0.2cvs136
authorColin Leroy <colin@colino.net>
Wed, 14 Nov 2007 17:35:03 +0000 (17:35 +0000)
committerColin Leroy <colin@colino.net>
Wed, 14 Nov 2007 17:35:03 +0000 (17:35 +0000)
* src/summaryview.c
* src/gtk/quicksearch.c
* src/gtk/quicksearch.h
Fix resetting the quicksearch when in non-sticky
mode, but Recursive is set: reset only when going
out of the root search folder.

ChangeLog
PATCHSETS
configure.ac
src/gtk/quicksearch.c
src/gtk/quicksearch.h
src/summaryview.c

index a01dde2..2d5feb2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-11-14 [colin]     3.0.2cvs136
+
+       * src/summaryview.c
+       * src/gtk/quicksearch.c
+       * src/gtk/quicksearch.h
+               Fix resetting the quicksearch when in non-sticky
+               mode, but Recursive is set: reset only when going
+               out of the root search folder.
+
 2007-11-14 [colin]     3.0.2cvs135
 
        * src/filtering.c
index ac1267f..bc571da 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.51 -r 1.1.2.52 src/imap_gtk.c;  cvs diff -u -r 1.2.2.28 -r 1.2.2.29 src/mh_gtk.c;  ) > 3.0.2cvs133.patchset
 ( cvs diff -u -r 1.12.2.24 -r 1.12.2.25 src/plugins/dillo_viewer/dillo_viewer.c;  ) > 3.0.2cvs134.patchset
 ( cvs diff -u -r 1.60.2.40 -r 1.60.2.41 src/filtering.c;  ) > 3.0.2cvs135.patchset
+( cvs diff -u -r 1.395.2.334 -r 1.395.2.335 src/summaryview.c;  cvs diff -u -r 1.1.2.81 -r 1.1.2.82 src/gtk/quicksearch.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/gtk/quicksearch.h;  ) > 3.0.2cvs136.patchset
index 28aaa7f..4bd5098 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=135
+EXTRA_VERSION=136
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 880a565..6994800 100644 (file)
@@ -1282,6 +1282,20 @@ static gboolean quicksearch_match_subfolder(QuickSearch *quicksearch,
        return result;
 }
 
+gboolean quicksearch_is_in_subfolder(QuickSearch *quicksearch, FolderItem *cur)
+{
+       if (quicksearch->root_folder_item == NULL)
+               return FALSE;
+       
+       while (cur) {
+               if (cur == quicksearch->root_folder_item) {
+                       return TRUE;
+               }
+               cur = folder_item_parent(cur);
+       }
+       return FALSE;
+}
+
 void quicksearch_search_subfolders(QuickSearch *quicksearch,
                                   FolderView *folderview,
                                   FolderItem *folder_item)
index 7914fb2..e5d6ea3 100644 (file)
@@ -53,6 +53,7 @@ void quicksearch_reset_cur_folder_item(QuickSearch *quicksearch);
 void quicksearch_search_subfolders(QuickSearch *quicksearch, 
                                   FolderView  *folderview,
                                   FolderItem  *folder_item);
+gboolean quicksearch_is_in_subfolder(QuickSearch *quicksearch, FolderItem *cur);
 gboolean quicksearch_is_fast(QuickSearch *quicksearch);
 gboolean quicksearch_is_in_typing(QuickSearch *quicksearch);
 void quicksearch_relayout(QuickSearch *quicksearch);
index 7744a62..4b776a1 100644 (file)
@@ -1135,7 +1135,8 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
        }
        if (!prefs_common.summary_quicksearch_sticky
         && (!prefs_common.summary_quicksearch_recurse
-         || !quicksearch_is_active(summaryview->quicksearch))
+         || !quicksearch_is_active(summaryview->quicksearch)
+         || (item && !quicksearch_is_in_subfolder(summaryview->quicksearch, item)))
         && !quicksearch_is_running(summaryview->quicksearch)
         && !is_refresh) {
                quicksearch_set(summaryview->quicksearch, prefs_common.summary_quicksearch_type, "");