diff options
author | Dan Winship <danw@src.gnome.org> | 2000-08-30 02:13:21 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-08-30 02:13:21 +0800 |
commit | 3ad97477c9110a8cfd8e9641f84c8984abf33be5 (patch) | |
tree | 0bacc110535936967cc8b0b44fbb2625d4d344dc /addressbook/backend | |
parent | e02a9171c4acc0d0884c32ad6b9119663b0d9bf2 (diff) | |
download | gsoc2013-evolution-3ad97477c9110a8cfd8e9641f84c8984abf33be5.tar.gz gsoc2013-evolution-3ad97477c9110a8cfd8e9641f84c8984abf33be5.tar.zst gsoc2013-evolution-3ad97477c9110a8cfd8e9641f84c8984abf33be5.zip |
Remove USING_OAF checks
svn path=/trunk/; revision=5099
Diffstat (limited to 'addressbook/backend')
-rw-r--r-- | addressbook/backend/ebook/e-book.c | 13 | ||||
-rw-r--r-- | addressbook/backend/ebook/load-gnomecard-addressbook.c | 30 | ||||
-rw-r--r-- | addressbook/backend/ebook/load-pine-addressbook.c | 30 | ||||
-rw-r--r-- | addressbook/backend/ebook/test-client-list.c | 11 | ||||
-rw-r--r-- | addressbook/backend/ebook/test-client.c | 30 | ||||
-rw-r--r-- | addressbook/backend/pas/pas-book-factory.c | 46 |
6 files changed, 11 insertions, 149 deletions
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c index 38179559ba..2023f1bf83 100644 --- a/addressbook/backend/ebook/e-book.c +++ b/addressbook/backend/ebook/e-book.c @@ -11,6 +11,7 @@ #include <config.h> #include <gtk/gtksignal.h> #include <gtk/gtkmarshal.h> +#include <liboaf/liboaf.h> #include "addressbook.h" #include "e-card-cursor.h" @@ -19,13 +20,7 @@ GtkObjectClass *e_book_parent_class; -#ifdef USING_OAF -#include <liboaf/liboaf.h> #define CARDSERVER_OAF_ID "OAFIID:evolution:addressbook-server:0fbc844d-c721-4615-98d0-d67eacf42d80" -#else -#include <libgnorba/gnorba.h> -#define CARDSERVER_GOAD_ID "evolution:addressbook-server" -#endif typedef enum { URINotLoaded, @@ -450,14 +445,8 @@ e_book_construct (EBook *book) * Connect to the Personal Addressbook Server. */ -#ifdef USING_OAF book->priv->book_factory = (Evolution_BookFactory) oaf_activate_from_id (CARDSERVER_OAF_ID, 0, NULL, NULL); -#else - book->priv->book_factory = (Evolution_BookFactory) - goad_server_activate_with_id (NULL, CARDSERVER_GOAD_ID, 0, NULL); -#endif - if (book->priv->book_factory == CORBA_OBJECT_NIL) { g_warning ("e_book_construct: Could not obtain a handle " "to the Personal Addressbook Server!\n"); diff --git a/addressbook/backend/ebook/load-gnomecard-addressbook.c b/addressbook/backend/ebook/load-gnomecard-addressbook.c index f1f20bf50b..3295854b0a 100644 --- a/addressbook/backend/ebook/load-gnomecard-addressbook.c +++ b/addressbook/backend/ebook/load-gnomecard-addressbook.c @@ -1,6 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ #include <config.h> #include <bonobo.h> +#include <liboaf/liboaf.h> #include <gnome.h> #include <stdio.h> @@ -8,32 +9,6 @@ static CORBA_Environment ev; -#ifdef USING_OAF - -#include <liboaf/liboaf.h> - -static void -init_corba (int *argc, char **argv) -{ - gnome_init_with_popt_table("blah", "0.0", *argc, argv, NULL, 0, NULL); - - oaf_init (*argc, argv); -} - -#else - -#include <libgnorba/gnorba.h> - -static void -init_corba (int *argc, char **argv) -{ - gnome_CORBA_init_with_popt_table ( - "blah", "0.0", - argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); -} - -#endif - static void init_bonobo (int argc, char **argv) { @@ -99,7 +74,8 @@ main (int argc, char **argv) CORBA_exception_init (&ev); - init_corba (&argc, argv); + gnome_init_with_popt_table("blah", "0.0", argc, argv, NULL, 0, NULL); + oaf_init (argc, argv); init_bonobo (argc, argv); gtk_idle_add ((GtkFunction) ebook_create, NULL); diff --git a/addressbook/backend/ebook/load-pine-addressbook.c b/addressbook/backend/ebook/load-pine-addressbook.c index 0cc1be693c..7d74fe20a4 100644 --- a/addressbook/backend/ebook/load-pine-addressbook.c +++ b/addressbook/backend/ebook/load-pine-addressbook.c @@ -1,6 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ #include <config.h> #include <bonobo.h> +#include <liboaf/liboaf.h> #include <gnome.h> #include <stdio.h> @@ -8,32 +9,6 @@ static CORBA_Environment ev; -#ifdef USING_OAF - -#include <liboaf/liboaf.h> - -static void -init_corba (int *argc, char **argv) -{ - gnome_init_with_popt_table("blah", "0.0", *argc, argv, NULL, 0, NULL); - - oaf_init (*argc, argv); -} - -#else - -#include <libgnorba/gnorba.h> - -static void -init_corba (int *argc, char **argv) -{ - gnome_CORBA_init_with_popt_table ( - "blah", "0.0", - argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); -} - -#endif - static void init_bonobo (int argc, char **argv) { @@ -149,7 +124,8 @@ main (int argc, char **argv) CORBA_exception_init (&ev); - init_corba (&argc, argv); + gnome_init_with_popt_table("blah", "0.0", argc, argv, NULL, 0, NULL); + oaf_init (argc, argv); init_bonobo (argc, argv); gtk_idle_add ((GtkFunction) ebook_create, NULL); diff --git a/addressbook/backend/ebook/test-client-list.c b/addressbook/backend/ebook/test-client-list.c index e492323310..69422ba20e 100644 --- a/addressbook/backend/ebook/test-client-list.c +++ b/addressbook/backend/ebook/test-client-list.c @@ -2,12 +2,7 @@ #include <config.h> #include <bonobo.h> #include <gnome.h> - -#ifdef USING_OAF #include <liboaf/liboaf.h> -#else -#include <libgnorba/gnorba.h> -#endif #include "e-book.h" @@ -16,14 +11,8 @@ CORBA_Environment ev; static void init_bonobo (int argc, char **argv) { -#ifdef USING_OAF gnome_init ("blah", "0.0", argc, argv); oaf_init (argc, argv); -#else - gnome_CORBA_init_with_popt_table ( - "blah", "0.0", - &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); -#endif if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) g_error (_("Could not initialize Bonobo")); diff --git a/addressbook/backend/ebook/test-client.c b/addressbook/backend/ebook/test-client.c index ef13c1ab96..acbeedac41 100644 --- a/addressbook/backend/ebook/test-client.c +++ b/addressbook/backend/ebook/test-client.c @@ -1,6 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ #include <config.h> #include <bonobo.h> +#include <liboaf/liboaf.h> #include <gnome.h> #include <e-book.h> @@ -32,32 +33,6 @@ static CORBA_Environment ev; static char *cardstr; -#ifdef USING_OAF - -#include <liboaf/liboaf.h> - -static void -init_corba (int *argc, char **argv) -{ - gnome_init_with_popt_table("blah", "0.0", *argc, argv, NULL, 0, NULL); - - oaf_init (*argc, argv); -} - -#else - -#include <libgnorba/gnorba.h> - -static void -init_corba (int *argc, char **argv) -{ - gnome_CORBA_init_with_popt_table ( - "blah", "0.0", - argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); -} - -#endif - static void init_bonobo (int argc, char **argv) { @@ -172,7 +147,8 @@ main (int argc, char **argv) CORBA_exception_init (&ev); - init_corba (&argc, argv); + gnome_init_with_popt_table ("blah", "0.0", argc, argv, NULL, 0, NULL); + oaf_init (argc, argv); init_bonobo (argc, argv); cardstr = NULL; diff --git a/addressbook/backend/pas/pas-book-factory.c b/addressbook/backend/pas/pas-book-factory.c index 626c7420e2..02dedbabe5 100644 --- a/addressbook/backend/pas/pas-book-factory.c +++ b/addressbook/backend/pas/pas-book-factory.c @@ -10,17 +10,12 @@ #include <config.h> #include <ctype.h> #include <gnome.h> +#include <liboaf/liboaf.h> #include "addressbook.h" #include "pas-book-factory.h" -#ifdef USING_OAF -#include <liboaf/liboaf.h> #define PAS_BOOK_FACTORY_OAF_ID "OAFIID:evolution:addressbook-server:0fbc844d-c721-4615-98d0-d67eacf42d80" -#else -#include <libgnorba/gnorba.h> -#define PAS_BOOK_FACTORY_GOAD_ID "evolution:addressbook-server" -#endif static BonoboObjectClass *pas_book_factory_parent_class; POA_Evolution_BookFactory__vepv pas_book_factory_vepv; @@ -424,8 +419,6 @@ pas_book_factory_new (void) return factory; } -#ifdef USING_OAF - static gboolean register_factory (CORBA_Object obj) { @@ -451,43 +444,6 @@ register_factory (CORBA_Object obj) } } -#else - -static gboolean -register_factory (CORBA_Object obj) -{ - CORBA_Environment ev; - int ret; - - CORBA_exception_init (&ev); - ret = goad_server_register (NULL, obj, PAS_BOOK_FACTORY_GOAD_ID, "server", &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("pas_book_factory_activate: Exception " - "registering PASBookFactory!\n"); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - - switch (ret) { - case 0: - return TRUE; - case -2: - g_message ("pas_book_factory_activate: Another " - "PASBookFactory is already running.\n"); - return FALSE; - case -1: - default: - g_message ("pas_book_factory_activate: Error " - "registering PASBookFactory!\n"); - return FALSE; - } -} - -#endif - /** * pas_book_factory_activate: */ |