From 1627a081744129fbf8f874c290b9a18138655590 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 13 Nov 2003 19:43:50 +0000 Subject: Modified to not use EStorage* functions. I don't even think it *needs* to 2003-11-13 Jeffrey Stedfast * mail-vfolder.c (context_rule_removed): Modified to not use EStorage* functions. I don't even think it *needs* to remove the folder from the mail-component, the mail-component should just pick it up automagically via CamelStore events. svn path=/trunk/; revision=23333 --- mail/ChangeLog | 5 +++++ mail/mail-component.c | 6 ++++++ mail/mail-component.h | 2 ++ mail/mail-vfolder.c | 13 ++++++------- 4 files changed, 19 insertions(+), 7 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index ae41feb26a..113a38c770 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,10 @@ 2003-11-13 Jeffrey Stedfast + * mail-vfolder.c (context_rule_removed): Modified to not use + EStorage* functions. I don't even think it *needs* to remove the + folder from the mail-component, the mail-component should just + pick it up automagically via CamelStore events. + * em-folder-tree.[c,h]: New folder-tree widget that replaces the shell's folder-tree widget. diff --git a/mail/mail-component.c b/mail/mail-component.c index f2e6a903c4..486477e46a 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -676,6 +676,12 @@ mail_component_storages_foreach (MailComponent *component, GHFunc func, void *us } +void +mail_component_remove_folder (MailComponent *component, CamelStore *store, const char *path) +{ + /* FIXME: implement me */ +} + EMFolderTreeModel * mail_component_get_tree_model (MailComponent *component) { diff --git a/mail/mail-component.h b/mail/mail-component.h index 818b8d2ff9..aab2dab4b3 100644 --- a/mail/mail-component.h +++ b/mail/mail-component.h @@ -82,6 +82,8 @@ void mail_component_storages_foreach (MailComponent *component, GHFunc func, void *data); +void mail_component_remove_folder (MailComponent *component, CamelStore *store, const char *path); + EMFolderTreeModel *mail_component_get_tree_model (MailComponent *component); char *em_uri_from_camel (const char *curi); diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 2bb08a587e..b8161d7e59 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -29,7 +29,6 @@ #include #include "Evolution.h" -#include "evolution-storage.h" #include "evolution-shell-component.h" #include "mail-component.h" @@ -645,14 +644,14 @@ static void context_rule_removed(RuleContext *ctx, FilterRule *rule) d(printf("rule removed; %s\n", rule->name)); /* TODO: remove from folder info cache? */ - + + /* FIXME: is this even necessary? if we remove the folder from + * the CamelStore, the tree should pick it up auto-magically + * because it listens to CamelStore events... */ path = g_strdup_printf("/%s", rule->name); - - /* EPFIXME This leaks, the original code was broken too. */ - e_storage_removed_folder (mail_component_lookup_storage (mail_component_peek (), vfolder_store), path); - + mail_component_remove_folder (mail_component_peek (), vfolder_store, path); g_free(path); - + LOCK(); if (g_hash_table_lookup_extended(vfolder_hash, rule->name, (void **)&key, (void **)&folder)) { g_hash_table_remove(vfolder_hash, key); -- cgit v1.2.3