aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-autofilter.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-autofilter.c')
-rw-r--r--mail/mail-autofilter.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index eb8caa78d9..f73c44be42 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -32,7 +32,6 @@
#include "mail-vfolder.h"
#include "mail-autofilter.h"
-#include "mail-component.h"
#include "em-utils.h"
#include "e-util/e-error.h"
#include "e-util/e-util-private.h"
@@ -49,6 +48,8 @@
#include <camel/camel-internet-address.h>
#include <camel/camel-mime-message.h>
+#include "e-mail-shell-module.h"
+
#define d(x)
static void
@@ -346,14 +347,15 @@ void
filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flags)
{
EMFilterContext *fc;
+ const gchar *data_dir;
char *user, *system;
FilterRule *rule;
g_return_if_fail (msg != NULL);
fc = em_filter_context_new ();
- user = g_strdup_printf ("%s/filters.xml",
- mail_component_peek_base_directory (mail_component_peek ()));
+ data_dir = e_shell_module_get_data_dir (mail_shell_module);
+ user = g_build_filename (data_dir, "filters.xml", NULL);
system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
rule_context_load ((RuleContext *)fc, system, user);
g_free (system);
@@ -371,6 +373,7 @@ void
mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri)
{
EMFilterContext *fc;
+ const gchar *data_dir;
char *user, *system;
GList *changed;
char *eolduri, *enewuri;
@@ -379,7 +382,8 @@ mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri
enewuri = em_uri_from_camel(newuri);
fc = em_filter_context_new ();
- user = g_strdup_printf ("%s/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
+ data_dir = e_shell_module_get_data_dir (mail_shell_module);
+ user = g_build_filename (data_dir, "filters.xml", NULL);
system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
rule_context_load ((RuleContext *)fc, system, user);
g_free (system);
@@ -403,6 +407,7 @@ void
mail_filter_delete_uri(CamelStore *store, const char *uri)
{
EMFilterContext *fc;
+ const gchar *data_dir;
char *user, *system;
GList *deleted;
char *euri;
@@ -410,7 +415,8 @@ mail_filter_delete_uri(CamelStore *store, const char *uri)
euri = em_uri_from_camel(uri);
fc = em_filter_context_new ();
- user = g_strdup_printf ("%s/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
+ data_dir = e_shell_module_get_data_dir (mail_shell_module);
+ user = g_build_filename (data_dir, "filters.xml", NULL);
system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
rule_context_load ((RuleContext *)fc, system, user);
g_free (system);