Check tool item index

master
Yevgen Muntyan 2006-05-23 02:48:08 -05:00
parent b9d8327388
commit d3238ce9c7
1 changed files with 3 additions and 0 deletions

View File

@ -2053,6 +2053,9 @@ create_tool_item (MooUIXML *xml,
tool_item = gtk_action_create_tool_item (action);
}
if (index > gtk_toolbar_get_n_items (toolbar))
index = -1;
gtk_toolbar_insert (toolbar, GTK_TOOL_ITEM (tool_item), index);
g_object_notify (G_OBJECT (action), "tooltip");