aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-03-29 10:16:56 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-03-29 10:16:56 +0800
commit7e0741f407bbcdbd58c2f07acbba03d06f5c0928 (patch)
treef926f673b70bc63c9748db1ea28a78e2b99d4cc3
parent325edf034ca4407a135b2a4eba12c2bae338d0d6 (diff)
downloadgsoc2013-evolution-7e0741f407bbcdbd58c2f07acbba03d06f5c0928.tar.gz
gsoc2013-evolution-7e0741f407bbcdbd58c2f07acbba03d06f5c0928.tar.zst
gsoc2013-evolution-7e0741f407bbcdbd58c2f07acbba03d06f5c0928.zip
set the sub item to the default as well
2003-03-28 JP Rosevear <jpr@ximian.com> * e-search-bar.c (clear_search): set the sub item to the default as well svn path=/trunk/; revision=20572
-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);
}