changeset 112168:744d9787c683

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.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 08 Jan 2011 22:29:49 -0500
parents 40ab7b8eb7a4
children 882d6cbb91a2
files src/ChangeLog src/gtkutil.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sat Jan 08 23:57:07 2011 +0100
+++ b/src/ChangeLog	Sat Jan 08 22:29:49 2011 -0500
@@ -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.
--- a/src/gtkutil.c	Sat Jan 08 23:57:07 2011 +0100
+++ b/src/gtkutil.c	Sat Jan 08 22:29:49 2011 -0500
@@ -4439,7 +4439,7 @@
   /* 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);