[evolution-data-server/gnome-3-16] [http calendar] Add UID to the component, if missing



commit 261091cb93f9b6c152827d528d047436b52aed96
Author: Milan Crha <mcrha redhat com>
Date:   Tue May 5 08:06:39 2015 +0200

    [http calendar] Add UID to the component, if missing
    
    There can be calendars with events without set UID, thus add it,
    similar as the local calendar adds it, to be able to show the calendar
    content.

 calendar/backends/http/e-cal-backend-http.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/calendar/backends/http/e-cal-backend-http.c b/calendar/backends/http/e-cal-backend-http.c
index 299d156..c71eb6a 100644
--- a/calendar/backends/http/e-cal-backend-http.c
+++ b/calendar/backends/http/e-cal-backend-http.c
@@ -686,9 +686,9 @@ cal_backend_http_load (ECalBackendHttp *backend,
                subcomp_kind = icalcomponent_isa (subcomp);
                prop = icalcomponent_get_first_property (subcomp, ICAL_UID_PROPERTY);
                if (!prop && subcomp_kind == kind) {
-                       g_warning (" The component does not have the  mandatory property UID \n");
-                       subcomp = icalcomponent_get_next_component (icalcomp, ICAL_ANY_COMPONENT);
-                       continue;
+                       gchar *new_uid = e_cal_component_gen_uid ();
+                       icalcomponent_set_uid (subcomp, new_uid);
+                       g_free (new_uid);
                }
 
                if (subcomp_kind == kind) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]