summaryrefslogtreecommitdiff
path: root/gtk/gtkstylecontext.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2010-11-17 02:41:54 +0100
committerCarlos Garnacho <carlosg@gnome.org>2010-12-04 15:39:13 +0100
commitb613f1f1f288d9e24ca8830834e6bc533a3e3727 (patch)
tree89980bad12cf6de8a8d527ed0838c034c34d72c3 /gtk/gtkstylecontext.c
parent13e186bbca5fbe0c332cf189e8b380e3145b711e (diff)
downloadgtk+-b613f1f1f288d9e24ca8830834e6bc533a3e3727.tar.gz
GtkStyleContext: Also use screen providers for widget style properties.
Diffstat (limited to 'gtk/gtkstylecontext.c')
-rw-r--r--gtk/gtkstylecontext.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 2fcabd24ac..58faf5d777 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -1982,8 +1982,8 @@ _gtk_style_context_peek_style_property (GtkStyleContext *context,
{
GtkStyleContextPrivate *priv;
PropertyValue *pcache, key = { 0 };
+ GList *global_list = NULL;
StyleData *data;
- GList *list;
guint i;
priv = context->priv;
@@ -2016,13 +2016,29 @@ _gtk_style_context_peek_style_property (GtkStyleContext *context,
g_param_spec_ref (pcache->pspec);
g_value_init (&pcache->value, G_PARAM_SPEC_VALUE_TYPE (pspec));
+ if (priv->screen)
+ {
+ global_list = g_object_get_qdata (G_OBJECT (priv->screen), provider_list_quark);
+ global_list = g_list_last (global_list);
+ }
+
if (priv->widget_path)
{
- for (list = priv->providers_last; list; list = list->prev)
+ GList *list, *global, *elem;
+
+ list = priv->providers_last;
+ global = global_list;
+
+ while ((elem = find_next_candidate (list, global)) != NULL)
{
GtkStyleProviderData *provider_data;
- provider_data = list->data;
+ provider_data = elem->data;
+
+ if (elem == list)
+ list = list->prev;
+ else
+ global = global->prev;
if (gtk_style_provider_get_style_property (provider_data->provider, priv->widget_path,
pspec->name, &pcache->value))