diff options
author | Vincent Torri <vincent.torri@gmail.com> | 2021-02-06 14:38:37 +0000 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2021-02-06 14:38:55 +0000 |
commit | d8d52861a619e7a6e1e7244ffb70a9a8b4819c07 (patch) | |
tree | 3a73d62fd7130f983bde4e2a735e8b60256a7a6e /src | |
parent | f323664bc701a7548c26dd64cf1e9dca4e1b90bf (diff) |
Efreet: do not translate standard directories on Windows
Summary: The directories on hard disk are not translated on Windows
Test Plan: test case
Reviewers: raster, cedric
Reviewed By: raster
Subscribers: #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12246
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/efreet/efreet_base.c | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/src/lib/efreet/efreet_base.c b/src/lib/efreet/efreet_base.c index 736a3a05fc..7b1490af46 100644 --- a/src/lib/efreet/efreet_base.c +++ b/src/lib/efreet/efreet_base.c | |||
@@ -134,7 +134,13 @@ EAPI const char * | |||
134 | efreet_desktop_dir_get(void) | 134 | efreet_desktop_dir_get(void) |
135 | { | 135 | { |
136 | if (xdg_desktop_dir) return xdg_desktop_dir; | 136 | if (xdg_desktop_dir) return xdg_desktop_dir; |
137 | xdg_desktop_dir = efreet_user_dir_get("XDG_DESKTOP_DIR", _("Desktop")); | 137 | xdg_desktop_dir = efreet_user_dir_get("XDG_DESKTOP_DIR", |
138 | #ifdef _WIN32 | ||
139 | "Desktop" | ||
140 | #else | ||
141 | _("Desktop") | ||
142 | #endif | ||
143 | ); | ||
138 | return xdg_desktop_dir; | 144 | return xdg_desktop_dir; |
139 | } | 145 | } |
140 | 146 | ||
@@ -142,7 +148,13 @@ EAPI const char * | |||
142 | efreet_download_dir_get(void) | 148 | efreet_download_dir_get(void) |
143 | { | 149 | { |
144 | if (xdg_download_dir) return xdg_download_dir; | 150 | if (xdg_download_dir) return xdg_download_dir; |
145 | xdg_download_dir = efreet_user_dir_get("XDG_DOWNLOAD_DIR", _("Downloads")); | 151 | xdg_download_dir = efreet_user_dir_get("XDG_DOWNLOAD_DIR", |
152 | #ifdef _WIN32 | ||
153 | "Downloads" | ||
154 | #else | ||
155 | _("Downloads") | ||
156 | #endif | ||
157 | ); | ||
146 | return xdg_download_dir; | 158 | return xdg_download_dir; |
147 | } | 159 | } |
148 | 160 | ||
@@ -151,7 +163,12 @@ efreet_templates_dir_get(void) | |||
151 | { | 163 | { |
152 | if (xdg_templates_dir) return xdg_templates_dir; | 164 | if (xdg_templates_dir) return xdg_templates_dir; |
153 | xdg_templates_dir = efreet_user_dir_get("XDG_TEMPLATES_DIR", | 165 | xdg_templates_dir = efreet_user_dir_get("XDG_TEMPLATES_DIR", |
154 | _("Templates")); | 166 | #ifdef _WIN32 |
167 | "Templates" | ||
168 | #else | ||
169 | _("Templates") | ||
170 | #endif | ||
171 | ); | ||
155 | return xdg_templates_dir; | 172 | return xdg_templates_dir; |
156 | } | 173 | } |
157 | 174 | ||
@@ -177,7 +194,13 @@ EAPI const char * | |||
177 | efreet_music_dir_get(void) | 194 | efreet_music_dir_get(void) |
178 | { | 195 | { |
179 | if (xdg_music_dir) return xdg_music_dir; | 196 | if (xdg_music_dir) return xdg_music_dir; |
180 | xdg_music_dir = efreet_user_dir_get("XDG_MUSIC_DIR", _("Music")); | 197 | xdg_music_dir = efreet_user_dir_get("XDG_MUSIC_DIR", |
198 | #ifdef _WIN32 | ||
199 | "Music" | ||
200 | #else | ||
201 | _("Music") | ||
202 | #endif | ||
203 | ); | ||
181 | return xdg_music_dir; | 204 | return xdg_music_dir; |
182 | } | 205 | } |
183 | 206 | ||
@@ -185,7 +208,13 @@ EAPI const char * | |||
185 | efreet_pictures_dir_get(void) | 208 | efreet_pictures_dir_get(void) |
186 | { | 209 | { |
187 | if (xdg_pictures_dir) return xdg_pictures_dir; | 210 | if (xdg_pictures_dir) return xdg_pictures_dir; |
188 | xdg_pictures_dir = efreet_user_dir_get("XDG_PICTURES_DIR", _("Pictures")); | 211 | xdg_pictures_dir = efreet_user_dir_get("XDG_PICTURES_DIR", |
212 | #ifdef _WIN32 | ||
213 | "Pictures" | ||
214 | #else | ||
215 | _("Pictures") | ||
216 | #endif | ||
217 | ); | ||
189 | return xdg_pictures_dir; | 218 | return xdg_pictures_dir; |
190 | } | 219 | } |
191 | 220 | ||
@@ -193,7 +222,13 @@ EAPI const char * | |||
193 | efreet_videos_dir_get(void) | 222 | efreet_videos_dir_get(void) |
194 | { | 223 | { |
195 | if (xdg_videos_dir) return xdg_videos_dir; | 224 | if (xdg_videos_dir) return xdg_videos_dir; |
196 | xdg_videos_dir = efreet_user_dir_get("XDG_VIDEOS_DIR", _("Videos")); | 225 | xdg_videos_dir = efreet_user_dir_get("XDG_VIDEOS_DIR", |
226 | #ifdef _WIN32 | ||
227 | "Videos" | ||
228 | #else | ||
229 | _("Videos") | ||
230 | #endif | ||
231 | ); | ||
197 | return xdg_videos_dir; | 232 | return xdg_videos_dir; |
198 | } | 233 | } |
199 | 234 | ||