on xenial help sign in
renamed menuItem->menuData
86d8183Nick Dedekind
plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qml+5−5
@@ -26,10 +26,10 @@ import QMenuModel 0.1 as QMenuModel
26Indicators.BaseMenuItem {
26Indicators.BaseMenuItem {
27 id: messageFactoryItem
27 id: messageFactoryItem
28 property var menuModel: null
28 property var menuModel: null
29− property QtObject menuItem: null
29+ property QtObject menuData: null
30 property var menuIndex: undefined
30 property var menuIndex: undefined
31
31
32− property var extAttrib: menuItem && menuItem.ext ? menuItem.ext : undefined
32+ property var extAttrib: menuData && menuData.ext ? menuData.ext : undefined
33 property var actionsDescription: extAttrib && extAttrib.hasOwnProperty("xCanonicalMessageActions") ? extAttrib.xCanonicalMessageActions : undefined
33 property var actionsDescription: extAttrib && extAttrib.hasOwnProperty("xCanonicalMessageActions") ? extAttrib.xCanonicalMessageActions : undefined
34
34
35 onMenuModelChanged: {
35 onMenuModelChanged: {
@@ -61,7 +61,7 @@ Indicators.BaseMenuItem {
61 id: simpleTextMessage
61 id: simpleTextMessage
62 SimpleTextMessage {
62 SimpleTextMessage {
63 // text
63 // text
64− title: menuItem && menuItem.label ? menuItem.label : ""
64+ title: menuData && menuData.label ? menuData.label : ""
65 time: extAttrib && extAttrib.hasOwnProperty("xCanonicalTime") ? extAttrib.xCanonicalTime : 0
65 time: extAttrib && extAttrib.hasOwnProperty("xCanonicalTime") ? extAttrib.xCanonicalTime : 0
66 message: extAttrib && extAttrib.hasOwnProperty("xCanonicalText") ? extAttrib.xCanonicalText : ""
66 message: extAttrib && extAttrib.hasOwnProperty("xCanonicalText") ? extAttrib.xCanonicalText : ""
67 // icons
67 // icons
@@ -93,7 +93,7 @@ Indicators.BaseMenuItem {
93 }
93 }
94
94
95 // text
95 // text
96− title: menuItem && menuItem.label ? menuItem.label : ""
96+ title: menuData && menuData.label ? menuData.label : ""
97 time: extAttrib && extAttrib.hasOwnProperty("xCanonicalTime") ? extAttrib.xCanonicalTime : 0
97 time: extAttrib && extAttrib.hasOwnProperty("xCanonicalTime") ? extAttrib.xCanonicalTime : 0
98 message: extAttrib && extAttrib.hasOwnProperty("xCanonicalText") ? extAttrib.xCanonicalText : ""
98 message: extAttrib && extAttrib.hasOwnProperty("xCanonicalText") ? extAttrib.xCanonicalText : ""
99 replyButtonText: replyActionDescription !== undefined && replyActionDescription.hasOwnProperty("label") ? replyActionDescription.label : "Send"
99 replyButtonText: replyActionDescription !== undefined && replyActionDescription.hasOwnProperty("label") ? replyActionDescription.label : "Send"
@@ -137,7 +137,7 @@ Indicators.BaseMenuItem {
137 }
137 }
138
138
139 // text
139 // text
140− title: menuItem && menuItem.label ? menuItem.label : ""
140+ title: menuData && menuData.label ? menuData.label : ""
141 time: extAttrib && extAttrib.hasOwnProperty("xCanonicalTime") ? extAttrib.xCanonicalTime : ""
141 time: extAttrib && extAttrib.hasOwnProperty("xCanonicalTime") ? extAttrib.xCanonicalTime : ""
142 message: extAttrib && extAttrib.hasOwnProperty("xCanonicalText") ? extAttrib.xCanonicalText : ""
142 message: extAttrib && extAttrib.hasOwnProperty("xCanonicalText") ? extAttrib.xCanonicalText : ""
143 actionButtonText: activateActionDescription !== undefined && activateActionDescription.hasOwnProperty("label") ? activateActionDescription.label : "Call back"
143 actionButtonText: activateActionDescription !== undefined && activateActionDescription.hasOwnProperty("label") ? activateActionDescription.label : "Call back"
plugins/Unity/Indicators/qml/IndicatorPage.qml+2−2
@@ -144,8 +144,8 @@ IndicatorBase {
144 item.selectMenu.connect(function() { mainMenu.selectedIndex = index; });
144 item.selectMenu.connect(function() { mainMenu.selectedIndex = index; });
145 item.deselectMenu.connect(function() { mainMenu.selectedIndex = -1; });
145 item.deselectMenu.connect(function() { mainMenu.selectedIndex = -1; });
146 }
146 }
147− if (item.hasOwnProperty("menuItem")) {
147+ if (item.hasOwnProperty("menuData")) {
148− item.menuItem = Qt.binding(function() { return model; });
148+ item.menuData = Qt.binding(function() { return model; });
149 }
149 }
150 if (item.hasOwnProperty("menuIndex")) {
150 if (item.hasOwnProperty("menuIndex")) {
151 item.menuIndex = Qt.binding(function() { return modelIndex; });
151 item.menuIndex = Qt.binding(function() { return modelIndex; });
plugins/Unity/Indicators/qml/MenuItemFactory.qml+39−39
@@ -55,13 +55,13 @@ Item {
55 Component {
55 Component {
56 id: sliderMenu;
56 id: sliderMenu;
57 Indicators.SliderMenuItem {
57 Indicators.SliderMenuItem {
58− property QtObject menuItem: null
58+ property QtObject menuData: null
59 property var menuModel: menuFactory.menuModel
59 property var menuModel: menuFactory.menuModel
60 property var menuIndex: undefined
60 property var menuIndex: undefined
61− property var extAttrib: menuItem && menuItem.ext ? menuItem.ext : undefined
61+ property var extAttrib: menuData && menuData.ext ? menuData.ext : undefined
62
62
63− text: menuItem && menuItem.label ? menuItem.label : ""
63+ text: menuData && menuData.label ? menuData.label : ""
64− icon: menuItem && menuItem.icon ? menuItem.icon : ""
64+ icon: menuData && menuData.icon ? menuData.icon : ""
65 minIcon: extAttrib && extAttrib.hasOwnProperty("minIcon") ? extAttrib.minIcon : ""
65 minIcon: extAttrib && extAttrib.hasOwnProperty("minIcon") ? extAttrib.minIcon : ""
66 maxIcon: extAttrib && extAttrib.hasOwnProperty("maxIcon") ? extAttrib.maxIcon : ""
66 maxIcon: extAttrib && extAttrib.hasOwnProperty("maxIcon") ? extAttrib.maxIcon : ""
67
67
@@ -73,8 +73,8 @@ Item {
73 }
73 }
74 return maximum;
74 return maximum;
75 }
75 }
76− value: menuItem ? menuItem.actionState : 0.0
76+ value: menuData ? menuData.actionState : 0.0
77− enabled: menuItem ? menuItem.sensitive : false
77+ enabled: menuData ? menuData.sensitive : false
78
78
79 onMenuModelChanged: {
79 onMenuModelChanged: {
80 loadAttributes();
80 loadAttributes();
@@ -99,12 +99,12 @@ Item {
99 Component {
99 Component {
100 id: buttonMenu;
100 id: buttonMenu;
101 Indicators.ButtonMenuItem {
101 Indicators.ButtonMenuItem {
102− property QtObject menuItem: null
102+ property QtObject menuData: null
103 property var menuModel: menuFactory.menuModel
103 property var menuModel: menuFactory.menuModel
104 property var menuIndex: undefined
104 property var menuIndex: undefined
105
105
106− text: menuItem && menuItem.label ? menuItem.label : ""
106+ text: menuData && menuData.label ? menuData.label : ""
107− enabled: menuItem ? menuItem.sensitive : false
107+ enabled: menuData ? menuData.sensitive : false
108
108
109 onActivate: {
109 onActivate: {
110 menuModel.activate(menuIndex);
110 menuModel.activate(menuIndex);
@@ -115,37 +115,37 @@ Item {
115 Component {
115 Component {
116 id: sectionMenu;
116 id: sectionMenu;
117 Indicators.SectionMenuItem {
117 Indicators.SectionMenuItem {
118− property QtObject menuItem: null
118+ property QtObject menuData: null
119 property var menuIndex: undefined
119 property var menuIndex: undefined
120
120
121− text: menuItem && menuItem.label ? menuItem.label : ""
121+ text: menuData && menuData.label ? menuData.label : ""
122 }
122 }
123 }
123 }
124
124
125 Component {
125 Component {
126 id: progressMenu;
126 id: progressMenu;
127 Indicators.ProgressMenuItem {
127 Indicators.ProgressMenuItem {
128− property QtObject menuItem: null
128+ property QtObject menuData: null
129 property var menuIndex: undefined
129 property var menuIndex: undefined
130
130
131− text: menuItem && menuItem.label ? menuItem.label : ""
131+ text: menuData && menuData.label ? menuData.label : ""
132− icon: menuItem ? menuItem.icon : ""
132+ icon: menuData ? menuData.icon : ""
133− value : menuItem ? menuItem.actionState : 0.0
133+ value : menuData ? menuData.actionState : 0.0
134− enabled: menuItem ? menuItem.sensitive : false
134+ enabled: menuData ? menuData.sensitive : false
135 }
135 }
136 }
136 }
137
137
138 Component {
138 Component {
139 id: standardMenu;
139 id: standardMenu;
140 Indicators.StandardMenuItem {
140 Indicators.StandardMenuItem {
141− property QtObject menuItem: null
141+ property QtObject menuData: null
142 property var menuIndex: undefined
142 property var menuIndex: undefined
143
143
144− text: menuItem && menuItem.label ? menuItem.label : ""
144+ text: menuData && menuData.label ? menuData.label : ""
145− icon: menuItem && menuItem.icon ? menuItem.icon : ""
145+ icon: menuData && menuData.icon ? menuData.icon : ""
146− checkable: menuItem ? (menuItem.isCheck || menuItem.isRadio) : false
146+ checkable: menuData ? (menuData.isCheck || menuData.isRadio) : false
147− checked: checkable ? menuItem.isToggled : false
147+ checked: checkable ? menuData.isToggled : false
148− enabled: menuItem ? menuItem.sensitive : false
148+ enabled: menuData ? menuData.sensitive : false
149
149
150 onActivate: {
150 onActivate: {
151 menuModel.activate(menuIndex);
151 menuModel.activate(menuIndex);
@@ -157,13 +157,13 @@ Item {
157 Component {
157 Component {
158 id: switchMenu;
158 id: switchMenu;
159 Indicators.SwitchMenuItem {
159 Indicators.SwitchMenuItem {
160− property QtObject menuItem: null
160+ property QtObject menuData: null
161 property var menuIndex: undefined
161 property var menuIndex: undefined
162
162
163− text: menuItem && menuItem.label ? menuItem.label : ""
163+ text: menuData && menuData.label ? menuData.label : ""
164− icon: menuItem && menuItem.icon ? menuItem.icon : ""
164+ icon: menuData && menuData.icon ? menuData.icon : ""
165− checked: menuItem ? menuItem.isToggled : false
165+ checked: menuData ? menuData.isToggled : false
166− enabled: menuItem ? menuItem.sensitive : false
166+ enabled: menuData ? menuData.sensitive : false
167
167
168 onActivate: {
168 onActivate: {
169 menuModel.activate(menuIndex);
169 menuModel.activate(menuIndex);
@@ -175,12 +175,12 @@ Item {
175 Component {
175 Component {
176 id: wifiSection;
176 id: wifiSection;
177 Indicators.SectionMenuItem {
177 Indicators.SectionMenuItem {
178− property QtObject menuItem: null
178+ property QtObject menuData: null
179 property var menuModel: menuFactory.menuModel
179 property var menuModel: menuFactory.menuModel
180 property var menuIndex: undefined
180 property var menuIndex: undefined
181− property var extAttrib: menuItem && menuItem.ext ? menuItem.ext : undefined
181+ property var extAttrib: menuData && menuData.ext ? menuData.ext : undefined
182
182
183− text: menuItem && menuItem.label ? menuItem.label : ""
183+ text: menuData && menuData.label ? menuData.label : ""
184 busy: extAttrib && extAttrib.hasOwnProperty("xCanonicalBusyAction") ? extAttrib.xCanonicalBusyAction : false
184 busy: extAttrib && extAttrib.hasOwnProperty("xCanonicalBusyAction") ? extAttrib.xCanonicalBusyAction : false
185
185
186 onMenuModelChanged: {
186 onMenuModelChanged: {
@@ -200,10 +200,10 @@ Item {
200 Component {
200 Component {
201 id: accessPoint;
201 id: accessPoint;
202 ICNetwork.AccessPoint {
202 ICNetwork.AccessPoint {
203− property QtObject menuItem: null
203+ property QtObject menuData: null
204 property var menuModel: menuFactory.menuModel
204 property var menuModel: menuFactory.menuModel
205 property var menuIndex: undefined
205 property var menuIndex: undefined
206− property var extAttrib: menuItem && menuItem.ext ? menuItem.ext : undefined
206+ property var extAttrib: menuData && menuData.ext ? menuData.ext : undefined
207
207
208 property var strengthAction: QMenuModel.UnityMenuAction {
208 property var strengthAction: QMenuModel.UnityMenuAction {
209 model: menuModel
209 model: menuModel
@@ -211,12 +211,12 @@ Item {
211 name: extAttrib && extAttrib.hasOwnProperty("xCanonicalWifiApStrengthAction") ? extAttrib.xCanonicalWifiApStrengthAction : ""
211 name: extAttrib && extAttrib.hasOwnProperty("xCanonicalWifiApStrengthAction") ? extAttrib.xCanonicalWifiApStrengthAction : ""
212 }
212 }
213
213
214− text: menuItem && menuItem.label ? menuItem.label : ""
214+ text: menuData && menuData.label ? menuData.label : ""
215 secure: extAttrib && extAttrib.hasOwnProperty("xCanonicalWifiApIsSecure") ? extAttrib.xCanonicalWifiApIsSecure : false
215 secure: extAttrib && extAttrib.hasOwnProperty("xCanonicalWifiApIsSecure") ? extAttrib.xCanonicalWifiApIsSecure : false
216 adHoc: extAttrib && extAttrib.hasOwnProperty("xCanonicalWifiApIsAdhoc") ? extAttrib.xCanonicalWifiApIsAdhoc : false
216 adHoc: extAttrib && extAttrib.hasOwnProperty("xCanonicalWifiApIsAdhoc") ? extAttrib.xCanonicalWifiApIsAdhoc : false
217− checked: menuItem ? menuItem.isToggled : false
217+ checked: menuData ? menuData.isToggled : false
218 signalStrength: strengthAction.valid ? strengthAction.state : 0
218 signalStrength: strengthAction.valid ? strengthAction.state : 0
219− enabled: menuItem ? menuItem.sensitive : false
219+ enabled: menuData ? menuData.sensitive : false
220
220
221 onMenuModelChanged: {
221 onMenuModelChanged: {
222 loadAttributes();
222 loadAttributes();
@@ -248,13 +248,13 @@ Item {
248 Component {
248 Component {
249 id: groupedMessage
249 id: groupedMessage
250 ICMessaging.GroupedMessage {
250 ICMessaging.GroupedMessage {
251− property QtObject menuItem: null
251+ property QtObject menuData: null
252 property var menuModel: menuFactory.menuModel
252 property var menuModel: menuFactory.menuModel
253 property var menuIndex: undefined
253 property var menuIndex: undefined
254− property var extAttrib: menuItem && menuItem.ext ? menuItem.ext : undefined
254+ property var extAttrib: menuData && menuData.ext ? menuData.ext : undefined
255
255
256− title: menuItem && menuItem.label ? menuItem.label : ""
256+ title: menuData && menuData.label ? menuData.label : ""
257− count: menuItem && menuItem.actionState.length > 0 ? menuItem.actionState[0] : "0"
257+ count: menuData && menuData.actionState.length > 0 ? menuData.actionState[0] : "0"
258 appIcon: extAttrib && extAttrib.hasOwnProperty("icon") ? extAttrib.icon : "qrc:/indicators/artwork/messaging/default_app.svg"
258 appIcon: extAttrib && extAttrib.hasOwnProperty("icon") ? extAttrib.icon : "qrc:/indicators/artwork/messaging/default_app.svg"
259
259
260 onMenuModelChanged: {
260 onMenuModelChanged: {