aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-model-calendar.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-cal-model-calendar.c')
-rw-r--r--calendar/gui/e-cal-model-calendar.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c
index 0a91d29a16..6d22135aea 100644
--- a/calendar/gui/e-cal-model-calendar.c
+++ b/calendar/gui/e-cal-model-calendar.c
@@ -377,11 +377,33 @@ ecmc_set_value_at (ETableModel *etm, int col, int row, const void *value)
break;
}
- if (e_cal_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
+ if (e_cal_modify_object (comp_data->client, comp_data->icalcomp, mod, NULL)) {
if (itip_organizer_is_user (comp, comp_data->client) &&
- send_component_dialog (NULL, comp_data->client, comp, FALSE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
+ send_component_dialog (NULL, comp_data->client, comp, FALSE)) {
+ ECalComponent *send_comp = NULL;
+
+ if (mod == CALOBJ_MOD_ALL && e_cal_component_is_instance (comp)) {
+ /* Ensure we send the master object, not the instance only */
+ icalcomponent *icalcomp = NULL;
+ const char *uid = NULL;
+
+ e_cal_component_get_uid (comp, &uid);
+ if (e_cal_get_object (comp_data->client, uid, NULL, &icalcomp, NULL) && icalcomp) {
+ send_comp = e_cal_component_new ();
+ if (!e_cal_component_set_icalcomponent (send_comp, icalcomp)) {
+ icalcomponent_free (icalcomp);
+ g_object_unref (send_comp);
+ send_comp = NULL;
+ }
+ }
+ }
+
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, send_comp ? send_comp : comp,
comp_data->client, NULL, NULL, NULL);
+
+ if (send_comp)
+ g_object_unref (send_comp);
+ }
} else {
g_warning (G_STRLOC ": Could not modify the object!");