MenuButton.setMenuModel

Sets the #GMenuModel from which the popup will be constructed, or %NULL to 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, their content will be lost and replaced by the newly created popup.

class MenuButton
void
setMenuModel

Parameters

menuModel MenuModel

a #GMenuModel

Meta