aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/search
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-08-13 02:12:04 +0800
committerChris Lahey <clahey@src.gnome.org>2000-08-13 02:12:04 +0800
commite9faa62d2f9f6bae897c2f718ee25b5a78e159c7 (patch)
treea181fc77a7125689fc33b5a208eaaf4cf6efcc6b /addressbook/gui/search
parent88f9174bfd2a9177e7f9298ec40d6b7b331286a9 (diff)
downloadgsoc2013-evolution-e9faa62d2f9f6bae897c2f718ee25b5a78e159c7.tar
gsoc2013-evolution-e9faa62d2f9f6bae897c2f718ee25b5a78e159c7.tar.gz
gsoc2013-evolution-e9faa62d2f9f6bae897c2f718ee25b5a78e159c7.tar.bz2
gsoc2013-evolution-e9faa62d2f9f6bae897c2f718ee25b5a78e159c7.tar.lz
gsoc2013-evolution-e9faa62d2f9f6bae897c2f718ee25b5a78e159c7.tar.xz
gsoc2013-evolution-e9faa62d2f9f6bae897c2f718ee25b5a78e159c7.tar.zst
gsoc2013-evolution-e9faa62d2f9f6bae897c2f718ee25b5a78e159c7.zip
Added addressbook/gui/search/Makefile.
2000-08-12 Christopher James Lahey <clahey@helixcode.com> * configure.in: Added addressbook/gui/search/Makefile. From addressbook/ChangeLog 2000-08-12 Christopher James Lahey <clahey@helixcode.com> * gui/Makefile.am: Added the search directory. * backend/ebook/e-book.c: Fixed a potential crash. * gui/minicard/e-reflow-sorted.h: Fixed an include line. * gui/search/.cvsignore, gui/search/Makefile.am: New files. * gui/search/e-addressbook-search-dialog.c: Fixed compilation. svn path=/trunk/; revision=4779
Diffstat (limited to 'addressbook/gui/search')
-rw-r--r--addressbook/gui/search/.cvsignore7
-rw-r--r--addressbook/gui/search/Makefile.am16
-rw-r--r--addressbook/gui/search/e-addressbook-search-dialog.c27
3 files changed, 40 insertions, 10 deletions
diff --git a/addressbook/gui/search/.cvsignore b/addressbook/gui/search/.cvsignore
new file mode 100644
index 0000000000..d6c55c7345
--- /dev/null
+++ b/addressbook/gui/search/.cvsignore
@@ -0,0 +1,7 @@
+.deps
+.libs
+.pure
+Makefile
+Makefile.in
+*.lo
+*.la
diff --git a/addressbook/gui/search/Makefile.am b/addressbook/gui/search/Makefile.am
new file mode 100644
index 0000000000..d18e9dcdfe
--- /dev/null
+++ b/addressbook/gui/search/Makefile.am
@@ -0,0 +1,16 @@
+INCLUDES = \
+ -DG_LOG_DOMAIN=\"e-addressbook-search\" \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/addressbook/backend \
+ -I$(top_builddir)/addressbook/backend \
+ -I$(top_srcdir)/addressbook/contact-editor \
+ -I$(top_srcdir)/widgets/e-text \
+ -I$(top_srcdir)/widgets/misc \
+ $(BONOBO_GNOME_CFLAGS)
+
+noinst_LIBRARIES = \
+ libeaddressbooksearchdialog.a
+
+libeaddressbooksearchdialog_a_SOURCES = \
+ e-addressbook-search-dialog.c \
+ e-addressbook-search-dialog.h
diff --git a/addressbook/gui/search/e-addressbook-search-dialog.c b/addressbook/gui/search/e-addressbook-search-dialog.c
index c25187f0b4..e89eafa074 100644
--- a/addressbook/gui/search/e-addressbook-search-dialog.c
+++ b/addressbook/gui/search/e-addressbook-search-dialog.c
@@ -24,7 +24,7 @@
#include <gnome.h>
#include <e-util/e-canvas.h>
#include "e-addressbook-search-dialog.h"
-#include "e-minicard-view-widget.h"
+#include "addressbook/gui/minicard/e-minicard-view-widget.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);
@@ -85,15 +85,22 @@ e_addressbook_search_dialog_class_init (EAddressbookSearchDialogClass *klass)
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;
+}
- widget_class->realize = e_addressbook_search_dialog_realize;
- widget_class->size_allocate = e_addressbook_search_dialog_size_allocate;
+static GtkWidget *
+get_widget ()
+{
+ return gtk_entry_new();
+}
- canvas_class->reflow = e_addressbook_search_dialog_reflow;
+static char *
+get_query ()
+{
+ return "(contains \"email\" \"\")";
}
static void
-button_press (GtkWidget *widget, EAddressBookSearchDialog *dialog)
+button_press (GtkWidget *widget, EAddressbookSearchDialog *dialog)
{
char *query;
gtk_widget_show(dialog->view);
@@ -107,7 +114,7 @@ button_press (GtkWidget *widget, EAddressBookSearchDialog *dialog)
static void
e_addressbook_search_dialog_init (EAddressbookSearchDialog *view)
{
- GtkWidget *search_button;
+ GtkWidget *button;
GnomeDialog *dialog = GNOME_DIALOG (view);
view->search = get_widget();
@@ -116,6 +123,8 @@ e_addressbook_search_dialog_init (EAddressbookSearchDialog *view)
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();
@@ -141,7 +150,7 @@ e_addressbook_search_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
switch (arg_id){
case ARG_BOOK:
- gtk_object_set(GTK_OBJECT(view->view),
+ gtk_object_set(GTK_OBJECT(emvw->view),
"book", GTK_VALUE_OBJECT (*arg),
NULL);
break;
@@ -157,7 +166,7 @@ e_addressbook_search_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_i
switch (arg_id) {
case ARG_BOOK:
- gtk_object_get(GTK_OBJECT(view->view),
+ gtk_object_get(GTK_OBJECT(emvw->view),
"book", &(GTK_VALUE_OBJECT (*arg)),
NULL);
break;
@@ -170,7 +179,5 @@ e_addressbook_search_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_i
static void
e_addressbook_search_dialog_destroy (GtkObject *object)
{
- EAddressbookSearchDialog *view = E_ADDRESSBOOK_SEARCH_DIALOG(object);
-
GTK_OBJECT_CLASS(parent_class)->destroy (object);
}