Method

GtkMenuButtonset_menu_model

Declaration [src]

void
gtk_menu_button_set_menu_model (
  GtkMenuButton* menu_button,
  GMenuModel* menu_model
)

Description [src]

Sets the GMenuModel from which the popup will be constructed.

If menu_model is NULL, the button is disabled.

A GtkPopover will be created from the menu model with gtk_popover_menu_new_from_model(). Actions will be connected as documented for this function.

If GtkMenuButton:popover is already set, it will be dissociated from the menu_button, and the property is set to NULL.

Parameters

menu_model

Type: GMenuModel

A GMenuModel, or NULL to unset and disable the button.

The argument can be NULL.
The data is owned by the caller of the method.