Mercurial > emacs
comparison src/gtkutil.c @ 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 | dffe14ef6b65 |
children | 417b1e4d63cd |
comparison
equal
deleted
inserted
replaced
112167:40ab7b8eb7a4 | 112168:744d9787c683 |
---|---|
4437 } | 4437 } |
4438 | 4438 |
4439 /* Remove buttons not longer needed. */ | 4439 /* Remove buttons not longer needed. */ |
4440 do | 4440 do |
4441 { | 4441 { |
4442 ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), j++); | 4442 ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), j); |
4443 if (ti) | 4443 if (ti) |
4444 gtk_container_remove (GTK_CONTAINER (wtoolbar), GTK_WIDGET (ti)); | 4444 gtk_container_remove (GTK_CONTAINER (wtoolbar), GTK_WIDGET (ti)); |
4445 } while (ti != NULL); | 4445 } while (ti != NULL); |
4446 | 4446 |
4447 if (f->n_tool_bar_items != 0) | 4447 if (f->n_tool_bar_items != 0) |