diff options
author | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2012-10-09 17:52:21 +0000 |
---|---|---|
committer | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2012-10-09 17:52:21 +0000 |
commit | 4cd60a96e1a0e02657a098ec51e603f8f16cfe21 (patch) | |
tree | 1d26bc9970950378cbcfb1a0a764b585f86909a5 /legacy/efreet | |
parent | fe34dc2b72f683adbc89239365fe0683cb2b29ff (diff) |
Add $XDG_RUNTIME_DIR support.
SVN revision: 77666
Diffstat (limited to 'legacy/efreet')
-rw-r--r-- | legacy/efreet/ChangeLog | 4 | ||||
-rw-r--r-- | legacy/efreet/NEWS | 5 | ||||
-rw-r--r-- | legacy/efreet/src/lib/efreet_base.c | 10 | ||||
-rw-r--r-- | legacy/efreet/src/lib/efreet_base.h | 7 |
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 | |||
143 | 2012-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: | |||
6 | Fixes: | 6 | Fixes: |
7 | * Fix insane delay added to desktop/icon updates. | 7 | * Fix insane delay added to desktop/icon updates. |
8 | 8 | ||
9 | Additions: | ||
10 | |||
11 | * Support XDG_RUNTIME_DIR | ||
12 | |||
13 | |||
9 | Changes since Efreet 1.2.0: | 14 | Changes 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; | |||
46 | static const char *xdg_data_home = NULL; | 46 | static const char *xdg_data_home = NULL; |
47 | static const char *xdg_config_home = NULL; | 47 | static const char *xdg_config_home = NULL; |
48 | static const char *xdg_cache_home = NULL; | 48 | static const char *xdg_cache_home = NULL; |
49 | static const char *xdg_runtime_dir = NULL; | ||
49 | static Eina_List *xdg_data_dirs = NULL; | 50 | static Eina_List *xdg_data_dirs = NULL; |
50 | static Eina_List *xdg_config_dirs = NULL; | 51 | static Eina_List *xdg_config_dirs = NULL; |
51 | static const char *xdg_desktop_dir = NULL; | 52 | static 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 | ||
182 | EAPI const char * | 184 | EAPI const char * |
185 | efreet_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 | |||
192 | EAPI const char * | ||
183 | efreet_hostname_get(void) | 193 | efreet_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); | |||
60 | EAPI const char *efreet_cache_home_get(void); | 60 | EAPI 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 | */ | ||
67 | EAPI 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 | */ |