2006-12-20 [colin] 2.6.1cvs59
[claws.git] / src / gtk / quicksearch.c
index ef7a171cfaca8434e52c761ce7c51ec2f63d8c0b..f3aa7520d572a57ef89026071a532440fb2e386c 100644 (file)
@@ -38,7 +38,7 @@
 #include "folderview.h"
 #include "folder.h"
 #include "prefs_matcher.h"
-#include "sylpheed.h"
+#include "claws.h"
 #include "statusbar.h"
 
 struct _QuickSearch
@@ -220,7 +220,9 @@ static gboolean searchbar_pressed(GtkWidget *widget, GdkEventKey *event,
 
                /* If the string entry is empty -> hide quicksearch bar. If not -> empty it */
                if (!*str) {
-                       quicksearch_hide(quicksearch);
+                       summaryview_activate_quicksearch(
+                               mainwindow_get_mainwindow()->summaryview, 
+                               FALSE);
                } else {
                        quicksearch_set(quicksearch, prefs_common.summary_quicksearch_type, "");
                        gtk_widget_grab_focus(
@@ -645,6 +647,9 @@ void quicksearch_set(QuickSearch *quicksearch, QuickSearchType type,
        gtk_option_menu_set_history(GTK_OPTION_MENU(quicksearch->search_type_opt),
                                    type);
 
+       if (!matchstring || !(*matchstring))
+               quicksearch->in_typing = FALSE;
+
        g_signal_handlers_block_by_func(G_OBJECT(GTK_COMBO(quicksearch->search_string_entry)->entry),
                        G_CALLBACK(searchbar_changed_cb), quicksearch);
        gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(quicksearch->search_string_entry)->entry),