2005-10-13 [colin] 1.9.15cvs39
authorColin Leroy <colin@colino.net>
Thu, 13 Oct 2005 17:51:19 +0000 (17:51 +0000)
committerColin Leroy <colin@colino.net>
Thu, 13 Oct 2005 17:51:19 +0000 (17:51 +0000)
* src/gtk/quicksearch.c
Reset quicksearch when hiding it
Make sticky a real pref

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/gtk/quicksearch.c

index b1d399f..4a28948 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-13 [colin]     1.9.15cvs39
+
+       * src/gtk/quicksearch.c
+               Reset quicksearch when hiding it
+               Make sticky a real pref
+
 2005-10-13 [colin]     1.9.15cvs38
 
        * src/summaryview.c
index f0efe21..1e5898f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.213.2.63 -r 1.213.2.64 src/folder.c;  cvs diff -u -r 1.207.2.71 -r 1.207.2.72 src/folderview.c;  ) > 1.9.15cvs36.patchset
 ( cvs diff -u -r 1.83.2.42 -r 1.83.2.43 src/mimeview.c;  cvs diff -u -r 1.5.2.8 -r 1.5.2.9 src/noticeview.c;  cvs diff -u -r 1.3.8.3 -r 1.3.8.4 src/noticeview.h;  cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/plugins/pgpcore/sgpgme.c;  ) > 1.9.15cvs37.patchset
 ( cvs diff -u -r 1.395.2.135 -r 1.395.2.136 src/summaryview.c;  ) > 1.9.15cvs38.patchset
+( cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/gtk/quicksearch.c;  ) > 1.9.15cvs39.patchset
index 15af26c..1249fc6 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=38
+EXTRA_VERSION=39
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 30360a2..ea27691 100644 (file)
@@ -199,6 +199,20 @@ static gboolean searchtype_recursive_changed(GtkMenuItem *widget, gpointer data)
        return TRUE;
 }
 
+static gboolean searchtype_sticky_changed(GtkMenuItem *widget, gpointer data)
+{
+       QuickSearch *quicksearch = (QuickSearch *)data;
+       gboolean checked = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget));
+       
+       prefs_common.summary_quicksearch_sticky = checked; 
+
+       /* reselect the search type */
+       gtk_option_menu_set_history(GTK_OPTION_MENU(quicksearch->search_type_opt), 
+                                   prefs_common.summary_quicksearch_type);
+
+       return TRUE;
+}
+
 /*
  * Strings describing how to use Extended Search
  * 
@@ -324,6 +338,16 @@ QuickSearch *quicksearch_new()
                         G_CALLBACK(searchtype_recursive_changed),
                         quicksearch);
 
+       menuitem = gtk_check_menu_item_new_with_label(_("Sticky"));
+       gtk_menu_shell_append(GTK_MENU_SHELL(search_type), menuitem);
+       
+       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
+                                       prefs_common.summary_quicksearch_sticky);
+       
+       g_signal_connect(G_OBJECT(menuitem), "activate",
+                        G_CALLBACK(searchtype_sticky_changed),
+                        quicksearch);
+
        gtk_option_menu_set_menu(GTK_OPTION_MENU(search_type_opt), search_type);
        
        gtk_option_menu_set_history(GTK_OPTION_MENU(search_type_opt), prefs_common.summary_quicksearch_type);
@@ -346,15 +370,13 @@ QuickSearch *quicksearch_new()
 
        gtk_box_set_spacing(GTK_BOX(search_hbbox), 5);
                
-       if (prefs_common.summary_quicksearch_sticky) {
-               clear_search = gtk_button_new_with_label(_("Clear"));
-               gtk_box_pack_start(GTK_BOX(search_hbbox), clear_search,
-                                  FALSE, FALSE, 0);
-               gtk_widget_set_size_request(clear_search, 120, -1);
-               g_signal_connect(G_OBJECT(clear_search), "clicked",
-                                G_CALLBACK(clear_search_cb), quicksearch);
-               gtk_widget_show(clear_search);
-       }
+       clear_search = gtk_button_new_with_label(_("Clear"));
+       gtk_box_pack_start(GTK_BOX(search_hbbox), clear_search,
+                          FALSE, FALSE, 0);
+       gtk_widget_set_size_request(clear_search, 120, -1);
+       g_signal_connect(G_OBJECT(clear_search), "clicked",
+                        G_CALLBACK(clear_search_cb), quicksearch);
+       gtk_widget_show(clear_search);
 
        search_description = gtk_button_new_with_label(_("Extended Symbols"));
        gtk_box_pack_start(GTK_BOX(search_hbbox), search_description,
@@ -418,6 +440,7 @@ void quicksearch_show(QuickSearch *quicksearch)
 
 void quicksearch_hide(QuickSearch *quicksearch)
 {
+       quicksearch_set(quicksearch, prefs_common.summary_quicksearch_type, "");
        quicksearch_set_active(quicksearch, FALSE);
        gtk_widget_hide(quicksearch->hbox_search);
 }