Build in default win32 css as gtk-win32

This commit is contained in:
Alexander Larsson 2011-11-18 16:52:38 +01:00
parent a38c48be92
commit f59836a4d0

View File

@ -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;