forked from AuroraMiddleware/gtk
toolbar: Limit item position to number of contained elements
Greater values don't make much sense. https://bugzilla.gnome.org/show_bug.cgi?id=682080
This commit is contained in:
parent
e463e09577
commit
63be0deb0f
@ -2789,7 +2789,9 @@ gtk_toolbar_insert (GtkToolbar *toolbar,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_TOOLBAR (toolbar));
|
||||
g_return_if_fail (GTK_IS_TOOL_ITEM (item));
|
||||
|
||||
|
||||
pos = MIN (pos, (int)g_list_length (toolbar->priv->content));
|
||||
|
||||
if (pos >= 0)
|
||||
pos = logical_to_physical (toolbar, pos);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user