aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-04-28 12:23:19 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-04-28 12:23:19 +0800
commit9483369aa04a5d2c4dc5c0034a3e4431153d9c99 (patch)
treeb52233be1d2618e4af4a919800422774133b4998 /addressbook/gui
parent02ed4a60f394f53de32b10459c959ad6a1f7b887 (diff)
downloadgsoc2013-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 'addressbook/gui')
-rw-r--r--addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in30
-rw-r--r--addressbook/gui/component/GNOME_Evolution_Addressbook.oafinfo30
-rw-r--r--addressbook/gui/component/Makefile.am9
-rw-r--r--addressbook/gui/component/addressbook-factory.c39
-rw-r--r--addressbook/gui/component/addressbook.c14
-rw-r--r--addressbook/gui/component/addressbook.oafinfo30
6 files changed, 140 insertions, 12 deletions
diff --git a/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in b/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in
new file mode 100644
index 0000000000..8f51a1f07a
--- /dev/null
+++ b/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in
@@ -0,0 +1,30 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:control-factory:addressbook:3e10597b-0591-4d45-b082-d781b7aa6e17"
+ type="exe"
+ location="evolution-addressbook">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="Factory for the sample Addressbook control"/>
+
+</oaf_server>
+
+<oaf_server iid="OAFIID:control:addressbook:851f883b-2fe7-4c94-a1e3-a1f2a7a03c49"
+ type="factory"
+ location="OAFIID:control-factory:addressbook:3e10597b-0591-4d45-b082-d781b7aa6e17">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:BonoboControl/addressbook-control:1.0"/>
+ <item value="IDL:GNOME/Control:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="A sample Bonobo control which displays an addressbook."/>
+
+</oaf_server>
+
+</oaf_info>
diff --git a/addressbook/gui/component/GNOME_Evolution_Addressbook.oafinfo b/addressbook/gui/component/GNOME_Evolution_Addressbook.oafinfo
new file mode 100644
index 0000000000..8f51a1f07a
--- /dev/null
+++ b/addressbook/gui/component/GNOME_Evolution_Addressbook.oafinfo
@@ -0,0 +1,30 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:control-factory:addressbook:3e10597b-0591-4d45-b082-d781b7aa6e17"
+ type="exe"
+ location="evolution-addressbook">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="Factory for the sample Addressbook control"/>
+
+</oaf_server>
+
+<oaf_server iid="OAFIID:control:addressbook:851f883b-2fe7-4c94-a1e3-a1f2a7a03c49"
+ type="factory"
+ location="OAFIID:control-factory:addressbook:3e10597b-0591-4d45-b082-d781b7aa6e17">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:BonoboControl/addressbook-control:1.0"/>
+ <item value="IDL:GNOME/Control:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="A sample Bonobo control which displays an addressbook."/>
+
+</oaf_server>
+
+</oaf_info>
diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am
index c20864912b..9e72319d03 100644
--- a/addressbook/gui/component/Makefile.am
+++ b/addressbook/gui/component/Makefile.am
@@ -35,5 +35,14 @@ evolution_addressbook_LDADD = \
evolution_addressbook_LDFLAGS = `gnome-config --libs gdk_pixbuf`
+if USING_OAF
+oafdir = $(datadir)/oaf
+oaf_DATA = addressbook.oafinfo
+else
gnorbadir = $(sysconfdir)/CORBA/servers
gnorba_DATA = addressbook.gnorba
+endif
+
+EXTRA_DIST = \
+ addressbook.gnorba \
+ addressbook.oafinfo
diff --git a/addressbook/gui/component/addressbook-factory.c b/addressbook/gui/component/addressbook-factory.c
index 83257b1189..aa6214786c 100644
--- a/addressbook/gui/component/addressbook-factory.c
+++ b/addressbook/gui/component/addressbook-factory.c
@@ -10,25 +10,48 @@
#include <config.h>
#include <gnome.h>
-#include <libgnorba/gnorba.h>
#include <bonobo.h>
#include <glade/glade.h>
+
#include "addressbook.h"
-CORBA_Environment ev;
-CORBA_ORB orb;
+#ifdef USING_OAF
+
+#include <liboaf/liboaf.h>
static void
-init_bonobo (int argc, char **argv)
+init_corba (int *argc, char **argv)
{
+ gnome_init_with_popt_table ("evolution-addressbook", "0.0",
+ *argc, argv, oaf_popt_options, 0, NULL);
+
+ oaf_init (*argc, argv);
+}
+
+#else
+
+#include <libgnorba/gnorba.h>
+
+static void
+init_corba (int *argc, char **argv)
+{
+ CORBA_Environment ev;
+
+ CORBA_exception_init (&ev);
gnome_CORBA_init_with_popt_table (
"evolution-addressbook", "0.0",
- &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
+ argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
+
+ CORBA_exception_free (&ev);
+}
- orb = gnome_CORBA_ORB ();
+#endif
- if (bonobo_init (orb, NULL, NULL) == FALSE)
+static void
+init_bonobo (int argc, char **argv)
+{
+ if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE)
g_error (_("Could not initialize Bonobo"));
glade_gnome_init ();
@@ -37,7 +60,7 @@ init_bonobo (int argc, char **argv)
int
main (int argc, char **argv)
{
- CORBA_exception_init (&ev);
+ init_corba (&argc, argv);
init_bonobo (argc, argv);
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index bb4b20406f..d634d5a926 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -9,6 +9,7 @@
*/
#include <config.h>
+
#include <gnome.h>
#include <libgnorba/gnorba.h>
#include <bonobo.h>
@@ -20,6 +21,12 @@
#include "e-minicard-view.h"
#include "e-contact-editor.h"
+#ifdef USING_OAF
+#define CONTROL_FACTORY_ID "OAFIID:control-factory:addressbook:3e10597b-0591-4d45-b082-d781b7aa6e17"
+#else
+#define CONTROL_FACTORY_ID "control-factory:addressbook"
+#endif
+
static void
control_deactivate (BonoboControl *control, BonoboUIHandler *uih)
{
@@ -451,10 +458,9 @@ addressbook_factory_init (void)
if (addressbook_control_factory != NULL)
return;
- addressbook_control_factory =
- bonobo_generic_factory_new (
- "control-factory:addressbook",
- addressbook_factory, NULL);
+ addressbook_control_factory = bonobo_generic_factory_new (CONTROL_FACTORY_ID,
+ addressbook_factory,
+ NULL);
if (addressbook_control_factory == NULL) {
g_error ("I could not register a Addressbook factory.");
diff --git a/addressbook/gui/component/addressbook.oafinfo b/addressbook/gui/component/addressbook.oafinfo
new file mode 100644
index 0000000000..8f51a1f07a
--- /dev/null
+++ b/addressbook/gui/component/addressbook.oafinfo
@@ -0,0 +1,30 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:control-factory:addressbook:3e10597b-0591-4d45-b082-d781b7aa6e17"
+ type="exe"
+ location="evolution-addressbook">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="Factory for the sample Addressbook control"/>
+
+</oaf_server>
+
+<oaf_server iid="OAFIID:control:addressbook:851f883b-2fe7-4c94-a1e3-a1f2a7a03c49"
+ type="factory"
+ location="OAFIID:control-factory:addressbook:3e10597b-0591-4d45-b082-d781b7aa6e17">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:BonoboControl/addressbook-control:1.0"/>
+ <item value="IDL:GNOME/Control:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="A sample Bonobo control which displays an addressbook."/>
+
+</oaf_server>
+
+</oaf_info>