same for HEAD
authorColin Leroy <colin@colino.net>
Tue, 6 Jul 2004 17:16:49 +0000 (17:16 +0000)
committerColin Leroy <colin@colino.net>
Tue, 6 Jul 2004 17:16:49 +0000 (17:16 +0000)
ChangeLog.claws
configure.ac
src/gtk/quicksearch.c

index 8437a5a..5a5f2da 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-06 [colin]     0.9.12cvs14
+
+       * src/gtk/quicksearch.c [1.4]
+               Add Clear button
+
 2004-07-06 [christoph] 0.9.12cvs13
 
        * src/toolbar.c
index 9d0bdc8..0d45e23 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=13
+EXTRA_VERSION=14
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index 73e0318..22e83ec 100644 (file)
@@ -193,6 +193,13 @@ static void search_description_cb(GtkWidget *widget)
        description_window_create(&search_descr);
 };
 
+static void clear_search_cb(GtkWidget *widget, gpointer data)
+{
+       QuickSearch *quicksearch = (QuickSearch *)data;
+
+       quicksearch_set(quicksearch, prefs_common.summary_quicksearch_type, "");
+}
+
 /*
 static void summary_searchbar_focus_evt(GtkWidget *widget, GdkEventFocus *event,
                                        SummaryView *summaryview)
@@ -218,6 +225,7 @@ QuickSearch *quicksearch_new()
        GtkWidget *search_string_entry;
        GtkWidget *search_hbbox;
        GtkWidget *search_description;
+       GtkWidget *clear_search;
        GtkWidget *menuitem;
 
        quicksearch = g_new0(QuickSearch, 1);
@@ -263,10 +271,28 @@ QuickSearch *quicksearch_new()
        gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(search_string_entry)->entry), "");
        gtk_widget_show(search_string_entry);
                
-       gtkut_button_set_create(&search_hbbox, &search_description, _("Extended Symbols"),
-                               NULL, NULL, NULL, NULL);
+       search_hbbox = gtk_hbutton_box_new();
+       gtk_button_box_set_layout(GTK_BUTTON_BOX(search_hbbox),
+                                 GTK_BUTTONBOX_START);
+
+       gtk_box_set_spacing(GTK_BOX(search_hbbox), 5);
+
+       clear_search = gtk_button_new_with_label(_("Clear"));
+       gtk_box_pack_start(GTK_BOX(search_hbbox), clear_search,
+                          FALSE, FALSE, 0);
+       gtk_widget_set_usize(clear_search, 120, -1);
+       
+       gtk_widget_show(clear_search);
+
+       search_description = gtk_button_new_with_label(_("Extended Symbols"));
+       gtk_box_pack_start(GTK_BOX(search_hbbox), search_description,
+                          TRUE, TRUE, 0);
+       gtk_widget_show(search_description);
+
        gtk_signal_connect(GTK_OBJECT(search_description), "clicked",
                           GTK_SIGNAL_FUNC(search_description_cb), NULL);
+       gtk_signal_connect(GTK_OBJECT(clear_search), "clicked",
+                          GTK_SIGNAL_FUNC(clear_search_cb), quicksearch);
        gtk_box_pack_start(GTK_BOX(hbox_search), search_hbbox, FALSE, FALSE, 2);                                
        gtk_widget_show(search_hbbox);
        if (prefs_common.summary_quicksearch_type == QUICK_SEARCH_EXTENDED)