summaryrefslogtreecommitdiff
path: root/gtk/gtkbbox.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-08-11 23:18:18 +0200
committerJavier Jardón <jjardon@gnome.org>2010-08-22 22:56:16 +0200
commitb05e897453c49bfae6805142fd8710c2e627e5fe (patch)
tree951b197f5d6b53cf4cc47e1954f03d3611c32b2f /gtk/gtkbbox.c
parentd9b459dd64b33eef7dade3d52ff1114ef3b3f467 (diff)
downloadgtk+-b05e897453c49bfae6805142fd8710c2e627e5fe.tar.gz
gtk/gtkbbox.c: use accessor functions to access GtkWidget
Diffstat (limited to 'gtk/gtkbbox.c')
-rw-r--r--gtk/gtkbbox.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c
index aae0f742a5..ceab527b88 100644
--- a/gtk/gtkbbox.c
+++ b/gtk/gtkbbox.c
@@ -381,7 +381,7 @@ gtk_button_box_set_child_secondary (GtkButtonBox *widget,
{
g_return_if_fail (GTK_IS_BUTTON_BOX (widget));
g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (child->parent == GTK_WIDGET (widget));
+ g_return_if_fail (gtk_widget_get_parent (child) == GTK_WIDGET (widget));
g_object_set_data (G_OBJECT (child),
GTK_BOX_SECONDARY_CHILD,
@@ -654,6 +654,7 @@ gtk_button_box_size_allocate (GtkWidget *widget,
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (widget));
spacing = gtk_box_get_spacing (GTK_BOX (widget));
+
gtk_widget_style_get (widget,
"child-internal-pad-x", &ipad_x,
"child-internal-pad-y", &ipad_y,
@@ -691,7 +692,7 @@ gtk_button_box_size_allocate (GtkWidget *widget,
}
total_size = primary_size + secondary_size;
- widget->allocation = *allocation;
+ gtk_widget_set_allocation (widget, allocation);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
width = allocation->width - border_width*2;