From 82f09c66c584eb4154ff714066b1e071c75b9598 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 2 Aug 2002 00:23:38 +0000 Subject: no more search_entry. 2002-08-01 Chris Toshok * gui/component/select-names/e-select-names.h (struct _ESelectNames): no more search_entry. * gui/component/select-names/e-select-names.c (update_query): no more search_entry, search_entry => select_entry, and add file_as to the query since some entries don't have names (like the Ximian, Inc. default card.) (e_select_names_init): no more search_entry, and add an "activate" handler on select_entry that updates the query. svn path=/trunk/; revision=17682 --- .../gui/component/select-names/e-select-names.c | 21 +++++++++------------ .../gui/component/select-names/e-select-names.h | 1 - 2 files changed, 9 insertions(+), 13 deletions(-) (limited to 'addressbook/gui/component/select-names') diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index a990a7b977..791293ae35 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -384,8 +384,8 @@ update_query (GtkWidget *widget, ESelectNames *e_select_names) if (e_select_names->categories) { category = e_categories_master_list_option_menu_get_category (E_CATEGORIES_MASTER_LIST_OPTION_MENU (e_select_names->categories)); } - if (e_select_names->search_entry) { - search = gtk_entry_get_text (GTK_ENTRY (e_select_names->search_entry)); + if (e_select_names->select_entry) { + search = gtk_entry_get_text (GTK_ENTRY (e_select_names->select_entry)); } i = 0; q_array[i++] = "(contains \"email\" \"\")"; @@ -394,8 +394,9 @@ update_query (GtkWidget *widget, ESelectNames *e_select_names) if (search && *search) q_array[i++] = g_strdup_printf ("(or (beginswith \"email\" \"%s\") " " (beginswith \"full_name\" \"%s\") " - " (beginswith \"nickname\" \"%s\"))", - search, search, search); + " (beginswith \"nickname\" \"%s\")" + " (beginswith \"file_as\" \"%s\"))", + search, search, search, search); q_array[i++] = NULL; if (i > 2) { char *temp = g_strjoinv (" ", q_array); @@ -522,19 +523,15 @@ e_select_names_init (ESelectNames *e_select_names) gtk_signal_connect(GTK_OBJECT(e_select_names->categories), "changed", GTK_SIGNAL_FUNC(categories_changed), e_select_names); - e_select_names->search_entry = glade_xml_get_widget (gui, "entry-find"); - if (e_select_names->search_entry && !GTK_IS_ENTRY (e_select_names->search_entry)) - e_select_names->search_entry = NULL; - if (e_select_names->search_entry) - gtk_signal_connect(GTK_OBJECT(e_select_names->search_entry), "activate", - GTK_SIGNAL_FUNC(update_query), e_select_names); - e_select_names->select_entry = glade_xml_get_widget (gui, "entry-select"); if (e_select_names->select_entry && !GTK_IS_ENTRY (e_select_names->select_entry)) e_select_names->select_entry = NULL; - if (e_select_names->select_entry) + if (e_select_names->select_entry) { gtk_signal_connect(GTK_OBJECT(e_select_names->select_entry), "changed", GTK_SIGNAL_FUNC(select_entry_changed), e_select_names); + gtk_signal_connect(GTK_OBJECT(e_select_names->select_entry), "activate", + GTK_SIGNAL_FUNC(update_query), e_select_names); + } button = glade_xml_get_widget (gui, "button-find"); if (button && GTK_IS_BUTTON (button)) diff --git a/addressbook/gui/component/select-names/e-select-names.h b/addressbook/gui/component/select-names/e-select-names.h index a351955ebe..ed9da9e115 100644 --- a/addressbook/gui/component/select-names/e-select-names.h +++ b/addressbook/gui/component/select-names/e-select-names.h @@ -71,7 +71,6 @@ struct _ESelectNames ETableModel *without; EAddressbookModel *model; GtkWidget *categories; - GtkWidget *search_entry; GtkWidget *select_entry; GtkWidget *status_message; char *def; -- cgit