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
This commit is contained in:
JP Rosevear
2003-03-29 02:16:56 +00:00
committed by JP Rosevear
parent 325edf034c
commit 7e0741f407
2 changed files with 18 additions and 0 deletions

View File

@ -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

View File

@ -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);
}