MenuButton.setMenuModel

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

Depending on the value of #GtkMenuButton:use-popover, either a #GtkMenu will be created with gtk_menu_new_from_model(), or a #GtkPopover with gtk_popover_new_from_model(). In either case, actions will be connected as documented for these functions.

If #GtkMenuButton:popup or #GtkMenuButton: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 #GMenuModel, or %NULL to unset and disable the button

Meta