summaryrefslogtreecommitdiff
path: root/gtk/gtktoolbutton.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/gtktoolbutton.c
parent2de1f3f88c661f2b932f9ab36a3b22ca35df1635 (diff)
downloadgtk+-4427760bcc330f60ec5778be04274f9f8073a84d.tar.gz
Use GtkBin accessors
Diffstat (limited to 'gtk/gtktoolbutton.c')
-rw-r--r--gtk/gtktoolbutton.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c
index a138c478eb..6cbd954acd 100644
--- a/gtk/gtktoolbutton.c
+++ b/gtk/gtktoolbutton.c
@@ -311,6 +311,7 @@ static void
gtk_tool_button_construct_contents (GtkToolItem *tool_item)
{
GtkToolButton *button = GTK_TOOL_BUTTON (tool_item);
+ GtkWidget *child;
GtkWidget *label = NULL;
GtkWidget *icon = NULL;
GtkToolbarStyle style;
@@ -340,12 +341,13 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item)
button->priv->label_widget);
}
- if (GTK_BIN (button->priv->button)->child)
+ child = gtk_bin_get_child (GTK_BIN (button->priv->button));
+ if (child)
{
/* Note: we are not destroying the label_widget or icon_widget
* here because they were removed from their containers above
*/
- gtk_widget_destroy (GTK_BIN (button->priv->button)->child);
+ gtk_widget_destroy (child);
}
style = gtk_tool_item_get_toolbar_style (GTK_TOOL_ITEM (button));
@@ -781,7 +783,7 @@ gtk_tool_button_update_icon_spacing (GtkToolButton *button)
GtkWidget *box;
guint spacing;
- box = GTK_BIN (button->priv->button)->child;
+ box = gtk_bin_get_child (GTK_BIN (button->priv->button));
if (GTK_IS_BOX (box))
{
gtk_widget_style_get (GTK_WIDGET (button),