ContextMenuItem.from_gaction


Description:

[ CCode ( has_construct_function = false ) ]
[ Version ( since = "2.18" ) ]
public ContextMenuItem.from_gaction (Action action, string label, Variant? target)

Creates a new ContextMenuItem for the given action and label.

On activation target will be passed as parameter to the callback.

Parameters:

action

a Action

label

the menu item label text

target

a Variant to use as the action target

Returns:

the newly created ContextMenuItem object.