From ac26ccfbdc8390cce592621407a26457c05f90b1 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Mon, 6 Nov 2000 01:06:09 +0000 Subject: Add menus items to the envelope printing stuff. 2000-11-05 Christopher James Lahey * contact-editor/e-contact-editor.c, gui/widgets/e-addressbook-view.c, gui/widgets/e-minicard.c: Add menus items to the envelope printing stuff. * gui/component/addressbook.c: Hook up the search menu. * gui/widgets/e-addressbook-search.c, gui/widgets/e-addressbook-search.h: Add the search menu. * printing/Makefile.am: Add e-contact-print-envelope.c and e-contact-print-envelope.h. * printing/e-contact-print-envelope.c, printing/e-contact-print-envelope.h: Added envelope printing. svn path=/trunk/; revision=6408 --- addressbook/gui/component/addressbook.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'addressbook/gui/component') diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 8a0d03cd05..1645dd849b 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -532,6 +532,25 @@ addressbook_query_changed (EAddressbookSearch *eas, AddressbookView *view) g_free (search_word); } +static void +addressbook_menu_activated (EAddressbookSearch *eas, int id, AddressbookView *view) +{ + EBook *book; + switch (id) { + case 0: + e_addressbook_view_show_all(view->view); + break; + case 1: + gtk_object_get(GTK_OBJECT(view->view), + "book", &book, + NULL); + g_assert (E_IS_BOOK (book)); + + gtk_widget_show(e_addressbook_search_dialog_new(book)); + break; + } +} + BonoboControl * addressbook_factory_new_control (void) { @@ -555,6 +574,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), "menu_activated", + GTK_SIGNAL_FUNC (addressbook_menu_activated), view); view->view = E_ADDRESSBOOK_VIEW(e_addressbook_view_new()); gtk_box_pack_start(GTK_BOX(view->vbox), GTK_WIDGET(view->view), -- cgit v1.2.3