event-widget: include recurid on event uuid

By taking recur id into event uuid we are able to properly handle events recurrences
This commit is contained in:
Erick Pérez Castellanos
2014-12-04 17:10:43 -05:00
parent c777d4c852
commit 2b92e0977f
+16 -5
View File
@@ -654,19 +654,30 @@ gcal_event_widget_new_from_data (GcalEventData *data)
GcalEventWidgetPrivate *priv; GcalEventWidgetPrivate *priv;
gchar *uuid; gchar *uuid;
ECalComponentId *id;
ECalComponentText e_summary; ECalComponentText e_summary;
ESourceSelectable *extension; ESourceSelectable *extension;
GdkRGBA *color; GdkRGBA *color;
ECalComponentDateTime dt; ECalComponentDateTime dt;
icaltimetype *date; icaltimetype *date;
gboolean start_is_date, end_is_date; gboolean start_is_date, end_is_date;
const gchar *uid = NULL;
e_cal_component_get_uid (data->event_component, &uid); id = e_cal_component_get_id (data->event_component);
uuid = g_strdup_printf ("%s:%s", if (id->rid != NULL)
e_source_get_uid (data->source), {
uid); 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); widget = g_object_new (GCAL_TYPE_EVENT_WIDGET, "uuid", uuid, NULL);
e_cal_component_free_id (id);
g_free (uuid); g_free (uuid);
event = GCAL_EVENT_WIDGET (widget); event = GCAL_EVENT_WIDGET (widget);