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-list.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-list.c')
-rw-r--r-- | addressbook/backend/ebook/test-client-list.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/addressbook/backend/ebook/test-client-list.c b/addressbook/backend/ebook/test-client-list.c index 8a38ccf4e1..0c93277d5a 100644 --- a/addressbook/backend/ebook/test-client-list.c +++ b/addressbook/backend/ebook/test-client-list.c @@ -2,24 +2,16 @@ #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 <liboaf/liboaf.h> +#include <bonobo/bonobo-i18n.h> #include <bonobo/bonobo-main.h> +#include <libgnome/gnome-init.h> #include "e-book.h" -CORBA_Environment ev; - static void -init_bonobo (int argc, char **argv) +init_bonobo (int *argc, char **argv) { - gnome_init ("blah", "0.0", argc, argv); - oaf_init (argc, 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")); } @@ -35,7 +27,7 @@ get_cursor_cb (EBook *book, EBookStatus status, ECardCursor *cursor, gpointer cl char *vcard = e_card_get_vcard_assume_utf8(card); printf("[%s]\n", vcard); g_free(vcard); - gtk_object_unref(GTK_OBJECT(card)); + g_object_unref(card); } } @@ -46,8 +38,8 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) e_book_get_cursor(book, "", get_cursor_cb, NULL); } -static guint -ebook_create (void) +static gboolean +ebook_create (gpointer data) { EBook *book; @@ -64,11 +56,12 @@ ebook_create (void) int main (int argc, char **argv) { + gnome_program_init("test-client-list", "0.0", LIBGNOME_MODULE, argc, argv, NULL); - CORBA_exception_init (&ev); - init_bonobo (argc, argv); + bonobo_activation_init (argc, argv); + init_bonobo (&argc, argv); - gtk_idle_add ((GtkFunction) ebook_create, NULL); + g_idle_add (ebook_create, NULL); bonobo_main (); |