Method

GtkApplicationset_app_menu

since: 3.4

Declaration [src]

void
gtk_application_set_app_menu (
  GtkApplication* application,
  GMenuModel* app_menu
)

Description [src]

Sets or unsets the application menu for application.

This can only be done in the primary instance of the application, after it has been registered. GApplication::startup is a good place to call this.

The application menu is a single menu containing items that typically impact the application as a whole, rather than acting on a specific window or document. For example, you would expect to see “Preferences” or “Quit” in an application menu, but not “Save” or “Print”.

If supported, the application menu will be rendered by the desktop environment.

Use the base GActionMap interface to add actions, to respond to the user selecting these menu items.

Available since: 3.4

Parameters

app_menu

Type: GMenuModel

A GMenuModel, or NULL.

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