From f92b45d7df69c958bb4fc606831bc51ee2bcc914 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 8 Jul 2010 16:59:11 -0400 Subject: Fix places where "~/.evolution" is hard-coded. Also replace "$USER_DATA_DIR/cache" path constructions with e_get_user_cache_dir(). --- shell/Makefile.am | 7 +++++-- shell/killev.c | 9 +++++---- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'shell') diff --git a/shell/Makefile.am b/shell/Makefile.am index 2f044e420e..2fc70ae490 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -156,11 +156,14 @@ endif killev_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ - $(GNOME_PLATFORM_CFLAGS) + $(GNOME_PLATFORM_CFLAGS) \ + $(EVOLUTION_DATA_SERVER_CFLAGS) killev_SOURCES = killev.c -killev_LDADD = $(GNOME_PLATFORM_LIBS) +killev_LDADD = \ + $(GNOME_PLATFORM_LIBS) \ + $(EVOLUTION_DATA_SERVER_LIBS) # Misc stuff diff --git a/shell/killev.c b/shell/killev.c index d1eb523495..16849eec42 100644 --- a/shell/killev.c +++ b/shell/killev.c @@ -29,6 +29,8 @@ #include #include +#include + /* Seconds to wait after asking Evolution to terminate gracefully. * If the process has not terminated before the timeout expires, * then we get violent. */ @@ -97,6 +99,7 @@ main (gint argc, gchar **argv) { GFile *pid_file; GFileMonitor *monitor; + const gchar *user_config_dir; gchar *filename; GError *error = NULL; @@ -106,10 +109,8 @@ main (gint argc, gchar **argv) g_type_init (); - /* XXX If e_get_user_data_dir() ever gets moved to libedataserver, - * use that instead of hard-coding the directory path here. */ - filename = g_build_filename ( - g_get_home_dir (), ".evolution", ".running", NULL); + user_config_dir = e_get_user_config_dir (); + filename = g_build_filename (user_config_dir, ".running", NULL); pid_file = g_file_new_for_path (filename); g_free (filename); -- cgit v1.2.3