From 0c43bcb20b82f8da6e6ffb71f85d27b251537e79 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 24 Jul 2002 07:21:15 +0000 Subject: Propagate name changes or removes to the mail config. #15951. Doesn't 2002-07-24 Not Zed * mail-folder-cache.c (real_flush_updates): Propagate name changes or removes to the mail config. #15951. Doesn't enitrely work for local folders, because they are never renamed only removed and added thanks to the shell's api. * mail-config.c (mail_config_uri_renamed): If a store folder is renamed, this checks for any config that needs updating, so far sent and drafts folders. (mail_config_uri_deleted): Same, for deleted folders. svn path=/trunk/; revision=17568 --- mail/mail-folder-cache.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mail/mail-folder-cache.c') diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 91001fa577..0e352bd634 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -45,6 +45,7 @@ /* For notifications of changes */ #include "mail-vfolder.h" #include "mail-autofilter.h" +#include "mail-config.h" #define w(x) #define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__), (x))*/ @@ -156,6 +157,7 @@ real_flush_updates(void *o, void *event_data, void *data) if (up->delete) { mail_vfolder_delete_uri(up->store, up->uri); mail_filter_delete_uri(up->store, up->uri); + mail_config_uri_deleted(CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(up->store))->compare_folder_name, up->uri); } else mail_vfolder_add_uri(up->store, up->uri, TRUE); } else { @@ -173,6 +175,7 @@ real_flush_updates(void *o, void *event_data, void *data) d(printf("renaming folder '%s' to '%s'\n", up->olduri, up->uri)); mail_vfolder_rename_uri(up->store, up->olduri, up->uri); mail_filter_rename_uri(up->store, up->olduri, up->uri); + mail_config_uri_renamed(CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(up->store))->compare_folder_name, up->olduri, up->uri); } if (up->name == NULL) { -- cgit v1.2.3