diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-06-07 13:01:26 +0300 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-06-07 14:08:34 +0300 |
commit | d6861acffeda97ac31815e99a0c5a1f5383b2714 (patch) | |
tree | 66436eff307013817cbe40281643975df1ad3ed8 | |
parent | 862301ee3c338daa7110a1123db3a4b06c4a1ef5 (diff) | |
download | metacity-d6861acffeda97ac31815e99a0c5a1f5383b2714.tar.gz |
theme-viewer: search themes in system data dirs
-rw-r--r-- | theme-viewer/theme-viewer-window.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/theme-viewer/theme-viewer-window.c b/theme-viewer/theme-viewer-window.c index 5d46f299..a0d4a03e 100644 --- a/theme-viewer/theme-viewer-window.c +++ b/theme-viewer/theme-viewer-window.c @@ -657,6 +657,8 @@ type_combo_box_changed_cb (GtkComboBox *combo_box, MetaThemeType type; GSList *themes; gchar *themes_dir; + const gchar *const *xdg_data_dirs; + gint i; GSList *theme; theme_combo_box_text = GTK_COMBO_BOX_TEXT (window->theme_combo_box); @@ -674,6 +676,14 @@ type_combo_box_changed_cb (GtkComboBox *combo_box, get_valid_themes (window, themes_dir, type, &themes); g_free (themes_dir); + xdg_data_dirs = g_get_system_data_dirs (); + for (i = 0; xdg_data_dirs[i] != NULL; i++) + { + themes_dir = g_build_filename (xdg_data_dirs[i], "themes", NULL); + get_valid_themes (window, themes_dir, type, &themes); + g_free (themes_dir); + } + themes_dir = g_build_filename (g_get_user_data_dir (), "themes", NULL); get_valid_themes (window, themes_dir, type, &themes); g_free (themes_dir); |