[gtk+] widget: Create style context using regular API



commit 1ca809854379ae5eff19225f8cf3e66d34c10ae3
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]