evolution/bnc-210959-evo-accept-ics.patch

59 lines
1.8 KiB
Diff
Raw Normal View History

Index: plugins/itip-formatter/itip-formatter.c
===================================================================
--- plugins/itip-formatter/itip-formatter.c.orig
+++ plugins/itip-formatter/itip-formatter.c
@@ -1860,6 +1860,26 @@ idle_open_cb (gpointer data)
return FALSE;
}
+static gboolean
+is_gw_item (icalcomponent *icalcomp)
+{
+ icalproperty *prop;
+
+ prop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
+ while (prop) {
+ const char *x_name, *x_val;
+
+ x_name = icalproperty_get_x_name (prop);
+ x_val = icalproperty_get_x (prop);
+ if (!strcmp (x_name, "X-GWRECORDID")) {
+ return TRUE;
+ }
+
+ prop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
+ }
+ return FALSE;
+}
+
static void
view_response_cb (GtkWidget *widget,
ItipViewResponse response,
@@ -1906,7 +1926,7 @@ view_response_cb (GtkWidget *widget, Iti
if (status) {
e_cal_component_rescan (pitip->comp);
flag = update_item (pitip, response);
- if (save_schedules && flag)
+ if (save_schedules && flag && is_gw_item (pitip->ical_comp))
delete_invitation_from_cache = TRUE;
}
break;
@@ -1916,7 +1936,7 @@ view_response_cb (GtkWidget *widget, Iti
if (status) {
e_cal_component_rescan (pitip->comp);
flag = update_item (pitip, response);
- if (save_schedules && flag)
+ if (save_schedules && flag && is_gw_item (pitip->ical_comp))
delete_invitation_from_cache = TRUE;
}
@@ -1935,7 +1955,7 @@ view_response_cb (GtkWidget *widget, Iti
if (status) {
e_cal_component_rescan (pitip->comp);
flag = update_item (pitip, response);
- if (save_schedules && flag)
+ if (save_schedules && flag && is_gw_item (pitip->ical_comp))
delete_invitation_from_cache = TRUE;
}
break;