diff options
author | Jonathon Jongsma <jonathon@quotidian.org> | 2009-12-17 00:27:12 +0800 |
---|---|---|
committer | Jonathon Jongsma <jonathon@quotidian.org> | 2009-12-17 01:10:02 +0800 |
commit | 968ea42023e5e0daf860a7246533311a67f77e05 (patch) | |
tree | b68bd7c80b48c09e332b45c9e3b4ed98fd68efd9 /mail/mail-vfolder.c | |
parent | 3a0a795a167ed33eaa6a9a73b0edeb854aef6f0f (diff) | |
download | gsoc2013-evolution-968ea42023e5e0daf860a7246533311a67f77e05.tar.gz 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/mail-vfolder.c')
-rw-r--r-- | mail/mail-vfolder.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index b4a8330776..6301e5ff5e 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -46,6 +46,7 @@ #include "mail-folder-cache.h" #include "mail-mt.h" #include "mail-ops.h" +#include "mail-session.h" #include "mail-tools.h" #include "mail-vfolder.h" @@ -66,8 +67,6 @@ static GHashTable *vfolder_hash; /* This is a slightly hacky solution to shutting down, we poll this variable in various loops, and just quit processing if it is set. */ static volatile gint shutdown; /* are we shutting down? */ -/* more globals ... */ -extern CamelSession *session; static void rule_changed(EFilterRule *rule, CamelFolder *folder); @@ -667,7 +666,7 @@ done: dialog = e_alert_dialog_new_for_args (e_shell_get_active_window (NULL), "mail:vfolder-updated", changed->str, uri, NULL); em_utils_show_info_silent (dialog); - data_dir = em_utils_get_data_dir (); + data_dir = mail_session_get_data_dir (); user = g_build_filename (data_dir, "vfolders.xml", NULL); e_rule_context_save ((ERuleContext *) context, user); g_free (user); @@ -735,7 +734,7 @@ mail_vfolder_rename_uri(CamelStore *store, const gchar *cfrom, const gchar *cto) gchar *user; d(printf("Vfolders updated from renamed folder\n")); - data_dir = em_utils_get_data_dir (); + data_dir = mail_session_get_data_dir (); user = g_build_filename (data_dir, "vfolders.xml", NULL); e_rule_context_save((ERuleContext *)context, user); g_free(user); @@ -914,7 +913,7 @@ store_folder_deleted(CamelObject *o, gpointer event_data, gpointer data) g_object_unref(rule); g_signal_connect(context, "rule_removed", G_CALLBACK(context_rule_removed), context); - data_dir = em_utils_get_data_dir (); + data_dir = mail_session_get_data_dir (); user = g_build_filename (data_dir, "vfolders.xml", NULL); e_rule_context_save((ERuleContext *)context, user); g_free(user); @@ -960,7 +959,7 @@ store_folder_renamed(CamelObject *o, gpointer event_data, gpointer data) e_filter_rule_set_name(rule, info->new->full_name); g_signal_connect(rule, "changed", G_CALLBACK(rule_changed), folder); - data_dir = em_utils_get_data_dir (); + data_dir = mail_session_get_data_dir (); user = g_build_filename (data_dir, "vfolders.xml", NULL); e_rule_context_save((ERuleContext *)context, user); g_free(user); @@ -1021,7 +1020,7 @@ vfolder_load_storage(void) G_UNLOCK (vfolder_hash); /* first, create the vfolder store, and set it up */ - data_dir = em_utils_get_data_dir (); + data_dir = mail_session_get_data_dir (); storeuri = g_strdup_printf("vfolder:%s/vfolder", data_dir); vfolder_store = camel_session_get_store(session, storeuri, NULL); if (vfolder_store == NULL) { @@ -1091,7 +1090,7 @@ vfolder_revert(void) gchar *user; d(printf("vfolder_revert\n")); - data_dir = em_utils_get_data_dir (); + data_dir = mail_session_get_data_dir (); user = g_build_filename (data_dir, "vfolders.xml", NULL); e_rule_context_revert((ERuleContext *)context, user); g_free(user); @@ -1145,7 +1144,7 @@ edit_rule_response(GtkWidget *w, gint button, gpointer data) EFilterRule *orig = g_object_get_data (G_OBJECT (w), "orig"); e_filter_rule_copy(orig, rule); - data_dir = em_utils_get_data_dir (); + data_dir = mail_session_get_data_dir (); user = g_build_filename (data_dir, "vfolders.xml", NULL); e_rule_context_save((ERuleContext *)context, user); g_free(user); @@ -1222,7 +1221,7 @@ new_rule_clicked(GtkWidget *w, gint button, gpointer data) g_object_ref(rule); e_rule_context_add_rule((ERuleContext *)context, rule); - data_dir = em_utils_get_data_dir (); + data_dir = mail_session_get_data_dir (); user = g_build_filename (data_dir, "vfolders.xml", NULL); e_rule_context_save((ERuleContext *)context, user); g_free(user); |