aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-08-02 08:23:38 +0800
committerChris Toshok <toshok@src.gnome.org>2002-08-02 08:23:38 +0800
commit82f09c66c584eb4154ff714066b1e071c75b9598 (patch)
treeae560fc22b401f423c1df0c37780e5a4a4f8f015 /addressbook/gui
parentc48c6afed5fc757732d9c8ff2bc3cdab3c90645e (diff)
downloadgsoc2013-evolution-82f09c66c584eb4154ff714066b1e071c75b9598.tar
gsoc2013-evolution-82f09c66c584eb4154ff714066b1e071c75b9598.tar.gz
gsoc2013-evolution-82f09c66c584eb4154ff714066b1e071c75b9598.tar.bz2
gsoc2013-evolution-82f09c66c584eb4154ff714066b1e071c75b9598.tar.lz
gsoc2013-evolution-82f09c66c584eb4154ff714066b1e071c75b9598.tar.xz
gsoc2013-evolution-82f09c66c584eb4154ff714066b1e071c75b9598.tar.zst
gsoc2013-evolution-82f09c66c584eb4154ff714066b1e071c75b9598.zip
no more search_entry.
2002-08-01 Chris Toshok <toshok@ximian.com> * 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
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c21
-rw-r--r--addressbook/gui/component/select-names/e-select-names.h1
2 files changed, 9 insertions, 13 deletions
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;