summaryrefslogtreecommitdiff
path: root/gtk/gtktoolbutton.c
diff options
context:
space:
mode:
authorSoeren Sandmann <sandmann@daimi.au.dk>2003-07-08 10:58:23 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2003-07-08 10:58:23 +0000
commitb3b16bebcf3a28475190b764091442e7be18fdb2 (patch)
tree75edd6971e54295d8931fcac765bcfa49097f9ee /gtk/gtktoolbutton.c
parentf74f620ca9ad6f1279fc00aff0a8d4111f3bb8bd (diff)
downloadgtk+-b3b16bebcf3a28475190b764091442e7be18fdb2.tar.gz
fix a type check, (#116947, Krasimir Angelov)
Tue Jul 8 12:50:20 2003 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtktoolbutton.c (gtk_tool_button_get_icon_widget): fix a type check, (#116947, Krasimir Angelov) * gtk/gtktoolbar.c: Use new GtkToolItem accessors. * gtk/gtktoolitem.[ch]: Use a private struct to hold the instance data. Not instance private data yet, because of bug 116921. * gtk/gtktoolitem.h: new accessors: gtk_tool_item_get_homogeneous () gtk_tool_item_get_expand () gtk_tool_item_get_pack_end () gtk_tool_item_get_use_drag_window ()
Diffstat (limited to 'gtk/gtktoolbutton.c')
-rw-r--r--gtk/gtktoolbutton.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c
index 0a6141faf0..318b43a2be 100644
--- a/gtk/gtktoolbutton.c
+++ b/gtk/gtktoolbutton.c
@@ -212,8 +212,8 @@ gtk_tool_button_init (GtkToolButton *button,
GtkToolButtonClass *klass)
{
GtkToolItem *toolitem = GTK_TOOL_ITEM (button);
-
- toolitem->homogeneous = TRUE;
+
+ gtk_tool_item_set_homogeneous (toolitem, TRUE);
/* create button */
button->button = g_object_new (klass->button_type, NULL);
@@ -257,8 +257,8 @@ gtk_tool_button_size_allocate (GtkWidget *widget,
widget->allocation = *allocation;
border_width = GTK_CONTAINER (widget)->border_width;
- if (toolitem->drag_window && GTK_WIDGET_REALIZED (widget))
- gdk_window_move_resize (toolitem->drag_window,
+ if (gtk_tool_item_get_use_drag_window (toolitem) && GTK_WIDGET_REALIZED (widget))
+ gdk_window_move_resize (_gtk_tool_item_get_drag_window (toolitem),
widget->allocation.x + border_width,
widget->allocation.y + border_width,
widget->allocation.width - border_width * 2,
@@ -776,7 +776,7 @@ gtk_tool_button_get_label_widget (GtkToolButton *button)
GtkWidget *
gtk_tool_button_get_icon_widget (GtkToolButton *button)
{
- g_return_val_if_fail (GTK_IS_BUTTON (button), NULL);
+ g_return_val_if_fail (GTK_IS_TOOL_BUTTON (button), NULL);
return button->icon_widget;
}