summaryrefslogtreecommitdiff
path: root/libwindow-settings
diff options
context:
space:
mode:
Diffstat (limited to 'libwindow-settings')
-rw-r--r--libwindow-settings/marco-window-manager.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/libwindow-settings/marco-window-manager.c b/libwindow-settings/marco-window-manager.c
index 2340ae27..74b872c0 100644
--- a/libwindow-settings/marco-window-manager.c
+++ b/libwindow-settings/marco-window-manager.c
@@ -163,15 +163,22 @@ marco_get_theme_list (MateWindowManager *wm)
{
GList *themes = NULL;
char *home_dir_themes;
+ const gchar* const* xdg_data_dirs;
+ int i;
home_dir_themes = g_build_filename (g_get_home_dir (), ".themes", NULL);
-
- themes = add_themes_from_dir (themes, MARCO_THEME_DIR);
- themes = add_themes_from_dir (themes, "/usr/share/themes");
themes = add_themes_from_dir (themes, home_dir_themes);
-
g_free (home_dir_themes);
+ xdg_data_dirs = g_get_system_data_dirs ();
+ for (i = 0; xdg_data_dirs[i] != NULL; i++) {
+ char *sys_dir_themes = g_build_filename (xdg_data_dirs[i], "themes", NULL);
+ themes = add_themes_from_dir (themes, sys_dir_themes);
+ g_free (sys_dir_themes);
+ }
+
+ themes = add_themes_from_dir (themes, MARCO_THEME_DIR);
+
return themes;
}