aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/conduits
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@src.gnome.org>2003-08-08 00:38:20 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-08-08 00:38:20 +0800
commitdc84df9871b3171a21d62feec988160f3c608103 (patch)
tree29f8dfbfa57dc43ae07fe645a1664fc5b1222086 /calendar/conduits
parent64222beb23056f789551b79e78fa721d32408e9e (diff)
downloadgsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.tar
gsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.tar.gz
gsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.tar.bz2
gsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.tar.lz
gsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.tar.xz
gsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.tar.zst
gsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.zip
Merge new-calendar-branch into HEAD
svn path=/trunk/; revision=22129
Diffstat (limited to 'calendar/conduits')
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c20
-rw-r--r--calendar/conduits/todo/todo-conduit.c20
2 files changed, 36 insertions, 4 deletions
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index 0171ea4b70..1893e6b34c 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -1006,13 +1006,21 @@ local_record_from_uid (ECalLocalRecord *local,
ECalConduitContext *ctxt)
{
CalComponent *comp;
+ icalcomponent *icalcomp;
CalClientGetStatus status;
g_assert(local!=NULL);
- status = cal_client_get_object (ctxt->client, uid, &comp);
+ status = cal_client_get_object (ctxt->client, uid, &icalcomp);
if (status == CAL_CLIENT_GET_SUCCESS) {
+ comp = cal_component_new ();
+ if (!cal_component_set_icalcomponent (comp, icalcomp)) {
+ g_object_unref (comp);
+ icalcomponent_free (icalcomp);
+ return;
+ }
+
local_record_from_comp (local, comp, ctxt);
g_object_unref (comp);
} else if (status == CAL_CLIENT_GET_NOT_FOUND) {
@@ -1328,6 +1336,7 @@ pre_sync (GnomePilotConduit *conduit,
int len;
unsigned char *buf;
char *filename, *change_id;
+ icalcomponent *icalcomp;
gint num_records, add_records = 0, mod_records = 0, del_records = 0;
abs_conduit = GNOME_PILOT_CONDUIT_SYNC_ABS (conduit);
@@ -1355,9 +1364,16 @@ pre_sync (GnomePilotConduit *conduit,
cal_client_set_default_timezone (ctxt->client, ctxt->timezone);
/* Get the default component */
- if (cal_client_get_default_object (ctxt->client, CALOBJ_TYPE_EVENT, &ctxt->default_comp) != CAL_CLIENT_GET_SUCCESS)
+ if (cal_client_get_default_object (ctxt->client, CALOBJ_TYPE_EVENT, &icalcomp) != CAL_CLIENT_GET_SUCCESS)
return -1;
+ ctxt->default_comp = cal_component_new ();
+ if (!cal_component_set_icalcomponent (ctxt->default_comp, icalcomp)) {
+ g_object_unref (ctxt->default_comp);
+ icalcomponent_free (icalcomp);
+ return -1;
+ }
+
/* Load the uid <--> pilot id mapping */
filename = map_name (ctxt);
e_pilot_map_read (filename, &ctxt->map);
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index a27beffb9d..6868368129 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -675,13 +675,21 @@ local_record_from_uid (EToDoLocalRecord *local,
EToDoConduitContext *ctxt)
{
CalComponent *comp;
+ icalcomponent *icalcomp;
CalClientGetStatus status;
g_assert(local!=NULL);
- status = cal_client_get_object (ctxt->client, uid, &comp);
+ status = cal_client_get_object (ctxt->client, uid, &icalcomp);
if (status == CAL_CLIENT_GET_SUCCESS) {
+ comp = cal_component_new ();
+ if (!cal_component_set_icalcomponent (comp, icalcomp)) {
+ g_object_unref (comp);
+ icalcomponent_free (icalcomp);
+ return;
+ }
+
local_record_from_comp (local, comp, ctxt);
g_object_unref (comp);
} else if (status == CAL_CLIENT_GET_NOT_FOUND) {
@@ -869,6 +877,7 @@ pre_sync (GnomePilotConduit *conduit,
int len;
unsigned char *buf;
char *filename, *change_id;
+ icalcomponent *icalcomp;
gint num_records, add_records = 0, mod_records = 0, del_records = 0;
abs_conduit = GNOME_PILOT_CONDUIT_SYNC_ABS (conduit);
@@ -897,9 +906,16 @@ pre_sync (GnomePilotConduit *conduit,
cal_client_set_default_timezone (ctxt->client, ctxt->timezone);
/* Get the default component */
- if (cal_client_get_default_object (ctxt->client, CALOBJ_TYPE_TODO, &ctxt->default_comp) != CAL_CLIENT_GET_SUCCESS)
+ if (cal_client_get_default_object (ctxt->client, CALOBJ_TYPE_TODO, &icalcomp) != CAL_CLIENT_GET_SUCCESS)
return -1;
+ ctxt->default_comp = cal_component_new ();
+ if (!cal_component_set_icalcomponent (ctxt->default_comp, icalcomp)) {
+ g_object_unref (ctxt->default_comp);
+ icalcomponent_free (icalcomp);
+ return -1;
+ }
+
/* Load the uid <--> pilot id map */
filename = map_name (ctxt);
e_pilot_map_read (filename, &ctxt->map);