aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/addressbook.c21
1 files changed, 19 insertions, 2 deletions
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);