aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/misc/ChangeLog5
-rw-r--r--widgets/misc/e-search-bar.c13
2 files changed, 18 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 45c2e10737..ba73f83a99 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-28 JP Rosevear <jpr@ximian.com>
+
+ * e-search-bar.c (clear_search): set the sub item to the default
+ as well
+
2003-03-25 Dan Winship <danw@ximian.com>
* e-calendar.c: #include gtkarrow.h
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index 9845f76320..484fb12c42 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -73,6 +73,9 @@ enum {
/* Forward decls. */
+static int find_id (GtkWidget *menu, int idin, const char *type, GtkWidget **widget);
+static void activate_by_subitems (ESearchBar *esb, gint item_id, ESearchBarSubitem *subitems);
+
static void emit_search_activated (ESearchBar *esb);
static void emit_query_changed (ESearchBar *esb);
@@ -103,8 +106,18 @@ verb_name_from_id (int id)
static void
clear_search (ESearchBar *esb)
{
+ int item_row;
+ GtkWidget *widget;
+ ESearchBarSubitem *subitems;
+
e_search_bar_set_text (esb, "");
e_search_bar_set_item_id (esb, 0);
+
+ item_row = find_id (esb->option_menu, 0, "EsbChoiceId", &widget);
+
+ subitems = g_object_get_data (G_OBJECT (widget), "EsbChoiceSubitems");
+ activate_by_subitems (esb, 0, subitems);
+
emit_search_activated (esb);
}