2008-11-20 15:18:48 +01:00
|
|
|
Index: plugins/itip-formatter/itip-formatter.c
|
|
|
|
===================================================================
|
2009-12-18 13:57:57 +01:00
|
|
|
--- plugins/itip-formatter/itip-formatter.c (revision 35641)
|
|
|
|
+++ plugins/itip-formatter/itip-formatter.c (working copy)
|
|
|
|
@@ -1620,6 +1620,26 @@ idle_open_cb (gpointer data)
|
2008-11-20 15:18:48 +01:00
|
|
|
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, gpointer data)
|
|
|
|
{
|
2009-12-18 13:57:57 +01:00
|
|
|
@@ -1664,7 +1684,7 @@ view_response_cb (GtkWidget *widget, Iti
|
2008-11-20 15:18:48 +01:00
|
|
|
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;
|
2009-12-18 13:57:57 +01:00
|
|
|
@@ -1674,7 +1694,7 @@ view_response_cb (GtkWidget *widget, Iti
|
2008-11-20 15:18:48 +01:00
|
|
|
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;
|
|
|
|
|
|
|
|
}
|
2009-12-18 13:57:57 +01:00
|
|
|
@@ -1693,7 +1713,7 @@ view_response_cb (GtkWidget *widget, Iti
|
2008-11-20 15:18:48 +01:00
|
|
|
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;
|
2009-12-18 13:57:57 +01:00
|
|
|
@@ -1753,7 +1773,7 @@ view_response_cb (GtkWidget *widget, Iti
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (!save_schedules && pitip->delete_message) {
|
|
|
|
+ if (!delete_invitation_from_cache && pitip->delete_message) {
|
|
|
|
g_message ("Deleting!");
|
|
|
|
camel_folder_delete_message (pitip->folder, pitip->uid);
|
|
|
|
}
|