Merge lp:~nick-dedekind/unity8/indicator.ubuntu-settings-components into lp:unity8
- indicator.ubuntu-settings-components
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Albert Astals Cid |
Approved revision: | 614 |
Merged at revision: | 670 |
Proposed branch: | lp:~nick-dedekind/unity8/indicator.ubuntu-settings-components |
Merge into: | lp:unity8 |
Prerequisite: | lp:~nick-dedekind/unity8/indicator-page-factory-tests |
Diff against target: |
3035 lines (+537/-1779) 37 files modified
debian/control (+2/-0) plugins/Unity/Indicators/CMakeLists.txt (+0/-2) plugins/Unity/Indicators/Messaging/CMakeLists.txt (+0/-1) plugins/Unity/Indicators/Messaging/qml/ActionTextField.qml (+0/-69) plugins/Unity/Indicators/Messaging/qml/CMakeLists.txt (+0/-5) plugins/Unity/Indicators/Messaging/qml/GroupedMessage.qml (+0/-91) plugins/Unity/Indicators/Messaging/qml/HeroMessage.qml (+0/-123) plugins/Unity/Indicators/Messaging/qml/HeroMessageHeader.qml (+0/-161) plugins/Unity/Indicators/Messaging/qml/QuickReply.qml (+0/-165) plugins/Unity/Indicators/Messaging/qml/SimpleTextMessage.qml (+0/-108) plugins/Unity/Indicators/Messaging/qml/SnapDecision.qml (+0/-167) plugins/Unity/Indicators/Messaging/qml/TextMessage.qml (+0/-43) plugins/Unity/Indicators/Messaging/qml/qmldir (+0/-12) plugins/Unity/Indicators/Network/CMakeLists.txt (+0/-1) plugins/Unity/Indicators/Network/qml/AccessPoint.qml (+0/-117) plugins/Unity/Indicators/Network/qml/CMakeLists.txt (+0/-5) plugins/Unity/Indicators/Network/qml/qmldir (+0/-3) plugins/Unity/Indicators/qml/BaseMenuItem.qml (+0/-38) plugins/Unity/Indicators/qml/ButtonMenuItem.qml (+0/-44) plugins/Unity/Indicators/qml/DivMenuItem.qml (+0/-26) plugins/Unity/Indicators/qml/FramedMenuItem.qml (+0/-39) plugins/Unity/Indicators/qml/HLine.qml (+0/-29) plugins/Unity/Indicators/qml/MenuItemFactory.qml (+232/-48) plugins/Unity/Indicators/qml/MessageMenuItemFactory.qml (+69/-28) plugins/Unity/Indicators/qml/ProgressMenuItem.qml (+0/-38) plugins/Unity/Indicators/qml/SectionMenuItem.qml (+0/-54) plugins/Unity/Indicators/qml/SliderMenuItem.qml (+0/-106) plugins/Unity/Indicators/qml/StandardMenuItem.qml (+0/-71) plugins/Unity/Indicators/qml/SwitchMenuItem.qml (+0/-53) plugins/Unity/Indicators/qml/qmldir (+1/-12) plugins/Unity/Indicators/resources/artwork/network/secure.svg (+0/-71) plugins/Unity/Indicators/resources/indicators.qrc (+0/-2) qml/Panel/Indicators/DefaultIndicatorPage.qml (+9/-5) qml/Panel/Indicators/client/IndicatorsList.qml (+17/-16) tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml (+0/-4) tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml (+194/-18) tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml (+13/-4) |
To merge this branch: | bzr merge lp:~nick-dedekind/unity8/indicator.ubuntu-settings-components |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sebastien Bacher | changes to the packaging | Approve | |
Albert Astals Cid (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Michał Sawicz | Needs Fixing | ||
Ubuntu Unity PS integration team | packaging | Pending | |
Review via email: mp+199311@code.launchpad.net |
Commit message
Ported indicators to using ubuntu-
Description of the change
Ported indicators to using ubuntu-
Are there any related MPs required for this MP to build/function as expected? Please list.
no
Did you perform an exploratory manual test run of your code change and any related functionality?
yes
If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
yes
If you changed the UI, has there been a design review?
n/a
PS Jenkins bot (ps-jenkins) wrote : | # |
Michał Sawicz (saviq) wrote : | # |
MessageMenuItem
Nick Dedekind (nick-dedekind) wrote : | # |
> MessageMenuItem
Fixed.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:603
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
MenuItemFactory
tst_MessageMenu
import Unity.Indicator
^
Nick Dedekind (nick-dedekind) wrote : | # |
> MenuItemFactory
> time: timeFormatter.
>
>
> tst_MessageMenu
> not installed
> import Unity.Indicator
> ^
Weird, I was sure I fixed this. Must have been fixing build folder files...
Anyway, fixed now!
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:604
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:606
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:606
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Nick Dedekind (nick-dedekind) wrote : | # |
Fixed incorrect paths due to trunk qml location changes
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:607
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:607
http://
Executed test runs:
None: http://
None: http://
None: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:607
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:607
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:609
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
Why the commented lines in some tests?
// compare(
Nick Dedekind (nick-dedekind) wrote : | # |
> Why the commented lines in some tests?
>
> // compare(
The comments are because of an issue with indicator-
1927 +// enabled: menuData && menuData.sensitive || false
1979 +// enabled: menuData && menuData.sensitive || false
2034 +// enabled: menuData && menuData.sensitive || false
- 611. By Nick Dedekind
-
Fixed tests
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:611
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
Personally i think we should wait until lp:~larsu/indicator-messages/set-targets gets merged at least
Albert Astals Cid (aacid) wrote : | # |
Since lp:~larsu/indicator-messages/set-targets seems to be part of the released indicator-messages 13.10.1+
- 612. By Nick Dedekind
-
Merged with trunk
- 613. By Nick Dedekind
-
Removed Message menu enable comment
Nick Dedekind (nick-dedekind) wrote : | # |
> Since lp:~larsu/indicator-messages/set-targets seems to be part of the
> released indicator-messages 13.10.1+
> the tests?
Removed comments for enable and tests.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:613
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
There's at least still two
// FIXME: Waiting for lp:~larsu/indicator-messages/set-targets
that seem that should be removed?
Albert Astals Cid (aacid) wrote : | # |
On the phone:
* Go to the netowrk indicator
* Change to the location indicator (i think changing to any other indicator has the same issue)
and i get on the console lots of
ShaderEffect: Property 'source' is not assigned a valid texture provider (QQuickImage*).
This is not happening with plain unity8
Nick Dedekind (nick-dedekind) wrote : | # |
> On the phone:
> * Go to the netowrk indicator
> * Change to the location indicator (i think changing to any other indicator
> has the same issue)
>
> and i get on the console lots of
> ShaderEffect: Property 'source' is not assigned a valid texture provider
> (QQuickImage*).
>
> This is not happening with plain unity8
It's a issue with the sdk Icon
https:/
- 614. By Nick Dedekind
-
removed FIXME
Nick Dedekind (nick-dedekind) wrote : | # |
> There's at least still two
> // FIXME: Waiting for lp:~larsu/indicator-messages/set-targets
> that seem that should be removed?
Removed
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:614
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes, indicators still work
* Did CI run pass? If not, please explain why.
No, notifications still broken.
Sebastien Bacher (seb128) wrote : | # |
the packaging changes looks fine, +1 on thpse
Preview Diff
1 | === modified file 'debian/control' |
2 | --- debian/control 2014-01-21 16:28:16 +0000 |
3 | +++ debian/control 2014-01-29 14:36:17 +0000 |
4 | @@ -37,6 +37,7 @@ |
5 | qtdeclarative5-private-dev, |
6 | qtdeclarative5-qtquick2-plugin, |
7 | qtdeclarative5-test-plugin, |
8 | + qtdeclarative5-ubuntu-settings-components, |
9 | qtdeclarative5-ubuntu-ui-toolkit-plugin, |
10 | qtdeclarative5-xmllistmodel-plugin, |
11 | libqt5xmlpatterns5-dev, |
12 | @@ -76,6 +77,7 @@ |
13 | qmenumodel-qml (>= 0.2.7), |
14 | qtdeclarative5-dee-plugin, |
15 | qtdeclarative5-gsettings1.0, |
16 | + qtdeclarative5-ubuntu-settings-components, |
17 | qtdeclarative5-ubuntu-ui-toolkit-plugin, |
18 | qtdeclarative5-unity-notifications-plugin | unity-notifications-impl, |
19 | qtdeclarative5-xmllistmodel-plugin, |
20 | |
21 | === modified file 'plugins/Unity/Indicators/CMakeLists.txt' |
22 | --- plugins/Unity/Indicators/CMakeLists.txt 2013-10-23 14:22:27 +0000 |
23 | +++ plugins/Unity/Indicators/CMakeLists.txt 2014-01-29 14:36:17 +0000 |
24 | @@ -12,8 +12,6 @@ |
25 | find_package(Qt5Quick REQUIRED) |
26 | |
27 | add_subdirectory(qml) |
28 | -add_subdirectory(Messaging) |
29 | -add_subdirectory(Network) |
30 | |
31 | include_directories( |
32 | ${CMAKE_CURRENT_SOURCE_DIR} |
33 | |
34 | === removed directory 'plugins/Unity/Indicators/Messaging' |
35 | === removed file 'plugins/Unity/Indicators/Messaging/CMakeLists.txt' |
36 | --- plugins/Unity/Indicators/Messaging/CMakeLists.txt 2013-06-28 10:54:46 +0000 |
37 | +++ plugins/Unity/Indicators/Messaging/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
38 | @@ -1,1 +0,0 @@ |
39 | -add_subdirectory(qml) |
40 | |
41 | === removed directory 'plugins/Unity/Indicators/Messaging/qml' |
42 | === removed file 'plugins/Unity/Indicators/Messaging/qml/ActionTextField.qml' |
43 | --- plugins/Unity/Indicators/Messaging/qml/ActionTextField.qml 2013-08-30 18:21:21 +0000 |
44 | +++ plugins/Unity/Indicators/Messaging/qml/ActionTextField.qml 1970-01-01 00:00:00 +0000 |
45 | @@ -1,69 +0,0 @@ |
46 | -/* |
47 | - * Copyright 2013 Canonical Ltd. |
48 | - * |
49 | - * This program is free software; you can redistribute it and/or modify |
50 | - * it under the terms of the GNU Lesser General Public License as published by |
51 | - * the Free Software Foundation; version 3. |
52 | - * |
53 | - * This program is distributed in the hope that it will be useful, |
54 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
55 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
56 | - * GNU Lesser General Public License for more details. |
57 | - * |
58 | - * You should have received a copy of the GNU Lesser General Public License |
59 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
60 | - * |
61 | - * Authors: |
62 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
63 | - * Olivier Tilloy <olivier.tilloy@canonical.com> |
64 | - */ |
65 | - |
66 | -import QtQuick 2.0 |
67 | -import Ubuntu.Components 0.1 |
68 | - |
69 | -Item { |
70 | - id: textField |
71 | - property alias text: replyField.text |
72 | - property alias buttonText: sendButton.text |
73 | - property bool activateEnabled: false |
74 | - |
75 | - signal activate(var value) |
76 | - |
77 | - TextField { |
78 | - id: replyField |
79 | - |
80 | - anchors { |
81 | - top: parent.top |
82 | - bottom: parent.bottom |
83 | - left: parent.left |
84 | - right: sendButton.left |
85 | - rightMargin: units.gu(1) |
86 | - } |
87 | - placeholderText: "Reply" |
88 | - hasClearButton: false |
89 | - |
90 | - onEnabledChanged: { |
91 | - //Make sure that the component lost focus when enabled = false, |
92 | - //otherwise it will get focus again when enable = true |
93 | - if (!enabled) { |
94 | - focus = false; |
95 | - } |
96 | - } |
97 | - } |
98 | - |
99 | - Button { |
100 | - id: sendButton |
101 | - anchors { |
102 | - top: parent.top |
103 | - bottom: parent.bottom |
104 | - right: parent.right |
105 | - } |
106 | - width: units.gu(9) |
107 | - enabled: replyField.text !== "" && textField.activateEnabled |
108 | - color: enabled ? "#c94212" : "#bababa" |
109 | - |
110 | - onClicked: { |
111 | - textField.activate(replyField.text); |
112 | - } |
113 | - } |
114 | -} |
115 | |
116 | === removed file 'plugins/Unity/Indicators/Messaging/qml/CMakeLists.txt' |
117 | --- plugins/Unity/Indicators/Messaging/qml/CMakeLists.txt 2013-08-22 13:05:57 +0000 |
118 | +++ plugins/Unity/Indicators/Messaging/qml/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
119 | @@ -1,5 +0,0 @@ |
120 | -# export_qmlfiles macro |
121 | -include(Plugins) |
122 | - |
123 | -# export the qmldir, *.qml files. |
124 | -export_qmlfiles(Unity.Indicators.Messaging Unity/Indicators/Messaging) |
125 | |
126 | === removed file 'plugins/Unity/Indicators/Messaging/qml/GroupedMessage.qml' |
127 | --- plugins/Unity/Indicators/Messaging/qml/GroupedMessage.qml 2013-09-16 07:37:30 +0000 |
128 | +++ plugins/Unity/Indicators/Messaging/qml/GroupedMessage.qml 1970-01-01 00:00:00 +0000 |
129 | @@ -1,91 +0,0 @@ |
130 | -/* |
131 | - * Copyright 2013 Canonical Ltd. |
132 | - * |
133 | - * This program is free software; you can redistribute it and/or modify |
134 | - * it under the terms of the GNU Lesser General Public License as published by |
135 | - * the Free Software Foundation; version 3. |
136 | - * |
137 | - * This program is distributed in the hope that it will be useful, |
138 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
139 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
140 | - * GNU Lesser General Public License for more details. |
141 | - * |
142 | - * You should have received a copy of the GNU Lesser General Public License |
143 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
144 | - * |
145 | - * Authors: |
146 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
147 | - * Olivier Tilloy <olivier.tilloy@canonical.com> |
148 | - */ |
149 | - |
150 | -import QtQuick 2.0 |
151 | -import Ubuntu.Components 0.1 |
152 | -import Unity.Indicators 0.1 as Indicators |
153 | - |
154 | -Indicators.BaseMenuItem { |
155 | - id: groupedMessage |
156 | - |
157 | - property alias title: __title.text |
158 | - property alias count: label.text |
159 | - property string appIcon: "qrc:/indicators/artwork/messaging/default_app.svg" |
160 | - |
161 | - signal activateApp() |
162 | - signal dismiss() |
163 | - |
164 | - implicitHeight: units.gu(10) |
165 | - |
166 | - Row { |
167 | - anchors.fill: parent |
168 | - anchors.margins: units.gu(2) |
169 | - spacing: units.gu(4) |
170 | - |
171 | - UbuntuShape { |
172 | - height: units.gu(6) |
173 | - width: units.gu(6) |
174 | - image: Image { |
175 | - source: groupedMessage.appIcon |
176 | - fillMode: Image.PreserveAspectFit |
177 | - } |
178 | - } |
179 | - |
180 | - Label { |
181 | - id: __title |
182 | - anchors.verticalCenter: parent.verticalCenter |
183 | - color: "#e8e1d0" |
184 | - font.weight: Font.DemiBold |
185 | - fontSize: "medium" |
186 | - } |
187 | - |
188 | - Label { |
189 | - id: label |
190 | - anchors.verticalCenter: parent.verticalCenter |
191 | - width: parent.width - x |
192 | - horizontalAlignment: Text.AlignRight |
193 | - color: "#e8e1d0" |
194 | - font.weight: Font.DemiBold |
195 | - fontSize: "medium" |
196 | - text: "0" |
197 | - } |
198 | - } |
199 | - |
200 | - Indicators.HLine { |
201 | - anchors.top: parent.top |
202 | - color: "#403b37" |
203 | - } |
204 | - |
205 | - Indicators.HLine { |
206 | - anchors.bottom: parent.bottom |
207 | - color: "#060606" |
208 | - } |
209 | - |
210 | - MouseArea { |
211 | - anchors.fill: parent |
212 | - onClicked: { |
213 | - groupedMessage.activateApp(); |
214 | - } |
215 | - } |
216 | - |
217 | - onItemRemoved: { |
218 | - groupedMessage.dismiss(); |
219 | - } |
220 | -} |
221 | |
222 | === removed file 'plugins/Unity/Indicators/Messaging/qml/HeroMessage.qml' |
223 | --- plugins/Unity/Indicators/Messaging/qml/HeroMessage.qml 2013-09-26 11:00:33 +0000 |
224 | +++ plugins/Unity/Indicators/Messaging/qml/HeroMessage.qml 1970-01-01 00:00:00 +0000 |
225 | @@ -1,123 +0,0 @@ |
226 | -/* |
227 | - * Copyright 2013 Canonical Ltd. |
228 | - * |
229 | - * This program is free software; you can redistribute it and/or modify |
230 | - * it under the terms of the GNU Lesser General Public License as published by |
231 | - * the Free Software Foundation; version 3. |
232 | - * |
233 | - * This program is distributed in the hope that it will be useful, |
234 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
235 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
236 | - * GNU Lesser General Public License for more details. |
237 | - * |
238 | - * You should have received a copy of the GNU Lesser General Public License |
239 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
240 | - * |
241 | - * Authors: |
242 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
243 | - * Olivier Tilloy <olivier.tilloy@canonical.com> |
244 | - */ |
245 | - |
246 | -import QtQuick 2.0 |
247 | -import Ubuntu.Components 0.1 |
248 | -import Unity.Indicators 0.1 as Indicators |
249 | - |
250 | -Indicators.BaseMenuItem { |
251 | - id: heroMessage |
252 | - |
253 | - property alias heroMessageHeader: __heroMessageHeader |
254 | - property real collapsedHeight: heroMessageHeader.y + heroMessageHeader.bodyBottom + units.gu(2) |
255 | - property real expandedHeight: collapsedHeight |
256 | - |
257 | - property alias avatar: __heroMessageHeader.avatar |
258 | - property alias appIcon: __heroMessageHeader.icon |
259 | - |
260 | - signal activateApp |
261 | - signal dismiss |
262 | - |
263 | - removable: state !== "expanded" |
264 | - implicitHeight: collapsedHeight |
265 | - |
266 | - Rectangle { |
267 | - id: background |
268 | - property real alpha: 0.0 |
269 | - anchors.fill: parent |
270 | - color: Qt.rgba(1.0, 1.0, 1.0, alpha) |
271 | - z: -1 |
272 | - } |
273 | - |
274 | - HeroMessageHeader { |
275 | - id: __heroMessageHeader |
276 | - |
277 | - anchors.top: parent.top |
278 | - anchors.left: parent.left |
279 | - anchors.right: parent.right |
280 | - |
281 | - avatar: "qrc:/indicators/artwork/messaging/default_contact.png" |
282 | - appIcon: icon |
283 | - |
284 | - state: heroMessage.state |
285 | - |
286 | - onAppIconClicked: { |
287 | - deselectMenu(); |
288 | - heroMessage.activateApp(); |
289 | - } |
290 | - } |
291 | - |
292 | - onClicked: { |
293 | - if (menuSelected) { |
294 | - deselectMenu(); |
295 | - } else { |
296 | - selectMenu(); |
297 | - } |
298 | - } |
299 | - |
300 | - Indicators.HLine { |
301 | - id: __topHLine |
302 | - anchors.top: parent.top |
303 | - color: "#403b37" |
304 | - } |
305 | - |
306 | - Indicators.HLine { |
307 | - id: __bottomHLine |
308 | - anchors.bottom: parent.bottom |
309 | - color: "#060606" |
310 | - } |
311 | - |
312 | - states: State { |
313 | - name: "expanded" |
314 | - when: menuSelected |
315 | - |
316 | - PropertyChanges { |
317 | - target: heroMessage |
318 | - implicitHeight: heroMessage.expandedHeight |
319 | - } |
320 | - PropertyChanges { |
321 | - target: background |
322 | - alpha: 0.05 |
323 | - } |
324 | - PropertyChanges { |
325 | - target: __topHLine |
326 | - opacity: 0.0 |
327 | - } |
328 | - PropertyChanges { |
329 | - target: __bottomHLine |
330 | - opacity: 0.0 |
331 | - } |
332 | - } |
333 | - |
334 | - transitions: Transition { |
335 | - ParallelAnimation { |
336 | - NumberAnimation { |
337 | - properties: "opacity,implicitHeight" |
338 | - duration: 200 |
339 | - easing.type: Easing.OutQuad |
340 | - } |
341 | - ColorAnimation {} |
342 | - } |
343 | - } |
344 | - |
345 | - onItemRemoved: { |
346 | - heroMessage.dismiss(); |
347 | - } |
348 | -} |
349 | |
350 | === removed file 'plugins/Unity/Indicators/Messaging/qml/HeroMessageHeader.qml' |
351 | --- plugins/Unity/Indicators/Messaging/qml/HeroMessageHeader.qml 2013-07-03 10:39:22 +0000 |
352 | +++ plugins/Unity/Indicators/Messaging/qml/HeroMessageHeader.qml 1970-01-01 00:00:00 +0000 |
353 | @@ -1,161 +0,0 @@ |
354 | -/* |
355 | - * Copyright 2013 Canonical Ltd. |
356 | - * |
357 | - * This program is free software; you can redistribute it and/or modify |
358 | - * it under the terms of the GNU Lesser General Public License as published by |
359 | - * the Free Software Foundation; version 3. |
360 | - * |
361 | - * This program is distributed in the hope that it will be useful, |
362 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
363 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
364 | - * GNU Lesser General Public License for more details. |
365 | - * |
366 | - * You should have received a copy of the GNU Lesser General Public License |
367 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
368 | - * |
369 | - * Authors: |
370 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
371 | - * Olivier Tilloy <olivier.tilloy@canonical.com> |
372 | - */ |
373 | - |
374 | -import QtQuick 2.0 |
375 | -import Ubuntu.Components 0.1 |
376 | - |
377 | -Item { |
378 | - id: heroMessageHeader |
379 | - |
380 | - property alias avatar: avatarImage.source |
381 | - property alias icon: iconImage.source |
382 | - property alias appIcon: appIconImage.source |
383 | - property alias titleText: __titleText |
384 | - property alias subtitleText: __subtitleText |
385 | - property alias bodyText: __bodyText |
386 | - property real bodyBottom: bodyText.y + bodyText.height |
387 | - |
388 | - signal appIconClicked() |
389 | - |
390 | - height: units.gu(9) |
391 | - |
392 | - UbuntuShape { |
393 | - id: avatarImageContainer |
394 | - anchors { |
395 | - top: parent.top |
396 | - topMargin: units.gu(2) |
397 | - left: parent.left |
398 | - leftMargin: units.gu(2) |
399 | - } |
400 | - height: units.gu(6) |
401 | - width: units.gu(6) |
402 | - image: Image { |
403 | - id: avatarImage |
404 | - fillMode: Image.PreserveAspectFit |
405 | - } |
406 | - } |
407 | - |
408 | - Image { |
409 | - id: iconImage |
410 | - anchors { |
411 | - top: parent.top |
412 | - topMargin: units.gu(2) |
413 | - left: avatarImageContainer.right |
414 | - leftMargin: units.gu(1) |
415 | - } |
416 | - height: units.gu(1.5) |
417 | - width: units.gu(2) |
418 | - horizontalAlignment: Image.AlignHCenter |
419 | - verticalAlignment: Image.AlignBottom |
420 | - fillMode: Image.PreserveAspectFit |
421 | - } |
422 | - |
423 | - Label { |
424 | - id: __titleText |
425 | - anchors { |
426 | - baseline: iconImage.bottom |
427 | - left: iconImage.right |
428 | - leftMargin: units.gu(1) |
429 | - right: __appIcon.left |
430 | - rightMargin: units.gu(2) |
431 | - } |
432 | - elide: Text.ElideRight |
433 | - color: "#e8e1d0" |
434 | - font.weight: Font.DemiBold |
435 | - fontSize: "medium" |
436 | - } |
437 | - |
438 | - Label { |
439 | - id: __subtitleText |
440 | - anchors { |
441 | - baseline: __titleText.baseline |
442 | - baselineOffset: units.gu(2.5) |
443 | - left: __titleText.left |
444 | - right: __titleText.right |
445 | - } |
446 | - elide: Text.ElideRight |
447 | - color: "#8f8f88" |
448 | - fontSize: "small" |
449 | - } |
450 | - |
451 | - Label { |
452 | - id: __bodyText |
453 | - anchors { |
454 | - baseline: __subtitleText.baseline |
455 | - baselineOffset: units.gu(2.5) |
456 | - left: __titleText.left |
457 | - right: parent.right |
458 | - rightMargin: units.gu(2) |
459 | - } |
460 | - maximumLineCount: 2 |
461 | - wrapMode: Text.WordWrap |
462 | - elide: Text.ElideRight |
463 | - color: "#e8e1d0" |
464 | - fontSize: "small" |
465 | - } |
466 | - |
467 | - Item { |
468 | - id: __appIcon |
469 | - width: units.gu(7) |
470 | - height: units.gu(7) |
471 | - anchors { |
472 | - top: parent.top |
473 | - right: parent.right |
474 | - } |
475 | - opacity: 0.0 |
476 | - enabled: heroMessageHeader.state === "expanded" |
477 | - |
478 | - Image { |
479 | - id: appIconImage |
480 | - height: width |
481 | - anchors { |
482 | - left: parent.left |
483 | - leftMargin: units.gu(2) |
484 | - right: parent.right |
485 | - rightMargin: units.gu(2) |
486 | - topMargin: units.gu(1) |
487 | - verticalCenter: parent.verticalCenter |
488 | - } |
489 | - fillMode: Image.PreserveAspectFit |
490 | - } |
491 | - |
492 | - MouseArea { |
493 | - anchors.fill: parent |
494 | - onClicked: heroMessageHeader.appIconClicked() |
495 | - } |
496 | - } |
497 | - |
498 | - states: State { |
499 | - name: "expanded" |
500 | - |
501 | - PropertyChanges { |
502 | - target: __appIcon |
503 | - opacity: 1.0 |
504 | - } |
505 | - } |
506 | - |
507 | - transitions: Transition { |
508 | - NumberAnimation { |
509 | - property: "opacity" |
510 | - duration: 200 |
511 | - easing.type: Easing.OutQuad |
512 | - } |
513 | - } |
514 | -} |
515 | |
516 | === removed file 'plugins/Unity/Indicators/Messaging/qml/QuickReply.qml' |
517 | --- plugins/Unity/Indicators/Messaging/qml/QuickReply.qml 2013-10-01 19:26:10 +0000 |
518 | +++ plugins/Unity/Indicators/Messaging/qml/QuickReply.qml 1970-01-01 00:00:00 +0000 |
519 | @@ -1,165 +0,0 @@ |
520 | -/* |
521 | - * Copyright 2013 Canonical Ltd. |
522 | - * |
523 | - * This program is free software; you can redistribute it and/or modify |
524 | - * it under the terms of the GNU Lesser General Public License as published by |
525 | - * the Free Software Foundation; version 3. |
526 | - * |
527 | - * This program is distributed in the hope that it will be useful, |
528 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
529 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
530 | - * GNU Lesser General Public License for more details. |
531 | - * |
532 | - * You should have received a copy of the GNU Lesser General Public License |
533 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
534 | - * |
535 | - * Authors: |
536 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
537 | - * Olivier Tilloy <olivier.tilloy@canonical.com> |
538 | - */ |
539 | - |
540 | -import QtQuick 2.0 |
541 | -import Ubuntu.Components 0.1 |
542 | -import Unity.Indicators 0.1 as Indicators |
543 | - |
544 | -Item { |
545 | - id: quickReply |
546 | - property alias buttonText: actionTextField.buttonText |
547 | - property real expandedHeight: childrenRect.height |
548 | - property alias messages : messagelistRepeater.model |
549 | - property alias replyEnabled: actionTextField.activateEnabled |
550 | - |
551 | - signal reply(var value) |
552 | - |
553 | - Item { |
554 | - id: header |
555 | - anchors.top: parent.top |
556 | - anchors.left: parent.left |
557 | - anchors.right: parent.right |
558 | - height: units.gu(4) |
559 | - |
560 | - Row { |
561 | - anchors { |
562 | - fill: parent |
563 | - leftMargin: units.gu(2) |
564 | - rightMargin: units.gu(2) |
565 | - topMargin: units.gu(1) |
566 | - bottomMargin: units.gu(1) |
567 | - } |
568 | - spacing: units.gu(1) |
569 | - |
570 | - Image { |
571 | - width: units.gu(2) |
572 | - height: width |
573 | - fillMode: Image.PreserveAspectFit |
574 | - source: "qrc:/indicators/artwork/messaging/message_sms01_54px.png" |
575 | - } |
576 | - |
577 | - Label { |
578 | - height: parent.height |
579 | - verticalAlignment: Text.AlignVCenter |
580 | - fontSize: "small" |
581 | - color: "#8f8f88" |
582 | - text: "Quick reply with:" |
583 | - } |
584 | - } |
585 | - |
586 | - Indicators.HLine { |
587 | - anchors.bottom: parent.bottom |
588 | - color: "#20201F" |
589 | - } |
590 | - } |
591 | - |
592 | - Column { |
593 | - id: messagelist |
594 | - anchors { |
595 | - left: parent.left |
596 | - right: parent.right |
597 | - top: header.bottom |
598 | - } |
599 | - height: childrenRect.height |
600 | - |
601 | - Repeater { |
602 | - id: messagelistRepeater |
603 | - |
604 | - height: childrenRect.height |
605 | - |
606 | - Item { |
607 | - width: messagelist.width |
608 | - height: units.gu(5) |
609 | - |
610 | - Label { |
611 | - id: __label |
612 | - |
613 | - anchors { |
614 | - fill: parent |
615 | - leftMargin: units.gu(2) |
616 | - rightMargin: units.gu(2) |
617 | - } |
618 | - verticalAlignment: Text.AlignVCenter |
619 | - fontSize: "medium" |
620 | - color: "#e8e1d0" |
621 | - text: modelData |
622 | - } |
623 | - |
624 | - Indicators.HLine { |
625 | - anchors.top: parent.top |
626 | - color: "#464543" |
627 | - } |
628 | - |
629 | - Indicators.HLine { |
630 | - anchors.bottom: parent.bottom |
631 | - color: "#20201F" |
632 | - } |
633 | - |
634 | - MouseArea { |
635 | - id: __mouseArea |
636 | - |
637 | - anchors.fill: parent |
638 | - onClicked: { |
639 | - actionTextField.text = modelData; |
640 | - } |
641 | - } |
642 | - |
643 | - Rectangle { |
644 | - id: __mask |
645 | - |
646 | - anchors.fill: parent |
647 | - color: "black" |
648 | - opacity: __mouseArea.pressed ? 0.3 : 0.0 |
649 | - Behavior on opacity { |
650 | - NumberAnimation { |
651 | - duration: 200 |
652 | - easing.type: Easing.OutQuad |
653 | - } |
654 | - } |
655 | - } |
656 | - } |
657 | - |
658 | - } |
659 | - } |
660 | - |
661 | - Item { |
662 | - anchors.top: messagelist.bottom |
663 | - anchors.left: parent.left |
664 | - anchors.right: parent.right |
665 | - height: units.gu(6) |
666 | - |
667 | - ActionTextField { |
668 | - id: actionTextField |
669 | - |
670 | - anchors.fill: parent |
671 | - anchors.margins: units.gu(1) |
672 | - activateEnabled: replyEnabled |
673 | - |
674 | - onActivate: { |
675 | - quickReply.reply(value) |
676 | - } |
677 | - } |
678 | - |
679 | - Indicators.HLine { |
680 | - anchors.top: parent.top |
681 | - color: "#464543" |
682 | - } |
683 | - } |
684 | -} |
685 | |
686 | === removed file 'plugins/Unity/Indicators/Messaging/qml/SimpleTextMessage.qml' |
687 | --- plugins/Unity/Indicators/Messaging/qml/SimpleTextMessage.qml 2013-10-23 14:26:51 +0000 |
688 | +++ plugins/Unity/Indicators/Messaging/qml/SimpleTextMessage.qml 1970-01-01 00:00:00 +0000 |
689 | @@ -1,108 +0,0 @@ |
690 | -/* |
691 | - * Copyright 2013 Canonical Ltd. |
692 | - * |
693 | - * This program is free software; you can redistribute it and/or modify |
694 | - * it under the terms of the GNU Lesser General Public License as published by |
695 | - * the Free Software Foundation; version 3. |
696 | - * |
697 | - * This program is distributed in the hope that it will be useful, |
698 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
699 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
700 | - * GNU Lesser General Public License for more details. |
701 | - * |
702 | - * You should have received a copy of the GNU Lesser General Public License |
703 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
704 | - * |
705 | - * Authors: |
706 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
707 | - * Olivier Tilloy <olivier.tilloy@canonical.com> |
708 | - */ |
709 | - |
710 | -import QtQuick 2.0 |
711 | -import Ubuntu.Components 0.1 |
712 | -import Unity.Indicators 0.1 |
713 | -import Utils 0.1 as Utils |
714 | - |
715 | -HeroMessage { |
716 | - id: __heroMessage |
717 | - |
718 | - property string title: "" |
719 | - property var time |
720 | - property string message: "" |
721 | - |
722 | - property alias footer: footerLoader.sourceComponent |
723 | - |
724 | - expandedHeight: fullMessage.y + fullMessage.height + units.gu(2) |
725 | - heroMessageHeader.titleText.text: title |
726 | - heroMessageHeader.subtitleText.text: timeFormatter.timeString |
727 | - heroMessageHeader.bodyText.text: message |
728 | - |
729 | - Item { |
730 | - id: fullMessage |
731 | - |
732 | - anchors { |
733 | - left: parent.left |
734 | - leftMargin: units.gu(2) |
735 | - right: parent.right |
736 | - rightMargin: units.gu(2) |
737 | - top: heroMessageHeader.bottom |
738 | - } |
739 | - height: childrenRect.height |
740 | - opacity: 0.0 |
741 | - enabled: false |
742 | - |
743 | - Utils.TimeFormatter { |
744 | - id: timeFormatter |
745 | - time: __heroMessage.time |
746 | - format: "hh:mm - MMM dd" |
747 | - } |
748 | - |
749 | - Label { |
750 | - id: bodyText |
751 | - anchors { |
752 | - top: parent.top |
753 | - left: parent.left |
754 | - right: parent.right |
755 | - } |
756 | - wrapMode: Text.WordWrap |
757 | - elide: Text.ElideRight |
758 | - color: "#e8e1d0" |
759 | - fontSize: "medium" |
760 | - text: heroMessageHeader.bodyText.text |
761 | - } |
762 | - |
763 | - Loader { |
764 | - id: footerLoader |
765 | - |
766 | - anchors { |
767 | - top: bodyText.bottom |
768 | - topMargin: units.gu(2) |
769 | - left: parent.left |
770 | - right: parent.right |
771 | - } |
772 | - height: item != undefined ? units.gu(4) : 0 |
773 | - } |
774 | - |
775 | - states: State { |
776 | - name: "expanded" |
777 | - when: __heroMessage.state === "expanded" |
778 | - |
779 | - PropertyChanges { |
780 | - target: heroMessageHeader.bodyText |
781 | - opacity: 0.0 |
782 | - } |
783 | - |
784 | - PropertyChanges { |
785 | - target: fullMessage |
786 | - opacity: 1.0 |
787 | - enabled: true |
788 | - } |
789 | - } |
790 | - transitions: Transition { |
791 | - NumberAnimation { |
792 | - property: "opacity" |
793 | - duration: 200 |
794 | - } |
795 | - } |
796 | - } |
797 | -} |
798 | |
799 | === removed file 'plugins/Unity/Indicators/Messaging/qml/SnapDecision.qml' |
800 | --- plugins/Unity/Indicators/Messaging/qml/SnapDecision.qml 2013-10-23 14:26:51 +0000 |
801 | +++ plugins/Unity/Indicators/Messaging/qml/SnapDecision.qml 1970-01-01 00:00:00 +0000 |
802 | @@ -1,167 +0,0 @@ |
803 | -/* |
804 | - * Copyright 2013 Canonical Ltd. |
805 | - * |
806 | - * This program is free software; you can redistribute it and/or modify |
807 | - * it under the terms of the GNU Lesser General Public License as published by |
808 | - * the Free Software Foundation; version 3. |
809 | - * |
810 | - * This program is distributed in the hope that it will be useful, |
811 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
812 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
813 | - * GNU Lesser General Public License for more details. |
814 | - * |
815 | - * You should have received a copy of the GNU Lesser General Public License |
816 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
817 | - * |
818 | - * Authors: |
819 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
820 | - * Olivier Tilloy <olivier.tilloy@canonical.com> |
821 | - */ |
822 | - |
823 | -import QtQuick 2.0 |
824 | -import Ubuntu.Components 0.1 |
825 | -import Unity.Indicators 0.1 |
826 | -import Utils 0.1 as Utils |
827 | - |
828 | -HeroMessage { |
829 | - id: snapDecision |
830 | - |
831 | - property string title: "" |
832 | - property var time |
833 | - property string message: "" |
834 | - |
835 | - property bool activateEnabled: true |
836 | - property alias actionButtonText: actionButton.text |
837 | - |
838 | - property bool replyEnabled: true |
839 | - property alias replyMessages: quickreply.messages |
840 | - property alias replyButtonText: quickreply.buttonText |
841 | - |
842 | - expandedHeight: buttons.y + buttons.height + quickreply.height + units.gu(2) |
843 | - heroMessageHeader.titleText.text: title |
844 | - heroMessageHeader.subtitleText.text: message |
845 | - heroMessageHeader.subtitleText.color: "#e8e1d0" |
846 | - heroMessageHeader.bodyText.text: timeFormatter.timeString |
847 | - heroMessageHeader.bodyText.color: "#8f8f88" |
848 | - |
849 | - signal activate |
850 | - signal reply(string value) |
851 | - |
852 | - Item { |
853 | - id: buttons |
854 | - |
855 | - anchors.left: parent.left |
856 | - anchors.leftMargin: units.gu(2) |
857 | - anchors.right: parent.right |
858 | - anchors.rightMargin: units.gu(2) |
859 | - anchors.top: heroMessageHeader.bottom |
860 | - anchors.topMargin: units.gu(1) |
861 | - height: units.gu(4) |
862 | - opacity: 0.0 |
863 | - |
864 | - Utils.TimeFormatter { |
865 | - id: timeFormatter |
866 | - time: snapDecision.time |
867 | - format: "hh:mm - MMM dd" |
868 | - } |
869 | - |
870 | - Button { |
871 | - text: "Message" |
872 | - color: "#bababa" |
873 | - anchors.left: parent.left |
874 | - anchors.top: parent.top |
875 | - anchors.bottom: parent.bottom |
876 | - width: (parent.width - units.gu(1)) / 2 |
877 | - |
878 | - onClicked: { |
879 | - if (quickreply.state === "") { |
880 | - quickreply.state = "expanded"; |
881 | - } else { |
882 | - quickreply.state = ""; |
883 | - } |
884 | - } |
885 | - } |
886 | - |
887 | - Button { |
888 | - id: actionButton |
889 | - text: "Call back" |
890 | - color: enabled ? "#c94212" : "#bababa" |
891 | - anchors.right: parent.right |
892 | - anchors.top: parent.top |
893 | - anchors.bottom: parent.bottom |
894 | - width: (parent.width - units.gu(1)) / 2 |
895 | - enabled: snapDecision.activateEnabled |
896 | - |
897 | - onClicked: { |
898 | - snapDecision.activate(); |
899 | - } |
900 | - } |
901 | - |
902 | - states: State { |
903 | - name: "expanded" |
904 | - when: snapDecision.state === "expanded" |
905 | - |
906 | - PropertyChanges { |
907 | - target: buttons |
908 | - opacity: 1.0 |
909 | - } |
910 | - } |
911 | - transitions: Transition { |
912 | - NumberAnimation { |
913 | - property: "opacity" |
914 | - duration: 200 |
915 | - easing.type: Easing.OutQuad |
916 | - } |
917 | - } |
918 | - } |
919 | - |
920 | - QuickReply { |
921 | - id: quickreply |
922 | - |
923 | - onReply: { |
924 | - snapDecision.reply(value); |
925 | - } |
926 | - |
927 | - messages: "" |
928 | - buttonText: "Send" |
929 | - anchors { |
930 | - top: buttons.bottom |
931 | - topMargin: units.gu(2) |
932 | - left: parent.left |
933 | - right: parent.right |
934 | - } |
935 | - height: 0 |
936 | - opacity: 0.0 |
937 | - enabled: false |
938 | - replyEnabled: snapDecision.replyEnabled |
939 | - |
940 | - states: State { |
941 | - name: "expanded" |
942 | - |
943 | - PropertyChanges { |
944 | - target: quickreply |
945 | - height: expandedHeight |
946 | - opacity: 1.0 |
947 | - } |
948 | - |
949 | - PropertyChanges { |
950 | - target: quickreply |
951 | - enabled: true |
952 | - } |
953 | - } |
954 | - |
955 | - transitions: Transition { |
956 | - NumberAnimation { |
957 | - properties: "opacity,height" |
958 | - duration: 200 |
959 | - easing.type: Easing.OutQuad |
960 | - } |
961 | - } |
962 | - } |
963 | - |
964 | - onStateChanged: { |
965 | - if (state === "") { |
966 | - quickreply.state = ""; |
967 | - } |
968 | - } |
969 | -} |
970 | |
971 | === removed file 'plugins/Unity/Indicators/Messaging/qml/TextMessage.qml' |
972 | --- plugins/Unity/Indicators/Messaging/qml/TextMessage.qml 2013-08-30 18:21:21 +0000 |
973 | +++ plugins/Unity/Indicators/Messaging/qml/TextMessage.qml 1970-01-01 00:00:00 +0000 |
974 | @@ -1,43 +0,0 @@ |
975 | -/* |
976 | - * Copyright 2013 Canonical Ltd. |
977 | - * |
978 | - * This program is free software; you can redistribute it and/or modify |
979 | - * it under the terms of the GNU Lesser General Public License as published by |
980 | - * the Free Software Foundation; version 3. |
981 | - * |
982 | - * This program is distributed in the hope that it will be useful, |
983 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
984 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
985 | - * GNU Lesser General Public License for more details. |
986 | - * |
987 | - * You should have received a copy of the GNU Lesser General Public License |
988 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
989 | - * |
990 | - * Authors: |
991 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
992 | - * Olivier Tilloy <olivier.tilloy@canonical.com> |
993 | - */ |
994 | - |
995 | -import QtQuick 2.0 |
996 | -import Ubuntu.Components 0.1 |
997 | -import Unity.Indicators 0.1 as Indicators |
998 | - |
999 | -SimpleTextMessage { |
1000 | - id: simpleMessage |
1001 | - |
1002 | - property bool replyEnabled: false |
1003 | - property string replyButtonText: "Send" |
1004 | - |
1005 | - signal reply(string value) |
1006 | - |
1007 | - footer: ActionTextField { |
1008 | - anchors.fill: parent |
1009 | - |
1010 | - activateEnabled: simpleMessage.replyEnabled |
1011 | - buttonText: simpleMessage.replyButtonText |
1012 | - |
1013 | - onActivate: { |
1014 | - simpleMessage.reply(value); |
1015 | - } |
1016 | - } |
1017 | -} |
1018 | |
1019 | === removed file 'plugins/Unity/Indicators/Messaging/qml/qmldir' |
1020 | --- plugins/Unity/Indicators/Messaging/qml/qmldir 2013-08-22 13:05:57 +0000 |
1021 | +++ plugins/Unity/Indicators/Messaging/qml/qmldir 1970-01-01 00:00:00 +0000 |
1022 | @@ -1,12 +0,0 @@ |
1023 | -module Unity.Indicators.Messaging |
1024 | - |
1025 | -ActionButton 0.1 ActionButton.qml |
1026 | -ActionTextField 0.1 ActionTextField.qml |
1027 | -GroupedMessage 0.1 GroupedMessage.qml |
1028 | -HeroMessage 0.1 HeroMessage.qml |
1029 | -HeroMessageHeader 0.1 HeroMessageHeader.qml |
1030 | -MessageMenuItemFactory 0.1 MessageMenuItemFactory.qml |
1031 | -QuickReply 0.1 QuickReply.qml |
1032 | -SimpleTextMessage 0.1 SimpleTextMessage.qml |
1033 | -SnapDecision 0.1 SnapDecision.qml |
1034 | -TextMessage 0.1 TextMessage.qml |
1035 | \ No newline at end of file |
1036 | |
1037 | === removed directory 'plugins/Unity/Indicators/Network' |
1038 | === removed file 'plugins/Unity/Indicators/Network/CMakeLists.txt' |
1039 | --- plugins/Unity/Indicators/Network/CMakeLists.txt 2013-09-30 20:22:18 +0000 |
1040 | +++ plugins/Unity/Indicators/Network/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
1041 | @@ -1,1 +0,0 @@ |
1042 | -add_subdirectory(qml) |
1043 | |
1044 | === removed directory 'plugins/Unity/Indicators/Network/qml' |
1045 | === removed file 'plugins/Unity/Indicators/Network/qml/AccessPoint.qml' |
1046 | --- plugins/Unity/Indicators/Network/qml/AccessPoint.qml 2013-12-12 16:32:20 +0000 |
1047 | +++ plugins/Unity/Indicators/Network/qml/AccessPoint.qml 1970-01-01 00:00:00 +0000 |
1048 | @@ -1,117 +0,0 @@ |
1049 | -/* |
1050 | - * Copyright 2013 Canonical Ltd. |
1051 | - * |
1052 | - * This program is free software; you can redistribute it and/or modify |
1053 | - * it under the terms of the GNU Lesser General Public License as published by |
1054 | - * the Free Software Foundation; version 3. |
1055 | - * |
1056 | - * This program is distributed in the hope that it will be useful, |
1057 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1058 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1059 | - * GNU Lesser General Public License for more details. |
1060 | - * |
1061 | - * You should have received a copy of the GNU Lesser General Public License |
1062 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1063 | - * |
1064 | - * Authors: |
1065 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
1066 | - */ |
1067 | - |
1068 | -import QtQuick 2.0 |
1069 | -import Ubuntu.Components 0.1 |
1070 | -import Ubuntu.Components.ListItems 0.1 as ListItem |
1071 | -import Unity.Indicators 0.1 as Indicators |
1072 | - |
1073 | -Indicators.BaseMenuItem { |
1074 | - id: menuItem |
1075 | - implicitHeight: units.gu(5.5) |
1076 | - |
1077 | - property bool checked: false |
1078 | - property bool secure: false |
1079 | - property bool adHoc: false |
1080 | - property int signalStrength: 0 |
1081 | - property alias label: _label.text |
1082 | - |
1083 | - signal activate() |
1084 | - |
1085 | - onCheckedChanged: { |
1086 | - // Can't rely on binding. Checked is assigned on click. |
1087 | - checkBoxActive.checked = checked; |
1088 | - } |
1089 | - |
1090 | - onClicked: { |
1091 | - checkBoxActive.clicked(); |
1092 | - } |
1093 | - |
1094 | - CheckBox { |
1095 | - id: checkBoxActive |
1096 | - height: units.gu(3) |
1097 | - width: units.gu(3) |
1098 | - |
1099 | - anchors { |
1100 | - left: parent.left |
1101 | - leftMargin: menuItem.__contentsMargins |
1102 | - verticalCenter: parent.verticalCenter |
1103 | - } |
1104 | - |
1105 | - onClicked: { |
1106 | - menuItem.activate(); |
1107 | - } |
1108 | - } |
1109 | - |
1110 | - Image { |
1111 | - id: iconSignal |
1112 | - |
1113 | - width: height |
1114 | - height: Math.min(units.gu(5), parent.height - units.gu(1)) |
1115 | - anchors { |
1116 | - left: checkBoxActive.right |
1117 | - leftMargin: units.gu(1) |
1118 | - verticalCenter: parent.verticalCenter |
1119 | - } |
1120 | - |
1121 | - source: { |
1122 | - var imageName = "nm-signal-100" |
1123 | - |
1124 | - if (adHoc) { |
1125 | - imageName = "nm-adhoc"; |
1126 | - } else if (signalStrength == 0) { |
1127 | - imageName = "nm-signal-00"; |
1128 | - } else if (signalStrength <= 25) { |
1129 | - imageName = "nm-signal-25"; |
1130 | - } else if (signalStrength <= 50) { |
1131 | - imageName = "nm-signal-50"; |
1132 | - } else if (signalStrength <= 75) { |
1133 | - imageName = "nm-signal-75"; |
1134 | - } |
1135 | - return "image://theme/" + imageName; |
1136 | - } |
1137 | - } |
1138 | - |
1139 | - Label { |
1140 | - id: _label |
1141 | - anchors { |
1142 | - left: iconSignal.right |
1143 | - leftMargin: units.gu(1) |
1144 | - verticalCenter: parent.verticalCenter |
1145 | - right: iconSecure.visible ? iconSecure.left : parent.right |
1146 | - rightMargin: menuItem.__contentsMargins |
1147 | - } |
1148 | - elide: Text.ElideRight |
1149 | - opacity: label.enabled ? 1.0 : 0.5 |
1150 | - } |
1151 | - |
1152 | - Image { |
1153 | - id: iconSecure |
1154 | - visible: secure |
1155 | - source: "qrc:/indicators/artwork/network/secure.svg" |
1156 | - |
1157 | - width: height |
1158 | - height: Math.min(units.gu(4), parent.height - units.gu(1)) |
1159 | - anchors { |
1160 | - right: parent.right |
1161 | - rightMargin: units.gu(1) |
1162 | - verticalCenter: parent.verticalCenter |
1163 | - } |
1164 | - } |
1165 | -} |
1166 | |
1167 | === removed file 'plugins/Unity/Indicators/Network/qml/CMakeLists.txt' |
1168 | --- plugins/Unity/Indicators/Network/qml/CMakeLists.txt 2013-08-20 19:50:07 +0000 |
1169 | +++ plugins/Unity/Indicators/Network/qml/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
1170 | @@ -1,5 +0,0 @@ |
1171 | -# export_qmlplugin macro |
1172 | -include(Plugins) |
1173 | - |
1174 | -# export the qmldir, *.qml files. |
1175 | -export_qmlfiles(Unity.Indicators.Network Unity/Indicators/Network) |
1176 | |
1177 | === removed file 'plugins/Unity/Indicators/Network/qml/qmldir' |
1178 | --- plugins/Unity/Indicators/Network/qml/qmldir 2013-10-03 10:59:32 +0000 |
1179 | +++ plugins/Unity/Indicators/Network/qml/qmldir 1970-01-01 00:00:00 +0000 |
1180 | @@ -1,3 +0,0 @@ |
1181 | -module Unity.Indicators.Network |
1182 | - |
1183 | -AccessPoint 0.1 AccessPoint.qml |
1184 | |
1185 | === removed file 'plugins/Unity/Indicators/qml/BaseMenuItem.qml' |
1186 | --- plugins/Unity/Indicators/qml/BaseMenuItem.qml 2013-08-22 13:05:57 +0000 |
1187 | +++ plugins/Unity/Indicators/qml/BaseMenuItem.qml 1970-01-01 00:00:00 +0000 |
1188 | @@ -1,38 +0,0 @@ |
1189 | -/* |
1190 | - * Copyright 2013 Canonical Ltd. |
1191 | - * |
1192 | - * This program is free software; you can redistribute it and/or modify |
1193 | - * it under the terms of the GNU Lesser General Public License as published by |
1194 | - * the Free Software Foundation; version 3. |
1195 | - * |
1196 | - * This program is distributed in the hope that it will be useful, |
1197 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1198 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1199 | - * GNU Lesser General Public License for more details. |
1200 | - * |
1201 | - * You should have received a copy of the GNU Lesser General Public License |
1202 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1203 | - * |
1204 | - * Authors: |
1205 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
1206 | - * Nick Dedekind <nick.dedekind@canonical.com> |
1207 | - */ |
1208 | - |
1209 | -import QtQuick 2.0 |
1210 | -import Ubuntu.Components.ListItems 0.1 as ListItem |
1211 | - |
1212 | -ListItem.Standard { |
1213 | - id: baseMenu |
1214 | - |
1215 | - property bool menuSelected: false |
1216 | - |
1217 | - signal selectMenu() |
1218 | - signal deselectMenu() |
1219 | - |
1220 | - showDivider: false |
1221 | - __foregroundColor: "#e8e1d0" // FIXME not in palette yet |
1222 | - |
1223 | - backgroundIndicator: RemoveBackground { |
1224 | - state: baseMenu.swipingState |
1225 | - } |
1226 | -} |
1227 | |
1228 | === removed file 'plugins/Unity/Indicators/qml/ButtonMenuItem.qml' |
1229 | --- plugins/Unity/Indicators/qml/ButtonMenuItem.qml 2013-12-12 16:32:20 +0000 |
1230 | +++ plugins/Unity/Indicators/qml/ButtonMenuItem.qml 1970-01-01 00:00:00 +0000 |
1231 | @@ -1,44 +0,0 @@ |
1232 | -/* |
1233 | - * Copyright 2013 Canonical Ltd. |
1234 | - * |
1235 | - * This program is free software; you can redistribute it and/or modify |
1236 | - * it under the terms of the GNU Lesser General Public License as published by |
1237 | - * the Free Software Foundation; version 3. |
1238 | - * |
1239 | - * This program is distributed in the hope that it will be useful, |
1240 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1241 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1242 | - * GNU Lesser General Public License for more details. |
1243 | - * |
1244 | - * You should have received a copy of the GNU Lesser General Public License |
1245 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1246 | - * |
1247 | - * Authors: |
1248 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
1249 | - * Nick Dedekind <nick.dedekind@canonical.com> |
1250 | - */ |
1251 | - |
1252 | -import QtQuick 2.0 |
1253 | -import Ubuntu.Components 0.1 |
1254 | -import Unity.Indicators 0.1 as Indicators |
1255 | - |
1256 | -BaseMenuItem { |
1257 | - id: menuItem |
1258 | - implicitHeight: units.gu(7) |
1259 | - |
1260 | - property alias buttonText: button.text |
1261 | - |
1262 | - signal activate() |
1263 | - |
1264 | - Button { |
1265 | - id: button |
1266 | - anchors.centerIn: parent |
1267 | - height: units.gu(4) |
1268 | - width: units.gu(16) |
1269 | - color: "#1b1817" |
1270 | - |
1271 | - onClicked: { |
1272 | - menuItem.activate(); |
1273 | - } |
1274 | - } |
1275 | -} |
1276 | |
1277 | === removed file 'plugins/Unity/Indicators/qml/DivMenuItem.qml' |
1278 | --- plugins/Unity/Indicators/qml/DivMenuItem.qml 2013-08-14 09:07:45 +0000 |
1279 | +++ plugins/Unity/Indicators/qml/DivMenuItem.qml 1970-01-01 00:00:00 +0000 |
1280 | @@ -1,26 +0,0 @@ |
1281 | -/* |
1282 | - * Copyright 2013 Canonical Ltd. |
1283 | - * |
1284 | - * This program is free software; you can redistribute it and/or modify |
1285 | - * it under the terms of the GNU Lesser General Public License as published by |
1286 | - * the Free Software Foundation; version 3. |
1287 | - * |
1288 | - * This program is distributed in the hope that it will be useful, |
1289 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1290 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1291 | - * GNU Lesser General Public License for more details. |
1292 | - * |
1293 | - * You should have received a copy of the GNU Lesser General Public License |
1294 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1295 | - * |
1296 | - * Authors: |
1297 | - * Olivier Tilloy <olivier.tilloy@canonical.com> |
1298 | - */ |
1299 | - |
1300 | -import QtQuick 2.0 |
1301 | -import Ubuntu.Components 0.1 |
1302 | - |
1303 | -Rectangle { |
1304 | - color: "#181514" // FIXME not in palette yet |
1305 | - implicitHeight: units.gu(1) |
1306 | -} |
1307 | |
1308 | === removed file 'plugins/Unity/Indicators/qml/FramedMenuItem.qml' |
1309 | --- plugins/Unity/Indicators/qml/FramedMenuItem.qml 2013-08-23 11:17:06 +0000 |
1310 | +++ plugins/Unity/Indicators/qml/FramedMenuItem.qml 1970-01-01 00:00:00 +0000 |
1311 | @@ -1,39 +0,0 @@ |
1312 | -/* |
1313 | - * Copyright 2013 Canonical Ltd. |
1314 | - * |
1315 | - * This program is free software; you can redistribute it and/or modify |
1316 | - * it under the terms of the GNU Lesser General Public License as published by |
1317 | - * the Free Software Foundation; version 3. |
1318 | - * |
1319 | - * This program is distributed in the hope that it will be useful, |
1320 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1321 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1322 | - * GNU Lesser General Public License for more details. |
1323 | - * |
1324 | - * You should have received a copy of the GNU Lesser General Public License |
1325 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1326 | - * |
1327 | - * Authors: |
1328 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
1329 | - * Nick Dedekind <nick.dedekind@canonical.com> |
1330 | - */ |
1331 | - |
1332 | -import QtQuick 2.0 |
1333 | -import Ubuntu.Components 0.1 |
1334 | -import Ubuntu.Components.ListItems 0.1 as ListItem |
1335 | - |
1336 | -BaseMenuItem { |
1337 | - implicitHeight: units.gu(7) |
1338 | - |
1339 | - iconFrame: false |
1340 | - |
1341 | - HLine { |
1342 | - anchors.top: parent.top |
1343 | - color: "#403b37" // FIXME not in palette yet |
1344 | - } |
1345 | - |
1346 | - HLine { |
1347 | - anchors.bottom: parent.bottom |
1348 | - color: "#060606" // FIXME not in palette yet |
1349 | - } |
1350 | -} |
1351 | |
1352 | === removed file 'plugins/Unity/Indicators/qml/HLine.qml' |
1353 | --- plugins/Unity/Indicators/qml/HLine.qml 2013-07-01 10:14:46 +0000 |
1354 | +++ plugins/Unity/Indicators/qml/HLine.qml 1970-01-01 00:00:00 +0000 |
1355 | @@ -1,29 +0,0 @@ |
1356 | -/* |
1357 | - * Copyright 2013 Canonical Ltd. |
1358 | - * |
1359 | - * This program is free software; you can redistribute it and/or modify |
1360 | - * it under the terms of the GNU Lesser General Public License as published by |
1361 | - * the Free Software Foundation; version 3. |
1362 | - * |
1363 | - * This program is distributed in the hope that it will be useful, |
1364 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1365 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1366 | - * GNU Lesser General Public License for more details. |
1367 | - * |
1368 | - * You should have received a copy of the GNU Lesser General Public License |
1369 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1370 | - * |
1371 | - * Authors: |
1372 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
1373 | - */ |
1374 | - |
1375 | -import QtQuick 2.0 |
1376 | -import Ubuntu.Components 0.1 |
1377 | - |
1378 | -Rectangle { |
1379 | - height: units.dp(1) |
1380 | - anchors { |
1381 | - left: parent.left |
1382 | - right: parent.right |
1383 | - } |
1384 | -} |
1385 | |
1386 | === modified file 'plugins/Unity/Indicators/qml/MenuItemFactory.qml' |
1387 | --- plugins/Unity/Indicators/qml/MenuItemFactory.qml 2013-12-12 16:32:20 +0000 |
1388 | +++ plugins/Unity/Indicators/qml/MenuItemFactory.qml 2014-01-29 14:36:17 +0000 |
1389 | @@ -18,11 +18,10 @@ |
1390 | */ |
1391 | |
1392 | import QtQuick 2.0 |
1393 | -import Unity.Indicators 0.1 as Indicators |
1394 | -import Unity.Indicators.Network 0.1 as ICNetwork |
1395 | -import Unity.Indicators.Messaging 0.1 as ICMessaging |
1396 | +import Ubuntu.Settings.Menus 0.1 as Menus |
1397 | import QMenuModel 0.1 as QMenuModel |
1398 | -import Ubuntu.Components 0.1 |
1399 | +import Utils 0.1 as Utils |
1400 | +import Ubuntu.Components.ListItems 0.1 as ListItems |
1401 | |
1402 | Item { |
1403 | id: menuFactory |
1404 | @@ -33,12 +32,14 @@ |
1405 | "unity.widgets.systemsettings.tablet.volumecontrol" : sliderMenu, |
1406 | "unity.widgets.systemsettings.tablet.switch" : switchMenu, |
1407 | |
1408 | - "com.canonical.indicator.button" : buttonMenu, |
1409 | - "com.canonical.indicator.div" : divMenu, |
1410 | - "com.canonical.indicator.section" : sectionMenu, |
1411 | - "com.canonical.indicator.progress" : progressMenu, |
1412 | - "com.canonical.indicator.slider" : sliderMenu, |
1413 | - "com.canonical.indicator.switch" : switchMenu, |
1414 | + "com.canonical.indicator.button" : buttonMenu, |
1415 | + "com.canonical.indicator.div" : separatorMenu, |
1416 | + "com.canonical.indicator.section" : sectionMenu, |
1417 | + "com.canonical.indicator.progress" : progressMenu, |
1418 | + "com.canonical.indicator.slider" : sliderMenu, |
1419 | + "com.canonical.indicator.switch" : switchMenu, |
1420 | + "com.canonical.indicator.alarm" : alarmMenu, |
1421 | + "com.canonical.indicator.appointment" : appointmentMenu, |
1422 | |
1423 | "com.canonical.indicator.messages.messageitem" : messageItem, |
1424 | "com.canonical.indicator.messages.sourceitem" : groupedMessage, |
1425 | @@ -46,6 +47,9 @@ |
1426 | "com.canonical.unity.slider" : sliderMenu, |
1427 | "com.canonical.unity.switch" : switchMenu, |
1428 | |
1429 | + "com.canonical.unity.media-player" : mediaPayerMenu, |
1430 | + "com.canonical.unity.playback-item" : playbackItemMenu, |
1431 | + |
1432 | "unity.widgets.systemsettings.tablet.wifisection" : wifiSection, |
1433 | "unity.widgets.systemsettings.tablet.accesspoint" : accessPoint, |
1434 | } |
1435 | @@ -58,15 +62,15 @@ |
1436 | } |
1437 | |
1438 | Component { |
1439 | - id: divMenu; |
1440 | - Indicators.DivMenuItem { |
1441 | - objectName: "divMenu" |
1442 | + id: separatorMenu; |
1443 | + Menus.SeparatorMenu { |
1444 | + objectName: "separatorMenu" |
1445 | } |
1446 | } |
1447 | |
1448 | Component { |
1449 | id: sliderMenu; |
1450 | - Indicators.SliderMenuItem { |
1451 | + Menus.SliderMenu { |
1452 | objectName: "sliderMenu" |
1453 | property QtObject menuData: null |
1454 | property var menuModel: menuFactory.menuModel |
1455 | @@ -95,12 +99,12 @@ |
1456 | onMenuIndexChanged: { |
1457 | loadAttributes(); |
1458 | } |
1459 | - onChangeState: { |
1460 | + onUpdated: { |
1461 | menuModel.changeState(menuIndex, value); |
1462 | } |
1463 | |
1464 | function loadAttributes() { |
1465 | - if (!menuModel || menuIndex == undefined) return; |
1466 | + if (!menuModel || menuIndex == -1) return; |
1467 | menuModel.loadExtendedAttributes(menuIndex, {'min-value': 'double', |
1468 | 'max-value': 'double', |
1469 | 'min-icon': 'icon', |
1470 | @@ -111,7 +115,7 @@ |
1471 | |
1472 | Component { |
1473 | id: buttonMenu; |
1474 | - Indicators.ButtonMenuItem { |
1475 | + Menus.ButtonMenu { |
1476 | objectName: "buttonMenu" |
1477 | property QtObject menuData: null |
1478 | property var menuModel: menuFactory.menuModel |
1479 | @@ -120,7 +124,7 @@ |
1480 | buttonText: menuData && menuData.label || "" |
1481 | enabled: menuData && menuData.sensitive || false |
1482 | |
1483 | - onActivate: { |
1484 | + onTriggered: { |
1485 | menuModel.activate(menuIndex); |
1486 | shell.hideIndicatorMenu(UbuntuAnimation.FastDuration); |
1487 | } |
1488 | @@ -128,18 +132,19 @@ |
1489 | } |
1490 | Component { |
1491 | id: sectionMenu; |
1492 | - Indicators.SectionMenuItem { |
1493 | + Menus.SectionMenu { |
1494 | objectName: "sectionMenu" |
1495 | property QtObject menuData: null |
1496 | property var menuIndex: undefined |
1497 | |
1498 | text: menuData && menuData.label || "" |
1499 | + busy: false |
1500 | } |
1501 | } |
1502 | |
1503 | Component { |
1504 | id: progressMenu; |
1505 | - Indicators.ProgressMenuItem { |
1506 | + Menus.ProgressValueMenu { |
1507 | objectName: "progressMenu" |
1508 | property QtObject menuData: null |
1509 | property int menuIndex: -1 |
1510 | @@ -153,7 +158,7 @@ |
1511 | |
1512 | Component { |
1513 | id: standardMenu; |
1514 | - Indicators.StandardMenuItem { |
1515 | + ListItems.Standard { |
1516 | objectName: "standardMenu" |
1517 | property QtObject menuData: null |
1518 | property int menuIndex: -1 |
1519 | @@ -161,19 +166,36 @@ |
1520 | text: menuData && menuData.label || "" |
1521 | iconSource: menuData && menuData.icon || "" |
1522 | enabled: menuData && menuData.sensitive || false |
1523 | - checkable: menuData ? (menuData.isCheck || menuData.isRadio) : false |
1524 | - checked: checkable ? menuData.isToggled : false |
1525 | - |
1526 | - onActivate: { |
1527 | - menuModel.activate(menuIndex); |
1528 | - shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration); |
1529 | - } |
1530 | - } |
1531 | - } |
1532 | + |
1533 | + onTriggered: { |
1534 | + menuModel.activate(menuIndex); |
1535 | + shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration); |
1536 | + } |
1537 | + } |
1538 | + } |
1539 | + |
1540 | + Component { |
1541 | + id: checkableMenu; |
1542 | + Menus.CheckableMenu { |
1543 | + objectName: "checkableMenu" |
1544 | + property QtObject menuData: null |
1545 | + property int menuIndex: -1 |
1546 | + |
1547 | + text: menuData && menuData.label || "" |
1548 | + enabled: menuData && menuData.sensitive || false |
1549 | + checked: menuData && menuData.isToggled || false |
1550 | + |
1551 | + onTriggered: { |
1552 | + menuModel.activate(menuIndex); |
1553 | + shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration); |
1554 | + } |
1555 | + } |
1556 | + } |
1557 | + |
1558 | |
1559 | Component { |
1560 | id: switchMenu; |
1561 | - Indicators.SwitchMenuItem { |
1562 | + Menus.SwitchMenu { |
1563 | objectName: "switchMenu" |
1564 | property QtObject menuData: null |
1565 | property int menuIndex: -1 |
1566 | @@ -181,9 +203,9 @@ |
1567 | text: menuData && menuData.label || "" |
1568 | iconSource: menuData && menuData.icon || "" |
1569 | enabled: menuData && menuData.sensitive || false |
1570 | - checked: menuData ? menuData.isToggled : false |
1571 | + checked: menuData && menuData.isToggled || false |
1572 | |
1573 | - onActivate: { |
1574 | + onTriggered: { |
1575 | menuModel.activate(menuIndex); |
1576 | shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration); |
1577 | } |
1578 | @@ -191,8 +213,84 @@ |
1579 | } |
1580 | |
1581 | Component { |
1582 | + id: alarmMenu; |
1583 | + Menus.EventMenu { |
1584 | + objectName: "alarmMenu" |
1585 | + property QtObject menuData: null |
1586 | + property var menuModel: menuFactory.menuModel |
1587 | + property int menuIndex: -1 |
1588 | + property var extendedData: menuData && menuData.ext || undefined |
1589 | + // TODO - bug #1260728 |
1590 | + property var timeFormatter: Utils.GDateTimeFormatter { |
1591 | + time: getExtendedProperty(extendedData, "xCanonicalTime", 0) |
1592 | + format: getExtendedProperty(extendedData, "xCanonicalTimeFormat", "") |
1593 | + } |
1594 | + |
1595 | + text: menuData && menuData.label || "" |
1596 | + iconSource: menuData && menuData.icon || "image://theme/alarm-clock" |
1597 | + time: timeFormatter.timeString |
1598 | + enabled: menuData && menuData.sensitive || false |
1599 | + |
1600 | + onMenuModelChanged: { |
1601 | + loadAttributes(); |
1602 | + } |
1603 | + onMenuIndexChanged: { |
1604 | + loadAttributes(); |
1605 | + } |
1606 | + onTriggered: { |
1607 | + menuModel.activate(menuIndex); |
1608 | + } |
1609 | + |
1610 | + function loadAttributes() { |
1611 | + if (!menuModel || menuIndex == -1) return; |
1612 | + menuModel.loadExtendedAttributes(menuIndex, {'x-canonical-time': 'int64', |
1613 | + 'x-canonical-time-format': 'string'}); |
1614 | + } |
1615 | + } |
1616 | + } |
1617 | + |
1618 | + Component { |
1619 | + id: appointmentMenu; |
1620 | + Menus.EventMenu { |
1621 | + objectName: "appointmentMenu" |
1622 | + property QtObject menuData: null |
1623 | + property var menuModel: menuFactory.menuModel |
1624 | + property int menuIndex: -1 |
1625 | + property var extendedData: menuData && menuData.ext || undefined |
1626 | + // TODO - bug #1260728 |
1627 | + property var timeFormatter: Utils.GDateTimeFormatter { |
1628 | + time: getExtendedProperty(extendedData, "xCanonicalTime", 0) |
1629 | + format: getExtendedProperty(extendedData, "xCanonicalTimeFormat", "") |
1630 | + } |
1631 | + |
1632 | + text: menuData && menuData.label || "" |
1633 | + iconSource: menuData && menuData.icon || "image://theme/calendar" |
1634 | + time: timeFormatter.timeString |
1635 | + eventColor: menu && menu.ext.hasOwnProperty("xCanonicalColor") ? menu.ext.xCanonicalColor : Qt.rgba(0.0, 0.0, 0.0, 0.0) |
1636 | + enabled: menuData && menuData.sensitive || false |
1637 | + |
1638 | + onMenuModelChanged: { |
1639 | + loadAttributes(); |
1640 | + } |
1641 | + onMenuIndexChanged: { |
1642 | + loadAttributes(); |
1643 | + } |
1644 | + onTriggered: { |
1645 | + menuModel.activate(menuIndex); |
1646 | + } |
1647 | + |
1648 | + function loadAttributes() { |
1649 | + if (!menuModel || menuIndex == -1) return; |
1650 | + menuModel.loadExtendedAttributes(menuIndex, {'x-canonical-color': 'string', |
1651 | + 'x-canonical-time': 'int64', |
1652 | + 'x-canonical-time-format': 'string'}); |
1653 | + } |
1654 | + } |
1655 | + } |
1656 | + |
1657 | + Component { |
1658 | id: wifiSection; |
1659 | - Indicators.SectionMenuItem { |
1660 | + Menus.SectionMenu { |
1661 | objectName: "wifiSection" |
1662 | property QtObject menuData: null |
1663 | property var menuModel: menuFactory.menuModel |
1664 | @@ -210,7 +308,7 @@ |
1665 | } |
1666 | |
1667 | function loadAttributes() { |
1668 | - if (!menuModel || menuIndex == undefined) return; |
1669 | + if (!menuModel || menuIndex == -1) return; |
1670 | menuModel.loadExtendedAttributes(menuIndex, {'x-canonical-busy-action': 'bool'}) |
1671 | } |
1672 | } |
1673 | @@ -218,7 +316,7 @@ |
1674 | |
1675 | Component { |
1676 | id: accessPoint; |
1677 | - ICNetwork.AccessPoint { |
1678 | + Menus.AccessPointMenu { |
1679 | objectName: "accessPoint" |
1680 | property QtObject menuData: null |
1681 | property var menuModel: menuFactory.menuModel |
1682 | @@ -231,11 +329,11 @@ |
1683 | name: getExtendedProperty(extendedData, "xCanonicalWifiApStrengthAction", "") |
1684 | } |
1685 | |
1686 | - label: menuData && menuData.label || "" |
1687 | + text: menuData && menuData.label || "" |
1688 | enabled: menuData && menuData.sensitive || false |
1689 | + checked: menuData && menuData.isToggled || false |
1690 | secure: getExtendedProperty(extendedData, "xCanonicalWifiApIsSecure", false) |
1691 | adHoc: getExtendedProperty(extendedData, "xCanonicalWifiApIsAdhoc", false) |
1692 | - checked: menuData ? menuData.isToggled : false |
1693 | signalStrength: strengthAction.valid ? strengthAction.state : 0 |
1694 | |
1695 | onMenuModelChanged: { |
1696 | @@ -244,13 +342,13 @@ |
1697 | onMenuIndexChanged: { |
1698 | loadAttributes(); |
1699 | } |
1700 | - onActivate: { |
1701 | + onTriggered: { |
1702 | menuModel.activate(menuIndex); |
1703 | shell.hideIndicatorMenu(UbuntuAnimation.BriskDuration); |
1704 | } |
1705 | |
1706 | function loadAttributes() { |
1707 | - if (!menuModel || menuIndex == undefined) return; |
1708 | + if (!menuModel || menuIndex == -1) return; |
1709 | menuModel.loadExtendedAttributes(menuIndex, {'x-canonical-wifi-ap-is-adhoc': 'bool', |
1710 | 'x-canonical-wifi-ap-is-secure': 'bool', |
1711 | 'x-canonical-wifi-ap-strength-action': 'string'}); |
1712 | @@ -260,7 +358,7 @@ |
1713 | |
1714 | Component { |
1715 | id: messageItem |
1716 | - ICMessaging.MessageMenuItemFactory { |
1717 | + MessageMenuItemFactory { |
1718 | objectName: "messageItem" |
1719 | menuModel: menuFactory.menuModel |
1720 | } |
1721 | @@ -268,17 +366,18 @@ |
1722 | |
1723 | Component { |
1724 | id: groupedMessage |
1725 | - ICMessaging.GroupedMessage { |
1726 | + Menus.GroupedMessageMenu { |
1727 | objectName: "groupedMessage" |
1728 | property QtObject menuData: null |
1729 | property var menuModel: menuFactory.menuModel |
1730 | property int menuIndex: -1 |
1731 | property var extendedData: menuData && menuData.ext || undefined |
1732 | |
1733 | - title: menuData && menuData.label || "" |
1734 | - appIcon: getExtendedProperty(extendedData, "icon", "qrc:/indicators/artwork/messaging/default_app.svg") |
1735 | + text: menuData && menuData.label || "" |
1736 | + iconSource: getExtendedProperty(extendedData, "icon", "qrc:/indicators/artwork/messaging/default_app.svg") |
1737 | count: menuData && menuData.actionState.length > 0 ? menuData.actionState[0] : "0" |
1738 | enabled: menuData && menuData.sensitive || false |
1739 | + removable: true |
1740 | |
1741 | onMenuModelChanged: { |
1742 | loadAttributes(); |
1743 | @@ -286,21 +385,103 @@ |
1744 | onMenuIndexChanged: { |
1745 | loadAttributes(); |
1746 | } |
1747 | - onActivateApp: { |
1748 | + onClicked: { |
1749 | menuModel.activate(menuIndex, true); |
1750 | shell.hideIndicatorMenu(UbuntuAnimation.FastDuration); |
1751 | } |
1752 | - onDismiss: { |
1753 | + onDismissed: { |
1754 | menuModel.activate(menuIndex, false); |
1755 | } |
1756 | |
1757 | function loadAttributes() { |
1758 | - if (!menuModel || menuIndex == undefined) return; |
1759 | + if (!menuModel || menuIndex == -1) return; |
1760 | menuModel.loadExtendedAttributes(modelIndex, {'icon': 'icon'}); |
1761 | } |
1762 | } |
1763 | } |
1764 | |
1765 | + Component { |
1766 | + id: mediaPayerMenu; |
1767 | + Menus.MediaPlayerMenu { |
1768 | + objectName: "mediaPayerMenu" |
1769 | + property QtObject menuData: null |
1770 | + property var menuModel: menuFactory.menuModel |
1771 | + property int menuIndex: -1 |
1772 | + property var actionState: menuData && menuData.actionState || undefined |
1773 | + |
1774 | + playerIcon: menuData && menuData.icon || "" |
1775 | + playerName: menuData && menuData.label || "" |
1776 | + |
1777 | + albumArt: getExtendedProperty(actionState, "art-url", "") |
1778 | + song: getExtendedProperty(actionState, "title", "unknown") |
1779 | + artist: getExtendedProperty(actionState, "artist", "unknown") |
1780 | + album: getExtendedProperty(actionState, "album", "unknown") |
1781 | + running: getExtendedProperty(actionState, "running", false) |
1782 | + state: getExtendedProperty(actionState, "state", "") |
1783 | + enabled: menuData && menuData.sensitive || false |
1784 | + |
1785 | + onTriggered: { |
1786 | + model.activate(modelIndex); |
1787 | + } |
1788 | + } |
1789 | + } |
1790 | + |
1791 | + Component { |
1792 | + id: playbackItemMenu; |
1793 | + Menus.PlaybackItemMenu { |
1794 | + objectName: "playbackItemMenu" |
1795 | + property QtObject menuData: null |
1796 | + property var menuModel: menuFactory.menuModel |
1797 | + property int menuIndex: -1 |
1798 | + property var extendedData: menuData && menuData.ext || undefined |
1799 | + |
1800 | + property var playAction: QMenuModel.UnityMenuAction { |
1801 | + model: menuModel |
1802 | + index: menuIndex |
1803 | + name: getExtendedProperty(extendedData, "xCanonicalPlayAction", "") |
1804 | + } |
1805 | + property var nextAction: QMenuModel.UnityMenuAction { |
1806 | + model: menuModel |
1807 | + index: menuIndex |
1808 | + name: getExtendedProperty(extendedData, "xCanonicalNextAction", "") |
1809 | + } |
1810 | + property var previousAction: QMenuModel.UnityMenuAction { |
1811 | + model: menuModel |
1812 | + index: menuIndex |
1813 | + name: getExtendedProperty(extendedData, "xCanonicalPreviousAction", "") |
1814 | + } |
1815 | + |
1816 | + playing: playAction.state === "Playing" |
1817 | + canPlay: playAction.valid |
1818 | + canGoNext: nextAction.valid |
1819 | + canGoPrevious: previousAction.valid |
1820 | + enabled: menuData && menuData.sensitive || false |
1821 | + |
1822 | + onPlay: { |
1823 | + playAction.activate(); |
1824 | + } |
1825 | + onNext: { |
1826 | + nextAction.activate(); |
1827 | + } |
1828 | + onPrevious: { |
1829 | + previousAction.activate(); |
1830 | + } |
1831 | + onMenuModelChanged: { |
1832 | + loadAttributes(); |
1833 | + } |
1834 | + onMenuIndexChanged: { |
1835 | + loadAttributes(); |
1836 | + } |
1837 | + |
1838 | + function loadAttributes() { |
1839 | + if (!menuModel || menuIndex == -1) return; |
1840 | + menuModel.loadExtendedAttributes(modelIndex, {'x-canonical-play-action': 'string', |
1841 | + 'x-canonical-next-action': 'string', |
1842 | + 'x-canonical-previous-action': 'string'}); |
1843 | + } |
1844 | + } |
1845 | + } |
1846 | + |
1847 | function load(modelData) { |
1848 | if (modelData.type !== undefined) { |
1849 | var component = _map[modelData.type]; |
1850 | @@ -308,8 +489,11 @@ |
1851 | return component; |
1852 | } |
1853 | } |
1854 | + if (modelData.isCheck || modelData.isRadio) { |
1855 | + return checkableMenu; |
1856 | + } |
1857 | if (modelData.isSeparator) { |
1858 | - return divMenu; |
1859 | + return separatorMenu; |
1860 | } |
1861 | return standardMenu; |
1862 | } |
1863 | |
1864 | === renamed file 'plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qml' => 'plugins/Unity/Indicators/qml/MessageMenuItemFactory.qml' |
1865 | --- plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qml 2013-12-12 16:36:10 +0000 |
1866 | +++ plugins/Unity/Indicators/qml/MessageMenuItemFactory.qml 2014-01-29 14:36:17 +0000 |
1867 | @@ -20,18 +20,29 @@ |
1868 | |
1869 | import QtQuick 2.0 |
1870 | import Ubuntu.Components 0.1 |
1871 | -import Unity.Indicators 0.1 as Indicators |
1872 | +import Ubuntu.Settings.Menus 0.1 as Menus |
1873 | import QMenuModel 0.1 as QMenuModel |
1874 | +import Utils 0.1 as Utils |
1875 | |
1876 | -Indicators.BaseMenuItem { |
1877 | +Item { |
1878 | id: messageFactoryItem |
1879 | property var menuModel: null |
1880 | property QtObject menuData: null |
1881 | property int menuIndex: -1 |
1882 | |
1883 | + property bool selected: false |
1884 | + signal menuSelected |
1885 | + signal menuDeselected |
1886 | + |
1887 | property var extendedData: menuData && menuData.ext || undefined |
1888 | property var actionsDescription: getExtendedProperty(extendedData, "xCanonicalMessageActions", undefined) |
1889 | |
1890 | + // TODO - bug #1260728 |
1891 | + property var timeFormatter: Utils.TimeFormatter { |
1892 | + time: getExtendedProperty(extendedData, "xCanonicalTime", 0) |
1893 | + format: "hh:mm - MMM dd" |
1894 | + } |
1895 | + |
1896 | onMenuModelChanged: { |
1897 | loadAttributes(); |
1898 | } |
1899 | @@ -40,8 +51,7 @@ |
1900 | } |
1901 | |
1902 | function loadAttributes() { |
1903 | - if (!menuModel || menuIndex == undefined) return; |
1904 | - |
1905 | + if (!menuModel || menuIndex == -1) return; |
1906 | menuModel.loadExtendedAttributes(menuIndex, {'x-canonical-time': 'int64', |
1907 | 'x-canonical-text': 'string', |
1908 | 'x-canonical-message-actions': 'variant', |
1909 | @@ -67,34 +77,46 @@ |
1910 | |
1911 | Component { |
1912 | id: simpleTextMessage |
1913 | - SimpleTextMessage { |
1914 | + Menus.SimpleTextMessageMenu { |
1915 | + id: message |
1916 | objectName: "simpleTextMessage" |
1917 | // text |
1918 | title: menuData && menuData.label || "" |
1919 | - time: getExtendedProperty(extendedData, "xCanonicalTime", 0) |
1920 | + time: timeFormatter.timeString |
1921 | message: getExtendedProperty(extendedData, "xCanonicalText", "") |
1922 | // icons |
1923 | avatar: getExtendedProperty(extendedData, "icon", "qrc:/indicators/artwork/messaging/default_contact.png") |
1924 | appIcon: getExtendedProperty(extendedData, "xCanonicalAppIcon", "qrc:/indicators/artwork/messaging/default_app.svg") |
1925 | // actions |
1926 | enabled: menuData && menuData.sensitive || false |
1927 | + removable: !selected |
1928 | + selected: messageFactoryItem.selected |
1929 | |
1930 | - onActivateApp: { |
1931 | + onAppActivated: { |
1932 | menuModel.activate(menuIndex, true); |
1933 | shell.hideIndicatorMenu(UbuntuAnimation.FastDuration); |
1934 | } |
1935 | - onDismiss: { |
1936 | + onDismissed: { |
1937 | menuModel.activate(menuIndex, false); |
1938 | } |
1939 | + onClicked: { |
1940 | + if (selected) { |
1941 | + menuDeselected(); |
1942 | + } else { |
1943 | + menuSelected(); |
1944 | + } |
1945 | + } |
1946 | |
1947 | - menuSelected: messageFactoryItem.menuSelected |
1948 | - onSelectMenu: messageFactoryItem.selectMenu() |
1949 | - onDeselectMenu: messageFactoryItem.deselectMenu() |
1950 | + backgroundIndicator: RemoveBackground { |
1951 | + state: message.swipingState |
1952 | + } |
1953 | } |
1954 | } |
1955 | + |
1956 | Component { |
1957 | id: textMessage |
1958 | - TextMessage { |
1959 | + Menus.TextMessageMenu { |
1960 | + id: message |
1961 | objectName: "textMessage" |
1962 | property var replyActionDescription: actionsDescription && actionsDescription.length > 0 ? actionsDescription[0] : undefined |
1963 | |
1964 | @@ -106,7 +128,7 @@ |
1965 | |
1966 | // text |
1967 | title: menuData && menuData.label || "" |
1968 | - time: getExtendedProperty(extendedData, "xCanonicalTime", 0) |
1969 | + time: timeFormatter.timeString |
1970 | message: getExtendedProperty(extendedData, "xCanonicalText", "") |
1971 | replyButtonText: getExtendedProperty(replyActionDescription, "label", "Send") |
1972 | // icons |
1973 | @@ -115,26 +137,36 @@ |
1974 | // actions |
1975 | replyEnabled: replyAction.valid && replyAction.enabled |
1976 | enabled: menuData && menuData.sensitive || false |
1977 | + removable: !selected |
1978 | + selected: messageFactoryItem.selected |
1979 | |
1980 | - onActivateApp: { |
1981 | + onAppActivated: { |
1982 | menuModel.activate(menuIndex, true); |
1983 | shell.hideIndicatorMenu(UbuntuAnimation.FastDuration); |
1984 | } |
1985 | - onDismiss: { |
1986 | + onDismissed: { |
1987 | menuModel.activate(menuIndex, false); |
1988 | } |
1989 | - onReply: { |
1990 | + onReplied: { |
1991 | replyAction.activate(value); |
1992 | } |
1993 | + onClicked: { |
1994 | + if (selected) { |
1995 | + menuDeselected(); |
1996 | + } else { |
1997 | + menuSelected(); |
1998 | + } |
1999 | + } |
2000 | |
2001 | - menuSelected: messageFactoryItem.menuSelected |
2002 | - onSelectMenu: messageFactoryItem.selectMenu() |
2003 | - onDeselectMenu: messageFactoryItem.deselectMenu() |
2004 | + backgroundIndicator: RemoveBackground { |
2005 | + state: message.swipingState |
2006 | + } |
2007 | } |
2008 | } |
2009 | Component { |
2010 | id: snapDecision |
2011 | - SnapDecision { |
2012 | + Menus.SnapDecisionMenu { |
2013 | + id: message |
2014 | objectName: "snapDecision" |
2015 | property var activateActionDescription: actionsDescription && actionsDescription.length > 0 ? actionsDescription[0] : undefined |
2016 | property var replyActionDescription: actionsDescription && actionsDescription.length > 1 ? actionsDescription[1] : undefined |
2017 | @@ -152,7 +184,7 @@ |
2018 | |
2019 | // text |
2020 | title: menuData && menuData.label || "" |
2021 | - time: getExtendedProperty(extendedData, "xCanonicalTime", 0) |
2022 | + time: timeFormatter.timeString |
2023 | message: getExtendedProperty(extendedData, "xCanonicalText", "") |
2024 | actionButtonText: getExtendedProperty(activateActionDescription, "label", "Call back") |
2025 | replyButtonText: getExtendedProperty(replyActionDescription, "label", "Send") |
2026 | @@ -164,24 +196,33 @@ |
2027 | activateEnabled: activateAction.valid && activateAction.enabled |
2028 | replyEnabled: replyAction.valid && replyAction.enabled |
2029 | enabled: menuData && menuData.sensitive || false |
2030 | + removable: !selected |
2031 | + selected: messageFactoryItem.selected |
2032 | |
2033 | - onActivateApp: { |
2034 | + onAppActivated: { |
2035 | menuModel.activate(menuIndex, true); |
2036 | shell.hideIndicatorMenu(UbuntuAnimation.FastDuration); |
2037 | } |
2038 | - onDismiss: { |
2039 | + onDismissed: { |
2040 | menuModel.activate(menuIndex, false); |
2041 | } |
2042 | - onActivate: { |
2043 | + onActivated: { |
2044 | activateAction.activate(); |
2045 | } |
2046 | - onReply: { |
2047 | + onReplied: { |
2048 | replyAction.activate(value); |
2049 | } |
2050 | + onClicked: { |
2051 | + if (selected) { |
2052 | + menuDeselected(); |
2053 | + } else { |
2054 | + menuSelected(); |
2055 | + } |
2056 | + } |
2057 | |
2058 | - menuSelected: messageFactoryItem.menuSelected |
2059 | - onSelectMenu: messageFactoryItem.selectMenu() |
2060 | - onDeselectMenu: messageFactoryItem.deselectMenu() |
2061 | + backgroundIndicator: RemoveBackground { |
2062 | + state: message.swipingState |
2063 | + } |
2064 | } |
2065 | } |
2066 | } |
2067 | |
2068 | === removed file 'plugins/Unity/Indicators/qml/ProgressMenuItem.qml' |
2069 | --- plugins/Unity/Indicators/qml/ProgressMenuItem.qml 2013-08-21 21:00:17 +0000 |
2070 | +++ plugins/Unity/Indicators/qml/ProgressMenuItem.qml 1970-01-01 00:00:00 +0000 |
2071 | @@ -1,38 +0,0 @@ |
2072 | -/* |
2073 | - * Copyright 2013 Canonical Ltd. |
2074 | - * |
2075 | - * This program is free software; you can redistribute it and/or modify |
2076 | - * it under the terms of the GNU Lesser General Public License as published by |
2077 | - * the Free Software Foundation; version 3. |
2078 | - * |
2079 | - * This program is distributed in the hope that it will be useful, |
2080 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2081 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2082 | - * GNU Lesser General Public License for more details. |
2083 | - * |
2084 | - * You should have received a copy of the GNU Lesser General Public License |
2085 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2086 | - * |
2087 | - * Authors: |
2088 | - * Michael Zanetti <michael.zanetti@canonical.com> |
2089 | - */ |
2090 | - |
2091 | -import QtQuick 2.0 |
2092 | -import Ubuntu.Components 0.1 |
2093 | -import Unity.Indicators 0.1 as Indicators |
2094 | - |
2095 | -FramedMenuItem { |
2096 | - id: menuItem |
2097 | - |
2098 | - property int value : 0.0 |
2099 | - |
2100 | - control: Label { |
2101 | - id: progress |
2102 | - anchors.verticalCenter: parent.verticalCenter |
2103 | - anchors.right: parent.right |
2104 | - |
2105 | - text: menuItem.value + " %" |
2106 | - fontSize: "medium" |
2107 | - color: "#e8e1d0" |
2108 | - } |
2109 | -} |
2110 | |
2111 | === removed file 'plugins/Unity/Indicators/qml/SectionMenuItem.qml' |
2112 | --- plugins/Unity/Indicators/qml/SectionMenuItem.qml 2013-08-21 21:00:17 +0000 |
2113 | +++ plugins/Unity/Indicators/qml/SectionMenuItem.qml 1970-01-01 00:00:00 +0000 |
2114 | @@ -1,54 +0,0 @@ |
2115 | -/* |
2116 | - * Copyright 2013 Canonical Ltd. |
2117 | - * |
2118 | - * This program is free software; you can redistribute it and/or modify |
2119 | - * it under the terms of the GNU Lesser General Public License as published by |
2120 | - * the Free Software Foundation; version 3. |
2121 | - * |
2122 | - * This program is distributed in the hope that it will be useful, |
2123 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2124 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2125 | - * GNU Lesser General Public License for more details. |
2126 | - * |
2127 | - * You should have received a copy of the GNU Lesser General Public License |
2128 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2129 | - * |
2130 | - * Authors: |
2131 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
2132 | - */ |
2133 | - |
2134 | -import QtQuick 2.0 |
2135 | -import Ubuntu.Components 0.1 |
2136 | -import Ubuntu.Components.ListItems 0.1 as ListItem |
2137 | - |
2138 | -BaseMenuItem { |
2139 | - id: menuItem |
2140 | - property alias text: header.text |
2141 | - property bool busy: false |
2142 | - |
2143 | - implicitHeight: text !== "" ? header.height : 0 |
2144 | - |
2145 | - ListItem.Header { |
2146 | - id: header |
2147 | - |
2148 | - height: units.gu(4) |
2149 | - anchors { |
2150 | - left: parent.left |
2151 | - right: parent.right |
2152 | - top: parent.top |
2153 | - } |
2154 | - visible: text != "" |
2155 | - |
2156 | - ActivityIndicator { |
2157 | - id: indicator |
2158 | - running: busy |
2159 | - anchors { |
2160 | - margins: units.gu(0.5) |
2161 | - right: parent.right |
2162 | - } |
2163 | - height: parent.height - (anchors.margins * 2) |
2164 | - width: height |
2165 | - anchors.verticalCenter: parent.verticalCenter |
2166 | - } |
2167 | - } |
2168 | -} |
2169 | |
2170 | === removed file 'plugins/Unity/Indicators/qml/SliderMenuItem.qml' |
2171 | --- plugins/Unity/Indicators/qml/SliderMenuItem.qml 2013-10-29 19:01:15 +0000 |
2172 | +++ plugins/Unity/Indicators/qml/SliderMenuItem.qml 1970-01-01 00:00:00 +0000 |
2173 | @@ -1,106 +0,0 @@ |
2174 | -/* |
2175 | - * Copyright 2013 Canonical Ltd. |
2176 | - * |
2177 | - * This program is free software; you can redistribute it and/or modify |
2178 | - * it under the terms of the GNU Lesser General Public License as published by |
2179 | - * the Free Software Foundation; version 3. |
2180 | - * |
2181 | - * This program is distributed in the hope that it will be useful, |
2182 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2183 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2184 | - * GNU Lesser General Public License for more details. |
2185 | - * |
2186 | - * You should have received a copy of the GNU Lesser General Public License |
2187 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2188 | - * |
2189 | - * Authors: |
2190 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
2191 | - * Nick Dedekind <nick.dedekind@canonical.com> |
2192 | - */ |
2193 | - |
2194 | -import QtQuick 2.0 |
2195 | -import Ubuntu.Components 0.1 as Components |
2196 | -import Unity.Indicators 0.1 as Indicators |
2197 | - |
2198 | -FramedMenuItem { |
2199 | - id: menuItem |
2200 | - |
2201 | - property alias minimumValue: slider.minimumValue |
2202 | - property alias maximumValue: slider.maximumValue |
2203 | - property double value: 0.0 |
2204 | - |
2205 | - property alias minIcon: leftImage.source |
2206 | - property alias maxIcon: rightImage.source |
2207 | - |
2208 | - property QtObject d: QtObject { |
2209 | - property bool enableValueConnection: true |
2210 | - } |
2211 | - |
2212 | - signal changeState(real value) |
2213 | - |
2214 | - onValueChanged: { |
2215 | - // TODO: look into adding a component to manage bi-directional bindings. |
2216 | - var oldEnable = d.enableValueConnection |
2217 | - d.enableValueConnection = false; |
2218 | - |
2219 | - // Can't rely on binding. Slider value is assigned by user slide. |
2220 | - slider.value = value; |
2221 | - |
2222 | - d.enableValueConnection = oldEnable; |
2223 | - } |
2224 | - |
2225 | - control: Item { |
2226 | - id: row |
2227 | - width: menuItem.text ? units.gu(20) : menuItem.width - (2 * menuItem.__contentsMargins) |
2228 | - height: slider.height |
2229 | - |
2230 | - Image { |
2231 | - id: leftImage |
2232 | - visible: status === Image.Ready |
2233 | - anchors.left: row.left |
2234 | - anchors.verticalCenter: row.verticalCenter |
2235 | - height: units.gu(4) |
2236 | - width: height |
2237 | - } |
2238 | - |
2239 | - Components.Slider { |
2240 | - id: slider |
2241 | - anchors { |
2242 | - left: leftImage.visible ? leftImage.right : row.left |
2243 | - right: rightImage.visible ? rightImage.left : row.right |
2244 | - leftMargin: leftImage.visible ? units.gu(0.5) : 0 |
2245 | - rightMargin: rightImage.visible ? units.gu(0.5) : 0 |
2246 | - } |
2247 | - live: true |
2248 | - |
2249 | - Component.onCompleted: { |
2250 | - value = menuItem.value |
2251 | - } |
2252 | - |
2253 | - minimumValue: 0.0 |
2254 | - maximumValue: 0.1 |
2255 | - |
2256 | - // FIXME - to be deprecated in Ubuntu.Components. |
2257 | - // Use this to disable the label, since there is not way to do it on the component. |
2258 | - function formatValue(v) { |
2259 | - return ""; |
2260 | - } |
2261 | - |
2262 | - Connections { |
2263 | - target: d.enableValueConnection ? slider : null |
2264 | - onValueChanged: { |
2265 | - menuItem.changeState(slider.value); |
2266 | - } |
2267 | - } |
2268 | - } |
2269 | - |
2270 | - Image { |
2271 | - id: rightImage |
2272 | - visible: status === Image.Ready |
2273 | - anchors.right: row.right |
2274 | - anchors.verticalCenter: row.verticalCenter |
2275 | - height: units.gu(4) |
2276 | - width: height |
2277 | - } |
2278 | - } |
2279 | -} |
2280 | |
2281 | === removed file 'plugins/Unity/Indicators/qml/StandardMenuItem.qml' |
2282 | --- plugins/Unity/Indicators/qml/StandardMenuItem.qml 2013-08-21 21:00:17 +0000 |
2283 | +++ plugins/Unity/Indicators/qml/StandardMenuItem.qml 1970-01-01 00:00:00 +0000 |
2284 | @@ -1,71 +0,0 @@ |
2285 | -/* |
2286 | - * Copyright 2013 Canonical Ltd. |
2287 | - * |
2288 | - * This program is free software; you can redistribute it and/or modify |
2289 | - * it under the terms of the GNU Lesser General Public License as published by |
2290 | - * the Free Software Foundation; version 3. |
2291 | - * |
2292 | - * This program is distributed in the hope that it will be useful, |
2293 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2294 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2295 | - * GNU Lesser General Public License for more details. |
2296 | - * |
2297 | - * You should have received a copy of the GNU Lesser General Public License |
2298 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2299 | - * |
2300 | - * Authors: |
2301 | - * Nick Dedekind <nick.dedekind@canonical.com> |
2302 | - */ |
2303 | - |
2304 | -import QtQuick 2.0 |
2305 | -import Ubuntu.Components 0.1 as Components |
2306 | -import Unity.Indicators 0.1 as Indicators |
2307 | - |
2308 | -FramedMenuItem { |
2309 | - id: menuItem |
2310 | - |
2311 | - property bool checkable: false |
2312 | - property bool checked: false |
2313 | - |
2314 | - signal activate() |
2315 | - |
2316 | - // FIXME : need a radio button from sdk |
2317 | - // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1211866 |
2318 | - onCheckableChanged: { |
2319 | - if (checkable) { |
2320 | - icon = checkComponent.createObject(menuItem); |
2321 | - } |
2322 | - } |
2323 | - |
2324 | - onCheckedChanged: { |
2325 | - // Can't rely on binding. Checked is assigned on click. |
2326 | - if (icon) { |
2327 | - icon.checked = checked; |
2328 | - } |
2329 | - } |
2330 | - |
2331 | - onClicked: { |
2332 | - if (checkable && icon) { |
2333 | - icon.clicked(); |
2334 | - } else { |
2335 | - menuItem.activate(); |
2336 | - } |
2337 | - } |
2338 | - |
2339 | - property var checkComponent: Component { |
2340 | - Components.CheckBox { |
2341 | - anchors.verticalCenter: parent.verticalCenter |
2342 | - anchors.left: parent.left |
2343 | - |
2344 | - Component.onCompleted: { |
2345 | - checked = menuItem.checked; |
2346 | - } |
2347 | - |
2348 | - // FIXME : should use Checkbox.toggled signal |
2349 | - // lp:~nick-dedekind/ubuntu-ui-toolkit/checkbox.toggled |
2350 | - onClicked: { |
2351 | - menuItem.activate(); |
2352 | - } |
2353 | - } |
2354 | - } |
2355 | -} |
2356 | |
2357 | === removed file 'plugins/Unity/Indicators/qml/SwitchMenuItem.qml' |
2358 | --- plugins/Unity/Indicators/qml/SwitchMenuItem.qml 2013-08-21 21:00:17 +0000 |
2359 | +++ plugins/Unity/Indicators/qml/SwitchMenuItem.qml 1970-01-01 00:00:00 +0000 |
2360 | @@ -1,53 +0,0 @@ |
2361 | -/* |
2362 | - * Copyright 2013 Canonical Ltd. |
2363 | - * |
2364 | - * This program is free software; you can redistribute it and/or modify |
2365 | - * it under the terms of the GNU Lesser General Public License as published by |
2366 | - * the Free Software Foundation; version 3. |
2367 | - * |
2368 | - * This program is distributed in the hope that it will be useful, |
2369 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2370 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2371 | - * GNU Lesser General Public License for more details. |
2372 | - * |
2373 | - * You should have received a copy of the GNU Lesser General Public License |
2374 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2375 | - * |
2376 | - * Authors: |
2377 | - * Renato Araujo Oliveira Filho <renato@canonical.com> |
2378 | - * Nick Dedekind <nick.dedekind@canonical.com> |
2379 | - */ |
2380 | - |
2381 | -import QtQuick 2.0 |
2382 | -import Ubuntu.Components 0.1 |
2383 | -import Unity.Indicators 0.1 as Indicators |
2384 | - |
2385 | -FramedMenuItem { |
2386 | - id: menuItem |
2387 | - |
2388 | - property bool checked: false |
2389 | - |
2390 | - signal activate() |
2391 | - |
2392 | - onCheckedChanged: { |
2393 | - // Can't rely on binding. Checked is assigned on click. |
2394 | - switcher.checked = checked; |
2395 | - } |
2396 | - |
2397 | - control: Switch { |
2398 | - id: switcher |
2399 | - |
2400 | - Component.onCompleted: { |
2401 | - checked = menuItem.checked; |
2402 | - } |
2403 | - |
2404 | - anchors.verticalCenter: parent.verticalCenter |
2405 | - anchors.right: parent.right |
2406 | - |
2407 | - // FIXME : should use Checkbox.toggled signal |
2408 | - // lp:~nick-dedekind/ubuntu-ui-toolkit/checkbox.toggled |
2409 | - onClicked: { |
2410 | - menuItem.activate(); |
2411 | - } |
2412 | - } |
2413 | -} |
2414 | |
2415 | === modified file 'plugins/Unity/Indicators/qml/qmldir' |
2416 | --- plugins/Unity/Indicators/qml/qmldir 2013-12-12 09:55:17 +0000 |
2417 | +++ plugins/Unity/Indicators/qml/qmldir 2014-01-29 14:36:17 +0000 |
2418 | @@ -2,20 +2,9 @@ |
2419 | plugin IndicatorsQml |
2420 | typeinfo plugin.qmltypes |
2421 | |
2422 | -BaseMenuItem 0.1 BaseMenuItem.qml |
2423 | -ButtonMenuItem 0.1 ButtonMenuItem.qml |
2424 | CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml |
2425 | -DivMenuItem 0.1 DivMenuItem.qml |
2426 | -FramedMenuItem 0.1 FramedMenuItem.qml |
2427 | -HLine 0.1 HLine.qml |
2428 | IndicatorBase 0.1 IndicatorBase.qml |
2429 | -MenuActionBinding 0.1 MenuActionBinding.qml |
2430 | MenuItemFactory 0.1 MenuItemFactory.qml |
2431 | -ProgressMenuItem 0.1 ProgressMenuItem.qml |
2432 | -SectionMenuItem 0.1 SectionMenuItem.qml |
2433 | -SliderMenuItem 0.1 SliderMenuItem.qml |
2434 | -StandardMenuItem 0.1 StandardMenuItem.qml |
2435 | -SwitchMenuItem 0.1 SwitchMenuItem.qml |
2436 | - |
2437 | +MessageMenuItemFactory 0.1 MessageMenuItemFactory.qml |
2438 | |
2439 | internal RemoveBackground RemoveBackground.qml |
2440 | |
2441 | === removed file 'plugins/Unity/Indicators/resources/artwork/messaging/message_sms01_54px.png' |
2442 | Binary files plugins/Unity/Indicators/resources/artwork/messaging/message_sms01_54px.png 2013-06-07 12:51:15 +0000 and plugins/Unity/Indicators/resources/artwork/messaging/message_sms01_54px.png 1970-01-01 00:00:00 +0000 differ |
2443 | === removed directory 'plugins/Unity/Indicators/resources/artwork/network' |
2444 | === removed file 'plugins/Unity/Indicators/resources/artwork/network/secure.svg' |
2445 | --- plugins/Unity/Indicators/resources/artwork/network/secure.svg 2013-09-02 10:59:11 +0000 |
2446 | +++ plugins/Unity/Indicators/resources/artwork/network/secure.svg 1970-01-01 00:00:00 +0000 |
2447 | @@ -1,71 +0,0 @@ |
2448 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2449 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> |
2450 | - |
2451 | -<svg |
2452 | - xmlns:dc="http://purl.org/dc/elements/1.1/" |
2453 | - xmlns:cc="http://creativecommons.org/ns#" |
2454 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
2455 | - xmlns:svg="http://www.w3.org/2000/svg" |
2456 | - xmlns="http://www.w3.org/2000/svg" |
2457 | - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
2458 | - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
2459 | - width="64" |
2460 | - height="64" |
2461 | - id="svg2986" |
2462 | - version="1.1" |
2463 | - inkscape:version="0.48.4 r9939" |
2464 | - sodipodi:docname="secure.svg"> |
2465 | - <defs |
2466 | - id="defs2988" /> |
2467 | - <sodipodi:namedview |
2468 | - id="base" |
2469 | - pagecolor="#ffffff" |
2470 | - bordercolor="#666666" |
2471 | - borderopacity="1.0" |
2472 | - inkscape:pageopacity="0.0" |
2473 | - inkscape:pageshadow="2" |
2474 | - inkscape:zoom="7.9180415" |
2475 | - inkscape:cx="7.5048745" |
2476 | - inkscape:cy="29.401628" |
2477 | - inkscape:current-layer="layer1" |
2478 | - showgrid="true" |
2479 | - inkscape:grid-bbox="true" |
2480 | - inkscape:document-units="px" |
2481 | - inkscape:snap-grids="false" |
2482 | - inkscape:window-width="1549" |
2483 | - inkscape:window-height="876" |
2484 | - inkscape:window-x="51" |
2485 | - inkscape:window-y="24" |
2486 | - inkscape:window-maximized="1"> |
2487 | - <inkscape:grid |
2488 | - type="xygrid" |
2489 | - id="grid3012" |
2490 | - empspacing="5" |
2491 | - visible="true" |
2492 | - enabled="true" |
2493 | - snapvisiblegridlinesonly="true" /> |
2494 | - </sodipodi:namedview> |
2495 | - <metadata |
2496 | - id="metadata2991"> |
2497 | - <rdf:RDF> |
2498 | - <cc:Work |
2499 | - rdf:about=""> |
2500 | - <dc:format>image/svg+xml</dc:format> |
2501 | - <dc:type |
2502 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
2503 | - <dc:title /> |
2504 | - </cc:Work> |
2505 | - </rdf:RDF> |
2506 | - </metadata> |
2507 | - <g |
2508 | - id="layer1" |
2509 | - inkscape:label="Layer 1" |
2510 | - inkscape:groupmode="layer" |
2511 | - transform="translate(0,32)"> |
2512 | - <path |
2513 | - inkscape:connector-curvature="0" |
2514 | - d="M 29.999999,-18 C 25.568001,-18 22,-14.432 22,-10 v 6 h -2 c -1.107999,0 -2,0.892 -2,2 v 18 c 0,1.108 0.892001,2 2,2 h 24 c 1.108,0 2,-0.892 2,-2 V -2 c 0,-1.108 -0.892,-2 -2,-2 h -2 v -6 c 0,-4.432 -3.568001,-8 -8.000001,-8 h -4 z m 0,4 h 4 c 2.216,0 4,1.784 4,4 v 6 H 26.000001 v -6 c 0,-2.216 1.784,-4 3.999998,-4 z" |
2515 | - style="fill:#dfdbd2;fill-rule:evenodd" |
2516 | - id="path8" /> |
2517 | - </g> |
2518 | -</svg> |
2519 | |
2520 | === modified file 'plugins/Unity/Indicators/resources/indicators.qrc' |
2521 | --- plugins/Unity/Indicators/resources/indicators.qrc 2013-09-09 09:23:15 +0000 |
2522 | +++ plugins/Unity/Indicators/resources/indicators.qrc 2014-01-29 14:36:17 +0000 |
2523 | @@ -1,8 +1,6 @@ |
2524 | <RCC> |
2525 | <qresource prefix="/indicators"> |
2526 | - <file>artwork/network/secure.svg</file> |
2527 | <file>artwork/messaging/default_contact.png</file> |
2528 | <file>artwork/messaging/default_app.svg</file> |
2529 | - <file>artwork/messaging/message_sms01_54px.png</file> |
2530 | </qresource> |
2531 | </RCC> |
2532 | |
2533 | === modified file 'qml/Panel/Indicators/DefaultIndicatorPage.qml' |
2534 | --- qml/Panel/Indicators/DefaultIndicatorPage.qml 2013-12-13 11:18:25 +0000 |
2535 | +++ qml/Panel/Indicators/DefaultIndicatorPage.qml 2014-01-29 14:36:17 +0000 |
2536 | @@ -138,10 +138,14 @@ |
2537 | sourceComponent: factory.load(model) |
2538 | |
2539 | onLoaded: { |
2540 | + if (item.hasOwnProperty("selected")) { |
2541 | + item.selected = mainMenu.selectedIndex == index; |
2542 | + } |
2543 | if (item.hasOwnProperty("menuSelected")) { |
2544 | - item.menuSelected = mainMenu.selectedIndex == index; |
2545 | - item.selectMenu.connect(function() { mainMenu.selectedIndex = index; }); |
2546 | - item.deselectMenu.connect(function() { mainMenu.selectedIndex = -1; }); |
2547 | + item.menuSelected.connect(function() { mainMenu.selectedIndex = index; }); |
2548 | + } |
2549 | + if (item.hasOwnProperty("menuDeselected")) { |
2550 | + item.menuDeselected.connect(function() { mainMenu.selectedIndex = -1; }); |
2551 | } |
2552 | if (item.hasOwnProperty("menuData")) { |
2553 | item.menuData = Qt.binding(function() { return model; }); |
2554 | @@ -162,8 +166,8 @@ |
2555 | Connections { |
2556 | target: mainMenu |
2557 | onSelectedIndexChanged: { |
2558 | - if (loader.item && loader.item.hasOwnProperty("menuSelected")) { |
2559 | - loader.item.menuSelected = mainMenu.selectedIndex == index; |
2560 | + if (loader.item && loader.item.hasOwnProperty("selected")) { |
2561 | + loader.item.selected = mainMenu.selectedIndex == index; |
2562 | } |
2563 | } |
2564 | } |
2565 | |
2566 | === modified file 'qml/Panel/Indicators/client/IndicatorsList.qml' |
2567 | --- qml/Panel/Indicators/client/IndicatorsList.qml 2013-10-11 08:21:59 +0000 |
2568 | +++ qml/Panel/Indicators/client/IndicatorsList.qml 2014-01-29 14:36:17 +0000 |
2569 | @@ -40,24 +40,25 @@ |
2570 | anchors.fill: parent |
2571 | model: indicatorsModel |
2572 | |
2573 | - delegate: Indicators.FramedMenuItem { |
2574 | + delegate: Rectangle { |
2575 | + color: "#221e1c" |
2576 | + |
2577 | anchors.left: parent.left |
2578 | anchors.right: parent.right |
2579 | - objectName: identifier |
2580 | - |
2581 | - text: identifier |
2582 | - |
2583 | - onClicked: { |
2584 | - var new_page = Qt.createComponent("IndicatorsPage.qml"); |
2585 | - page.pageStack.push(new_page.createObject(pages), {"indicatorProperties" : model.indicatorProperties, "pageSource" : model.pageSource}); |
2586 | - } |
2587 | - |
2588 | - Rectangle { |
2589 | - id: background |
2590 | - |
2591 | - anchors.fill: parent |
2592 | - color: "#221e1c" |
2593 | - z: -1 |
2594 | + height: menuItem.height |
2595 | + |
2596 | + ListItem.Standard { |
2597 | + id: menuItem |
2598 | + anchors.left: parent.left |
2599 | + anchors.right: parent.right |
2600 | + objectName: identifier |
2601 | + |
2602 | + text: identifier |
2603 | + |
2604 | + onClicked: { |
2605 | + var new_page = Qt.createComponent("IndicatorsPage.qml"); |
2606 | + page.pageStack.push(new_page.createObject(pages), {"indicatorProperties" : model.indicatorProperties, "pageSource" : model.pageSource}); |
2607 | + } |
2608 | } |
2609 | } |
2610 | } |
2611 | |
2612 | === modified file 'tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml' |
2613 | --- tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml 2014-01-06 16:18:08 +0000 |
2614 | +++ tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml 2014-01-29 14:36:17 +0000 |
2615 | @@ -129,14 +129,10 @@ |
2616 | function test_reloadData() { |
2617 | var mainMenu = findChild(page, "mainMenu"); |
2618 | |
2619 | - console.log("setting empty data"); |
2620 | page.menuModel.modelData = []; |
2621 | tryCompare(mainMenu, "count", 0); |
2622 | - console.log("set empty data"); |
2623 | |
2624 | - console.log("setting full data"); |
2625 | page.menuModel.modelData = fullMenuData; |
2626 | - console.log("set full data"); |
2627 | tryCompare(mainMenu, "count", 3); |
2628 | |
2629 | page.menuModel.modelData = []; |
2630 | |
2631 | === modified file 'tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml' |
2632 | --- tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml 2014-01-06 10:41:54 +0000 |
2633 | +++ tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml 2014-01-29 14:36:17 +0000 |
2634 | @@ -84,11 +84,13 @@ |
2635 | { tag: 'switch1', type: "unity.widgets.systemsettings.tablet.switch", objectName: "switchMenu" }, |
2636 | |
2637 | { tag: 'button', type: "com.canonical.indicator.button", objectName: "buttonMenu" }, |
2638 | - { tag: 'separator', type: "com.canonical.indicator.div", objectName: "divMenu" }, |
2639 | + { tag: 'separator', type: "com.canonical.indicator.div", objectName: "separatorMenu" }, |
2640 | { tag: 'section', type: "com.canonical.indicator.section", objectName: "sectionMenu" }, |
2641 | { tag: 'progress', type: "com.canonical.indicator.progress", objectName: "progressMenu" }, |
2642 | { tag: 'slider1', type: "com.canonical.indicator.slider", objectName: "sliderMenu" }, |
2643 | { tag: 'switch2', type: "com.canonical.indicator.switch", objectName: "switchMenu" }, |
2644 | + { tag: 'alarm', type: "com.canonical.indicator.alarm", objectName: "alarmMenu" }, |
2645 | + { tag: 'appointment', type: "com.canonical.indicator.appointment", objectName: "appointmentMenu" }, |
2646 | |
2647 | { tag: 'messageItem', type: "com.canonical.indicator.messages.messageitem", objectName: "messageItem" }, |
2648 | { tag: 'sourceItem', type: "com.canonical.indicator.messages.sourceitem", objectName: "groupedMessage" }, |
2649 | @@ -96,8 +98,8 @@ |
2650 | { tag: 'slider2', type: "com.canonical.unity.slider", objectName: "sliderMenu" }, |
2651 | { tag: 'switch3', type: "com.canonical.unity.switch", objectName: "switchMenu" }, |
2652 | |
2653 | - { tag: 'mediaplayer', type: "com.canonical.unity.media-player", objectName: "standardMenu" }, |
2654 | - { tag: 'playbackitem', type: "com.canonical.unity.playback-item", objectName: "standardMenu" }, |
2655 | + { tag: 'mediaplayer', type: "com.canonical.unity.media-player", objectName: "mediaPayerMenu" }, |
2656 | + { tag: 'playbackitem', type: "com.canonical.unity.playback-item", objectName: "playbackItemMenu" }, |
2657 | |
2658 | { tag: 'wifisection', type: "unity.widgets.systemsettings.tablet.wifisection", objectName: "wifiSection" }, |
2659 | { tag: 'accesspoint', type: "unity.widgets.systemsettings.tablet.accesspoint", objectName: "accessPoint" }, |
2660 | @@ -115,6 +117,16 @@ |
2661 | compare(loader.item.objectName, data.objectName, "Created object name does not match intended object (" + loader.item.objectName + " != " + data.objectName + ")"); |
2662 | } |
2663 | |
2664 | + function test_create_checkable() { |
2665 | + var tmpData = menuData; |
2666 | + tmpData.isCheck = true; |
2667 | + |
2668 | + loader.data = tmpData; |
2669 | + loader.sourceComponent = factory.load(tmpData); |
2670 | + tryCompareFunction(function() { return loader.item != undefined; }, true); |
2671 | + compare(loader.item.objectName, "checkableMenu", "Should have created a checkable menu"); |
2672 | + } |
2673 | + |
2674 | function test_create_radio() { |
2675 | skip("No radio component"); |
2676 | menuData.isRadio = true; |
2677 | @@ -131,7 +143,7 @@ |
2678 | loader.data = menuData; |
2679 | loader.sourceComponent = factory.load(menuData); |
2680 | tryCompareFunction(function() { return loader.item != undefined; }, true); |
2681 | - compare(loader.item.objectName, "divMenu", "Should have created a separator menu"); |
2682 | + compare(loader.item.objectName, "separatorMenu", "Should have created a separator menu"); |
2683 | } |
2684 | |
2685 | function test_create_sliderMenu_data() { |
2686 | @@ -145,13 +157,13 @@ |
2687 | menuData.type = "com.canonical.indicator.slider" |
2688 | menuData.label = data.label; |
2689 | menuData.sensitive = data.enabled; |
2690 | - menuData.actionState = data.value; |
2691 | menuData.ext = { |
2692 | 'minIcon': "file:///testMinIcon", |
2693 | 'maxIcon': "file:///testMaxIcon", |
2694 | 'minValue': data.minValue, |
2695 | 'maxValue': data.maxValue |
2696 | }; |
2697 | + menuData.actionState = data.value; |
2698 | |
2699 | loader.data = menuData; |
2700 | loader.sourceComponent = factory.load(menuData); |
2701 | @@ -163,7 +175,7 @@ |
2702 | compare(loader.item.maxIcon, "file:///testMaxIcon", "MaxIcon does not match data"); |
2703 | compare(loader.item.minimumValue, data.minValue, "MinValue does not match data"); |
2704 | compare(loader.item.maximumValue, data.maxValue, "MaxValue does not match data"); |
2705 | - compare(loader.item.value, data.value, "Calue does not match data"); |
2706 | + compare(loader.item.value, data.value, "Value does not match data"); |
2707 | compare(loader.item.enabled, data.enabled, "Enabled does not match data"); |
2708 | } |
2709 | |
2710 | @@ -232,7 +244,7 @@ |
2711 | |
2712 | function test_create_standardMenu_data() { |
2713 | return [ |
2714 | - {label: "testLabel1", enabled: true, icon: "file:///testIcon" }, |
2715 | + {label: "testLabel1", enabled: true, icon: "file:///testIcon1" }, |
2716 | {label: "testLabel2", enabled: false, icon: "file:///testIcon2"}, |
2717 | ]; |
2718 | } |
2719 | @@ -253,31 +265,101 @@ |
2720 | compare(loader.item.enabled, data.enabled, "Enabled does not match data"); |
2721 | } |
2722 | |
2723 | - function test_create_switchMenu_data() { |
2724 | + function test_create_checkableMenu_data() { |
2725 | return [ |
2726 | {label: "testLabel1", enabled: true, checked: false }, |
2727 | {label: "testLabel2", enabled: false, checked: true }, |
2728 | ]; |
2729 | } |
2730 | |
2731 | + function test_create_checkableMenu(data) { |
2732 | + menuData.type = ""; |
2733 | + menuData.label = data.label; |
2734 | + menuData.sensitive = data.enabled; |
2735 | + menuData.isCheck = true; |
2736 | + menuData.isToggled = data.checked; |
2737 | + |
2738 | + loader.data = menuData; |
2739 | + loader.sourceComponent = factory.load(menuData); |
2740 | + tryCompareFunction(function() { return loader.item != undefined; }, true); |
2741 | + compare(loader.item.objectName, "checkableMenu", "Should have created a checkable menu"); |
2742 | + |
2743 | + compare(loader.item.text, data.label, "Label does not match data"); |
2744 | + compare(loader.item.checked, data.checked, "Checked does not match data"); |
2745 | + compare(loader.item.enabled, data.enabled, "Enabled does not match data"); |
2746 | + } |
2747 | + |
2748 | + function test_create_switchMenu_data() { |
2749 | + return [ |
2750 | + {label: "testLabel1", enabled: true, checked: false, icon: "file:///testIcon1" }, |
2751 | + {label: "testLabel2", enabled: false, checked: true, icon: "file:///testIcon2" }, |
2752 | + ]; |
2753 | + } |
2754 | + |
2755 | function test_create_switchMenu(data) { |
2756 | menuData.type = "com.canonical.indicator.switch"; |
2757 | menuData.label = data.label; |
2758 | menuData.sensitive = data.enabled; |
2759 | - menuData.icon = "file:///testIcon"; |
2760 | + menuData.icon = data.icon; |
2761 | menuData.isToggled = data.checked; |
2762 | |
2763 | loader.data = menuData; |
2764 | loader.sourceComponent = factory.load(menuData); |
2765 | tryCompareFunction(function() { return loader.item != undefined; }, true); |
2766 | - compare(loader.item.objectName, "switchMenu", "Should have created a standard menu"); |
2767 | + compare(loader.item.objectName, "switchMenu", "Should have created a switch menu"); |
2768 | |
2769 | compare(loader.item.text, data.label, "Label does not match data"); |
2770 | - compare(loader.item.icon, "file:///testIcon", "MaxIcon does not match data"); |
2771 | + compare(loader.item.iconSource, data.icon, "Icon does not match data"); |
2772 | compare(loader.item.checked, data.checked, "Checked does not match data"); |
2773 | compare(loader.item.enabled, data.enabled, "Enabled does not match data"); |
2774 | } |
2775 | |
2776 | + function test_create_alarmMenu_data() { |
2777 | + return [ |
2778 | + {label: "testLabel1", enabled: true, icon: "file:///testIcon1" }, |
2779 | + {label: "testLabel2", enabled: false, icon: "file:///testIcon2" }, |
2780 | + ]; |
2781 | + } |
2782 | + |
2783 | + function test_create_alarmMenu(data) { |
2784 | + menuData.type = "com.canonical.indicator.alarm"; |
2785 | + menuData.label = data.label; |
2786 | + menuData.sensitive = data.enabled; |
2787 | + menuData.icon = data.icon; |
2788 | + |
2789 | + loader.data = menuData; |
2790 | + loader.sourceComponent = factory.load(menuData); |
2791 | + tryCompareFunction(function() { return loader.item != undefined; }, true); |
2792 | + compare(loader.item.objectName, "alarmMenu", "Should have created a alarm menu"); |
2793 | + |
2794 | + compare(loader.item.text, data.label, "Label does not match data"); |
2795 | + compare(loader.item.iconSource, data.icon, "Icon does not match data"); |
2796 | + compare(loader.item.enabled, data.enabled, "Enabled does not match data"); |
2797 | + } |
2798 | + |
2799 | + function test_create_appointmentMenu_data() { |
2800 | + return [ |
2801 | + {label: "testLabel1", enabled: true, icon: "file:///testIcon1" }, |
2802 | + {label: "testLabel2", enabled: false, icon: "file:///testIcon2" }, |
2803 | + ]; |
2804 | + } |
2805 | + |
2806 | + function test_create_appointmentMenu(data) { |
2807 | + menuData.type = "com.canonical.indicator.appointment"; |
2808 | + menuData.label = data.label; |
2809 | + menuData.sensitive = data.enabled; |
2810 | + menuData.icon = data.icon; |
2811 | + |
2812 | + loader.data = menuData; |
2813 | + loader.sourceComponent = factory.load(menuData); |
2814 | + tryCompareFunction(function() { return loader.item != undefined; }, true); |
2815 | + compare(loader.item.objectName, "appointmentMenu", "Should have created a appointment menu"); |
2816 | + |
2817 | + compare(loader.item.text, data.label, "Label does not match data"); |
2818 | + compare(loader.item.iconSource, data.icon, "Icon does not match data"); |
2819 | + compare(loader.item.enabled, data.enabled, "Enabled does not match data"); |
2820 | + } |
2821 | + |
2822 | function test_create_wifiSection_data() { |
2823 | return [ |
2824 | {label: "testLabel1", busy: false }, |
2825 | @@ -322,7 +404,7 @@ |
2826 | tryCompareFunction(function() { return loader.item != undefined; }, true); |
2827 | compare(loader.item.objectName, "accessPoint", "Should have created a access point menu"); |
2828 | |
2829 | - compare(loader.item.label, data.label, "Label does not match data"); |
2830 | + compare(loader.item.text, data.label, "Label does not match data"); |
2831 | compare(loader.item.strengthAction.name, "action::strength", "Strength action incorrect"); |
2832 | compare(loader.item.secure, data.secure, "Secure does not match data"); |
2833 | compare(loader.item.adHoc, data.adHoc, "AdHoc does not match data"); |
2834 | @@ -341,8 +423,8 @@ |
2835 | |
2836 | function test_create_groupedMessage_data() { |
2837 | return [ |
2838 | - {label: "testLabel1", enabled: true, count: "5", appIcon: "file:///testIcon" }, |
2839 | - {label: "testLabel2", enabled: false, count: "10", appIcon: "file:///testIcon2" }, |
2840 | + {label: "testLabel1", enabled: true, count: "5", icon: "file:///testIcon" }, |
2841 | + {label: "testLabel2", enabled: false, count: "10", icon: "file:///testIcon2" }, |
2842 | ]; |
2843 | } |
2844 | |
2845 | @@ -350,8 +432,8 @@ |
2846 | menuData.type = "com.canonical.indicator.messages.sourceitem"; |
2847 | menuData.label = data.label; |
2848 | menuData.sensitive = data.enabled; |
2849 | - menuData.icon = data.appIcon; |
2850 | - menuData.ext = { 'icon': data.appIcon }; |
2851 | + menuData.icon = data.icon; |
2852 | + menuData.ext = { 'icon': data.icon }; |
2853 | menuData.actionState = [data.count]; |
2854 | menuData.isToggled = true; |
2855 | |
2856 | @@ -360,9 +442,103 @@ |
2857 | tryCompareFunction(function() { return loader.item != undefined; }, true); |
2858 | compare(loader.item.objectName, "groupedMessage", "Should have created a group message menu"); |
2859 | |
2860 | - compare(loader.item.title, data.label, "Label does not match data"); |
2861 | + compare(loader.item.text, data.label, "Label does not match data"); |
2862 | compare(loader.item.count, data.count, "Count does not match data"); |
2863 | - compare(loader.item.appIcon, data.appIcon, "App Icon does not match data"); |
2864 | + compare(loader.item.iconSource, data.icon, "Icon does not match data"); |
2865 | + compare(loader.item.enabled, data.enabled, "Enabled does not match data"); |
2866 | + } |
2867 | + |
2868 | + function test_create_mediaPayerMenu_data() { |
2869 | + return [{ |
2870 | + label: "player1", |
2871 | + icon: "file:://icon1", |
2872 | + albumArt: "file:://art1", |
2873 | + song: "song1", |
2874 | + artist: "artist1", |
2875 | + album: "album1", |
2876 | + running: true, |
2877 | + state: "Playing", |
2878 | + enabled: true |
2879 | + },{ |
2880 | + label: "player2", |
2881 | + icon: "file:://icon2", |
2882 | + albumArt: "file:://art2", |
2883 | + song: "song2", |
2884 | + artist: "artist2", |
2885 | + album: "album2", |
2886 | + running: false, |
2887 | + state: "Paused", |
2888 | + enabled: false |
2889 | + } |
2890 | + ]; |
2891 | + } |
2892 | + |
2893 | + function test_create_mediaPayerMenu(data) { |
2894 | + menuData.type = "com.canonical.unity.media-player"; |
2895 | + menuData.label = data.label; |
2896 | + menuData.sensitive = data.enabled; |
2897 | + menuData.icon = data.icon; |
2898 | + menuData.actionState = { |
2899 | + 'art-url': data.albumArt, |
2900 | + 'title': data.song, |
2901 | + 'artist': data.artist, |
2902 | + 'album': data.album, |
2903 | + 'running': data.running, |
2904 | + 'state': data.state, |
2905 | + }; |
2906 | + |
2907 | + loader.data = menuData; |
2908 | + loader.sourceComponent = factory.load(menuData); |
2909 | + tryCompareFunction(function() { return loader.item != undefined; }, true); |
2910 | + compare(loader.item.objectName, "mediaPayerMenu", "Should have created a media player menu"); |
2911 | + |
2912 | + compare(loader.item.playerIcon, data.icon, "Album art does not match data"); |
2913 | + compare(loader.item.playerName, data.label, "Album art does not match data"); |
2914 | + compare(loader.item.albumArt, data.albumArt, "Album art does not match data"); |
2915 | + compare(loader.item.song, data.song, "Song does not match data"); |
2916 | + compare(loader.item.artist, data.artist, "Artist does not match data"); |
2917 | + compare(loader.item.album, data.album, "Album does not match data"); |
2918 | + compare(loader.item.running, data.running, "Running does not match data"); |
2919 | + compare(loader.item.state, data.state, "State does not match data"); |
2920 | + compare(loader.item.enabled, data.enabled, "Enabled does not match data"); |
2921 | + } |
2922 | + |
2923 | + function test_create_playbackItemMenu_data() { |
2924 | + return [{ |
2925 | + playAction: "action::play", |
2926 | + nextAction: "action::next", |
2927 | + previousAction: "action::previous", |
2928 | + enabled: true |
2929 | + },{ |
2930 | + playAction: "action::play2", |
2931 | + nextAction: "action::next2", |
2932 | + previousAction: "action::previous2", |
2933 | + enabled: false |
2934 | + } |
2935 | + ]; |
2936 | + } |
2937 | + |
2938 | + function test_create_playbackItemMenu(data) { |
2939 | + menuData.type = "com.canonical.unity.playback-item"; |
2940 | + menuData.sensitive = data.enabled; |
2941 | + menuData.ext = { |
2942 | + 'xCanonicalPlayAction': data.playAction, |
2943 | + 'xCanonicalNextAction': data.nextAction, |
2944 | + 'xCanonicalPreviousAction': data.previousAction |
2945 | + }; |
2946 | + |
2947 | + loader.data = menuData; |
2948 | + loader.sourceComponent = factory.load(menuData); |
2949 | + tryCompareFunction(function() { return loader.item != undefined; }, true); |
2950 | + compare(loader.item.objectName, "playbackItemMenu", "Should have created a playback menu"); |
2951 | + |
2952 | + compare(loader.item.playing, false, "Playing does not match data"); |
2953 | + compare(loader.item.playAction.name, data.playAction, "Play action incorrect"); |
2954 | + compare(loader.item.nextAction.name, data.nextAction, "Next action incorrect"); |
2955 | + compare(loader.item.previousAction.name, data.previousAction, "Previous action incorrect"); |
2956 | + compare(loader.item.canPlay, false, "CanPlay should be false"); |
2957 | + compare(loader.item.canGoNext, false, "CanGoNext should be false"); |
2958 | + compare(loader.item.canGoPrevious, false, "CanGoPrevious should be false"); |
2959 | compare(loader.item.enabled, data.enabled, "Enabled does not match data"); |
2960 | } |
2961 | } |
2962 | |
2963 | === modified file 'tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml' |
2964 | --- tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml 2013-12-12 16:32:20 +0000 |
2965 | +++ tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml 2014-01-29 14:36:17 +0000 |
2966 | @@ -18,7 +18,8 @@ |
2967 | import QtTest 1.0 |
2968 | import Unity.Test 0.1 as UT |
2969 | import QMenuModel 0.1 |
2970 | -import Unity.Indicators.Messaging 0.1 as Indicators |
2971 | +import Unity.Indicators 0.1 as Indicators |
2972 | +import Utils 0.1 as Utils |
2973 | |
2974 | Item { |
2975 | id: testView |
2976 | @@ -31,6 +32,11 @@ |
2977 | menuIndex: 0 |
2978 | } |
2979 | |
2980 | + Utils.TimeFormatter { |
2981 | + id: timeFormatter |
2982 | + format: "hh:mm - MMM dd" |
2983 | + } |
2984 | + |
2985 | UT.UnityTestCase { |
2986 | name: "MessageMenuItemFactory" |
2987 | |
2988 | @@ -82,13 +88,14 @@ |
2989 | 'xCanonicalAppIcon': data.appIcon, |
2990 | }; |
2991 | factory.menuData = menuData; |
2992 | + timeFormatter.time = data.time; |
2993 | |
2994 | var loader = findChild(factory, "loader"); |
2995 | verify(loader !== undefined); |
2996 | |
2997 | tryCompare(loader.item, "objectName", "simpleTextMessage"); |
2998 | compare(loader.item.title, data.title, "Title does not match data"); |
2999 | - compare(loader.item.time, data.time, "Time does not match data"); |
3000 | + compare(loader.item.time, timeFormatter.timeString, "Time does not match data"); |
3001 | compare(loader.item.message, data.message, "Message does not match data"); |
3002 | compare(loader.item.avatar, data.avatar, "Avatar does not match data"); |
3003 | compare(loader.item.appIcon, data.appIcon, "App icon does not match data"); |
3004 | @@ -119,13 +126,14 @@ |
3005 | ] |
3006 | }; |
3007 | factory.menuData = menuData; |
3008 | + timeFormatter.time = data.time; |
3009 | |
3010 | var loader = findChild(factory, "loader"); |
3011 | verify(loader !== undefined); |
3012 | |
3013 | tryCompare(loader.item, "objectName", "textMessage"); |
3014 | compare(loader.item.title, data.title, "Title does not match data"); |
3015 | - compare(loader.item.time, data.time, "Time does not match data"); |
3016 | + compare(loader.item.time, timeFormatter.timeString, "Time does not match data"); |
3017 | compare(loader.item.message, data.message, "Message does not match data"); |
3018 | compare(loader.item.avatar, data.avatar, "Avatar does not match data"); |
3019 | compare(loader.item.appIcon, data.appIcon, "App icon does not match data"); |
3020 | @@ -160,13 +168,14 @@ |
3021 | ] |
3022 | }; |
3023 | factory.menuData = menuData; |
3024 | + timeFormatter.time = data.time; |
3025 | |
3026 | var loader = findChild(factory, "loader"); |
3027 | verify(loader !== undefined); |
3028 | |
3029 | tryCompare(loader.item, "objectName", "snapDecision"); |
3030 | compare(loader.item.title, data.title, "Title does not match data"); |
3031 | - compare(loader.item.time, data.time, "Time does not match data"); |
3032 | + compare(loader.item.time, timeFormatter.timeString, "Time does not match data"); |
3033 | compare(loader.item.message, data.message, "Message does not match data"); |
3034 | compare(loader.item.avatar, data.avatar, "Avatar does not match data"); |
3035 | compare(loader.item.appIcon, data.appIcon, "App icon does not match data"); |
FAILED: Continuous integration, rev:602 jenkins. qa.ubuntu. com/job/ unity8- ci/1918/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty/ 1790/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty- touch/1709/ console jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- trusty/ 705/console jenkins. qa.ubuntu. com/job/ unity8- trusty- amd64-ci/ 441/console jenkins. qa.ubuntu. com/job/ unity8- trusty- armhf-ci/ 442/console jenkins. qa.ubuntu. com/job/ unity8- trusty- i386-ci/ 441/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- amd64/1790/ console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/1709/ console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/1918/ rebuild
http://