Menu.insertSection

void insertSection(int position, string label, gio.menu_model.MenuModel section)

Convenience function for inserting a section menu item into menu. Combine gio.menu_item.MenuItem.newSection and gio.menu.Menu.insertItem for a more flexible alternative.

Parameters

positionthe position at which to insert the item
labelthe section label, or null
sectiona #GMenuModel with the items of the section