aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
diff options
context:
space:
mode:
authorJonathon Jongsma <jonathon@quotidian.org>2009-12-17 00:27:12 +0800
committerJonathon Jongsma <jonathon@quotidian.org>2009-12-17 01:10:02 +0800
commit968ea42023e5e0daf860a7246533311a67f77e05 (patch)
treeb68bd7c80b48c09e332b45c9e3b4ed98fd68efd9 /mail/em-utils.c
parent3a0a795a167ed33eaa6a9a73b0edeb854aef6f0f (diff)
downloadgsoc2013-evolution-968ea42023e5e0daf860a7246533311a67f77e05.tar
gsoc2013-evolution-968ea42023e5e0daf860a7246533311a67f77e05.tar.gz
gsoc2013-evolution-968ea42023e5e0daf860a7246533311a67f77e05.tar.bz2
gsoc2013-evolution-968ea42023e5e0daf860a7246533311a67f77e05.tar.lz
gsoc2013-evolution-968ea42023e5e0daf860a7246533311a67f77e05.tar.xz
gsoc2013-evolution-968ea42023e5e0daf860a7246533311a67f77e05.tar.zst
gsoc2013-evolution-968ea42023e5e0daf860a7246533311a67f77e05.zip
Kill em_utils_get_data/config_dir(), push down to MailSession
This pushes the get_data_dir() API down to the right level. At present, it is still implemented by querying the shell backend for the data dir / config dir. But this should eventually be reversed (when mail is split off to EDS) so that the mail daemon is the one responsible for the storage locations and the shell backend queries the daemon for these values.
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r--mail/em-utils.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index bf4357aff3..fd60db36fb 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -78,6 +78,7 @@
#include "em-composer-utils.h"
#include "em-format-quote.h"
#include "e-mail-local.h"
+#include "mail-session.h"
/* XXX This is a dirty hack on a dirty hack. We really need
* to rework or get rid of the functions that use this. */
@@ -91,38 +92,6 @@ static void emu_save_part_done (CamelMimePart *part, gchar *name, gint done, gpo
#define d(x)
-const gchar *
-em_utils_get_data_dir (void)
-{
- EShell *shell;
- EShellBackend *shell_backend;
-
- /* XXX This is a temporary solution until I can figure out a
- * better way. Ideally, nothing below the module layer
- * should need to know about the user data directory. */
- shell = e_shell_get_default ();
- shell_backend = e_shell_get_backend_by_name (
- shell, shell_builtin_backend);
-
- return e_shell_backend_get_data_dir (shell_backend);
-}
-
-const gchar *
-em_utils_get_config_dir (void)
-{
- EShell *shell;
- EShellBackend *shell_backend;
-
- /* XXX This is a temporary solution until I can figure out a
- * better way. Ideally, nothing below the module layer
- * should need to know about the user config directory. */
- shell = e_shell_get_default ();
- shell_backend = e_shell_get_backend_by_name (
- shell, shell_builtin_backend);
-
- return e_shell_backend_get_config_dir (shell_backend);
-}
-
gboolean
em_utils_ask_open_many (GtkWindow *parent,
gint how_many)
@@ -274,7 +243,7 @@ em_filter_editor_response (GtkWidget *dialog, gint button, gpointer user_data)
const gchar *data_dir;
gchar *user;
- data_dir = em_utils_get_data_dir ();
+ data_dir = mail_session_get_data_dir ();
fc = g_object_get_data ((GObject *) dialog, "context");
user = g_strdup_printf ("%s/filters.xml", data_dir);
e_rule_context_save ((ERuleContext *) fc, user);
@@ -312,7 +281,7 @@ em_utils_edit_filters (GtkWidget *parent)
return;
}
- data_dir = em_utils_get_data_dir ();
+ data_dir = mail_session_get_data_dir ();
fc = em_filter_context_new ();
user = g_build_filename (data_dir, "filters.xml", NULL);