aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-10-10 18:50:18 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-10-10 18:50:18 +0800
commit56a166bb42bd55216a489c0b850ddd6bca2a3cd5 (patch)
tree3f87cf07fd6098ab2700c56d71d97686c5e5bc71 /plugins
parent8fd93c9042bb30e53ce88303f8a0789a6ca688eb (diff)
parent6d5db4c7cd468d424ea8628344c5a1bba6fc3d7c (diff)
downloadgsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.gz
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.bz2
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.lz
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.xz
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.zst
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.zip
Merge branch 'master' into wip/gsettings
Diffstat (limited to 'plugins')
-rw-r--r--plugins/itip-formatter/itip-formatter.c47
-rw-r--r--plugins/mail-notification/mail-notification.c4
2 files changed, 23 insertions, 28 deletions
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 9ab5895c3d..5c733b7d49 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -2315,51 +2315,44 @@ view_response_cb (GtkWidget *widget,
CamelFolderChangeInfo *changes = NULL;
const gchar *tag = NULL;
CamelMessageInfo *mi;
- mi = camel_folder_summary_uid (pitip->folder->summary, pitip->uid);
+ mi = camel_folder_summary_get (pitip->folder->summary, pitip->uid);
if (mi) {
changes = camel_folder_change_info_new ();
if (itip_view_get_recur_check_state (ITIP_VIEW (pitip->view))) {
/* Recurring appointment and "apply-to-all" is selected */
- camel_message_info_ref (mi);
tag = camel_message_info_user_tag (mi, "recurrence-key");
- camel_message_info_free (mi);
if (tag) {
- CamelStore *parent_store;
- GList *list = NULL;
- const gchar *full_name;
- gint i = 0, count;
-
- count = camel_folder_summary_count (pitip->folder->summary);
- for (i = 0; i < count; i++) {
- mi = camel_folder_summary_index (pitip->folder->summary, i);
- if (!mi)
+ gint i;
+ GPtrArray *known_uids;
+
+ known_uids = camel_folder_summary_get_array (pitip->folder->summary);
+ for (i = 0; known_uids && i < known_uids->len; i++) {
+ const gchar *uid = g_ptr_array_index (known_uids, i);
+ CamelMessageInfo *mi2;
+
+ mi2 = camel_folder_summary_get (pitip->folder->summary, uid);
+ if (!mi2)
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, (gchar *)(mi->uid));
- camel_folder_change_info_remove_uid (changes, (gchar *) mi->uid);
- list = g_list_prepend (list, (gpointer) mi->uid);
-
- /* step back once to have the right index */
- count--;
- i--;
+
+ if (camel_message_info_user_tag (mi2, "recurrence-key") &&
+ g_str_equal (camel_message_info_user_tag (mi2, "recurrence-key"), tag)) {
+ camel_folder_summary_remove_uid (pitip->folder->summary, mi2->uid);
+ camel_folder_change_info_remove_uid (changes, mi2->uid);
}
- camel_message_info_free (mi);
- }
- full_name = camel_folder_get_full_name (pitip->folder);
- parent_store = camel_folder_get_parent_store (pitip->folder);
- camel_db_delete_uids (parent_store->cdb_w, full_name, list, NULL);
- g_list_free (list);
+ camel_message_info_free (mi2);
+ }
}
} else {
/* Either not a recurring appointment or "apply-to-all" is not selected. So just delete this instance alone */
camel_folder_summary_remove_uid (pitip->folder->summary, pitip->uid);
camel_folder_change_info_remove_uid (changes, pitip->uid);
}
+
camel_folder_changed (pitip->folder, changes);
camel_folder_change_info_free (changes);
+ camel_message_info_free (mi);
}
}
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index d85987df55..d41f492292 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -308,11 +308,13 @@ notify_default_action_cb (NotifyNotification *notification,
EShellWindow *shell_window;
EShellSidebar *shell_sidebar;
EMFolderTree *folder_tree;
+ GtkApplication *application;
GtkAction *action;
GList *list;
shell = e_shell_get_default ();
- list = e_shell_get_watched_windows (shell);
+ application = GTK_APPLICATION (shell);
+ list = gtk_application_get_windows (application);
/* Find the first EShellWindow in the list. */
while (list != NULL && !E_IS_SHELL_WINDOW (list->data))