Minor fix to GTK tool-bar button refresh code.

* gtkutil.c (update_frame_tool_bar): Don't advance tool-bar index
when removing extra buttons.
This commit is contained in:
Chong Yidong 2011-01-08 22:29:49 -05:00
parent c44d54b34f
commit 21a76236f6
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2011-01-09 Chong Yidong <cyd@stupidchicken.com>
* gtkutil.c (update_frame_tool_bar): Don't advance tool-bar index
when removing extra buttons.
2011-01-08 Chong Yidong <cyd@stupidchicken.com>
* fns.c (Fyes_or_no_p): Doc fix.

View file

@ -4439,7 +4439,7 @@ update_frame_tool_bar (FRAME_PTR f)
/* Remove buttons not longer needed. */
do
{
ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), j++);
ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), j);
if (ti)
gtk_container_remove (GTK_CONTAINER (wtoolbar), GTK_WIDGET (ti));
} while (ti != NULL);