summaryrefslogtreecommitdiff
path: root/legacy/efreet
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-10-09 17:52:21 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-10-09 17:52:21 +0000
commit4cd60a96e1a0e02657a098ec51e603f8f16cfe21 (patch)
tree1d26bc9970950378cbcfb1a0a764b585f86909a5 /legacy/efreet
parentfe34dc2b72f683adbc89239365fe0683cb2b29ff (diff)
Add $XDG_RUNTIME_DIR support.
SVN revision: 77666
Diffstat (limited to 'legacy/efreet')
-rw-r--r--legacy/efreet/ChangeLog4
-rw-r--r--legacy/efreet/NEWS5
-rw-r--r--legacy/efreet/src/lib/efreet_base.c10
-rw-r--r--legacy/efreet/src/lib/efreet_base.h7
4 files changed, 26 insertions, 0 deletions
diff --git a/legacy/efreet/ChangeLog b/legacy/efreet/ChangeLog
index 2ac2f1bdb3..f0f1efd061 100644
--- a/legacy/efreet/ChangeLog
+++ b/legacy/efreet/ChangeLog
@@ -139,3 +139,7 @@
139 139
140 * Fix long lurking bug where desktop/icon cache updates get 140 * Fix long lurking bug where desktop/icon cache updates get
141 delayed by silly long amounts of time. 141 delayed by silly long amounts of time.
142
1432012-10-09 Gustavo Sverzut Barbieri (k-s)
144
145 * Add $XDG_RUNTIME_DIR support
diff --git a/legacy/efreet/NEWS b/legacy/efreet/NEWS
index 15ddc1a6b2..2ca94afe8e 100644
--- a/legacy/efreet/NEWS
+++ b/legacy/efreet/NEWS
@@ -6,6 +6,11 @@ Changes since Efreet 1.7.0:
6Fixes: 6Fixes:
7 * Fix insane delay added to desktop/icon updates. 7 * Fix insane delay added to desktop/icon updates.
8 8
9Additions:
10
11 * Support XDG_RUNTIME_DIR
12
13
9Changes since Efreet 1.2.0: 14Changes since Efreet 1.2.0:
10--------------------------- 15---------------------------
11 16
diff --git a/legacy/efreet/src/lib/efreet_base.c b/legacy/efreet/src/lib/efreet_base.c
index afb59204d9..0f43ee5ec2 100644
--- a/legacy/efreet/src/lib/efreet_base.c
+++ b/legacy/efreet/src/lib/efreet_base.c
@@ -46,6 +46,7 @@ static const char *efreet_home_dir = NULL;
46static const char *xdg_data_home = NULL; 46static const char *xdg_data_home = NULL;
47static const char *xdg_config_home = NULL; 47static const char *xdg_config_home = NULL;
48static const char *xdg_cache_home = NULL; 48static const char *xdg_cache_home = NULL;
49static const char *xdg_runtime_dir = NULL;
49static Eina_List *xdg_data_dirs = NULL; 50static Eina_List *xdg_data_dirs = NULL;
50static Eina_List *xdg_config_dirs = NULL; 51static Eina_List *xdg_config_dirs = NULL;
51static const char *xdg_desktop_dir = NULL; 52static const char *xdg_desktop_dir = NULL;
@@ -87,6 +88,7 @@ efreet_base_shutdown(void)
87 IF_RELEASE(xdg_data_home); 88 IF_RELEASE(xdg_data_home);
88 IF_RELEASE(xdg_config_home); 89 IF_RELEASE(xdg_config_home);
89 IF_RELEASE(xdg_cache_home); 90 IF_RELEASE(xdg_cache_home);
91 IF_RELEASE(xdg_runtime_dir);
90 92
91 IF_FREE_LIST(xdg_data_dirs, eina_stringshare_del); 93 IF_FREE_LIST(xdg_data_dirs, eina_stringshare_del);
92 IF_FREE_LIST(xdg_config_dirs, eina_stringshare_del); 94 IF_FREE_LIST(xdg_config_dirs, eina_stringshare_del);
@@ -180,6 +182,14 @@ efreet_cache_home_get(void)
180} 182}
181 183
182EAPI const char * 184EAPI const char *
185efreet_runtime_dir_get(void)
186{
187 if (xdg_runtime_dir) return xdg_runtime_dir;
188 xdg_runtime_dir = efreet_dir_get("XDG_RUNTIME_DIR", "/tmp");
189 return xdg_runtime_dir;
190}
191
192EAPI const char *
183efreet_hostname_get(void) 193efreet_hostname_get(void)
184{ 194{
185 char buf[256]; 195 char buf[256];
diff --git a/legacy/efreet/src/lib/efreet_base.h b/legacy/efreet/src/lib/efreet_base.h
index 0eb3d52297..96d85910b9 100644
--- a/legacy/efreet/src/lib/efreet_base.h
+++ b/legacy/efreet/src/lib/efreet_base.h
@@ -60,6 +60,13 @@ EAPI Eina_List *efreet_config_dirs_get(void);
60EAPI const char *efreet_cache_home_get(void); 60EAPI const char *efreet_cache_home_get(void);
61 61
62/** 62/**
63 * @return Returns the XDG User Runtime directory.
64 * @brief Retrieves the XDG User Runtime directory.
65 * @since 1.8
66 */
67EAPI const char *efreet_runtime_dir_get(void);
68
69/**
63 * @return Returns the current hostname 70 * @return Returns the current hostname
64 * @brief Returns the current hostname or empty string if not found 71 * @brief Returns the current hostname or empty string if not found
65 */ 72 */