[evolution/gnome-3-4] Bug #673946 - Cannot delete search folders
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-4] Bug #673946 - Cannot delete search folders
- Date: Thu, 31 May 2012 09:51:41 +0000 (UTC)
commit b897f9601d068fcb13f84b6f866b94c17514d209
Author: Milan Crha <mcrha redhat com>
Date: Thu May 31 11:51:27 2012 +0200
Bug #673946 - Cannot delete search folders
libemail-engine/mail-vfolder.c | 7 ++++---
mail/e-mail-reader-utils.c | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/libemail-engine/mail-vfolder.c b/libemail-engine/mail-vfolder.c
index aed9668..f1c9efd 100644
--- a/libemail-engine/mail-vfolder.c
+++ b/libemail-engine/mail-vfolder.c
@@ -887,17 +887,18 @@ store_folder_deleted_cb (CamelStore *store,
rule = e_rule_context_find_rule ((ERuleContext *) context, info->full_name, NULL);
if (rule) {
const gchar *config_dir;
+ EMailSession *session = E_MAIL_SESSION (camel_service_get_session (CAMEL_SERVICE (store)));
/* We need to stop listening to removed events,
* otherwise we'll try and remove it again. */
g_signal_handlers_disconnect_matched (
- context, G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, context_rule_removed, context);
+ context, G_SIGNAL_MATCH_FUNC,
+ 0, 0, NULL, context_rule_removed, NULL);
e_rule_context_remove_rule ((ERuleContext *) context, rule);
g_object_unref (rule);
g_signal_connect (
context, "rule_removed",
- G_CALLBACK (context_rule_removed), context);
+ G_CALLBACK (context_rule_removed), session);
config_dir = mail_session_get_config_dir ();
user = g_build_filename (config_dir, "vfolders.xml", NULL);
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index bc87295..7ff1f31 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -196,13 +196,13 @@ e_mail_reader_delete_folder (EMailReader *reader,
EMailSession *session;
EAlertSink *alert_sink;
CamelStore *parent_store;
+ CamelProvider *provider;
MailFolderCache *folder_cache;
GtkWindow *parent = e_shell_get_active_window (NULL);
GtkWidget *dialog;
gboolean store_is_local;
const gchar *display_name;
const gchar *full_name;
- const gchar *uid;
CamelFolderInfoFlags flags = 0;
gboolean have_flags;
@@ -212,9 +212,9 @@ e_mail_reader_delete_folder (EMailReader *reader,
full_name = camel_folder_get_full_name (folder);
display_name = camel_folder_get_display_name (folder);
parent_store = camel_folder_get_parent_store (folder);
+ provider = camel_service_get_provider (CAMEL_SERVICE (parent_store));
- uid = camel_service_get_uid (CAMEL_SERVICE (parent_store));
- store_is_local = (g_strcmp0 (uid, E_MAIL_SESSION_LOCAL_UID) == 0);
+ store_is_local = (provider->flags & CAMEL_PROVIDER_IS_LOCAL) != 0;
backend = e_mail_reader_get_backend (reader);
session = e_mail_backend_get_session (backend);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]