MateMenu.Tree¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
|||
r/w/co |
|||
r/w/co |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Class Details¶
- class MateMenu.Tree(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod item_ref(item)¶
- classmethod new(menu_basename, flags)¶
- Parameters:
menu_basename (
str
) – Basename of menu fileflags (
MateMenu.TreeFlags
) – Flags controlling menu content
- Returns:
A new
MateMenu.Tree
instance- Return type:
- classmethod new_for_path(menu_path, flags)¶
- Parameters:
menu_path (
str
) –flags (
MateMenu.TreeFlags
) –
- Return type:
- get_canonical_menu_path()¶
- Returns:
The absolute and canonicalized path to the loaded menu file
- Return type:
This function is only available if the tree has been loaded via
MateMenu.Tree.load_sync
() or a variant thereof.
- get_entry_by_id(id)¶
- Parameters:
id (
str
) – a desktop file ID- Returns:
A newly referenced
MateMenu.TreeEntry
, orNone
if none- Return type:
Look up the entry corresponding to the given “desktop file id”.
- get_root_directory()¶
- Returns:
Root of the tree
- Return type:
Get the root directory; you must have loaded the tree first (at least once) via
MateMenu.Tree.load_sync
() or a variant thereof.
- load_sync()¶
- Raises:
- Returns:
- Return type:
Synchronously load the menu contents. This function performs a significant amount of blocking I/O if the tree has not been loaded yet.
Signal Details¶
- MateMenu.Tree.signals.changed(tree)¶
- Signal Name:
changed
- Flags:
- Parameters:
tree (
MateMenu.Tree
) – The object which received the signal
Property Details¶
- MateMenu.Tree.props.flags¶
- Name:
flags
- Type:
- Default Value:
- Flags:
Flags controlling the content of the menu.
- MateMenu.Tree.props.menu_basename¶
- Name:
menu-basename
- Type:
- Default Value:
'applications.menu'
- Flags:
The name of the menu file; must be a basename or a relative path. The file will be looked up in $XDG_CONFIG_DIRS/menus/. See the Desktop Menu specification.
- MateMenu.Tree.props.menu_path¶
- Name:
menu-path
- Type:
- Default Value:
- Flags:
The full path of the menu file. If set,
MateMenu.Tree
:menu-basename
will get ignored.