summaryrefslogtreecommitdiff
path: root/gtk/gtkbox.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-06-02 06:28:22 +0200
committerJavier Jardón <jjardon@gnome.org>2010-07-13 19:40:46 +0200
commit3a10216dd01c8d10df235b88c8942b2fda15689b (patch)
tree80df10196e365741a9dcb6a8c773c1e992e3e9fe /gtk/gtkbox.c
parent009acc263e883923fd7c528c401f9d39756788aa (diff)
downloadgtk+-3a10216dd01c8d10df235b88c8942b2fda15689b.tar.gz
Use accessor functions to acces GtkContainer
Diffstat (limited to 'gtk/gtkbox.c')
-rw-r--r--gtk/gtkbox.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index 2451b6b60b..899da0e1ef 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -427,7 +427,7 @@ gtk_box_size_allocate (GtkWidget *widget,
if (nvis_children > 0)
{
- gint border_width = GTK_CONTAINER (box)->border_width;
+ guint border_width = gtk_container_get_border_width (GTK_CONTAINER (box));
GtkTextDirection direction = gtk_widget_get_direction (widget);
GtkAllocation child_allocation;
GtkBoxSpreading *spreading = g_newa (GtkBoxSpreading, nvis_children);
@@ -882,7 +882,7 @@ gtk_box_get_size (GtkSizeRequest *widget,
box = GTK_BOX (widget);
private = box->priv;
- border_width = GTK_CONTAINER (box)->border_width;
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (box));
minimum = natural = 0;
@@ -981,7 +981,7 @@ gtk_box_compute_size_for_opposing_orientation (GtkBox *box,
gint nvis_children;
gint nexpand_children;
gint computed_minimum = 0, computed_natural = 0;
- gint border_width = GTK_CONTAINER (box)->border_width;
+ guint border_width = gtk_container_get_border_width (GTK_CONTAINER (box));
count_expand_children (box, &nvis_children, &nexpand_children);
@@ -1184,8 +1184,10 @@ gtk_box_compute_size_for_orientation (GtkBox *box,
gint nvis_children = 0;
gint required_size = 0, required_natural = 0, child_size, child_natural;
gint largest_child = 0, largest_natural = 0;
+ guint border_width;
- avail_size -= GTK_CONTAINER (box)->border_width * 2;
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (box));
+ avail_size -= border_width * 2;
for (children = private->children; children != NULL;
children = children->next, nvis_children++)
@@ -1229,8 +1231,8 @@ gtk_box_compute_size_for_orientation (GtkBox *box,
required_natural += (nvis_children - 1) * private->spacing;
}
- required_size += GTK_CONTAINER (box)->border_width * 2;
- required_natural += GTK_CONTAINER (box)->border_width * 2;
+ required_size += border_width * 2;
+ required_natural += border_width * 2;
if (minimum_size)
*minimum_size = required_size;