summaryrefslogtreecommitdiff
path: root/gtk/gtktoolitem.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/gtktoolitem.c
parent2de1f3f88c661f2b932f9ab36a3b22ca35df1635 (diff)
downloadgtk+-4427760bcc330f60ec5778be04274f9f8073a84d.tar.gz
Use GtkBin accessors
Diffstat (limited to 'gtk/gtktoolitem.c')
-rw-r--r--gtk/gtktoolitem.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtktoolitem.c b/gtk/gtktoolitem.c
index a7008dfcf3..eae96cea54 100644
--- a/gtk/gtktoolitem.c
+++ b/gtk/gtktoolitem.c
@@ -488,9 +488,10 @@ static void
gtk_tool_item_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
- GtkWidget *child = GTK_BIN (widget)->child;
+ GtkWidget *child;
guint border_width;
+ child = gtk_bin_get_child (GTK_BIN (widget));
if (child && gtk_widget_get_visible (child))
{
gtk_widget_size_request (child, requisition);
@@ -513,8 +514,9 @@ gtk_tool_item_size_allocate (GtkWidget *widget,
GtkToolItem *toolitem = GTK_TOOL_ITEM (widget);
GtkAllocation child_allocation;
gint border_width;
- GtkWidget *child = GTK_BIN (widget)->child;
+ GtkWidget *child;
+ child = gtk_bin_get_child (GTK_BIN (widget));
widget->allocation = *allocation;
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
@@ -1063,8 +1065,7 @@ gtk_tool_item_set_tooltip_text (GtkToolItem *tool_item,
g_return_if_fail (GTK_IS_TOOL_ITEM (tool_item));
- child = GTK_BIN (tool_item)->child;
-
+ child = gtk_bin_get_child (GTK_BIN (tool_item));
if (child)
gtk_widget_set_tooltip_text (child, text);
}
@@ -1087,8 +1088,7 @@ gtk_tool_item_set_tooltip_markup (GtkToolItem *tool_item,
g_return_if_fail (GTK_IS_TOOL_ITEM (tool_item));
- child = GTK_BIN (tool_item)->child;
-
+ child = gtk_bin_get_child (GTK_BIN (tool_item));
if (child)
gtk_widget_set_tooltip_markup (child, markup);
}