[metacity] theme-viewer: search themes in system data dirs
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] theme-viewer: search themes in system data dirs
- Date: Tue, 7 Jun 2016 18:29:24 +0000 (UTC)
commit d6861acffeda97ac31815e99a0c5a1f5383b2714
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Jun 7 13:01:26 2016 +0300
theme-viewer: search themes in system data dirs
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 5d46f29..a0d4a03 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]