set_action_and_target


Description:

public void set_action_and_target (string? action, string? format_string, ...)

Sets or unsets the "action" and "target" attributes of this.

If action is null then both the "action" and "target" attributes are unset (and format_string is ignored along with the positional parameters).

If action is non-null then the "action" attribute is set. format_string is then inspected. If it is non-null then the proper position parameters are collected to create a Variant instance to use as the target value. If it is null then the positional parameters are ignored and the "target" attribute is unset.

See also set_action_and_target_value for an equivalent call that directly accepts a Variant. See set_detailed_action for a more convenient version that works with string-typed targets.

See also set_action_and_target_value for a description of the semantics of the action and target attributes.

Parameters:

this

a MenuItem

action

the name of the action for this item

format_string

a GVariant format string

...

positional parameters, as per format_string