aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog24
-rw-r--r--mail/GNOME_Evolution_Mail.oaf.in28
-rw-r--r--mail/GNOME_Evolution_Mail.oafinfo28
-rw-r--r--mail/Makefile.am14
-rw-r--r--mail/evolution-mail.oafinfo28
-rw-r--r--mail/folder-browser-factory.c13
-rw-r--r--mail/main.c35
-rw-r--r--mail/test-mail.c46
8 files changed, 187 insertions, 29 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index af7b74ab6c..b119e9a18e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,27 @@
+2000-04-27 Ettore Perazzoli <ettore@helixcode.com>
+
+ * folder-browser-factory.c: New macro `CONTROL_FACTORY_ID', which
+ is #defined to a different value according to whether we are
+ `USING_OAF' or not.
+ (folder_browser_factory_init): Use `CONTROL_FACTORY_ID'.
+
+ * test-mail.c
+ (init_corba): New helper function, implemented differently
+ according to `USING_OAF'.
+ (main): Use `init_corba()'.
+
+ * main.c
+ (init_corba): New helper function, implemented differently
+ according to `USING_OAF'.
+ (init_bonobo): Use `init_corba()'.
+
+ * Makefile.am: Install OAF stuff if `USING_OAF'. Add
+ `-I$(datadir)/idl' to the `orbit-idl' command-line so that we can
+ use Bonobo IDL files installed under our prefix as well. Also,
+ use `$(ORBIT_IDL)' instead of hardcoded `orbit-idl'.
+
+ * evolution-mail.oafinfo: New file.
+
2000-04-27 Dan Winship <danw@helixcode.com>
* mail-format.c: Move text_to_html to e-util.
diff --git a/mail/GNOME_Evolution_Mail.oaf.in b/mail/GNOME_Evolution_Mail.oaf.in
new file mode 100644
index 0000000000..6c284ece5c
--- /dev/null
+++ b/mail/GNOME_Evolution_Mail.oaf.in
@@ -0,0 +1,28 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:control-factory:evolution-mail:25902062-543b-4f44-8702-d90145fcdbf2"
+ type="exe"
+ location="evolution-mail">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="Evolution mail folder factory component."/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:control:evolution-mail:833d5a71-a201-4a0e-b7e6-5475c5c4cb45"
+ type="factory"
+ location="OAFIID:control-factory:evolution-mail:25902062-543b-4f44-8702-d90145fcdbf2">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:BonoboControl/evolution-mail:1.0"/>
+ <item value="IDL:GNOME/Control:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="Evolution mail folder display component."/>
+</oaf_server>
+
+</oaf_info>
diff --git a/mail/GNOME_Evolution_Mail.oafinfo b/mail/GNOME_Evolution_Mail.oafinfo
new file mode 100644
index 0000000000..6c284ece5c
--- /dev/null
+++ b/mail/GNOME_Evolution_Mail.oafinfo
@@ -0,0 +1,28 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:control-factory:evolution-mail:25902062-543b-4f44-8702-d90145fcdbf2"
+ type="exe"
+ location="evolution-mail">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="Evolution mail folder factory component."/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:control:evolution-mail:833d5a71-a201-4a0e-b7e6-5475c5c4cb45"
+ type="factory"
+ location="OAFIID:control-factory:evolution-mail:25902062-543b-4f44-8702-d90145fcdbf2">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:BonoboControl/evolution-mail:1.0"/>
+ <item value="IDL:GNOME/Control:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="Evolution mail folder display component."/>
+</oaf_server>
+
+</oaf_info>
diff --git a/mail/Makefile.am b/mail/Makefile.am
index 4c2193330f..283333d2a4 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -63,13 +63,21 @@ test_mail_LDADD = \
$(BONOBO_HTML_GNOME_LIBS)
+GOAD_FILES = evolution-mail.gnorba
+OAF_FILES = evolution-mail.oafinfo
+
+if USING_OAF
+oafdir = $(datadir)/oaf
+oaf_DATA = $(OAF_FILES)
+else
gnorbadir = $(sysconfdir)/CORBA/servers
-gnorba_DATA = evolution-mail.gnorba
+gnorba_DATA = $(GOAD_FILES)
+endif
$(EVOLUTION_MAIL_CORBA_GENERATED): Mail.idl
- orbit-idl -I`$(GNOME_CONFIG) --datadir`/idl -I$(srcdir) $(srcdir)/Mail.idl
+ $(ORBIT_IDL) -I$(datadir)/idl -I`$(GNOME_CONFIG) --datadir`/idl -I$(srcdir) $(srcdir)/Mail.idl
-EXTRA_DIST = Mail.idl evolution-mail.gnorba
+EXTRA_DIST = Mail.idl $(GOAD_FILES) $(OAF_FILES)
dist-hook:
-mkdir $(distdir)/pixmaps
diff --git a/mail/evolution-mail.oafinfo b/mail/evolution-mail.oafinfo
new file mode 100644
index 0000000000..6c284ece5c
--- /dev/null
+++ b/mail/evolution-mail.oafinfo
@@ -0,0 +1,28 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:control-factory:evolution-mail:25902062-543b-4f44-8702-d90145fcdbf2"
+ type="exe"
+ location="evolution-mail">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/GenericFactory:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="Evolution mail folder factory component."/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:control:evolution-mail:833d5a71-a201-4a0e-b7e6-5475c5c4cb45"
+ type="factory"
+ location="OAFIID:control-factory:evolution-mail:25902062-543b-4f44-8702-d90145fcdbf2">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:BonoboControl/evolution-mail:1.0"/>
+ <item value="IDL:GNOME/Control:1.0"/>
+ </oaf_attribute>
+
+ <oaf_attribute name="description" type="string"
+ value="Evolution mail folder display component."/>
+</oaf_server>
+
+</oaf_info>
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
index 0f438a7118..a485df29d9 100644
--- a/mail/folder-browser-factory.c
+++ b/mail/folder-browser-factory.c
@@ -23,6 +23,11 @@
#include <camel/camel-stream-fs.h>
#include "mail-ops.h"
+#ifdef USING_OAF
+#define CONTROL_FACTORY_ID "OAFIID:control-factory:evolution-mail:25902062-543b-4f44-8702-d90145fcdbf2"
+#else
+#define CONTROL_FACTORY_ID "control-factory:evolution-mail"
+#endif
static void
folder_browser_set_shell (EvolutionServiceRepository *sr,
@@ -252,14 +257,12 @@ folder_browser_factory_init (void)
{
static BonoboGenericFactory *bonobo_folder_browser_factory = NULL;
-
if (bonobo_folder_browser_factory != NULL)
return;
- bonobo_folder_browser_factory =
- bonobo_generic_factory_new (
- "control-factory:evolution-mail",
- folder_browser_factory, NULL);
+ bonobo_folder_browser_factory = bonobo_generic_factory_new (CONTROL_FACTORY_ID,
+ folder_browser_factory,
+ NULL);
if (bonobo_folder_browser_factory == NULL){
e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
diff --git a/mail/main.c b/mail/main.c
index 953f424a79..2102a153ff 100644
--- a/mail/main.c
+++ b/mail/main.c
@@ -8,7 +8,6 @@
*/
#include <config.h>
#include <gnome.h>
-#include <libgnorba/gnorba.h>
#include <bonobo/bonobo-main.h>
#include <glade/glade.h>
#include "e-util/e-gui-utils.h"
@@ -16,28 +15,48 @@
#include "main.h"
#include "session.h"
-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-mail-component", VERSION, argc, argv,
+ oaf_popt_options, 0, NULL);
+ 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_with_popt_table (
+ gnome_CORBA_init_with_popt_table (
"evolution-mail-component", "1.0",
&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
- orb = gnome_CORBA_ORB ();
+ CORBA_exception_free (&ev);
+}
+
+#endif /* USING_OAF */
- if (bonobo_init (orb, NULL, NULL) == FALSE){
+static void
+init_bonobo (int argc, char **argv)
+{
+ init_corba (argc, argv);
+
+ if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE){
e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
_("Mail Component: I could not initialize Bonobo"));
exit (1);
}
-
- CORBA_exception_free (&ev);
}
int
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);