GMenu.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 GMenu.Tree(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
- classmethod item_ref(item)¶
 
- classmethod new(menu_basename, flags)¶
 - Parameters:
 menu_basename (
str) – Basename of menu fileflags (
GMenu.TreeFlags) – Flags controlling menu content
- Returns:
 A new
GMenu.Treeinstance- Return type:
 
- classmethod new_for_path(menu_path, flags)¶
 - Parameters:
 menu_path (
str) –flags (
GMenu.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
GMenu.Tree.load_sync() or a variant thereof.
- get_entry_by_id(id)¶
 - Parameters:
 id (
str) – a desktop file ID- Returns:
 A newly referenced
GMenu.TreeEntry, orNoneif 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
GMenu.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¶
- GMenu.Tree.signals.changed(tree)¶
 - Signal Name:
 changed- Flags:
 - Parameters:
 tree (
GMenu.Tree) – The object which received the signal
Property Details¶
- GMenu.Tree.props.flags¶
 - Name:
 flags- Type:
 - Default Value:
 - Flags:
 
Flags controlling the content of the menu.
- GMenu.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.
- GMenu.Tree.props.menu_path¶
 - Name:
 menu-path- Type:
 - Default Value:
 - Flags:
 
The full path of the menu file. If set,
GMenu.Tree:menu-basenamewill get ignored.