[evince] [ev-daemon] Respect GNOME22_USER_DIR env variable
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] [ev-daemon] Respect GNOME22_USER_DIR env variable
- Date: Mon, 3 May 2010 15:12:05 +0000 (UTC)
commit 76b398e459ef2f02942b903f01e69e34c17db8f5
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Mon May 3 17:08:57 2010 +0200
[ev-daemon] Respect GNOME22_USER_DIR env variable
shell/ev-daemon.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/shell/ev-daemon.c b/shell/ev-daemon.c
index 8844027..d767c49 100644
--- a/shell/ev-daemon.c
+++ b/shell/ev-daemon.c
@@ -385,14 +385,20 @@ convert_metadata (const gchar *metadata)
static void
ev_migrate_metadata (void)
{
- gchar *updated;
- gchar *metadata;
- gchar *dot_dir;
-
- dot_dir = g_build_filename (g_get_home_dir (),
- ".gnome2",
- "evince",
- NULL);
+ gchar *updated;
+ gchar *metadata;
+ gchar *dot_dir;
+ const gchar *userdir;
+
+ userdir = g_getenv ("GNOME22_USER_DIR");
+ if (userdir) {
+ dot_dir = g_build_filename (userdir, "evince", NULL);
+ } else {
+ dot_dir = g_build_filename (g_get_home_dir (),
+ ".gnome2",
+ "evince",
+ NULL);
+ }
updated = g_build_filename (dot_dir, "migrated-to-gvfs", NULL);
if (g_file_test (updated, G_FILE_TEST_EXISTS)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]