Garcon.MenuItem¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Application command |
||
r/w |
Comment/description for the application |
||
r/w |
Desktop-File Id of the application |
||
r/w/co |
file |
||
r/w |
Generic name of the application |
||
r/w |
Whether the application has been deleted |
||
r/w |
Name of the application icon |
||
r/w |
Name of the application |
||
r/w |
Visibility state of the menu item |
||
r/w |
Working directory path |
||
r/w |
Whether the application prefers to be run on a discrete GPU |
||
r/w |
Whether this application requires a terminal |
||
r/w |
Startup notification support |
||
r/w |
Command to check if application is installed |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when |
Fields¶
- Inherited:
Class Details¶
- class Garcon.MenuItem(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(file)¶
- Parameters:
- Return type:
Returns (transfer full): a new
Garcon.MenuItem
- classmethod new_for_path(filename)¶
- Parameters:
filename (
str
) – name of a file- Returns:
a new
Garcon.MenuItem
- Return type:
- classmethod new_for_uri(uri)¶
- Parameters:
uri (
str
) – a given URI- Returns:
a new
Garcon.MenuItem
- Return type:
- decrement_allocated()¶
- get_actions()¶
- Return type:
- get_file()¶
-
Get the
Gio.File
for self. The returned object should be unreffed withGObject.Object.unref
() when no longer needed.
- increment_allocated()¶
- ref()¶
- reload_from_file(file, affects_the_outside)¶
- Parameters:
- Raises:
- Return type:
- set_action(action_name, action)¶
- Parameters:
action_name (
str
) –action (
Garcon.MenuItemAction
) –
- set_supports_startup_notification(supports_startup_notification)¶
- Parameters:
supports_startup_notification (
bool
) –
- unref()¶
- do_changed() virtual¶
Signal Details¶
- Garcon.MenuItem.signals.changed(menu_item)¶
- Signal Name:
changed
- Flags:
- Parameters:
menu_item (
Garcon.MenuItem
) – The object which received the signal
Emitted when
Garcon.MenuItem
has been reloaded.
Property Details¶
- Garcon.MenuItem.props.command¶
-
Command to be executed when the menu item is clicked.
- Garcon.MenuItem.props.comment¶
-
Comment/description for the application. To be displayed e.g. in tooltips of GtkMenuItems.
- Garcon.MenuItem.props.desktop_id¶
-
The desktop-file id of this application.
- Garcon.MenuItem.props.file¶
- Name:
file
- Type:
- Default Value:
- Flags:
The
Gio.File
from which theGarcon.MenuItem
was loaded.
- Garcon.MenuItem.props.generic_name¶
-
GenericName of the application (will be displayed in menus etc.).
- Garcon.MenuItem.props.hidden¶
-
It means the user deleted (at his level) something that was present (at an upper level, e.g. in the system dirs). It’s strictly equivalent to the .desktop file not existing at all, as far as that user is concerned.
- Garcon.MenuItem.props.icon_name¶
-
Name of the icon to be displayed for this menu item.
- Garcon.MenuItem.props.name¶
-
Name of the application (will be displayed in menus etc.).
- Garcon.MenuItem.props.no_display¶
-
Whether this menu item is hidden in menus.
- Garcon.MenuItem.props.path¶
-
Working directory the application should be started in.
- Garcon.MenuItem.props.prefers_non_default_gpu¶
-
If true, the application prefers to be run on a more powerful discrete GPU if available.
- Garcon.MenuItem.props.requires_terminal¶
-
Whether this application requires a terinal to be started in.
- Garcon.MenuItem.props.supports_startup_notification¶
-
Startup notification support
- Garcon.MenuItem.props.try_exec¶
-
Path to an executable file on disk used to determine if the program is actually installed. If the path is not an absolute path, the file is looked up in the $PATH environment variable. If the file is not present or if it is not executable, the entry may be ignored (not be used in menus, for example).