summaryrefslogtreecommitdiff
path: root/gtk/gtktoolitem.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/gtktoolitem.c
parent009acc263e883923fd7c528c401f9d39756788aa (diff)
downloadgtk+-3a10216dd01c8d10df235b88c8942b2fda15689b.tar.gz
Use accessor functions to acces GtkContainer
Diffstat (limited to 'gtk/gtktoolitem.c')
-rw-r--r--gtk/gtktoolitem.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk/gtktoolitem.c b/gtk/gtktoolitem.c
index 38911a0ad0..a7008dfcf3 100644
--- a/gtk/gtktoolitem.c
+++ b/gtk/gtktoolitem.c
@@ -404,7 +404,7 @@ create_drag_window (GtkToolItem *toolitem)
g_return_if_fail (toolitem->priv->use_drag_window == TRUE);
widget = GTK_WIDGET (toolitem);
- border_width = GTK_CONTAINER (toolitem)->border_width;
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x + border_width;
@@ -489,6 +489,7 @@ gtk_tool_item_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
GtkWidget *child = GTK_BIN (widget)->child;
+ guint border_width;
if (child && gtk_widget_get_visible (child))
{
@@ -499,9 +500,10 @@ gtk_tool_item_size_request (GtkWidget *widget,
requisition->height = 0;
requisition->width = 0;
}
-
- requisition->width += (GTK_CONTAINER (widget)->border_width) * 2;
- requisition->height += (GTK_CONTAINER (widget)->border_width) * 2;
+
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
+ requisition->width += border_width * 2;
+ requisition->height += border_width * 2;
}
static void
@@ -514,7 +516,7 @@ gtk_tool_item_size_allocate (GtkWidget *widget,
GtkWidget *child = GTK_BIN (widget)->child;
widget->allocation = *allocation;
- border_width = GTK_CONTAINER (widget)->border_width;
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
if (toolitem->priv->drag_window)
gdk_window_move_resize (toolitem->priv->drag_window,