]> Pileus Git - ~andy/gtk/commitdiff
widget: Create style context using regular API
authorBenjamin Otte <otte@redhat.com>
Sun, 18 Mar 2012 13:02:58 +0000 (14:02 +0100)
committerBenjamin Otte <otte@redhat.com>
Sat, 7 Apr 2012 11:01:25 +0000 (13:01 +0200)
gtk/gtkwidget.c

index a82f05023a45f459a64f6ce35852e502afa109aa..66f6674dac9fba111b61a6ce2b3fcaa8f8597df7 100644 (file)
@@ -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);