summaryrefslogtreecommitdiff
path: root/tests/gtkoffscreenbox.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 /tests/gtkoffscreenbox.c
parent009acc263e883923fd7c528c401f9d39756788aa (diff)
downloadgtk+-3a10216dd01c8d10df235b88c8942b2fda15689b.tar.gz
Use accessor functions to acces GtkContainer
Diffstat (limited to 'tests/gtkoffscreenbox.c')
-rw-r--r--tests/gtkoffscreenbox.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/gtkoffscreenbox.c b/tests/gtkoffscreenbox.c
index b6caa14c8b..71b36db43c 100644
--- a/tests/gtkoffscreenbox.c
+++ b/tests/gtkoffscreenbox.c
@@ -234,13 +234,13 @@ gtk_offscreen_box_realize (GtkWidget *widget)
GtkOffscreenBox *offscreen_box = GTK_OFFSCREEN_BOX (widget);
GdkWindowAttr attributes;
gint attributes_mask;
- gint border_width;
+ guint border_width;
GtkRequisition child_requisition;
int start_y = 0;
gtk_widget_set_realized (widget, TRUE);
- border_width = GTK_CONTAINER (widget)->border_width;
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
attributes.x = widget->allocation.x + border_width;
attributes.y = widget->allocation.y + border_width;
@@ -458,6 +458,7 @@ gtk_offscreen_box_size_request (GtkWidget *widget,
{
GtkOffscreenBox *offscreen_box = GTK_OFFSCREEN_BOX (widget);
int w, h;
+ guint border_width;
w = 0;
h = 0;
@@ -482,8 +483,9 @@ gtk_offscreen_box_size_request (GtkWidget *widget,
h += CHILD2_SIZE_SCALE * child_requisition.height;
}
- requisition->width = GTK_CONTAINER (widget)->border_width * 2 + w;
- requisition->height = GTK_CONTAINER (widget)->border_width * 2 + h;
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
+ requisition->width = border_width * 2 + w;
+ requisition->height = border_width * 2 + h;
}
static void
@@ -491,13 +493,13 @@ gtk_offscreen_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkOffscreenBox *offscreen_box;
- gint border_width;
gint start_y;
+ guint border_width;
widget->allocation = *allocation;
offscreen_box = GTK_OFFSCREEN_BOX (widget);
- border_width = GTK_CONTAINER (widget)->border_width;
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
if (gtk_widget_get_realized (widget))
gdk_window_move_resize (widget->window,