aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchenthill@novell.com>2009-05-21 16:36:28 +0800
committerChenthill Palanisamy <pchenthill@novell.com>2009-05-21 16:36:28 +0800
commit66687b22ec92a829f752c39fa9418be33b16c0bd (patch)
treec4d694c9eda599a2c915f25f3c7be2f6a53c37f6 /plugins/itip-formatter
parent5d12f06367a0939387381f66cea77766a873aea6 (diff)
downloadgsoc2013-evolution-66687b22ec92a829f752c39fa9418be33b16c0bd.tar
gsoc2013-evolution-66687b22ec92a829f752c39fa9418be33b16c0bd.tar.gz
gsoc2013-evolution-66687b22ec92a829f752c39fa9418be33b16c0bd.tar.bz2
gsoc2013-evolution-66687b22ec92a829f752c39fa9418be33b16c0bd.tar.lz
gsoc2013-evolution-66687b22ec92a829f752c39fa9418be33b16c0bd.tar.xz
gsoc2013-evolution-66687b22ec92a829f752c39fa9418be33b16c0bd.tar.zst
gsoc2013-evolution-66687b22ec92a829f752c39fa9418be33b16c0bd.zip
Fixes bug 499107 (bnc) - delete all the recurring instances from the folder.
Reset the index properly so that all the recurring instances are deleted once the mail is processed.
Diffstat (limited to 'plugins/itip-formatter')
-rw-r--r--plugins/itip-formatter/itip-formatter.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 6eebfdee92..c2f64a1a17 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -38,6 +38,7 @@
#include <camel/camel-multipart.h>
#include <camel/camel-service.h>
#include <camel/camel-store.h>
+#include <camel/camel-db.h>
#include <libecal/e-cal.h>
#include <libecal/e-cal-time-util.h>
#include <libedataserverui/e-source-selector.h>
@@ -1876,6 +1877,7 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
camel_message_info_free (mi);
if (tag) {
int i = 0, count;
+ GSList *list = NULL;
count = camel_folder_summary_count (pitip->folder->summary);
for (i = 0; i < count; i++) {
@@ -1884,12 +1886,18 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
continue;
camel_message_info_ref (mi);
if ( camel_message_info_user_tag (mi, "recurrence-key") && g_str_equal (camel_message_info_user_tag (mi, "recurrence-key"), tag)) {
+ camel_folder_summary_remove_uid_fast (pitip->folder->summary, (char *)(mi->uid));
+ camel_folder_change_info_remove_uid (changes, (char *) mi->uid);
+ list = g_slist_prepend (list, (gpointer) mi->uid);
- camel_folder_summary_remove_uid(pitip->folder->summary, (char *)(mi->uid));
- camel_folder_change_info_remove_uid (changes, (char *)(mi->uid));
+ /* step back once to have the right index */
+ count--;
+ i--;
}
camel_message_info_free (mi);
}
+ camel_db_delete_uids (pitip->folder->parent_store->cdb_w, pitip->folder->full_name, list, NULL);
+ g_slist_free (list);
}
} else {
/* Either not a recurring appointment or "apply-to-all" is not selected. So just delete this instance alone */