aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog10
-rw-r--r--addressbook/gui/component/addressbook.c21
2 files changed, 29 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index d3170c12cd..ca2944e2fb 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,15 @@
2002-02-24 Chris Toshok <toshok@ximian.com>
+ * gui/component/addressbook.c (addressbook_query_changed): only
+ handle the ESB_ADVANCED case here now. the actual query work is
+ done in addressbook_search_activated.
+ (addressbook_search_activated): split out all the searching
+ functionality here.
+ (addressbook_factory_new_control): hook up "search_activated" to
+ addressbook_search_activated.
+
+2002-02-24 Chris Toshok <toshok@ximian.com>
+
* gui/component/addressbook-config.c
(addressbook_source_dialog_set_source): make the right auth page
start up open.
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 3e3a854dbe..73cb71abff 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -869,7 +869,7 @@ addressbook_menu_activated (ESearchBar *esb, int id, AddressbookView *view)
}
static void
-addressbook_query_changed (ESearchBar *esb, AddressbookView *view)
+addressbook_search_activated (ESearchBar *esb, AddressbookView *view)
{
ECategoriesMasterList *master_list;
char *search_word, *search_query;
@@ -931,7 +931,22 @@ addressbook_query_changed (ESearchBar *esb, AddressbookView *view)
NULL);
g_free (search_query);
- g_free (search_word);
+ }
+
+ g_free (search_word);
+}
+
+static void
+addressbook_query_changed (ESearchBar *esb, AddressbookView *view)
+{
+ int search_type;
+
+ gtk_object_get(GTK_OBJECT(esb),
+ "item_id", &search_type,
+ NULL);
+
+ if (search_type == ESB_ADVANCED) {
+ gtk_widget_show(e_addressbook_search_dialog_new(view->view));
}
}
@@ -1127,6 +1142,8 @@ addressbook_factory_new_control (void)
FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (view->search), "query_changed",
GTK_SIGNAL_FUNC (addressbook_query_changed), view);
+ gtk_signal_connect (GTK_OBJECT (view->search), "search_activated",
+ GTK_SIGNAL_FUNC (addressbook_search_activated), view);
gtk_signal_connect (GTK_OBJECT (view->search), "menu_activated",
GTK_SIGNAL_FUNC (addressbook_menu_activated), view);