summaryrefslogtreecommitdiff
path: root/gtk/gtkeventbox.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-05-24 22:31:36 +0200
committerJavier Jardón <jjardon@gnome.org>2010-07-13 19:40:47 +0200
commit4427760bcc330f60ec5778be04274f9f8073a84d (patch)
tree3ffb76a88d357ea094b1287b1fcfdfe078271f90 /gtk/gtkeventbox.c
parent2de1f3f88c661f2b932f9ab36a3b22ca35df1635 (diff)
downloadgtk+-4427760bcc330f60ec5778be04274f9f8073a84d.tar.gz
Use GtkBin accessors
Diffstat (limited to 'gtk/gtkeventbox.c')
-rw-r--r--gtk/gtkeventbox.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
index 17045ffe14..3e575e1c9c 100644
--- a/gtk/gtkeventbox.c
+++ b/gtk/gtkeventbox.c
@@ -484,16 +484,18 @@ gtk_event_box_size_request (GtkWidget *widget,
{
GtkBin *bin = GTK_BIN (widget);
guint border_width;
+ GtkWidget *child;
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
requisition->width = border_width * 2;
requisition->height = border_width * 2;
- if (bin->child && gtk_widget_get_visible (bin->child))
+ child = gtk_bin_get_child (bin);
+ if (child && gtk_widget_get_visible (child))
{
GtkRequisition child_requisition;
- gtk_widget_size_request (bin->child, &child_requisition);
+ gtk_widget_size_request (child, &child_requisition);
requisition->width += child_requisition.width;
requisition->height += child_requisition.height;
@@ -508,7 +510,8 @@ gtk_event_box_size_allocate (GtkWidget *widget,
GtkAllocation child_allocation;
GtkEventBoxPrivate *priv;
guint border_width;
-
+ GtkWidget *child;
+
widget->allocation = *allocation;
bin = GTK_BIN (widget);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
@@ -544,9 +547,10 @@ gtk_event_box_size_allocate (GtkWidget *widget,
child_allocation.width,
child_allocation.height);
}
-
- if (bin->child)
- gtk_widget_size_allocate (bin->child, &child_allocation);
+
+ child = gtk_bin_get_child (bin);
+ if (child)
+ gtk_widget_size_allocate (child, &child_allocation);
}
static void