Refactoring: Actions

Registered by Jiří Janoušek

Two types of actions are present in trunk revno 347:

1) Player actions defined in enum Nuvola.PlayerActions
2) User Interface actions managed by class Nuvola.UIActions

Goal of refactoring is universal framework for all actions

* Actions are identified by name.
* Actions can be added by plugins.
* Some metadata should be configurable (e.g. keyboard shortcut).

Blueprint information

Status:
Complete
Approver:
None
Priority:
High
Drafter:
None
Direction:
Approved
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 1.1.0
Started by
Jiří Janoušek
Completed by
Jiří Janoušek

Related branches

Sprints

Whiteboard

Proposed design:

class Nuvola.Action based on Gtk.Action - main properties
* name = unique name of action
* label
* stock_id
* tooltip
* sensitive
* visible
* keybinding (new) - local keybinding

class Nuvola.Actions based on GLib.Object:
* uses Gtk.ActionGroup, Gtk.UIManager to show actions in GTK interface with local keybindings
* methods add(Nuvola.Action action), remove(string name), get(string name), list()

New actions:
* show/hide window
* show notification with currently playing song

(?)

Work Items

Work items:
Implement Nuvola.Actions: DONE
Port code using UIActions to Nuvola.Actions: DONE
Port Nuvola.Player to Nuvola.Actions: DONE
Implement API for plugins to add actions: DONE

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.