From 2b92e0977fc103680302b318dbf9ba60268e5e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Thu, 16 Oct 2014 16:48:40 -0400 Subject: [PATCH] event-widget: include recurid on event uuid By taking recur id into event uuid we are able to properly handle events recurrences --- src/gcal-event-widget.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/gcal-event-widget.c b/src/gcal-event-widget.c index d946ffa6..e43e71b5 100644 --- a/src/gcal-event-widget.c +++ b/src/gcal-event-widget.c @@ -654,19 +654,30 @@ gcal_event_widget_new_from_data (GcalEventData *data) GcalEventWidgetPrivate *priv; gchar *uuid; + ECalComponentId *id; ECalComponentText e_summary; ESourceSelectable *extension; GdkRGBA *color; ECalComponentDateTime dt; icaltimetype *date; gboolean start_is_date, end_is_date; - const gchar *uid = NULL; - e_cal_component_get_uid (data->event_component, &uid); - uuid = g_strdup_printf ("%s:%s", - e_source_get_uid (data->source), - uid); + id = e_cal_component_get_id (data->event_component); + if (id->rid != NULL) + { + uuid = g_strdup_printf ("%s:%s:%s", + e_source_get_uid (data->source), + id->uid, + id->rid); + } + else + { + uuid = g_strdup_printf ("%s:%s", + e_source_get_uid (data->source), + id->uid); + } widget = g_object_new (GCAL_TYPE_EVENT_WIDGET, "uuid", uuid, NULL); + e_cal_component_free_id (id); g_free (uuid); event = GCAL_EVENT_WIDGET (widget);