aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;