[gtk+/gtk-3-14] inspector: Look for themes in the right places
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] inspector: Look for themes in the right places
- Date: Thu, 11 Dec 2014 14:00:34 +0000 (UTC)
commit 63d0cf2a83771f61da38015c8ba21f139c7422b7
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Dec 11 08:53:11 2014 -0500
inspector: Look for themes in the right places
Match the places that GtkCssProvider looks in, so we show all
the themes that GTK+ would actually find.
gtk/inspector/visual.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/inspector/visual.c b/gtk/inspector/visual.c
index 9e97501..ebbdc19 100644
--- a/gtk/inspector/visual.c
+++ b/gtk/inspector/visual.c
@@ -28,6 +28,7 @@
#include "gtksettings.h"
#include "gtkswitch.h"
#include "gtkwindow.h"
+#include "gtkcssproviderprivate.h"
#ifdef GDK_WINDOWING_X11
#include "x11/gdkx.h"
@@ -188,7 +189,7 @@ get_data_path (const gchar *subdir)
{
gchar *base_datadir, *full_datadir;
#if defined (GDK_WINDOWING_WIN32) || defined (GDK_WINDOWING_QUARTZ)
- base_datadir = g_strdup (_gtk_get_datadir());
+ base_datadir = g_strdup (_gtk_get_datadir ());
#else
base_datadir = g_strdup (GTK_DATADIR);
#endif
@@ -205,21 +206,21 @@ init_theme (GtkInspectorVisual *vis)
gchar *theme, *current_theme, *path;
gint i, pos;
GSettings *settings;
- gchar *themedir = get_data_path ("themes");
+ gchar *themedir;
t = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
g_hash_table_add (t, g_strdup ("Adwaita"));
g_hash_table_add (t, g_strdup ("Raleigh"));
- fill_gtk (themedir, t);
-
- g_free (themedir);
+ path = _gtk_css_provider_get_theme_dir ();
+ fill_gtk (path, t);
+ g_free (path);
path = g_build_filename (g_get_user_data_dir (), "themes", NULL);
fill_gtk (path, t);
g_free (path);
- path = g_build_filename (g_get_home_dir (), "themes", NULL);
+ path = g_build_filename (g_get_home_dir (), ".themes", NULL);
fill_gtk (path, t);
g_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]