Dazzle.ShortcutManager¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
The current key theme. |
||
r/w/en |
The name of the current theme |
||
r/w/en |
The directory for saved user modifications |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Dazzle.ShortcutManager(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod get_default()¶
- Returns:
- Return type:
Gets the singleton
Dazzle.ShortcutManager
for the process.
- add_action(detailed_action_name, section, group, title, subtitle)¶
- add_command(command, section, group, title, subtitle)¶
- add_shortcut_entries(shortcuts, translation_domain)¶
- Parameters:
shortcuts ([
Dazzle.ShortcutEntry
]) – shortcuts to addtranslation_domain (
str
orNone
) – the gettext domain to use for translations
This method will add shortcuts to the
Dazzle.ShortcutManager
.This provides a simple way for widgets to add their shortcuts to the manager so that they may be overriden by themes or the end user.
- add_shortcuts_to_window(window)¶
- Parameters:
window (
Dazzle.ShortcutsWindow
) – ADazzle.ShortcutsWindow
Adds shortcuts registered with the
Dazzle.ShortcutManager
to theDazzle.ShortcutsWindow
.
- get_theme()¶
- Returns:
- Return type:
Gets the “theme” property.
- get_theme_by_name(theme_name)¶
- Parameters:
theme_name (
str
orNone
) – the name of a theme orNone
of the internal theme- Returns:
A
Dazzle.ShortcutTheme
orNone
.- Return type:
Locates a theme by the name of the theme.
If theme_name is
None
, then the internal theme is used. You probably dont need to use that as it is used by various controllers to hook up their default actions.
- handle_event(event, toplevel)¶
- Parameters:
event (
Gdk.EventKey
) – AGdk.EventKey
event to handle.toplevel (
Gtk.Widget
) – AGtk.Widget
orNone
.
- Returns:
True
if the event was handled.- Return type:
This function will try to dispatch event to the proper widget and
Dazzle.ShortcutContext
. If the event is handled, thenTrue
is returned.You should call this from
Gtk.Widget
::key-press-event
handler in yourGtk.Window
toplevel.
- queue_reload()¶
- reload(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) –
- set_theme(theme)¶
- Parameters:
theme (
Dazzle.ShortcutTheme
) – AnDazzle.ShortcutTheme
Sets the theme for the shortcut manager.
Signal Details¶
- Dazzle.ShortcutManager.signals.changed(shortcut_manager)¶
- Signal Name:
changed
- Flags:
- Parameters:
shortcut_manager (
Dazzle.ShortcutManager
) – The object which received the signal
Property Details¶
- Dazzle.ShortcutManager.props.theme¶
- Name:
theme
- Type:
- Default Value:
- Flags:
The current key theme.
- Dazzle.ShortcutManager.props.theme_name¶
- Name:
theme-name
- Type:
- Default Value:
- Flags:
The name of the current theme