diff options
author | Chris Toshok <toshok@ximian.com> | 2002-11-03 14:14:01 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-11-03 14:14:01 +0800 |
commit | f54b808bf2b6c6649f33c062036a207fe152bdd8 (patch) | |
tree | 9e4f2e0a40597c4ea425ba60501f20f5403ed76f /addressbook/backend/ebook/test-client.c | |
parent | 805e75e7d9315f8cb9f6a7213fc373a8a873a242 (diff) | |
download | gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar.gz gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar.bz2 gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar.lz gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar.xz gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.tar.zst gsoc2013-evolution-f54b808bf2b6c6649f33c062036a207fe152bdd8.zip |
just include glib.h instead of the gtk stuff.
2002-11-02 Chris Toshok <toshok@ximian.com>
* backend/ebook/e-book-types.h: just include glib.h instead of the
gtk stuff.
* backend/ebook/e-book-listener.[ch]: convert to
GObject/bonobo-activation/etc/etc.
* e-book-util.[ch]: same.
* e-book-view-listener.[ch]: same.
* e-book-view.[ch]: same.
* e-book.[ch]: same.
* e-card-compare.[ch]: same.
* e-card-cursor.[ch]: same.
* e-card-simple.[ch]: same.
* e-card.[ch]: same.
* e-destination.[ch]: same.
* evolution-ldif-importer.c: same.
* evolution-vcard-importer.c: same.
* load-gnomecard-addressbook.c: same.
* load-pine-addressbok.c: same.
* test-card.c: same.
* test-client-list.c: same.
* test-client.c: same.
* backend/ebook/Makefile.am: add e-book-marshal.c to SOURCES, add
e-book-marshal.[ch] to CLEANFILES, and add e-book-marshal.list to
EXTRA_DIST. Also, remove the camel libs from the test LDADD's,
and leave e-destination.[ch] out of the build.
* backend/ebook/.cvsignore: ignore e-book-marshal.[ch]
* backend/ebook/e-book-marshal.list: marshallers for e-book.
svn path=/trunk/; revision=18505
Diffstat (limited to 'addressbook/backend/ebook/test-client.c')
-rw-r--r-- | addressbook/backend/ebook/test-client.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/addressbook/backend/ebook/test-client.c b/addressbook/backend/ebook/test-client.c index 300f25958b..96706eea7c 100644 --- a/addressbook/backend/ebook/test-client.c +++ b/addressbook/backend/ebook/test-client.c @@ -1,12 +1,9 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ #include <config.h> #include <glib.h> -#include <gtk/gtkmain.h> -#include <libgnome/gnome-defs.h> -#include <libgnome/gnome-i18n.h> -#include <libgnomeui/gnome-init.h> +#include <bonobo/bonobo-i18n.h> #include <bonobo/bonobo-main.h> -#include <liboaf/liboaf.h> +#include <libgnome/gnome-init.h> #include "e-book.h" #include "e-book-util.h" @@ -28,9 +25,9 @@ static CORBA_Environment ev; static char *cardstr; static void -init_bonobo (int argc, char **argv) +init_bonobo (int *argc, char **argv) { - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) + if (bonobo_init (argc, argv) == FALSE) g_error (_("Could not initialize Bonobo")); } @@ -51,7 +48,7 @@ get_cursor_cb (EBook *book, EBookStatus status, ECardCursor *cursor, gpointer cl char *vcard = e_card_get_vcard_assume_utf8(card); printf("Get all cards callback: [%s]\n", vcard); g_free(vcard); - gtk_object_unref(GTK_OBJECT(card)); + g_object_unref(card); } } @@ -63,7 +60,7 @@ get_card_cb (EBook *book, EBookStatus status, ECard *card, gpointer closure) vcard = e_card_get_vcard_assume_utf8(card); printf ("Card added: [%s]\n", vcard); g_free(vcard); - gtk_object_unref(GTK_OBJECT(card)); + g_object_unref(card); printf ("Getting cards..\n"); e_book_get_cursor(book, "", get_cursor_cb, NULL); @@ -98,7 +95,7 @@ get_fields_cb (EBook *book, EBookStatus status, EList *fields, gpointer closure) printf (" %s\n", (char*)e_iterator_get (iter)); } - gtk_object_unref(GTK_OBJECT(fields)); + g_object_unref(fields); } else { printf ("No supported fields?\n"); @@ -121,8 +118,8 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) e_book_authenticate_user (book, "username", "password", "auth_method", auth_user_cb, NULL); } -static guint -ebook_create (void) +static gboolean +ebook_create (gpointer data) { EBook *book; @@ -174,9 +171,10 @@ main (int argc, char **argv) CORBA_exception_init (&ev); - gnome_init_with_popt_table ("blah", "0.0", argc, argv, NULL, 0, NULL); - oaf_init (argc, argv); - init_bonobo (argc, argv); + gnome_program_init("test-client", "0.0", LIBGNOME_MODULE, argc, argv, NULL); + + bonobo_activation_init (argc, argv); + init_bonobo (&argc, argv); cardstr = NULL; if (argc == 2) @@ -185,7 +183,7 @@ main (int argc, char **argv) if (cardstr == NULL) cardstr = TEST_VCARD; - gtk_idle_add ((GtkFunction) ebook_create, NULL); + g_idle_add (ebook_create, NULL); bonobo_main (); |