[evolution/wip/webkit2] Bug 544813 - Allow recurrence editing for non-detached instances
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Bug 544813 - Allow recurrence editing for non-detached instances
- Date: Tue, 1 Mar 2016 13:47:08 +0000 (UTC)
commit df79b12e73ef961d5445f11c3d81473e12204d20
Author: Milan Crha <mcrha redhat com>
Date: Mon Sep 21 15:41:50 2015 +0200
Bug 544813 - Allow recurrence editing for non-detached instances
calendar/gui/dialogs/recurrence-page.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 89daa42..f19ef38 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -639,10 +639,23 @@ rpage_get_objects_for_uid_cb (GObject *source_object,
g_clear_error (&error);
}
+ if (g_slist_length (ecalcomps) > 1 && rpage->priv->comp) {
+ icalcomponent *icalcomp;
+ gboolean has_rrule;
+
+ icalcomp = e_cal_component_get_icalcomponent (rpage->priv->comp);
+ has_rrule = icalcomponent_get_first_property (icalcomp, ICAL_RRULE_PROPERTY) != NULL;
+
+ if (has_rrule) {
+ /* Not a detached instance, can edit recurrences */
+ g_slist_free_full (ecalcomps, g_object_unref);
+ ecalcomps = NULL;
+ }
+ }
+
update_with_readonly (rpage, g_slist_length (ecalcomps) > 1);
- g_slist_foreach (ecalcomps, (GFunc) g_object_unref, NULL);
- g_slist_free (ecalcomps);
+ g_slist_free_full (ecalcomps, g_object_unref);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]