Constructor

GioMenuItemnew

Declaration

GMenuItem*
g_menu_item_new (
  const gchar* label,
  const gchar* detailed_action
)

Description

Creates a new GMenuItem.

If label is non-NULL it is used to set the “label” attribute of the new item.

If detailed_action is non-NULL it is used to set the “action” and possibly the “target” attribute of the new item. See g_menu_item_set_detailed_action() for more information.

Available since:2.32

Parameters

label const gchar*
 

The section label, or NULL.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
detailed_action const gchar*
 

The detailed action string, or NULL.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.

Return value

Returns: GMenuItem
 

A new GMenuItem.

 The caller of the function takes ownership of the data, and is responsible for freeing it.