diff options
author | Chris Toshok <toshok@ximian.com> | 2002-02-25 19:01:20 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-02-25 19:01:20 +0800 |
commit | bafc982da4a7398d7aab35362076b8c3c9722057 (patch) | |
tree | a1d7ee007e5f1d7f0243b6f78c1942e83dfc3ea7 /addressbook/gui/component | |
parent | 26411433698a528c1b94851a7dcf8a950b4d24f0 (diff) | |
download | gsoc2013-evolution-bafc982da4a7398d7aab35362076b8c3c9722057.tar.gz gsoc2013-evolution-bafc982da4a7398d7aab35362076b8c3c9722057.tar.zst gsoc2013-evolution-bafc982da4a7398d7aab35362076b8c3c9722057.zip |
only handle the ESB_ADVANCED case here now. the actual query work is done
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.
svn path=/trunk/; revision=15828
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/addressbook.c | 21 |
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); |