aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/conduits/todo
diff options
context:
space:
mode:
authorSeth Alves <alves@src.gnome.org>2000-08-05 07:37:17 +0800
committerSeth Alves <alves@src.gnome.org>2000-08-05 07:37:17 +0800
commit83bf2090acb12e1b0354f5924a05e0780b0d6ea4 (patch)
treee7c03ddf6d053ffcc1f908ca3a36ff377ccd861d /calendar/conduits/todo
parent08f484c66062063c88fa46c71127be8dc174feef (diff)
downloadgsoc2013-evolution-83bf2090acb12e1b0354f5924a05e0780b0d6ea4.tar
gsoc2013-evolution-83bf2090acb12e1b0354f5924a05e0780b0d6ea4.tar.gz
gsoc2013-evolution-83bf2090acb12e1b0354f5924a05e0780b0d6ea4.tar.bz2
gsoc2013-evolution-83bf2090acb12e1b0354f5924a05e0780b0d6ea4.tar.lz
gsoc2013-evolution-83bf2090acb12e1b0354f5924a05e0780b0d6ea4.tar.xz
gsoc2013-evolution-83bf2090acb12e1b0354f5924a05e0780b0d6ea4.tar.zst
gsoc2013-evolution-83bf2090acb12e1b0354f5924a05e0780b0d6ea4.zip
if oaf isn't initialized by the time the conduit starts, start it up. we
* conduits/todo/todo-conduit.c (conduit_get_gpilot_conduit): if oaf isn't initialized by the time the conduit starts, start it up. we do this because we need to start wombat with oaf, and gpilotd doesn't currently start oaf. svn path=/trunk/; revision=4539
Diffstat (limited to 'calendar/conduits/todo')
-rw-r--r--calendar/conduits/todo/todo-conduit-control-applet.c1
-rw-r--r--calendar/conduits/todo/todo-conduit.c32
-rw-r--r--calendar/conduits/todo/todo-conduit.h4
3 files changed, 32 insertions, 5 deletions
diff --git a/calendar/conduits/todo/todo-conduit-control-applet.c b/calendar/conduits/todo/todo-conduit-control-applet.c
index f1a852fa0b..188aadc16e 100644
--- a/calendar/conduits/todo/todo-conduit-control-applet.c
+++ b/calendar/conduits/todo/todo-conduit-control-applet.c
@@ -354,7 +354,6 @@ main (int argc, char *argv[])
/* we're a capplet */
gnome_capplet_init ("todo conduit control applet", NULL, argc, argv,
NULL, 0, NULL);
-
gpc = gnome_pilot_client_new();
gnome_pilot_client_connect_to_daemon(gpc);
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index aac3908792..387a79936d 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -22,9 +22,9 @@
#include <gpilotd/gnome-pilot-conduit-standard-abs.h>
#include <todo-conduit.h>
-//#include "GnomeCal.h"
+#include <bonobo.h>
-void fook_fook (char *hi); /* FIX ME delete this */
+//#include "GnomeCal.h"
GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
@@ -1170,6 +1170,16 @@ delete_all (GnomePilotConduitStandardAbs *conduit,
}
+static ORBit_MessageValidationResult
+accept_all_cookies (CORBA_unsigned_long request_id,
+ CORBA_Principal *principal,
+ CORBA_char *operation)
+{
+ /* allow ALL cookies */
+ return ORBIT_MESSAGE_ALLOW_ALL;
+}
+
+
GnomePilotConduit *
conduit_get_gpilot_conduit (guint32 pilotId)
{
@@ -1179,6 +1189,22 @@ conduit_get_gpilot_conduit (guint32 pilotId)
printf ("in todo's conduit_get_gpilot_conduit\n");
+ /* we need to find wombat with oaf, so make sure oaf
+ is initialized here. once the desktop is converted
+ to oaf and gpilotd is built with oaf, this can go away */
+ if (! oaf_is_initialized ())
+ {
+ char *argv[ 1 ] = {"hi"};
+ oaf_init (1, argv);
+
+ if (bonobo_init (CORBA_OBJECT_NIL,
+ CORBA_OBJECT_NIL,
+ CORBA_OBJECT_NIL) == FALSE)
+ g_error (_("Could not initialize Bonobo"));
+
+ ORBit_set_request_validation_handler (accept_all_cookies);
+ }
+
retval = gnome_pilot_conduit_standard_abs_new ("ToDoDB", 0x746F646F);
g_assert (retval != NULL);
gnome_pilot_conduit_construct(GNOME_PILOT_CONDUIT(retval),"ToDoConduit");
@@ -1208,8 +1234,6 @@ conduit_get_gpilot_conduit (guint32 pilotId)
gtk_signal_connect (retval, "transmit", (GtkSignalFunc) transmit, ctxt);
gtk_signal_connect (retval, "pre_sync", (GtkSignalFunc) pre_sync, ctxt);
- fook_fook ("foo");
-
return GNOME_PILOT_CONDUIT (retval);
}
diff --git a/calendar/conduits/todo/todo-conduit.h b/calendar/conduits/todo/todo-conduit.h
index 05b9c00d18..7ffc1bd5d3 100644
--- a/calendar/conduits/todo/todo-conduit.h
+++ b/calendar/conduits/todo/todo-conduit.h
@@ -14,12 +14,16 @@
#include <cal-util/calobj.h>
#include <cal-util/timeutil.h>
+/*
#ifdef USING_OAF
#include <liboaf/liboaf.h>
#else
#include <libgnorba/gnorba.h>
#endif
+*/
+#include <liboaf/liboaf.h>
+#include <libgnorba/gnorba.h>
/* This is the local record structure for the GnomeCal conduit. */
typedef struct _GCalLocalRecord GCalLocalRecord;