From 1fc94a31fa32251b9371cd1e643422a403ebc52c Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sat, 12 Aug 2000 09:11:12 +0000 Subject: Ref our book view listener. 2000-08-12 Christopher James Lahey * backend/pas/pas-book-view.c: Ref our book view listener. * gui/component/addressbook.c: Updated to use new minicard view widget. * gui/minicard/Makefile.am: Added e-minicard-view-widget.c and e-minicard-view-widget.h. * gui/minicard/e-minicard-view-widget.c, gui/minicard/e-minicard-view-widget.h: New class that's just a minicard view in an ECanvas. * gui/search/e-addressbook-search-dialog.c: New file for implementing a search dialog. svn path=/trunk/; revision=4771 --- .../gui/search/e-addressbook-search-dialog.c | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 addressbook/gui/search/e-addressbook-search-dialog.c (limited to 'addressbook/gui/search') diff --git a/addressbook/gui/search/e-addressbook-search-dialog.c b/addressbook/gui/search/e-addressbook-search-dialog.c new file mode 100644 index 0000000000..a7e0f0e1a8 --- /dev/null +++ b/addressbook/gui/search/e-addressbook-search-dialog.c @@ -0,0 +1,46 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +struct _EAddressBookSearchDialog { + GtkWidget *search; + GtkWidget *view; +}; + +static void +button_press (GtkWidget *widget, EAddressBookSearchDialog *dialog) +{ + char *query; + gtk_widget_show(dialog->view); + query = get_query(); + gtk_object_set(GTK_OBJECT(dialog->view), + "query", query, + NULL); + g_free(query); +} + +GtkWidget * +get_addressbook_search_dialog(EBook *book) +{ + GtkWidget *vbox; + GtkWidget *search; + GtkWidget *search_button; + GtkWidget *view; + + vbox = gtk_vbox_new(FALSE, 0); + + search = get_widget(); + gtk_box_pack_start(GTK_BOX(vbox), search, TRUE, TRUE, 0); + gtk_widget_show(search); + + button = gtk_button_new_with_label(_("Search")); + gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); + gtk_widget_show(button); + + view = e_minicard_view_widget_new(); + gtk_box_pack_start(GTK_BOX(vbox), view, TRUE, TRUE, 0); + gtk_object_set(GTK_OBJECT(dialog->view), + "book", book, + NULL); + + gtk_widget_show(vbox); + return vbox; +} -- cgit v1.2.3