diff options
Diffstat (limited to 'modules/mail')
-rw-r--r-- | modules/mail/e-mail-shell-backend.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index f1a85a8927..be6bd1d199 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -56,7 +56,9 @@ #include "em-mailer-prefs.h" #include "em-network-prefs.h" #include "em-utils.h" +#include "mail-autofilter.h" #include "mail-config.h" +#include "mail-folder-cache.h" #include "mail-ops.h" #include "mail-send-recv.h" #include "mail-session.h" @@ -768,6 +770,18 @@ mail_shell_backend_window_created_cb (EShell *shell, } static void +folder_deleted_cb (MailFolderCache *cache, CamelStore *store, const gchar *uri, gpointer user_data) +{ + mail_filter_delete_uri(store, uri); +} + +static void +folder_renamed_cb (MailFolderCache *cache, CamelStore *store, const gchar *olduri, const gchar *newuri, gpointer user_data) +{ + mail_filter_rename_uri(store, olduri, newuri); +} + +static void mail_shell_backend_constructed (GObject *object) { EMailShellBackendPrivate *priv; @@ -833,6 +847,14 @@ mail_shell_backend_constructed (GObject *object) G_CALLBACK (mail_shell_backend_window_created_cb), shell_backend); + g_signal_connect ( + mail_folder_cache_get_default (), "folder-deleted", + G_CALLBACK (folder_deleted_cb), NULL); + + g_signal_connect ( + mail_folder_cache_get_default (), "folder-renamed", + G_CALLBACK (folder_renamed_cb), NULL); + mail_config_init (); mail_msg_init (); |