2005-01-22 [colin] 1.0.0cvs8.1
[claws.git] / src / summaryview.c
index aaf2621..76d037c 100644 (file)
@@ -791,7 +791,6 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
        guint displayed_msgnum = 0;
        GSList *cur;
         GSList *not_killed;
-       gboolean quicksearch_changed = FALSE;
 
        if (summary_is_locked(summaryview)) return FALSE;
 
@@ -804,9 +803,6 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
                quicksearch_set(summaryview->quicksearch, prefs_common.summary_quicksearch_type, "");
        }
 
-       if (quicksearch_is_running(summaryview->quicksearch))
-               quicksearch_changed = TRUE;
-
        /* STATUSBAR_POP(summaryview->mainwin); */
 
        is_refresh = (item == summaryview->folder_item) ? TRUE : FALSE;
@@ -857,6 +853,15 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
                gtk_clist_thaw(GTK_CLIST(ctree));
                summary_unlock(summaryview);
                inc_unlock();
+               if (item && quicksearch_is_running(summaryview->quicksearch)) {
+                       main_window_cursor_wait(summaryview->mainwin);
+                       quicksearch_reset_cur_folder_item(summaryview->quicksearch);
+                       if (quicksearch_is_active(summaryview->quicksearch))
+                               quicksearch_search_subfolders(summaryview->quicksearch, 
+                                             summaryview->folderview,
+                                             summaryview->folder_item);
+                       main_window_cursor_normal(summaryview->mainwin);
+               }                       
                return TRUE;
        }
        g_free(buf);
@@ -919,7 +924,7 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
                                procmsg_msginfo_free(msginfo);
                }
                
-               if (quicksearch_changed) {
+               if (quicksearch_is_running(summaryview->quicksearch)) {
                        /* only scan subfolders when quicksearch changed,
                         * not when search is the same and folder changed */
                        main_window_cursor_wait(summaryview->mainwin);