on xenial help sign in
Refitted DBusActionState to allow activation. Renamed to MenuItemAction & MenuItemActionValue. Now used in buttons as well.
d88d556Nick Dedekind
modules/Unity/Indicators/Messaging/qml/ActionButton.qml+14−4
@@ -20,14 +20,24 @@
20
20
21import QtQuick 2.0
21import QtQuick 2.0
22import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
23+import Unity.Indicators 0.1 as Indicators
23
24
24Button {
25Button {
26+ id: __button
25− property variant action: null
27+ property QtObject actionGroup: null
28+ property string action
29+
26− property variant actionParameter: null
30+ property var actionParameter: null
31+
32+ Indicators.MenuItemAction {
33+ id: menuAction
34+ actionGroup: __button.actionGroup
35+ action: __button.action
36+ }
27
37
28 onClicked: {
38 onClicked: {
29− if (action && action.valid) {
39+ if (menuAction.valid) {
30− action.activate(actionParameter);
40+ menuAction.activate(actionParameter);
31 }
41 }
32 }
42 }
33}
43}
modules/Unity/Indicators/Messaging/qml/ActionTextField.qml+2
@@ -22,7 +22,9 @@ import QtQuick 2.0
22import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
23
23
24Item {
24Item {
25+ property alias actionGroup: __sendButton.actionGroup
25 property alias action: __sendButton.action
26 property alias action: __sendButton.action
27+
26 property alias text: __replyField.text
28 property alias text: __replyField.text
27 property alias buttonText: __sendButton.text
29 property alias buttonText: __sendButton.text
28
30
modules/Unity/Indicators/Messaging/qml/GroupedMessage.qml+12−6
@@ -23,12 +23,18 @@ import Ubuntu.Components 0.1
23import Unity.Indicators 0.1 as Indicators
23import Unity.Indicators 0.1 as Indicators
24
24
25Indicators.BasicMenuItem {
25Indicators.BasicMenuItem {
26− property var action: menu && menu.action != "" && actionGroup ? actionGroup.action(menu.action) : null
26+ id: __groupedMessage
27 property alias count: label.text
27 property alias count: label.text
28
28
29 color: "#221e1b"
29 color: "#221e1b"
30 implicitHeight: units.gu(10)
30 implicitHeight: units.gu(10)
31
31
32+ Indicators.MenuItemAction {
33+ id: menuAction
34+ actionGroup: __groupedMessage.actionGroup
35+ action: menu ? menu.action : ""
36+ }
37+
32 Row {
38 Row {
33 anchors.fill: parent
39 anchors.fill: parent
34 anchors.margins: units.gu(2)
40 anchors.margins: units.gu(2)
@@ -59,7 +65,7 @@ Indicators.BasicMenuItem {
59 color: "#e8e1d0"
65 color: "#e8e1d0"
60 font.weight: Font.DemiBold
66 font.weight: Font.DemiBold
61 fontSize: "medium"
67 fontSize: "medium"
62− text: action && action.valid && action.state ? action.state[0] : "0"
68+ text: menuAction.valid ? menuAction.state[0] : "0"
63 }
69 }
64 }
70 }
65
71
@@ -76,15 +82,15 @@ Indicators.BasicMenuItem {
76 MouseArea {
82 MouseArea {
77 anchors.fill: parent
83 anchors.fill: parent
78 onClicked: {
84 onClicked: {
79− if (action && action.valid) {
85+ if (menuAction.valid) {
80− action.activate(true);
86+ menuAction.activate(true);
81 }
87 }
82 }
88 }
83 }
89 }
84
90
85 onItemRemoved: {
91 onItemRemoved: {
86− if (action && action.valid) {
92+ if (menuAction.valid) {
87− action.activate(false);
93+ menuAction.activate(false);
88 }
94 }
89 }
95 }
90}
96}
modules/Unity/Indicators/Messaging/qml/HeroMessage.qml+9−4
@@ -26,7 +26,6 @@ Indicators.BasicMenuItem {
26 id: __heroMessage
26 id: __heroMessage
27
27
28 property variant actionsDescription: null
28 property variant actionsDescription: null
29− property var action: menu && menu.action != "" && actionGroup ? actionGroup.action(menu.action) : null
30 property alias heroMessageHeader: __heroMessageHeader
29 property alias heroMessageHeader: __heroMessageHeader
31 property real collapsedHeight: heroMessageHeader.y + heroMessageHeader.bodyBottom + units.gu(2)
30 property real collapsedHeight: heroMessageHeader.y + heroMessageHeader.bodyBottom + units.gu(2)
32 property real expandedHeight: collapsedHeight
31 property real expandedHeight: collapsedHeight
@@ -36,6 +35,12 @@ Indicators.BasicMenuItem {
36 removable: state !== "expanded"
35 removable: state !== "expanded"
37 implicitHeight: collapsedHeight
36 implicitHeight: collapsedHeight
38
37
38+ Indicators.MenuItemAction {
39+ id: menuAction
40+ actionGroup: __heroMessage.actionGroup
41+ action: menu ? menu.action : ""
42+ }
43+
39 HeroMessageHeader {
44 HeroMessageHeader {
40 id: __heroMessageHeader
45 id: __heroMessageHeader
41
46
@@ -50,7 +55,7 @@ Indicators.BasicMenuItem {
50 state: __heroMessage.state
55 state: __heroMessage.state
51
56
52 onAppIconClicked: {
57 onAppIconClicked: {
53− if (action && action.valid) {
58+ if (menuAction.valid) {
54 deactivateMenu();
59 deactivateMenu();
55 action.activate(true);
60 action.activate(true);
56 }
61 }
@@ -108,8 +113,8 @@ Indicators.BasicMenuItem {
108 }
113 }
109
114
110 onItemRemoved: {
115 onItemRemoved: {
111− if (action && action.valid) {
116+ if (menuAction.valid) {
112− action.activate(false);
117+ menuAction.activate(false);
113 }
118 }
114 }
119 }
115}
120}
modules/Unity/Indicators/Messaging/qml/QuickReply.qml+2
@@ -23,7 +23,9 @@ import Ubuntu.Components 0.1
23import Unity.Indicators 0.1 as Indicators
23import Unity.Indicators 0.1 as Indicators
24
24
25Item {
25Item {
26+ property alias actionGroup: __actionTextField.actionGroup
26 property alias action: __actionTextField.action
27 property alias action: __actionTextField.action
28+
27 property alias buttonText: __actionTextField.buttonText
29 property alias buttonText: __actionTextField.buttonText
28 property real expandedHeight: childrenRect.height
30 property real expandedHeight: childrenRect.height
29 property alias messages : __messagelistRepeater.model
31 property alias messages : __messagelistRepeater.model
modules/Unity/Indicators/Messaging/qml/SnapDecision.qml+9−4
@@ -20,10 +20,11 @@
20
20
21import QtQuick 2.0
21import QtQuick 2.0
22import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
23+import Unity.Indicators 0.1 as Indicators
23import "utils.js" as Utils
24import "utils.js" as Utils
24
25
25HeroMessage {
26HeroMessage {
26− id: __heroMessage
27+ id: __snapDecision
27
28
28 expandedHeight: __buttons.y + __buttons.height + __quickreply.height + units.gu(2)
29 expandedHeight: __buttons.y + __buttons.height + __quickreply.height + units.gu(2)
29 heroMessageHeader.titleText.text: menu ? menu.label : ""
30 heroMessageHeader.titleText.text: menu ? menu.label : ""
@@ -62,7 +63,9 @@ HeroMessage {
62 }
63 }
63
64
64 ActionButton {
65 ActionButton {
65− action: menu && actionGroup && actionsDescription ? actionGroup.action(actionsDescription[0].name) : undefined
66+ actionGroup: __snapDecision.actionGroup
67+ action: actionsDescription[0].name
68+
66 text: actionsDescription ? actionsDescription[0].label : "Call back"
69 text: actionsDescription ? actionsDescription[0].label : "Call back"
67 color: "#c94212"
70 color: "#c94212"
68 anchors.right: parent.right
71 anchors.right: parent.right
@@ -73,7 +76,7 @@ HeroMessage {
73
76
74 states: State {
77 states: State {
75 name: "expanded"
78 name: "expanded"
76− when: __heroMessage.state === "expanded"
79+ when: __snapDecision.state === "expanded"
77
80
78 PropertyChanges {
81 PropertyChanges {
79 target: __buttons
82 target: __buttons
@@ -92,9 +95,11 @@ HeroMessage {
92 QuickReply {
95 QuickReply {
93 id: __quickreply
96 id: __quickreply
94
97
98+ actionGroup: __snapDecision.actionGroup
99+ action: actionsDescription[1].name
100+
95 messages: actionsDescription ? actionsDescription[1]["parameter-hint"] : ""
101 messages: actionsDescription ? actionsDescription[1]["parameter-hint"] : ""
96 buttonText: actionsDescription ? actionsDescription[1].label : "send"
102 buttonText: actionsDescription ? actionsDescription[1].label : "send"
97− action: menu && actionGroup && actionsDescription ? actionGroup.action(actionsDescription[1].name) : undefined
98 anchors.top: __buttons.bottom
103 anchors.top: __buttons.bottom
99 anchors.topMargin: units.gu(2)
104 anchors.topMargin: units.gu(2)
100 anchors.left: parent.left
105 anchors.left: parent.left
modules/Unity/Indicators/Messaging/qml/TextMessage.qml+5−2
@@ -20,13 +20,16 @@
20
20
21import QtQuick 2.0
21import QtQuick 2.0
22import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
23+import Unity.Indicators 0.1 as Indicators
23
24
24SimpleTextMessage {
25SimpleTextMessage {
25− id: __heroMessage
26+ id: __simpleMessage
26
27
27 footer: ActionTextField {
28 footer: ActionTextField {
28 anchors.fill: parent
29 anchors.fill: parent
29− action: menu && actionGroup && actionsDescription ? actionGroup.action(actionsDescription[0].name) : undefined
30+ actionGroup: __simpleMessage.actionGroup
31+ action: actionsDescription[0].name
32+
30 buttonText: actionsDescription ? actionsDescription[0].label : "Send"
33 buttonText: actionsDescription ? actionsDescription[0].label : "Send"
31 }
34 }
32}
35}
modules/Unity/Indicators/Network/qml/AccessPoint.qml+1−1
@@ -61,7 +61,7 @@ Indicators.MenuItem {
61 anchors.centerIn: parent
61 anchors.centerIn: parent
62 }
62 }
63
63
64− Indicators.DBusActionState {
64+ Indicators.MenuItemActionValue {
65 actionGroup: _accessPoint.actionGroup
65 actionGroup: _accessPoint.actionGroup
66 action: menu ? menu.action : ""
66 action: menu ? menu.action : ""
67 target: checkBoxActive
67 target: checkBoxActive
modules/Unity/Indicators/Network/qml/WifiSection.qml+9−2
@@ -22,6 +22,13 @@ import Ubuntu.Components 0.1
22import Unity.Indicators 0.1 as Indicators
22import Unity.Indicators 0.1 as Indicators
23
23
24Indicators.SectionMenuItem {
24Indicators.SectionMenuItem {
25+ id: __wifiSectionMenu
26+
27+ Indicators.MenuItemAction {
28+ id: busyAction
29+ actionGroup: __wifiSectionMenu.actionGroup
25− property variant busyAction : actionGroup ? actionGroup.action(menu.extra.canonical_busy_action) : undefined
30+ action: menu ? menu.extra.canonical_busy_action : ""
31+ }
32+
26− busy: busyAction && busyAction.valid ? busyAction.state : false
33+ busy: busyAction.valid ? busyAction.state : false
27}
34}
modules/Unity/Indicators/qml/ButtonMenuItem.qml+10−5
@@ -21,12 +21,13 @@ import QtQuick 2.0
21import Ubuntu.Components 0.1
21import Ubuntu.Components 0.1
22
22
23BasicMenuItem {
23BasicMenuItem {
24− property var action: menu && menu.action != "" && actionGroup ? actionGroup.action(menu.action) : null
24+ id: _buttonMenu
25−
26 color: "#221e1b"
25 color: "#221e1b"
27 implicitHeight: units.gu(7)
26 implicitHeight: units.gu(7)
28
27
29 Button {
28 Button {
29+ id: button
30+ enabled: menuAction.valid
30 text: menu ? menu.label : ""
31 text: menu ? menu.label : ""
31 anchors.centerIn: parent
32 anchors.centerIn: parent
32 height: units.gu(4)
33 height: units.gu(4)
@@ -34,9 +35,13 @@ BasicMenuItem {
34 color: "#1b1817"
35 color: "#1b1817"
35
36
36 onClicked: {
37 onClicked: {
37− if (action && action.valid) {
38− action.activate()
38+ menuAction.activate()
39− }
40 }
39 }
41 }
40 }
41+
42+ MenuItemAction {
43+ id: menuAction
44+ actionGroup: _buttonMenu.actionGroup
45+ action: menu ? menu.action : ""
46+ }
42}
47}
modules/Unity/Indicators/qml/IndicatorBase.qml−2
@@ -20,8 +20,6 @@
20
20
21import QtQuick 2.0
21import QtQuick 2.0
22import QMenuModel 0.1
22import QMenuModel 0.1
23−import Ubuntu.Components 0.1
24−import Ubuntu.Components.ListItems 0.1 as ListItem
25import Unity.Indicators 0.1 as Indicators
23import Unity.Indicators 0.1 as Indicators
26
24
27Item {
25Item {
modules/Unity/Indicators/qml/IndicatorPage.qml+8−11
@@ -19,10 +19,7 @@
19 */
19 */
20
20
21import QtQuick 2.0
21import QtQuick 2.0
22−import QMenuModel 0.1
23−import Ubuntu.Components 0.1
24−import Ubuntu.Components.ListItems 0.1 as ListItem
22+import Ubuntu.Components 0.1 as Components
25−import Unity.Indicators 0.1 as Indicators
26
23
27IndicatorBase {
24IndicatorBase {
28 id: main
25 id: main
@@ -132,7 +129,6 @@ IndicatorBase {
132 isCurrentItem: item.ListView.isCurrentItem
129 isCurrentItem: item.ListView.isCurrentItem
133 anchors.left: parent.left
130 anchors.left: parent.left
134 anchors.right: parent.right
131 anchors.right: parent.right
135− height: implicitHeight
136 menu: model
132 menu: model
137
133
138 Connections {
134 Connections {
@@ -145,14 +141,15 @@ IndicatorBase {
145 }
141 }
146 }
142 }
147
143
148− Label {
144+ Components.Label {
149 id: emptyLabel
145 id: emptyLabel
150 visible: (mainMenu.visibleItems === 0)
146 visible: (mainMenu.visibleItems === 0)
147+ anchors {
151− anchors.top: parent.top
148+ top: parent.top
152− anchors.left: parent.left
149+ left: parent.left
153− anchors.right: parent.right
150+ right: parent.right
154− anchors.topMargin: units.gu(2)
151+ topMargin: units.gu(2)
155− height: paintedHeight
152+ }
156 wrapMode: Text.WordWrap
153 wrapMode: Text.WordWrap
157 horizontalAlignment: Text.AlignHCenter
154 horizontalAlignment: Text.AlignHCenter
158
155
modules/Unity/Indicators/qml/IndicatorWidget.qml−3
@@ -18,9 +18,6 @@
18 */
18 */
19
19
20import QtQuick 2.0
20import QtQuick 2.0
21−import QMenuModel 0.1
22−import Ubuntu.Components 0.1
23−import Ubuntu.Components.ListItems 0.1 as ListItem
24import Unity.Indicators 0.1 as Indicators
21import Unity.Indicators 0.1 as Indicators
25
22
26IndicatorBase {
23IndicatorBase {
modules/Unity/Indicators/qml/MenuItemAction.qmlnew file+94
@@ -0,0 +1,94 @@
1+/*
2+ * Copyright 2013 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ *
16+ * Authors:
17+ * Renato Araujo Oliveira Filho <renato@canonical.com>
18+ */
19+
20+import QtQuick 2.0
21+
22+/*!
23+ \qmltype MenuItemActionValue
24+ \inqmlmodule Indicators 0.1
25+ \brief Helper class to connect dbus action state with qml components property
26+
27+ Exampiles:
28+ \qml
29+ Button {
30+ id: slide
31+ onClick: { action.activate() }
32+ }
33+ MenuItemAction {
34+ id: action
35+ actionGroup: menuItem.actionGroup
36+ action: "/ubuntu/sound/auto"
37+ }
38+ \endqml
39+
40+ \b{This component is under heavy development.}
41+*/
42+
43+Item {
44+ id: dbusAction
45+
46+ /*!
47+ \preliminary
48+ The dbus action name
49+ */
50+ property string action: ""
51+
52+ /*!
53+ \preliminary
54+ The dbus action group object
55+ */
56+ property QtObject actionGroup: null
57+
58+ /*!
59+ \preliminary
60+ This is a read-only property with the current validity of the action
61+ */
62+ readonly property bool valid: __actionObject ? __actionObject.valid : false
63+
64+ readonly property var state: __actionObject ? __actionObject.state : undefined
65+
66+ // internal
67+ property QtObject __actionObject: null
68+
69+ function activate(param) {
70+ if (valid) {
71+ __actionObject.activate(param);
72+ console.log("ACTIONED : " + action + "(" + param + ")")
73+ }
74+ }
75+
76+ onActionGroupChanged: updateAction()
77+ onActionChanged: updateAction()
78+
79+ Item {
80+ id: priv
81+ property var actionObject: null
82+
83+ Connections {
84+ target: dbusAction.actionGroup != undefined ? dbusAction.actionGroup : null
85+ onActionAppear: dbusAction.updateAction();
86+ onActionVanish: dbusAction.updateAction();
87+ onStatusChanged: dbusAction.updateAction();
88+ }
89+ }
90+
91+ function updateAction() {
92+ __actionObject = action !== "" && actionGroup ? actionGroup.action(action) : null
93+ }
94+}
modules/Unity/Indicators/qml/DBusActionState.qml → modules/Unity/Indicators/qml/MenuItemActionValue.qmlrenamed+10−28
@@ -20,7 +20,7 @@
20import QtQuick 2.0
20import QtQuick 2.0
21
21
22/*!
22/*!
23− \qmltype DBusActionState
23+ \qmltype MenuItemActionValue
24 \inqmlmodule Indicators 0.1
24 \inqmlmodule Indicators 0.1
25 \brief Helper class to connect dbus action state with qml components property
25 \brief Helper class to connect dbus action state with qml components property
26
26
@@ -29,7 +29,7 @@ import QtQuick 2.0
29 Slider {
29 Slider {
30 id: slide
30 id: slide
31 }
31 }
32− DBusActionState {
32+ MenuItemActionValue {
33 actionGroup: menuItem.actionGroup
33 actionGroup: menuItem.actionGroup
34 action: "/ubuntu/sound/volume"
34 action: "/ubuntu/sound/volume"
35 target: slider
35 target: slider
@@ -40,27 +40,9 @@ import QtQuick 2.0
40 \b{This component is under heavy development.}
40 \b{This component is under heavy development.}
41*/
41*/
42
42
43−Item {
43+MenuItemAction {
44 id: dbusActionState
44 id: dbusActionState
45
45
46− /*!
47− \preliminary
48− The dbus action name
49− */
50− property string action : ""
51−
52− /*!
53− \preliminary
54− The dbus action group object
55− */
56− property QtObject actionGroup : null
57−
58− /*!
59− \preliminary
60− This is a read-only property with the action current value
61− */
62− property var value : undefined
63−
64 /*!
46 /*!
65 \preliminary
47 \preliminary
66 The component which will have the property changed by action
48 The component which will have the property changed by action
@@ -85,23 +67,23 @@ Item {
85
67
86 Item {
68 Item {
87 id: priv
69 id: priv
88− property var actionObject: action != "" && dbusActionState.actionGroup ? dbusActionState.actionGroup.action(action) : null
70+ property alias actionObject : dbusActionState.__actionObject
89− property var actionState: actionObject ? actionObject.state : undefined
90
71
91 property var currentTarget: undefined
72 property var currentTarget: undefined
92 property string currentSignal
73 property string currentSignal
93
74
75+
94 Binding {
76 Binding {
95 id: propertyBinding
77 id: propertyBinding
96− value: priv.actionState
78+ value: dbusActionState.state
97− when: (actionGroup && active && priv.actionObject)
79+ when: priv.actionObject && dbusActionState.active
98 property: dbusActionState.property
80 property: dbusActionState.property
99 }
81 }
100 }
82 }
101
83
102 function connectViewChanges() {
84 function connectViewChanges() {
103 if (priv.currentTarget != undefined && priv.currentSignal !== "") {
85 if (priv.currentTarget != undefined && priv.currentSignal !== "") {
104− if (priv.currentTarget[priv.currentSignal] != undefined) {
86+ if (priv.currentTarget[priv.currentSignal] !== undefined) {
105 priv.currentTarget[priv.currentSignal].disconnect(onViewValueChanged);
87 priv.currentTarget[priv.currentSignal].disconnect(onViewValueChanged);
106 }
88 }
107 }
89 }
@@ -110,7 +92,7 @@ Item {
110 priv.currentSignal = "";
92 priv.currentSignal = "";
111 if (target) {
93 if (target) {
112 var signal = "on%1Changed".arg(property.charAt(0).toUpperCase() + property.slice(1));
94 var signal = "on%1Changed".arg(property.charAt(0).toUpperCase() + property.slice(1));
113− if (target[signal] != undefined) {
95+ if (target[signal] !== undefined) {
114 target[signal].connect(onViewValueChanged);
96 target[signal].connect(onViewValueChanged);
115 priv.currentTarget = target;
97 priv.currentTarget = target;
116 priv.currentSignal = signal;
98 priv.currentSignal = signal;
@@ -119,7 +101,7 @@ Item {
119 }
101 }
120
102
121 function onViewValueChanged() {
103 function onViewValueChanged() {
122− if (priv.actionObject.valid) {
104+ if (valid) {
123 var propertyValue = target[property];
105 var propertyValue = target[property];
124 priv.actionObject.updateState(propertyValue);
106 priv.actionObject.updateState(propertyValue);
125 }
107 }
modules/Unity/Indicators/qml/ProgressMenuItem.qml+1−1
@@ -54,7 +54,7 @@ MenuItem {
54 }
54 }
55 }
55 }
56
56
57− DBusActionState {
57+ MenuItemActionValue {
58 actionGroup: _progressMenu.actionGroup
58 actionGroup: _progressMenu.actionGroup
59 action: menu ? menu.action : ""
59 action: menu ? menu.action : ""
60 target: progressBar
60 target: progressBar
modules/Unity/Indicators/qml/SliderMenuItem.qml+3−1
@@ -29,6 +29,7 @@ MenuItem {
29
29
30 control: Slider {
30 control: Slider {
31 id: slider
31 id: slider
32+ enabled: menuAction.valid
32 width: _sliderMenu.text ? units.gu(20) : _sliderMenu.width - units.gu(4)
33 width: _sliderMenu.text ? units.gu(20) : _sliderMenu.width - units.gu(4)
33 anchors.verticalCenter: parent.verticalCenter
34 anchors.verticalCenter: parent.verticalCenter
34 live: false
35 live: false
@@ -58,7 +59,8 @@ MenuItem {
58 }
59 }
59 }
60 }
60
61
61− DBusActionState {
62+ MenuItemActionValue {
63+ id: menuAction
62 actionGroup: _sliderMenu.actionGroup
64 actionGroup: _sliderMenu.actionGroup
63 action: menu ? menu.action : ""
65 action: menu ? menu.action : ""
64 target: slider
66 target: slider
modules/Unity/Indicators/qml/SwitchMenuItem.qml+3−1
@@ -27,12 +27,14 @@ MenuItem {
27
27
28 control: Switch {
28 control: Switch {
29 id: switcher
29 id: switcher
30+ enabled: menuAction.valid
30
31
31 anchors.verticalCenter: parent.verticalCenter
32 anchors.verticalCenter: parent.verticalCenter
32 anchors.right: parent.right
33 anchors.right: parent.right
33 }
34 }
34
35
35− DBusActionState {
36+ MenuItemActionValue {
37+ id: menuAction
36 actionGroup: _switchMenu.actionGroup
38 actionGroup: _switchMenu.actionGroup
37 action: menu ? menu.action : ""
39 action: menu ? menu.action : ""
38 target: switcher
40 target: switcher
modules/Unity/Indicators/qml/TextMenuItem.qml+1−1
@@ -73,7 +73,7 @@ MenuItem {
73 }
73 }
74 }
74 }
75
75
76− DBusActionState {
76+ MenuItemActionValue {
77 actionGroup: _textMenu.actionGroup
77 actionGroup: _textMenu.actionGroup
78 action: menu ? menu.action : ""
78 action: menu ? menu.action : ""
79 target: _textField
79 target: _textField
modules/Unity/Indicators/qml/qmldir+2−1
@@ -3,13 +3,14 @@ plugin IndicatorsQml
3
3
4BasicMenuItem 0.1 BasicMenuItem.qml
4BasicMenuItem 0.1 BasicMenuItem.qml
5ButtonMenuItem 0.1 ButtonMenuItem.qml
5ButtonMenuItem 0.1 ButtonMenuItem.qml
6−DBusActionState 0.1 DBusActionState.qml
7DivMenuItem 0.1 DivMenuItem.qml
6DivMenuItem 0.1 DivMenuItem.qml
8HLine 0.1 HLine.qml
7HLine 0.1 HLine.qml
9IndicatorBase 0.1 IndicatorBase.qml
8IndicatorBase 0.1 IndicatorBase.qml
10IndicatorPage 0.1 IndicatorPage.qml
9IndicatorPage 0.1 IndicatorPage.qml
11IndicatorWidget 0.1 IndicatorWidget.qml
10IndicatorWidget 0.1 IndicatorWidget.qml
12MenuItem 0.1 MenuItem.qml
11MenuItem 0.1 MenuItem.qml
12+MenuItemAction 0.1 MenuItemAction.qml
13+MenuItemActionValue 0.1 MenuItemActionValue.qml
13MenuItemFactory 0.1 MenuItemFactory.qml
14MenuItemFactory 0.1 MenuItemFactory.qml
14ProgressMenuItem 0.1 ProgressMenuItem.qml
15ProgressMenuItem 0.1 ProgressMenuItem.qml
15SectionMenuItem 0.1 SectionMenuItem.qml
16SectionMenuItem 0.1 SectionMenuItem.qml