diff options
Diffstat (limited to 'calendar/cal-client/client-test.c')
-rw-r--r-- | calendar/cal-client/client-test.c | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/calendar/cal-client/client-test.c b/calendar/cal-client/client-test.c index fa8316707d..f4b847eb65 100644 --- a/calendar/cal-client/client-test.c +++ b/calendar/cal-client/client-test.c @@ -1,8 +1,7 @@ #include <config.h> -#include <libgnorba/gnorba.h> #include <bonobo.h> +#include <gnome.h> #include <cal-client/cal-client.h> - static CalClient *client1; static CalClient *client2; @@ -145,13 +144,25 @@ client_destroy_cb (GtkObject *object, gpointer data) gtk_main_quit (); } -int -main (int argc, char **argv) +#ifdef USING_OAF + +#include <liboaf/liboaf.h> + +static void +init_corba (int *argc, char **argv) { - CORBA_Environment ev; + gnome_init ("tl-test", VERSION, *argc, argv); + oaf_init (*argc, argv); +} - bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE); +#else + +#include <libgnorba/gnorba.h> + +static void +init_corba (int *argc, char **argv) +{ + CORBA_Environment ev; CORBA_exception_init (&ev); gnome_CORBA_init ("tl-test", VERSION, &argc, argv, 0, &ev); @@ -161,6 +172,17 @@ main (int argc, char **argv) exit (1); } CORBA_exception_free (&ev); +} + +#endif + +int +main (int argc, char **argv) +{ + bindtextdomain (PACKAGE, GNOMELOCALEDIR); + textdomain (PACKAGE); + + init_corba (&argc, argv); if (!bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) { g_message ("main(): could not initialize Bonobo"); |