[gtk+/wip/css: 14/37] widget: Create style context using regular API



commit 3c948a8b8f9975e2583892a6b5da8a05f21a86f4
Author: Benjamin Otte <otte redhat com>
Date:   Sun Mar 18 14:02:58 2012 +0100

    widget: Create style context using regular API

 gtk/gtkwidget.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index a82f050..66f6674 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -14115,12 +14115,11 @@ gtk_widget_get_style_context (GtkWidget *widget)
     {
       GdkScreen *screen;
 
-      priv->context = g_object_new (GTK_TYPE_STYLE_CONTEXT,
-                                    "direction", gtk_widget_get_direction (widget),
-                                    NULL);
+      priv->context = gtk_style_context_new ();
 
-      screen = gtk_widget_get_screen (widget);
+      gtk_style_context_set_direction (priv->context, gtk_widget_get_direction (widget));
 
+      screen = gtk_widget_get_screen (widget);
       if (screen)
         gtk_style_context_set_screen (priv->context, screen);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]