aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/e-mail-session.c')
-rw-r--r--mail/e-mail-session.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 24fd0be3ef..11bdf87b8d 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -345,8 +345,6 @@ main_get_filter_driver (CamelSession *session,
const gchar *type,
GError **error)
{
- EShell *shell;
- EShellBackend *shell_backend;
EMailSession *ms = E_MAIL_SESSION (session);
CamelFilterDriver *driver;
EFilterRule *rule = NULL;
@@ -355,17 +353,12 @@ main_get_filter_driver (CamelSession *session,
GSettings *settings;
ERuleContext *fc;
- shell = e_shell_get_default ();
- shell_backend = e_shell_get_backend_by_name (shell, "mail");
- g_return_val_if_fail (E_IS_MAIL_BACKEND (shell_backend), NULL);
-
settings = g_settings_new ("org.gnome.evolution.mail");
config_dir = mail_session_get_config_dir ();
user = g_build_filename (config_dir, "filters.xml", NULL);
system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
- fc = (ERuleContext *) em_filter_context_new (
- E_MAIL_BACKEND (shell_backend));
+ fc = (ERuleContext *) em_filter_context_new (ms);
e_rule_context_load (fc, system, user);
g_free (system);
g_free (user);
@@ -446,17 +439,10 @@ static guint preparing_flush = 0;
static gboolean
forward_to_flush_outbox_cb (EMailSession *session)
{
- EShell *shell;
- EShellBackend *shell_backend;
-
g_return_val_if_fail (preparing_flush != 0, FALSE);
- shell = e_shell_get_default ();
- shell_backend = e_shell_get_backend_by_name (shell, "mail");
- g_return_val_if_fail (E_IS_MAIL_BACKEND (shell_backend), FALSE);
-
preparing_flush = 0;
- mail_send (E_MAIL_BACKEND (shell_backend));
+ mail_send (session);
return FALSE;
}