diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-07-09 04:59:11 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-07-09 04:59:11 +0800 |
commit | f92b45d7df69c958bb4fc606831bc51ee2bcc914 (patch) | |
tree | 704ffb1fe55bb37673436695c2d4e49efab8e7b4 /e-util | |
parent | ae4e6007efece29bf587f3193e7c57ad7f7d81dc (diff) | |
download | gsoc2013-evolution-f92b45d7df69c958bb4fc606831bc51ee2bcc914.tar gsoc2013-evolution-f92b45d7df69c958bb4fc606831bc51ee2bcc914.tar.gz gsoc2013-evolution-f92b45d7df69c958bb4fc606831bc51ee2bcc914.tar.bz2 gsoc2013-evolution-f92b45d7df69c958bb4fc606831bc51ee2bcc914.tar.lz gsoc2013-evolution-f92b45d7df69c958bb4fc606831bc51ee2bcc914.tar.xz gsoc2013-evolution-f92b45d7df69c958bb4fc606831bc51ee2bcc914.tar.zst gsoc2013-evolution-f92b45d7df69c958bb4fc606831bc51ee2bcc914.zip |
Fix places where "~/.evolution" is hard-coded.
Also replace "$USER_DATA_DIR/cache" path constructions with
e_get_user_cache_dir().
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-mktemp.c | 9 | ||||
-rw-r--r-- | e-util/e-util.c | 20 | ||||
-rw-r--r-- | e-util/e-util.h | 5 |
3 files changed, 9 insertions, 25 deletions
diff --git a/e-util/e-mktemp.c b/e-util/e-mktemp.c index e53ea60b69..064c01997a 100644 --- a/e-util/e-mktemp.c +++ b/e-util/e-mktemp.c @@ -36,7 +36,6 @@ #include <stdio.h> #include <time.h> -#include <libedataserver/e-data-server-util.h> #include "e-util.h" #include "e-mktemp.h" @@ -109,9 +108,11 @@ get_dir (gboolean make) static time_t last = 0; #ifdef TEMP_HOME - gchar *tmpdir = NULL; - tmpdir = g_build_filename(e_get_user_data_dir (), - "cache", "tmp", NULL); + const gchar *user_cache_dir; + gchar *tmpdir; + + user_cache_dir = e_get_user_cache_dir (); + tmpdir = g_build_filename (user_cache_dir, "tmp", NULL); path = g_string_new(tmpdir); if (make && g_mkdir_with_parents(tmpdir, 0777) == -1) { g_string_free(path, TRUE); diff --git a/e-util/e-util.c b/e-util/e-util.c index 956f7d009f..4b73fd7865 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -59,26 +59,6 @@ #include "e-util-private.h" /** - * e_get_user_data_dir: - * - * Returns the base directory for Evolution-specific user data. - * The string is owned by Evolution and must not be modified or freed. - * - * Returns: base directory for user data - **/ -const gchar * -e_get_user_data_dir (void) -{ - static gchar *dirname = NULL; - - if (G_UNLIKELY (dirname == NULL)) - dirname = g_build_filename ( - g_get_home_dir (), ".evolution", NULL); - - return dirname; -} - -/** * e_get_gnome2_user_dir: * * Returns the base directory for user data, according to libgnome. diff --git a/e-util/e-util.h b/e-util/e-util.h index 6f7e56b07f..e3ce5cb103 100644 --- a/e-util/e-util.h +++ b/e-util/e-util.h @@ -30,6 +30,10 @@ #include <e-util/e-marshal.h> +/* e_get_user_data_dir() used to live here, so #include its new home + * for backward-compatibility (not that we really care about that). */ +#include <libedataserver/e-data-server-util.h> + /* Convenience macro to help migrate from libglade to GtkBuilder. * Use it as a direct replacement for glade_xml_get_widget(). */ #define e_builder_get_widget(builder, name) \ @@ -46,7 +50,6 @@ typedef enum { typedef void (*ETypeFunc) (GType type, gpointer user_data); -const gchar * e_get_user_data_dir (void); const gchar * e_get_gnome2_user_dir (void); const gchar * e_get_accels_filename (void); void e_show_uri (GtkWindow *parent, |