RB.Application¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Application (21), Gio.Application (39), GObject.Object (37), Gio.ActionGroup (14), Gio.ActionMap (5)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
|
Signals¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class RB.Application(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
application instance
- Return type:
Creates the application instance.
- activate_key(event)¶
- Parameters:
event (
Gdk.EventKey
) – aGdk.EventKey
- Returns:
True
if an accelerator was activated- Return type:
Attempts to activate an accelerator registered using
RB.Application.add_accelerator
.
- add_accelerator(accel, action, parameter)¶
- Parameters:
accel (
str
) – accelerator stringaction (
str
) – the name of the action to activateparameter (
GLib.Variant
orNone
) – parameter to pass when activating the action, orNone
if the action does not accept an activation parameter.
Like
Gtk.Application.add_accelerator
, except the accelerator only applies if the key was not handled by the focused widget.
- Parameters:
menu (
str
) – name of the menu to add toid (
str
) – id of the item to add (used to remove it, must be unique within the menu)item (
Gio.MenuItem
) – menu item to add
Adds an item to a plugin menu. The id can be used to remove the item.
- Parameters:
name (
str
) – a name for the menumenu (
Gio.MenuModel
) –Gio.MenuModel
instance
Adds a menu model to the set of shared menus available for linking into other menus.
- Parameters:
menu (
str
) – name of plugin menu to return- Returns:
plugin menu instance.
- Return type:
Returns a plugin menu instance. Plugin menus are like shared menus except they are created empty on first access, and they consist solely of entries added through rb_application_add_plugin_item.
- Parameters:
name (
str
) – name of menu to return- Returns:
menu model instance, or
None
if not found- Return type:
Returns a shared menu instance added with rb_application_add_shared_menu
-
Processes shared menu links in the given menu. Menu links take the form of items with “rb-menu-link” or “rb-plugin-menu-link” and “rb-menu-link-type” attributes. “rb-menu-link” specifies the name of a shared menu to link in, “rb-plugin-menu-link” specifies the name of a plugin menu to link in, “rb-menu-link-type” specifies the link type, either “section” or “submenu”. A link item must have “rb-menu-link-type” and one of “rb-menu-link” or “rb-plugin-menu-link”.
- run(argc, argv)¶
-
Runs the application
- Parameters:
menu (
Gio.MenuModel
) – aGio.MenuModel
for which to enable or disable acceleratorsenable (
bool
) –True
to enable accelerators,False
to disable
Enables or disables accelerators for items in menu.