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 /calendar/gui | |
parent | 02ed4a60f394f53de32b10459c959ad6a1f7b887 (diff) | |
download | gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.gz gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.bz2 gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.lz gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.xz gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.tar.zst gsoc2013-evolution-9483369aa04a5d2c4dc5c0034a3e4431153d9c99.zip |
Made Evolution OAF-compatible.
svn path=/trunk/; revision=2673
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/GNOME_Evolution_Calendar_Control.oaf.in | 28 | ||||
-rw-r--r-- | calendar/gui/GNOME_Evolution_Calendar_Control.oafinfo | 28 | ||||
-rw-r--r-- | calendar/gui/Makefile.am | 9 | ||||
-rw-r--r-- | calendar/gui/calendar-control.oafinfo | 28 | ||||
-rw-r--r-- | calendar/gui/evolution-calendar-control.c | 33 | ||||
-rw-r--r-- | calendar/gui/gnomecal.oafinfo | 27 | ||||
-rw-r--r-- | calendar/gui/main.c | 26 |
7 files changed, 163 insertions, 16 deletions
diff --git a/calendar/gui/GNOME_Evolution_Calendar_Control.oaf.in b/calendar/gui/GNOME_Evolution_Calendar_Control.oaf.in new file mode 100644 index 0000000000..fb0f138caf --- /dev/null +++ b/calendar/gui/GNOME_Evolution_Calendar_Control.oaf.in @@ -0,0 +1,28 @@ +<oaf_info> + +<oaf_server iid="OAFIID:control-factory:calendar:f4f90989-0f50-4af2-ad94-8bbdf331f0bc" + type="exe" + location="evolution-calendar"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:Bonobo/GenericFactory:1.0"/> + </oaf_attribute> + + <oaf_attribute name="description" type="string" + value="Factory for the sample Calendar control"/> +</oaf_server> + +<oaf_server iid="OAFIID:control:calendar:dd34ddae-25c6-486b-a8a8-3e8f0286b54c" + type="factory" + location="OAFIID:control-factory:calendar:f4f90989-0f50-4af2-ad94-8bbdf331f0bc"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:BonoboControl/calendar-control:1.0"/> + <item value="IDL:Bonobo/Control:1.0"/> + </oaf_attribute> + + <oaf_attribute name="description" type="string" + value="A sample Bonobo control which displays an calendar."/> +</oaf_server> + +</oaf_info> diff --git a/calendar/gui/GNOME_Evolution_Calendar_Control.oafinfo b/calendar/gui/GNOME_Evolution_Calendar_Control.oafinfo new file mode 100644 index 0000000000..fb0f138caf --- /dev/null +++ b/calendar/gui/GNOME_Evolution_Calendar_Control.oafinfo @@ -0,0 +1,28 @@ +<oaf_info> + +<oaf_server iid="OAFIID:control-factory:calendar:f4f90989-0f50-4af2-ad94-8bbdf331f0bc" + type="exe" + location="evolution-calendar"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:Bonobo/GenericFactory:1.0"/> + </oaf_attribute> + + <oaf_attribute name="description" type="string" + value="Factory for the sample Calendar control"/> +</oaf_server> + +<oaf_server iid="OAFIID:control:calendar:dd34ddae-25c6-486b-a8a8-3e8f0286b54c" + type="factory" + location="OAFIID:control-factory:calendar:f4f90989-0f50-4af2-ad94-8bbdf331f0bc"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:BonoboControl/calendar-control:1.0"/> + <item value="IDL:Bonobo/Control:1.0"/> + </oaf_attribute> + + <oaf_attribute name="description" type="string" + value="A sample Bonobo control which displays an calendar."/> +</oaf_server> + +</oaf_info> diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am index 07e8ca1531..fa15a9286e 100644 --- a/calendar/gui/Makefile.am +++ b/calendar/gui/Makefile.am @@ -81,8 +81,17 @@ evolution_calendar_LDADD = \ evolution_calendar_LDFLAGS = `gnome-config --libs gdk_pixbuf` +if USING_OAF +oafdir = $(datadir)/oaf +oaf_DATA = calendar-control.oafinfo +else gnorbadir = $(sysconfdir)/CORBA/servers gnorba_DATA = calendar-control.gnorba +endif + +EXTRA_DIST = \ + calendar-control.gnorba \ + calendar-control.oafinfo #calendar_pilot_sync_SOURCES = \ # GnomeCal-common.c \ diff --git a/calendar/gui/calendar-control.oafinfo b/calendar/gui/calendar-control.oafinfo new file mode 100644 index 0000000000..fb0f138caf --- /dev/null +++ b/calendar/gui/calendar-control.oafinfo @@ -0,0 +1,28 @@ +<oaf_info> + +<oaf_server iid="OAFIID:control-factory:calendar:f4f90989-0f50-4af2-ad94-8bbdf331f0bc" + type="exe" + location="evolution-calendar"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:Bonobo/GenericFactory:1.0"/> + </oaf_attribute> + + <oaf_attribute name="description" type="string" + value="Factory for the sample Calendar control"/> +</oaf_server> + +<oaf_server iid="OAFIID:control:calendar:dd34ddae-25c6-486b-a8a8-3e8f0286b54c" + type="factory" + location="OAFIID:control-factory:calendar:f4f90989-0f50-4af2-ad94-8bbdf331f0bc"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:BonoboControl/calendar-control:1.0"/> + <item value="IDL:Bonobo/Control:1.0"/> + </oaf_attribute> + + <oaf_attribute name="description" type="string" + value="A sample Bonobo control which displays an calendar."/> +</oaf_server> + +</oaf_info> diff --git a/calendar/gui/evolution-calendar-control.c b/calendar/gui/evolution-calendar-control.c index c8c419d471..54ac148889 100644 --- a/calendar/gui/evolution-calendar-control.c +++ b/calendar/gui/evolution-calendar-control.c @@ -2,10 +2,14 @@ #include <config.h> #include <gnome.h> -#include <libgnorba/gnorba.h> #include <bonobo.h> #include <bonobo/bonobo-control.h> +#ifdef USING_OAF +#include <liboaf/liboaf.h> +#else +#include <libgnorba/gnorba.h> +#endif #include <cal-util/timeutil.h> #include <gui/alarm.h> @@ -17,6 +21,11 @@ #define PROPERTY_CALENDAR_URI_IDX 1 +#ifdef USING_OAF +#define CONTROL_FACTORY_ID "OAFIID:control-factory:calendar:f4f90989-0f50-4af2-ad94-8bbdf331f0bc" +#else +#define CONTROL_FACTORY_ID "control-factory:calendar" +#endif CORBA_Environment ev; CORBA_ORB orb; @@ -36,15 +45,21 @@ control_activate_cb (BonoboControl *control, static void -init_bonobo (int argc, char **argv) +init_bonobo (int *argc, char **argv) { +#ifdef USING_OAF + /* FIXME: VERSION instead of "0.0". */ + gnome_init_with_popt_table ("evolution-calendar", "0.0", + *argc, argv, oaf_popt_options, + 0, NULL); + oaf_init (*argc, argv); +#else gnome_CORBA_init_with_popt_table ( "evolution-calendar", "0.0", - &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); + argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); +#endif - 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")); } @@ -144,8 +159,10 @@ calendar_factory_init (void) if (calendar_control_factory != NULL) return; + puts ("XXXXXX - initializing calendar factory!!!"); + calendar_control_factory = - bonobo_generic_factory_new ("control-factory:calendar", + bonobo_generic_factory_new (CONTROL_FACTORY_ID, calendar_factory, NULL); if (calendar_control_factory == NULL) { @@ -164,7 +181,7 @@ main (int argc, char **argv) CORBA_exception_init (&ev); - init_bonobo (argc, argv); + init_bonobo (&argc, argv); calendar_factory_init (); diff --git a/calendar/gui/gnomecal.oafinfo b/calendar/gui/gnomecal.oafinfo new file mode 100644 index 0000000000..c4b91b9dd8 --- /dev/null +++ b/calendar/gui/gnomecal.oafinfo @@ -0,0 +1,27 @@ +<oaf_info> + +<oaf_server iid="OAFIID:IDL:GNOME:Calendar:Repository:1.0:56989bb6-65a1-430c-86a8-81bbe64bf7ab" + type="factory" + location="OAFIID:IDL:GNOME:Calendar:RepositoryLocator:1.0:83b25bb0-b68b-4c6b-86e7-c303e9897c21"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:Gnome/Calendar/Repository:1.0"/> + </oaf_attribute> + + <oaf_attribute name="description" type="string" + value="Calendar Repository"/> +</oaf_server> + +<oaf_server iid="OAFIID:IDL:GNOME:Calendar:RepositoryLocator:1.0:83b25bb0-b68b-4c6b-86e7-c303e9897c21" + type="exe" + location="gnomecal"> + + <oaf_attribute name="repo_ids" type="stringv"> + <item value="IDL:GNOME/GenericFactory:1.0"/> + </oaf_attribute> + + <oaf_attribute name="description" type="string" + value="Calendar Server"/> +</oaf_server> + +</oaf_info> diff --git a/calendar/gui/main.c b/calendar/gui/main.c index 904868513e..46f4c31e3e 100644 --- a/calendar/gui/main.c +++ b/calendar/gui/main.c @@ -9,6 +9,7 @@ */ #include <config.h> + #include <pwd.h> #include <unistd.h> #include <sys/types.h> @@ -325,22 +326,31 @@ int main (int argc, char **argv) { GnomeClient *client; - CORBA_Environment ev; GtkWidget *cal_window; GnomeCalendar *cal_frame; bindtextdomain (PACKAGE, GNOMELOCALEDIR); textdomain (PACKAGE); - CORBA_exception_init (&ev); - gnome_CORBA_init_with_popt_table ("calendar", VERSION, &argc, argv, - options, 0, NULL, 0, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("main(): could not initialize the ORB"); +#ifdef USING_OAF + gnome_init_with_popt_table ("calendar", VERSION, argc, argv, oaf_popt_options, + 0, NULL); + oaf_init (argc, argv); +#else + { + CORBA_Environment ev; + + CORBA_exception_init (&ev); + gnome_CORBA_init_with_popt_table ("calendar", VERSION, &argc, argv, + options, 0, NULL, 0, &ev); + if (ev._major != CORBA_NO_EXCEPTION) { + g_message ("main(): could not initialize the ORB"); + CORBA_exception_free (&ev); + exit (EXIT_FAILURE); + } CORBA_exception_free (&ev); - exit (EXIT_FAILURE); } - CORBA_exception_free (&ev); +#endif if (!bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) { g_message ("main(): could not initialize Bonobo"); |