[gtk+] inspector: Look for themes in system data dirs



commit 65927caf84aae82f1938604e291367335a98116e
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Mar 22 08:20:20 2016 -0400

    inspector: Look for themes in system data dirs
    
    This matches what GTK+ does now.

 gtk/inspector/visual.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gtk/inspector/visual.c b/gtk/inspector/visual.c
index cd4efb9..7ceb88f 100644
--- a/gtk/inspector/visual.c
+++ b/gtk/inspector/visual.c
@@ -262,6 +262,7 @@ init_theme (GtkInspectorVisual *vis)
   gchar **builtin_themes;
   GList *list, *l;
   guint i;
+  const gchar * const *dirs;
 
   t = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
   /* Builtin themes */
@@ -285,6 +286,14 @@ init_theme (GtkInspectorVisual *vis)
   fill_gtk (path, t);
   g_free (path);
 
+  dirs = g_get_system_data_dirs ();
+  for (i = 0; dirs[i]; i++)
+    {
+      path = g_build_filename (dirs[i], "themes", NULL);
+      fill_gtk (path, t);
+      g_free (path);
+    }
+
   list = NULL;
   g_hash_table_iter_init (&iter, t);
   while (g_hash_table_iter_next (&iter, (gpointer *)&theme, NULL))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]