Merge lp:~abreu-alexandre/ubuntu-ui-toolkit/add-public-actionmanager-alias into lp:ubuntu-ui-toolkit

Proposed by Alexandre Abreu
Status: Merged
Approved by: Tim Peeters
Approved revision: 703
Merged at revision: 706
Proposed branch: lp:~abreu-alexandre/ubuntu-ui-toolkit/add-public-actionmanager-alias
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 33 lines (+12/-0)
2 files modified
components.api (+1/-0)
modules/Ubuntu/Components/MainView.qml (+11/-0)
To merge this branch: bzr merge lp:~abreu-alexandre/ubuntu-ui-toolkit/add-public-actionmanager-alias
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Tim Peeters Pending
Review via email: mp+181318@code.launchpad.net

This proposal supersedes a proposal from 2013-08-21.

Description of the change

Add an actionmanager property that let clients be more flexible with their actions at runtime

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

20 + /*!
21 + The current ActionManager that supervises the global and local ActionContexts.
22 +
23 + \qmlproperty UnityActions.ActionManager actionManager
24 + */
25 + property alias actionManager: unityActionManager
26 +

I wouldn't say "current" because an app normally has just one ActionManager.

Please add a note with a reference to the actions property which should be used in most cases, and mention that the developers only need to use the actionManager for specific cases (list example). That will avoid developers creating complex code using the actionManager if it is not really needed.

703. By Alexandre Abreu

Fix the documentation

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

> 20 + /*!
> 21 + The current ActionManager that supervises the global and local
> ActionContexts.
> 22 +
> 23 + \qmlproperty UnityActions.ActionManager actionManager
> 24 + */
> 25 + property alias actionManager: unityActionManager
> 26 +
>
> I wouldn't say "current" because an app normally has just one ActionManager.
>
> Please add a note with a reference to the actions property which should be
> used in most cases, and mention that the developers only need to use the
> actionManager for specific cases (list example). That will avoid developers
> creating complex code using the actionManager if it is not really needed.

done

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components.api'
2--- components.api 2013-08-16 10:16:48 +0000
3+++ components.api 2013-08-21 19:13:25 +0000
4@@ -85,6 +85,7 @@
5 property bool automaticOrientation
6 default property internal contentsItem
7 property list<Action> actions
8+ property UnityActions.ActionManager actionManager
9 property ToolbarActions tools
10 onToolsChanged
11 modules/Ubuntu/Components/ModelSectionCounter.qml
12
13=== modified file 'modules/Ubuntu/Components/MainView.qml'
14--- modules/Ubuntu/Components/MainView.qml 2013-08-08 19:44:09 +0000
15+++ modules/Ubuntu/Components/MainView.qml 2013-08-21 19:13:25 +0000
16@@ -289,6 +289,17 @@
17 */
18 property alias actions: unityActionManager.actions
19
20+ /*!
21+ The ActionManager that supervises the global and local ActionContexts.
22+ The \l actions property should be used preferably since it covers most
23+ use cases. The ActionManager is accessible to have a more refined control
24+ over the actions, e.g. if one wants to add/remove actions dynamically, create
25+ specific action contexts, etc.
26+
27+ \qmlproperty UnityActions.ActionManager actionManager
28+ */
29+ property alias actionManager: unityActionManager
30+
31 Object {
32 id: internal
33 UnityActions.ActionManager {

Subscribers

People subscribed via source and target branches

to status/vote changes: