summaryrefslogtreecommitdiff
path: root/gtk/gtklayout.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2011-01-10 02:46:29 +0100
committerCarlos Garnacho <carlosg@gnome.org>2011-01-10 03:50:01 +0100
commit3dd838fe76c3193c95ed29fc2e9e1a538dd8b907 (patch)
tree2d84dbfb1b86d22f40c62a125873da033dfa0877 /gtk/gtklayout.c
parent18502518f34312495f580b1e7cb8cda44825eff0 (diff)
downloadgtk+-3dd838fe76c3193c95ed29fc2e9e1a538dd8b907.tar.gz
Make GtkLayout use GtkStyleContext
Diffstat (limited to 'gtk/gtklayout.c')
-rw-r--r--gtk/gtklayout.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c
index f3dae47139..3cb0a8295d 100644
--- a/gtk/gtklayout.c
+++ b/gtk/gtklayout.c
@@ -156,8 +156,7 @@ static void gtk_layout_allocate_child (GtkLayout *layout,
GtkLayoutChild *child);
static void gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
GtkLayout *layout);
-static void gtk_layout_style_set (GtkWidget *widget,
- GtkStyle *old_style);
+static void gtk_layout_style_updated (GtkWidget *widget);
static void gtk_layout_set_hadjustment_values (GtkLayout *layout);
static void gtk_layout_set_vadjustment_values (GtkLayout *layout);
@@ -678,7 +677,7 @@ gtk_layout_class_init (GtkLayoutClass *class)
widget_class->get_preferred_height = gtk_layout_get_preferred_height;
widget_class->size_allocate = gtk_layout_size_allocate;
widget_class->draw = gtk_layout_draw;
- widget_class->style_set = gtk_layout_style_set;
+ widget_class->style_updated = gtk_layout_style_updated;
container_class->add = gtk_layout_add;
container_class->remove = gtk_layout_remove;
@@ -888,9 +887,7 @@ gtk_layout_realize (GtkWidget *widget)
priv->bin_window = gdk_window_new (window,
&attributes, attributes_mask);
gdk_window_set_user_data (priv->bin_window, widget);
-
- gtk_widget_style_attach (widget);
- gtk_style_set_background (gtk_widget_get_style (widget), priv->bin_window, GTK_STATE_NORMAL);
+ gtk_style_context_set_background (gtk_widget_get_style_context (widget), priv->bin_window);
tmp_list = priv->children;
while (tmp_list)
@@ -903,17 +900,16 @@ gtk_layout_realize (GtkWidget *widget)
}
static void
-gtk_layout_style_set (GtkWidget *widget,
- GtkStyle *old_style)
+gtk_layout_style_updated (GtkWidget *widget)
{
GtkLayoutPrivate *priv;
- GTK_WIDGET_CLASS (gtk_layout_parent_class)->style_set (widget, old_style);
+ GTK_WIDGET_CLASS (gtk_layout_parent_class)->style_updated (widget);
if (gtk_widget_get_realized (widget))
{
priv = GTK_LAYOUT (widget)->priv;
- gtk_style_set_background (gtk_widget_get_style (widget), priv->bin_window, GTK_STATE_NORMAL);
+ gtk_style_context_set_background (gtk_widget_get_style_context (widget), priv->bin_window);
}
}