Amtk.ActionInfo¶
Fields¶
None
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Amtk.ActionInfo¶
- classmethod new()¶
- Returns:
a new
Amtk.ActionInfo
.- Return type:
New in version 2.0.
- classmethod new_from_entry(info_entry, translation_domain)¶
- Parameters:
info_entry (
Amtk.ActionInfoEntry
) – anAmtk.ActionInfoEntry
.translation_domain (
str
orNone
) – a gettext domain, orNone
.
- Returns:
a new
Amtk.ActionInfo
.- Return type:
Creates a new
Amtk.ActionInfo
from anAmtk.ActionInfoEntry
.If translation_domain is not
None
,GLib.dgettext
() is used to translate the label and tooltip before setting them to theAmtk.ActionInfo
.New in version 2.0.
- copy()¶
- Returns:
a copy of self. The copy will have a reference count of one.
- Return type:
New in version 2.0.
- get_accels()¶
- Returns:
a
None
-terminated array of accelerators in the format understood byGtk.accelerator_parse
().- Return type:
[
str
]
Returns the accelerators. This function never returns
None
, it always returns aNone
-terminated array, to be suitable forGtk.Application.set_accels_for_action
().New in version 2.0.
- get_action_name()¶
- Returns:
the action name, or
None
. Example:"win.save"
. Can be a detailed action name, seeGio.Action.parse_detailed_name
().- Return type:
New in version 2.0.
- get_label()¶
-
Gets the label. The label has normally a mnemonic. To remove the mnemonic, there is the
Amtk.utils_remove_mnemonic
() function.New in version 2.0.
- get_tooltip()¶
-
New in version 2.0.
- has_been_used()¶
- Returns:
whether self has been used.
- Return type:
Returns whether self has been used (for example by an
Amtk.Factory
function). See alsoAmtk.ActionInfoStore.check_all_used
().New in version 3.0.
- mark_as_used()¶
Mark self as used. An
Amtk.Factory
function that uses anAmtk.ActionInfo
should call this function. SeeAmtk.ActionInfoStore.check_all_used
().New in version 3.0.
- ref()¶
- Returns:
the passed in self.
- Return type:
Increments the reference count of self by one.
New in version 2.0.
- set_accels(accels)¶
- Parameters:
accels ([
str
]) – aNone
-terminated array of accelerators in the format understood byGtk.accelerator_parse
().
A function similar to
Gtk.Application.set_accels_for_action
().accels must not be
None
, it must be aNone
-terminated array, to be consistent withGtk.Application.set_accels_for_action
().New in version 2.0.
- set_action_name(action_name)¶
- Parameters:
action_name (
str
) – the action name.
Sets the action name, for example
"win.save"
. Can be a detailed action name, seeGio.Action.parse_detailed_name
().New in version 2.0.
- set_icon_name(icon_name)¶
-
New in version 2.0.
- set_label(label)¶
-
Sets the label with a mnemonic. To know how to encode the mnemonic, see the documentation of
Gtk.Label.new_with_mnemonic
().New in version 2.0.
- set_tooltip(tooltip)¶
-
New in version 2.0.
- unref()¶
Decrements the reference count of self by one. If the reference count drops to 0, self is freed.
New in version 2.0.