MenuButton.setMenuModel

Sets the gio.MenuModel from which the popup will be constructed, or NULL to dissociate any existing menu model and disable the button.

Depending on the value of use-popover, either a gtk.Menu will be created with Menu.newFromModel, or a gtk.Popover with Popover.newFromModel. In either case, actions will be connected as documented for these functions.

If popup or popover are already set, those widgets are dissociated from the menu_button, and those properties are set to NULL.

class MenuButton
void
setMenuModel

Parameters

menuModel MenuModel

a gio.MenuModel, or NULL to unset and disable the button

Meta