GtkWidget: Do not reset GtkStyleContext per get_style_context().

This commit is contained in:
Carlos Garnacho
2010-06-18 17:25:53 +02:00
parent 22bae20ce8
commit 6c91ba1cc2

View File

@@ -13271,18 +13271,19 @@ gtk_widget_get_style_context (GtkWidget *widget)
g_object_unref (css_file);
}
gtk_style_context_add_provider (context, css_provider,
gtk_style_context_add_provider (context,
GTK_STYLE_PROVIDER (css_provider),
GTK_STYLE_PROVIDER_PRIORITY_USER);
}
if (widget->parent ||
gtk_widget_is_toplevel (widget))
{
GtkWidgetPath *path;
if (widget->parent ||
gtk_widget_is_toplevel (widget))
{
GtkWidgetPath *path;
path = gtk_widget_get_path (widget);
gtk_style_context_set_path (context, path);
gtk_widget_path_free (path);
path = gtk_widget_get_path (widget);
gtk_style_context_set_path (context, path);
gtk_widget_path_free (path);
}
}
return context;