summaryrefslogtreecommitdiff
path: root/gtk/gtktoolbutton.c
diff options
context:
space:
mode:
authorSoeren Sandmann <sandmann@daimi.au.dk>2004-01-24 22:29:18 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2004-01-24 22:29:18 +0000
commit63f37a9ef608c27f617ab3ea64e7ccb8d0a10852 (patch)
tree93f3efb5e1538f9acacf04d4843016aabc74cc12 /gtk/gtktoolbutton.c
parentc2afbf795524cbbfdbbd3383c34e55f6adb01381 (diff)
downloadgtk+-63f37a9ef608c27f617ab3ea64e7ccb8d0a10852.tar.gz
Only try to pack icon if there actually is one.
Sat Jan 24 23:17:27 2004 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtktoolbutton.c (gtk_tool_button_construct_contents): Only try to pack icon if there actually is one. * gtk/gtktoolbar.c (gtk_toolbar_size_allocate): Make sure OVERFLOWN items get an allocation even when they are unmapped. This ensures they will slide in properly. * gtk/gtktoolbar.c (slide_idle_handler): Make sure we return TRUE when there are overflown items that need to slide in. Also add comments and make formatting more readable.
Diffstat (limited to 'gtk/gtktoolbutton.c')
-rw-r--r--gtk/gtktoolbutton.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c
index 91f5a7c23f..516f93c3b7 100644
--- a/gtk/gtktoolbutton.c
+++ b/gtk/gtktoolbutton.c
@@ -387,7 +387,8 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item)
case GTK_TOOLBAR_BOTH_HORIZ:
box = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (box), icon, label? FALSE : TRUE, TRUE, 0);
+ if (icon)
+ gtk_box_pack_start (GTK_BOX (box), icon, label? FALSE : TRUE, TRUE, 0);
if (label)
gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (button->priv->button), box);