diff options
author | infirit <[email protected]> | 2014-10-25 15:24:42 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2014-10-25 15:24:42 +0200 |
commit | 5a302cfa3549e0b371b21a765ba14acff2162073 (patch) | |
tree | e37b7ffee29078f94d205ddd0e324d3e9d5aa6f5 | |
parent | 860429f9c9e08b1f27a01c74691f5e7bccd09018 (diff) | |
download | marco-5a302cfa3549e0b371b21a765ba14acff2162073.tar.bz2 marco-5a302cfa3549e0b371b21a765ba14acff2162073.tar.xz |
Add in XDG_USER_DATA_DIR when looking for themes
Based off metacity commit: 52a524ee4a7e14d99451ea3f596b353ddf7957d4
From: Jasper St. Pierre <[email protected]>
-rw-r--r-- | src/ui/theme-parser.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c index 91b565db..b7d22381 100644 --- a/src/ui/theme-parser.c +++ b/src/ui/theme-parser.c @@ -4101,7 +4101,8 @@ meta_theme_load (const char *theme_name, /* We try all supported major versions from current to oldest */ for (version = THEME_VERSION; (version > 0); version--) { - /* We try first in home dir, XDG_DATA_DIRS, then system dir for themes */ + /* We try first in home dir, XDG_USER_DATA_DIR, XDG_DATA_DIRS, + * then system dir for themes */ /* Try home dir for themes */ theme_dir = g_build_filename (g_get_home_dir (), @@ -4115,6 +4116,19 @@ meta_theme_load (const char *theme_name, if (!keep_trying (&error)) goto out; + /* Try XDG_USER_DATA_DIR second */ + theme_dir = g_build_filename (g_get_user_data_dir(), + "themes", + theme_name, + THEME_SUBDIR, + NULL); + + retval = load_theme (theme_dir, theme_name, version, &error); + g_free (theme_dir); + + if (!keep_trying (&error)) + goto out; + /* Try each XDG_DATA_DIRS for theme */ xdg_data_dirs = g_get_system_data_dirs(); for(i = 0; xdg_data_dirs[i] != NULL; i++) |