Method
GioMenuItemset_link
since: 2.32
Declaration [src]
void
g_menu_item_set_link (
GMenuItem* menu_item,
const gchar* link,
GMenuModel* model
)
Description [src]
Creates a link from menu_item
to model
if non-NULL
, or unsets it.
Links are used to establish a relationship between a particular menu
item and another menu. For example, G_MENU_LINK_SUBMENU
is used to
associate a submenu with a particular menu item, and G_MENU_LINK_SECTION
is used to create a section. Other types of link can be used, but there
is no guarantee that clients will be able to make sense of them.
Link types are restricted to lowercase characters, numbers
and ‘-‘. Furthermore, the names must begin with a lowercase character,
must not end with a ‘-‘, and must not contain consecutive dashes.
Available since: 2.32
Parameters
link
-
Type:
const gchar*
Type of link to establish or unset.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. model
-
Type:
GMenuModel
The
GMenuModel
to link to (orNULL
to unset).The argument can be NULL
.The data is owned by the caller of the method.