GtkToolbar: partial fix for toolbar editing

When using an editable toolbar in evince, we can end up
in gtk_toolbar_get_visible() position with item being the
highlight_tool_item, but not one of the regular children.
So, handle that.
This commit is contained in:
Matthias Clasen 2011-08-27 11:45:01 -04:00
parent c8e8cdaaf4
commit 0039418001

View File

@ -3896,6 +3896,9 @@ gtk_toolbar_get_visible_position (GtkToolbar *toolbar,
{ {
CountingData count = { child, FALSE, 0, 0 }; CountingData count = { child, FALSE, 0, 0 };
if (child == (GtkWidget*)toolbar->priv->highlight_tool_item)
return 0;
/* foreach iterates in visible order */ /* foreach iterates in visible order */
gtk_container_forall (GTK_CONTAINER (toolbar), gtk_container_forall (GTK_CONTAINER (toolbar),
count_widget_position, count_widget_position,