[gtk+/win32-theme2: 17/18] Build in default win32 css as gtk-win32
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/win32-theme2: 17/18] Build in default win32 css as gtk-win32
- Date: Fri, 18 Nov 2011 15:58:53 +0000 (UTC)
commit f59836a4d063b8c384a818bdc7bf3768cbc6995d
Author: Alexander Larsson <alexl redhat com>
Date: Fri Nov 18 16:52:38 2011 +0100
Build in default win32 css as gtk-win32
gtk/gtkcssprovider.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 839fa7c..1b993ec 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -3083,6 +3083,8 @@ _gtk_css_provider_get_theme_dir (void)
return path;
}
+#include "gtkwin32css.h"
+
/**
* gtk_css_provider_get_named:
* @name: A theme name
@@ -3103,7 +3105,18 @@ gtk_css_provider_get_named (const gchar *name,
gchar *key;
if (G_UNLIKELY (!themes))
- themes = g_hash_table_new (g_str_hash, g_str_equal);
+ {
+ themes = g_hash_table_new (g_str_hash, g_str_equal);
+
+ provider = gtk_css_provider_new ();
+ if (!gtk_css_provider_load_from_data (provider, gtk_win32_default_css, -1, NULL))
+ {
+ g_warning ("Failed to load the internal win32 default CSS.");
+ g_object_unref (provider);
+ }
+ else
+ g_hash_table_insert (themes, "gtk-win32", provider);
+ }
if (variant == NULL)
key = (gchar *)name;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]