[gnome-calendar] event-widget: include recurid on event uuid
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] event-widget: include recurid on event uuid
- Date: Thu, 4 Dec 2014 22:37:02 +0000 (UTC)
commit 2b92e0977fc103680302b318dbf9ba60268e5e21
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu Oct 16 16:48:40 2014 -0400
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 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/src/gcal-event-widget.c b/src/gcal-event-widget.c
index d946ffa..e43e71b 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]