aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
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/gui/gnome-cal.c
parent64222beb23056f789551b79e78fa721d32408e9e (diff)
downloadgsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.tar.gz
gsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.tar.zst
gsoc2013-evolution-dc84df9871b3171a21d62feec988160f3c608103.zip
Merge new-calendar-branch into HEAD
svn path=/trunk/; revision=22129
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 7598aecd8d..4dab508ffc 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -363,7 +363,8 @@ dn_query_obj_updated_cb (CalQuery *query, const char *uid,
{
GnomeCalendar *gcal;
GnomeCalendarPrivate *priv;
- CalComponent *comp;
+ CalComponent *comp = NULL;
+ icalcomponent *icalcomp;
CalClientGetStatus status;
gcal = GNOME_CALENDAR (data);
@@ -379,20 +380,25 @@ dn_query_obj_updated_cb (CalQuery *query, const char *uid,
return;
}
- status = cal_client_get_object (priv->client, uid, &comp);
+ status = cal_client_get_object (priv->client, uid, &icalcomp);
switch (status) {
case CAL_CLIENT_GET_SUCCESS:
- /* Everything is fine */
+ comp = cal_component_new ();
+ if (!cal_component_set_icalcomponent (comp, icalcomp)) {
+ g_object_unref (comp);
+ icalcomponent_free (icalcomp);
+ return;
+ }
break;
case CAL_CLIENT_GET_SYNTAX_ERROR:
g_message ("dn_query_obj_updated_cb(): Syntax error while getting object `%s'", uid);
- break;
+ return;
case CAL_CLIENT_GET_NOT_FOUND:
/* The object is no longer in the server, so do nothing */
- break;
+ return;
default:
g_assert_not_reached ();
@@ -3001,14 +3007,22 @@ purging_obj_updated_cb (CalQuery *query, const char *uid,
GnomeCalendarPrivate *priv;
GnomeCalendar *gcal = data;
CalComponent *comp;
+ icalcomponent *icalcomp;
obj_updated_closure closure;
gchar *msg;
priv = gcal->priv;
- if (cal_client_get_object (priv->client, uid, &comp) != CAL_CLIENT_GET_SUCCESS)
+ if (cal_client_get_object (priv->client, uid, &icalcomp) != CAL_CLIENT_GET_SUCCESS)
return;
+ comp = cal_component_new ();
+ if (!cal_component_set_icalcomponent (comp, icalcomp)) {
+ g_object_unref (comp);
+ icalcomponent_free (icalcomp);
+ return;
+ }
+
msg = g_strdup_printf (_("Purging event %s"), uid);
/* further filter the event, to check the last recurrence end date */