aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/search/e-addressbook-search-dialog.c
diff options
context:
space:
mode:
authornobody <nobody@localhost>2000-08-22 20:05:30 +0800
committernobody <nobody@localhost>2000-08-22 20:05:30 +0800
commit5091a392d863dc4f08f2bed94a08cd6d353e1561 (patch)
tree3b4824784cd30983db4a6ae1f38db287d5815941 /addressbook/gui/search/e-addressbook-search-dialog.c
parent44ae37c371e25fe05e8aee145f1d9af7130a201d (diff)
downloadgsoc2013-evolution-GNOME_PRINT_0_23.tar
gsoc2013-evolution-GNOME_PRINT_0_23.tar.gz
gsoc2013-evolution-GNOME_PRINT_0_23.tar.bz2
gsoc2013-evolution-GNOME_PRINT_0_23.tar.lz
gsoc2013-evolution-GNOME_PRINT_0_23.tar.xz
gsoc2013-evolution-GNOME_PRINT_0_23.tar.zst
gsoc2013-evolution-GNOME_PRINT_0_23.zip
This commit was manufactured by cvs2svn to create tagGNOME_PRINT_0_23
'GNOME_PRINT_0_23'. svn path=/tags/GNOME_PRINT_0_23/; revision=4946
Diffstat (limited to 'addressbook/gui/search/e-addressbook-search-dialog.c')
-rw-r--r--addressbook/gui/search/e-addressbook-search-dialog.c192
1 files changed, 0 insertions, 192 deletions
diff --git a/addressbook/gui/search/e-addressbook-search-dialog.c b/addressbook/gui/search/e-addressbook-search-dialog.c
deleted file mode 100644
index 4acfd1585c..0000000000
--- a/addressbook/gui/search/e-addressbook-search-dialog.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-addressbook-search-dialog.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-#include <gnome.h>
-#include <e-util/e-canvas.h>
-#include "e-addressbook-search-dialog.h"
-#include "addressbook/gui/minicard/e-minicard-view-widget.h"
-#include "widgets/misc/e-scroll-frame.h"
-static void e_addressbook_search_dialog_init (EAddressbookSearchDialog *widget);
-static void e_addressbook_search_dialog_class_init (EAddressbookSearchDialogClass *klass);
-static void e_addressbook_search_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_addressbook_search_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_addressbook_search_dialog_destroy (GtkObject *object);
-
-static ECanvasClass *parent_class = NULL;
-
-#define PARENT_TYPE (gnome_dialog_get_type())
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_BOOK,
-};
-
-GtkType
-e_addressbook_search_dialog_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type)
- {
- static const GtkTypeInfo info =
- {
- "EAddressbookSearchDialog",
- sizeof (EAddressbookSearchDialog),
- sizeof (EAddressbookSearchDialogClass),
- (GtkClassInitFunc) e_addressbook_search_dialog_class_init,
- (GtkObjectInitFunc) e_addressbook_search_dialog_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
-
-static void
-e_addressbook_search_dialog_class_init (EAddressbookSearchDialogClass *klass)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- ECanvasClass *canvas_class;
-
- object_class = (GtkObjectClass*) klass;
- widget_class = GTK_WIDGET_CLASS (klass);
- canvas_class = E_CANVAS_CLASS (klass);
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- gtk_object_add_arg_type ("EAddressbookSearchDialog::book", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_BOOK);
-
- object_class->set_arg = e_addressbook_search_dialog_set_arg;
- object_class->get_arg = e_addressbook_search_dialog_get_arg;
- object_class->destroy = e_addressbook_search_dialog_destroy;
-}
-
-static GtkWidget *
-get_widget ()
-{
- return gtk_entry_new();
-}
-
-static char *
-get_query ()
-{
- return "(contains \"email\" \"\")";
-}
-
-static void
-button_press (GtkWidget *widget, EAddressbookSearchDialog *dialog)
-{
- char *query;
- gtk_widget_show(dialog->scrolled_window);
- query = get_query();
- gtk_object_set(GTK_OBJECT(dialog->view),
- "query", query,
- NULL);
- g_free(query);
-}
-
-static void
-e_addressbook_search_dialog_init (EAddressbookSearchDialog *view)
-{
- GtkWidget *button;
- GnomeDialog *dialog = GNOME_DIALOG (view);
-
- gtk_window_set_policy(GTK_WINDOW(view), FALSE, TRUE, FALSE);
-
- view->search = get_widget();
- gtk_box_pack_start(GTK_BOX(dialog->vbox), view->search, TRUE, TRUE, 0);
- gtk_widget_show(view->search);
-
- button = gtk_button_new_with_label(_("Search"));
- gtk_box_pack_start(GTK_BOX(dialog->vbox), button, FALSE, FALSE, 0);
- gtk_signal_connect(GTK_OBJECT(button), "clicked",
- GTK_SIGNAL_FUNC(button_press), view);
- gtk_widget_show(button);
-
- view->view = e_minicard_view_widget_new();
- gtk_widget_show(view->view);
-
- view->scrolled_window = e_scroll_frame_new(NULL, NULL);
- e_scroll_frame_set_policy(E_SCROLL_FRAME(view->scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
- gtk_container_add(GTK_CONTAINER(view->scrolled_window), view->view);
-
- gtk_box_pack_start(GTK_BOX(dialog->vbox), view->scrolled_window, TRUE, TRUE, 0);
-}
-
-GtkWidget *
-e_addressbook_search_dialog_new (EBook *book)
-{
- EAddressbookSearchDialog *view = gtk_type_new (e_addressbook_search_dialog_get_type ());
- gtk_object_set(GTK_OBJECT(view->view),
- "book", book,
- NULL);
- return GTK_WIDGET(view);
-}
-
-static void
-e_addressbook_search_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- EAddressbookSearchDialog *emvw;
-
- emvw = E_ADDRESSBOOK_SEARCH_DIALOG (o);
-
- switch (arg_id){
- case ARG_BOOK:
- gtk_object_set(GTK_OBJECT(emvw->view),
- "book", GTK_VALUE_OBJECT (*arg),
- NULL);
- break;
- }
-}
-
-static void
-e_addressbook_search_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EAddressbookSearchDialog *emvw;
-
- emvw = E_ADDRESSBOOK_SEARCH_DIALOG (object);
-
- switch (arg_id) {
- case ARG_BOOK:
- gtk_object_get(GTK_OBJECT(emvw->view),
- "book", &(GTK_VALUE_OBJECT (*arg)),
- NULL);
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-e_addressbook_search_dialog_destroy (GtkObject *object)
-{
- GTK_OBJECT_CLASS(parent_class)->destroy (object);
-}