on xenial help sign in
renamed extAttrib to extendedData
commit4dfc20f7a1add787d31c84020d2f389254fe1d7e authorNick Dedekind <nicholas.dedekind@gmail.com> dateThu 12 Dec 2013, 11:47 (13 years ago) parent86d8183
2 files changed+27−27
plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qml+14−14 plugins/Unity/Indicators/qml/MenuItemFactory.qml+13−13
plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qml+14−14
@@ -29,8 +29,8 @@ Indicators.BaseMenuItem {
2929 property QtObject menuData: null
3030 property var menuIndex: undefined
3131
32− property var extAttrib: menuData && menuData.ext ? menuData.ext : undefined
33− property var actionsDescription: extAttrib && extAttrib.hasOwnProperty("xCanonicalMessageActions") ? extAttrib.xCanonicalMessageActions : undefined
32+ property var extendedData: menuData && menuData.ext ? menuData.ext : undefined
33+ property var actionsDescription: extendedData && extendedData.hasOwnProperty("xCanonicalMessageActions") ? extendedData.xCanonicalMessageActions : undefined
3434
3535 onMenuModelChanged: {
3636 loadAttributes();
@@ -62,11 +62,11 @@ Indicators.BaseMenuItem {
6262 SimpleTextMessage {
6363 // text
6464 title: menuData && menuData.label ? menuData.label : ""
65− time: extAttrib && extAttrib.hasOwnProperty("xCanonicalTime") ? extAttrib.xCanonicalTime : 0
66− message: extAttrib && extAttrib.hasOwnProperty("xCanonicalText") ? extAttrib.xCanonicalText : ""
65+ time: extendedData && extendedData.hasOwnProperty("xCanonicalTime") ? extendedData.xCanonicalTime : 0
66+ message: extendedData && extendedData.hasOwnProperty("xCanonicalText") ? extendedData.xCanonicalText : ""
6767 // icons
68− avatar: extAttrib && extAttrib.hasOwnProperty("icon") ? extAttrib.icon : "qrc:/indicators/artwork/messaging/default_contact.png"
69− appIcon: extAttrib && extAttrib.hasOwnProperty("xCanonicalAppIcon") ? extAttrib.xCanonicalAppIcon : "qrc:/indicators/artwork/messaging/default_app.svg"
68+ avatar: extendedData && extendedData.hasOwnProperty("icon") ? extendedData.icon : "qrc:/indicators/artwork/messaging/default_contact.png"
69+ appIcon: extendedData && extendedData.hasOwnProperty("xCanonicalAppIcon") ? extendedData.xCanonicalAppIcon : "qrc:/indicators/artwork/messaging/default_app.svg"
7070
7171 onActivateApp: {
7272 menuModel.activate(menuIndex, true);
@@ -94,12 +94,12 @@ Indicators.BaseMenuItem {
9494
9595 // text
9696 title: menuData && menuData.label ? menuData.label : ""
97− time: extAttrib && extAttrib.hasOwnProperty("xCanonicalTime") ? extAttrib.xCanonicalTime : 0
98− message: extAttrib && extAttrib.hasOwnProperty("xCanonicalText") ? extAttrib.xCanonicalText : ""
97+ time: extendedData && extendedData.hasOwnProperty("xCanonicalTime") ? extendedData.xCanonicalTime : 0
98+ message: extendedData && extendedData.hasOwnProperty("xCanonicalText") ? extendedData.xCanonicalText : ""
9999 replyButtonText: replyActionDescription !== undefined && replyActionDescription.hasOwnProperty("label") ? replyActionDescription.label : "Send"
100100 // icons
101− avatar: extAttrib && extAttrib.hasOwnProperty("icon") ? extAttrib.icon : "qrc:/indicators/artwork/messaging/default_contact.png"
102− appIcon: extAttrib && extAttrib.hasOwnProperty("xCanonicalAppIcon") ? extAttrib.xCanonicalAppIcon : "qrc:/indicators/artwork/messaging/default_app.svg"
101+ avatar: extendedData && extendedData.hasOwnProperty("icon") ? extendedData.icon : "qrc:/indicators/artwork/messaging/default_contact.png"
102+ appIcon: extendedData && extendedData.hasOwnProperty("xCanonicalAppIcon") ? extendedData.xCanonicalAppIcon : "qrc:/indicators/artwork/messaging/default_app.svg"
103103 // actions
104104 replyEnabled: replyAction.valid && replyAction.enabled
105105
@@ -138,14 +138,14 @@ Indicators.BaseMenuItem {
138138
139139 // text
140140 title: menuData && menuData.label ? menuData.label : ""
141− time: extAttrib && extAttrib.hasOwnProperty("xCanonicalTime") ? extAttrib.xCanonicalTime : ""
142− message: extAttrib && extAttrib.hasOwnProperty("xCanonicalText") ? extAttrib.xCanonicalText : ""
141+ time: extendedData && extendedData.hasOwnProperty("xCanonicalTime") ? extendedData.xCanonicalTime : ""
142+ message: extendedData && extendedData.hasOwnProperty("xCanonicalText") ? extendedData.xCanonicalText : ""
143143 actionButtonText: activateActionDescription !== undefined && activateActionDescription.hasOwnProperty("label") ? activateActionDescription.label : "Call back"
144144 replyButtonText: replyActionDescription !== undefined && replyActionDescription.hasOwnProperty("label") ? replyActionDescription.label : "Send"
145145 replyMessages: replyActionDescription !== undefined && replyActionDescription.hasOwnProperty("parameter-hint") ? replyActionDescription["parameter-hint"] : ""
146146 // icons
147− avatar: extAttrib && extAttrib.hasOwnProperty("icon") ? extAttrib.icon : "qrc:/indicators/artwork/messaging/default_contact.png"
148− appIcon: extAttrib && extAttrib.hasOwnProperty("xCanonicalAppIcon") ? extAttrib.xCanonicalAppIcon : "qrc:/indicators/artwork/messaging/default_app.svg"
147+ avatar: extendedData && extendedData.hasOwnProperty("icon") ? extendedData.icon : "qrc:/indicators/artwork/messaging/default_contact.png"
148+ appIcon: extendedData && extendedData.hasOwnProperty("xCanonicalAppIcon") ? extendedData.xCanonicalAppIcon : "qrc:/indicators/artwork/messaging/default_app.svg"
149149 // actions
150150 activateEnabled: activateAction.valid && activateAction.enabled
151151 replyEnabled: replyAction.valid && replyAction.enabled
plugins/Unity/Indicators/qml/MenuItemFactory.qml+13−13
@@ -58,16 +58,16 @@ Item {
5858 property QtObject menuData: null
5959 property var menuModel: menuFactory.menuModel
6060 property var menuIndex: undefined
61− property var extAttrib: menuData && menuData.ext ? menuData.ext : undefined
61+ property var extendedData: menuData && menuData.ext ? menuData.ext : undefined
6262
6363 text: menuData && menuData.label ? menuData.label : ""
6464 icon: menuData && menuData.icon ? menuData.icon : ""
65− minIcon: extAttrib && extAttrib.hasOwnProperty("minIcon") ? extAttrib.minIcon : ""
66− maxIcon: extAttrib && extAttrib.hasOwnProperty("maxIcon") ? extAttrib.maxIcon : ""
65+ minIcon: extendedData && extendedData.hasOwnProperty("minIcon") ? extendedData.minIcon : ""
66+ maxIcon: extendedData && extendedData.hasOwnProperty("maxIcon") ? extendedData.maxIcon : ""
6767
68− minimumValue: extAttrib && extAttrib.hasOwnProperty("minValue") ? extAttrib.minValue : 0.0
68+ minimumValue: extendedData && extendedData.hasOwnProperty("minValue") ? extendedData.minValue : 0.0
6969 maximumValue: {
70− var maximum = extAttrib && extAttrib.hasOwnProperty("maxValue") ? extAttrib.maxValue : 1.0
70+ var maximum = extendedData && extendedData.hasOwnProperty("maxValue") ? extendedData.maxValue : 1.0
7171 if (maximum <= minimumValue) {
7272 return minimumValue + 1;
7373 }
@@ -178,10 +178,10 @@ Item {
178178 property QtObject menuData: null
179179 property var menuModel: menuFactory.menuModel
180180 property var menuIndex: undefined
181− property var extAttrib: menuData && menuData.ext ? menuData.ext : undefined
181+ property var extendedData: menuData && menuData.ext ? menuData.ext : undefined
182182
183183 text: menuData && menuData.label ? menuData.label : ""
184− busy: extAttrib && extAttrib.hasOwnProperty("xCanonicalBusyAction") ? extAttrib.xCanonicalBusyAction : false
184+ busy: extendedData && extendedData.hasOwnProperty("xCanonicalBusyAction") ? extendedData.xCanonicalBusyAction : false
185185
186186 onMenuModelChanged: {
187187 loadAttributes();
@@ -203,17 +203,17 @@ Item {
203203 property QtObject menuData: null
204204 property var menuModel: menuFactory.menuModel
205205 property var menuIndex: undefined
206− property var extAttrib: menuData && menuData.ext ? menuData.ext : undefined
206+ property var extendedData: menuData && menuData.ext ? menuData.ext : undefined
207207
208208 property var strengthAction: QMenuModel.UnityMenuAction {
209209 model: menuModel
210210 index: menuIndex
211− name: extAttrib && extAttrib.hasOwnProperty("xCanonicalWifiApStrengthAction") ? extAttrib.xCanonicalWifiApStrengthAction : ""
211+ name: extendedData && extendedData.hasOwnProperty("xCanonicalWifiApStrengthAction") ? extendedData.xCanonicalWifiApStrengthAction : ""
212212 }
213213
214214 text: menuData && menuData.label ? menuData.label : ""
215− secure: extAttrib && extAttrib.hasOwnProperty("xCanonicalWifiApIsSecure") ? extAttrib.xCanonicalWifiApIsSecure : false
216− adHoc: extAttrib && extAttrib.hasOwnProperty("xCanonicalWifiApIsAdhoc") ? extAttrib.xCanonicalWifiApIsAdhoc : false
215+ secure: extendedData && extendedData.hasOwnProperty("xCanonicalWifiApIsSecure") ? extendedData.xCanonicalWifiApIsSecure : false
216+ adHoc: extendedData && extendedData.hasOwnProperty("xCanonicalWifiApIsAdhoc") ? extendedData.xCanonicalWifiApIsAdhoc : false
217217 checked: menuData ? menuData.isToggled : false
218218 signalStrength: strengthAction.valid ? strengthAction.state : 0
219219 enabled: menuData ? menuData.sensitive : false
@@ -251,11 +251,11 @@ Item {
251251 property QtObject menuData: null
252252 property var menuModel: menuFactory.menuModel
253253 property var menuIndex: undefined
254− property var extAttrib: menuData && menuData.ext ? menuData.ext : undefined
254+ property var extendedData: menuData && menuData.ext ? menuData.ext : undefined
255255
256256 title: menuData && menuData.label ? menuData.label : ""
257257 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: extendedData && extendedData.hasOwnProperty("icon") ? extendedData.icon : "qrc:/indicators/artwork/messaging/default_app.svg"
259259
260260 onMenuModelChanged: {
261261 loadAttributes();