diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-04-28 12:23:19 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-04-28 12:23:19 +0800 |
commit | 9483369aa04a5d2c4dc5c0034a3e4431153d9c99 (patch) | |
tree | b52233be1d2618e4af4a919800422774133b4998 /mail/test-mail.c | |
parent | 02ed4a60f394f53de32b10459c959ad6a1f7b887 (diff) | |
download | gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.gz gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.zst gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.zip |
Made Evolution OAF-compatible.
svn path=/trunk/; revision=2673
Diffstat (limited to 'mail/test-mail.c')
-rw-r--r-- | mail/test-mail.c | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/mail/test-mail.c b/mail/test-mail.c index 94102da1d3..4d6707c711 100644 --- a/mail/test-mail.c +++ b/mail/test-mail.c @@ -6,10 +6,41 @@ * * (C) 2000 Helix Code, Inc. */ + +#include <config.h> + #include <gnome.h> #include <bonobo.h> + +#ifdef USING_OAF + +#include <liboaf/liboaf.h> + +static void +init_corba (int *argc, char *argv[]) +{ + gnome_init ("sample-control-container", "1.0", *argc, argv); + oaf_init (*argc, argv); +} + +#else /* USING_OAF */ + #include <libgnorba/gnorba.h> +static void +init_corba (int *argc, char *argv []) +{ + CORBA_Environment ev; + + CORBA_exception_init (&ev); + + gnome_CORBA_init ("sample-control-container", "1.0", argc, argv, 0, &ev); + + CORBA_exception_free (&ev); +} + +#endif /* USING_OAF */ + static guint create_container (void) { @@ -46,21 +77,10 @@ create_container (void) int main (int argc, char *argv []) { - CORBA_Environment ev; - CORBA_ORB orb; - - CORBA_exception_init (&ev); - - gnome_CORBA_init ("sample-control-container", "1.0", &argc, argv, 0, &ev); - - CORBA_exception_free (&ev); + init_corba (&argc, argv); - orb = gnome_CORBA_ORB (); - - if (bonobo_init (orb, NULL, NULL) == FALSE) + if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) g_error ("Could not initialize Bonobo\n"); - - gtk_idle_add ((GtkFunction) create_container, NULL); |