on xenial help sign in
Merge new-header
5a2323bMichał Sawicz
debian/changelog+7
@@ -1,3 +1,10 @@
1+unity8 (7.90+14.10.20140707-0ubuntu1) utopic; urgency=low
2+
3+ [ Nick Dedekind ]
4+ * Added support for TransferMenu
5+
6+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 07 Jul 2014 11:40:59 +0000
7+
1unity8 (7.90+14.10.20140703.1-0ubuntu1) utopic; urgency=low
8unity8 (7.90+14.10.20140703.1-0ubuntu1) utopic; urgency=low
2
9
3 [ Michał Sawicz ]
10 [ Michał Sawicz ]
debian/control+5−5
@@ -39,8 +39,8 @@ Build-Depends: cmake,
39 qtdeclarative5-dev-tools,
39 qtdeclarative5-dev-tools,
40 qtdeclarative5-private-dev (>= 5.2.1),
40 qtdeclarative5-private-dev (>= 5.2.1),
41 qtdeclarative5-qtmultimedia-plugin,
41 qtdeclarative5-qtmultimedia-plugin,
42− qtdeclarative5-ubuntu-settings-components (>= 0.2),
42+ qtdeclarative5-ubuntu-settings-components (>= 0.3),
43− qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.48) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.48),
43+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.49) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.49),
44 ttf-ubuntu-font-family,
44 ttf-ubuntu-font-family,
45Standards-Version: 3.9.4
45Standards-Version: 3.9.4
46Homepage: http://launchpad.net/unity
46Homepage: http://launchpad.net/unity
@@ -53,7 +53,7 @@ Vcs-Browser: https://bazaar.launchpad.net/~unity-team/unity8/trunk
53Package: indicators-client
53Package: indicators-client
54Architecture: amd64 armhf i386
54Architecture: amd64 armhf i386
55Depends: qmenumodel-qml (>= 0.2.7),
55Depends: qmenumodel-qml (>= 0.2.7),
56− qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.48) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.48),
56+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.49) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.49),
57 unity8 (= ${binary:Version}),
57 unity8 (= ${binary:Version}),
58 ${misc:Depends},
58 ${misc:Depends},
59 ${shlibs:Depends},
59 ${shlibs:Depends},
@@ -80,7 +80,7 @@ Depends: gsettings-desktop-schemas,
80 qmenumodel-qml (>= 0.2.7),
80 qmenumodel-qml (>= 0.2.7),
81 qml-module-qtquick-xmllistmodel,
81 qml-module-qtquick-xmllistmodel,
82 qtdeclarative5-gsettings1.0,
82 qtdeclarative5-gsettings1.0,
83− qtdeclarative5-ubuntu-settings-components (>= 0.2),
83+ qtdeclarative5-ubuntu-settings-components (>= 0.3),
84 unity-launcher-impl-3,
84 unity-launcher-impl-3,
85 unity8-common (= ${source:Version}),
85 unity8-common (= ${source:Version}),
86 unity8-private (= ${binary:Version}),
86 unity8-private (= ${binary:Version}),
@@ -101,7 +101,7 @@ Description: Unity 8 shell
101Package: unity8-common
101Package: unity8-common
102Architecture: all
102Architecture: all
103Depends: qtdeclarative5-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
103Depends: qtdeclarative5-ubuntu-thumbnailer0.1 | ubuntu-thumbnailer-impl,
104− qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.48) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.48),
104+ qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.49) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 0.1.49),
105 qtdeclarative5-unity-notifications-plugin | unity-notifications-impl,
105 qtdeclarative5-unity-notifications-plugin | unity-notifications-impl,
106 ubuntu-thumbnailer-impl-0,
106 ubuntu-thumbnailer-impl-0,
107 unity-application-impl-2,
107 unity-application-impl-2,
po/ast.po+11−11
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity8\n"
8"Project-Id-Version: unity8\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-06-13 09:55+0200\n"
10"POT-Creation-Date: 2014-06-13 09:55+0200\n"
11−"PO-Revision-Date: 2014-04-04 02:16+0000\n"
11+"PO-Revision-Date: 2014-07-04 15:29+0000\n"
12−"Last-Translator: Xuacu Saturio <xuacusk8@gmail.com>\n"
12+"Last-Translator: ivarela <ivarela@ubuntu.com>\n"
13"Language-Team: Asturian <ast@li.org>\n"
13"Language-Team: Asturian <ast@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-06-17 06:51+0000\n"
17+"X-Launchpad-Export-Date: 2014-07-05 05:59+0000\n"
18−"X-Generator: Launchpad (build 17045)\n"
18+"X-Generator: Launchpad (build 17086)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -73,8 +73,8 @@ msgid ""
73"You have now mastered the edge gestures and can start using the "
73"You have now mastered the edge gestures and can start using the "
74"phone<br><br>Tap on the screen to start"
74"phone<br><br>Tap on the screen to start"
75msgstr ""
75msgstr ""
76−"Agora domina los xestos de los bordes y pue principiar a usar el "
76+"Agora yá domines los xestos de los berbesos y pues entamar a usar el "
77−"teléfonu<br><br>Toque la pantalla pa comenzar"
77+"teléfonu<br><br>Toca la pantalla pa comenzar"
78
78
79#: qml/Components/Lockscreen.qml:214
79#: qml/Components/Lockscreen.qml:214
80msgid "Emergency Call"
80msgid "Emergency Call"
@@ -82,7 +82,7 @@ msgstr "Llamada d'emerxencia"
82
82
83#: qml/Components/Lockscreen.qml:231
83#: qml/Components/Lockscreen.qml:231
84msgid "OK"
84msgid "OK"
85−msgstr ""
85+msgstr "Aceutar"
86
86
87#: qml/Components/PageHeader.qml:365
87#: qml/Components/PageHeader.qml:365
88msgid "Recent searches"
88msgid "Recent searches"
@@ -99,11 +99,11 @@ msgstr "Hola"
99
99
100#: qml/Components/PinLockscreen.qml:198
100#: qml/Components/PinLockscreen.qml:198
101msgid "CANCEL"
101msgid "CANCEL"
102−msgstr ""
102+msgstr "ENCABOXAR"
103
103
104#: qml/Components/PinLockscreen.qml:216
104#: qml/Components/PinLockscreen.qml:216
105msgid "DONE"
105msgid "DONE"
106−msgstr ""
106+msgstr "FECHO"
107
107
108#: qml/Components/SeeMore.qml:35
108#: qml/Components/SeeMore.qml:35
109msgid "See more"
109msgid "See more"
@@ -139,7 +139,7 @@ msgstr "Unviar"
139
139
140#: qml/Greeter/Greeter.qml:157
140#: qml/Greeter/Greeter.qml:157
141msgid "Swipe to unlock"
141msgid "Swipe to unlock"
142−msgstr ""
142+msgstr "Esliza pa desbloquiar"
143
143
144#: qml/Hud/HudParametrizedActionsPage.qml:132
144#: qml/Hud/HudParametrizedActionsPage.qml:132
145msgid "Confirm"
145msgid "Confirm"
@@ -167,7 +167,7 @@ msgstr "Amosar contraseña"
167
167
168#: qml/Notifications/NotificationMenuItemFactory.qml:103
168#: qml/Notifications/NotificationMenuItemFactory.qml:103
169msgid "Please enter SIM PIN"
169msgid "Please enter SIM PIN"
170−msgstr "Escriba'l PIN de la SIM"
170+msgstr "Escribi'l PIN de la SIM"
171
171
172#: qml/Panel/SearchIndicator.qml:27
172#: qml/Panel/SearchIndicator.qml:27
173msgid "Search"
173msgid "Search"
po/gl.po+10−8
@@ -8,14 +8,14 @@ msgstr ""
8"Project-Id-Version: unity\n"
8"Project-Id-Version: unity\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-06-13 09:55+0200\n"
10"POT-Creation-Date: 2014-06-13 09:55+0200\n"
11−"PO-Revision-Date: 2014-06-07 13:26+0000\n"
11+"PO-Revision-Date: 2014-07-06 15:53+0000\n"
12"Last-Translator: Marcos Lans <Unknown>\n"
12"Last-Translator: Marcos Lans <Unknown>\n"
13"Language-Team: Galician <gl@li.org>\n"
13"Language-Team: Galician <gl@li.org>\n"
14"MIME-Version: 1.0\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
16"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2014-06-17 06:51+0000\n"
17+"X-Launchpad-Export-Date: 2014-07-07 06:08+0000\n"
18−"X-Generator: Launchpad (build 17045)\n"
18+"X-Generator: Launchpad (build 17086)\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
@@ -36,7 +36,7 @@ msgstr "Bordo dereito"
36
36
37#: qml/Components/EdgeDemo.qml:114
37#: qml/Components/EdgeDemo.qml:114
38msgid "Try swiping from the right edge to unlock the phone"
38msgid "Try swiping from the right edge to unlock the phone"
39−msgstr "Probe a esvarar desde o bordo dereito para desbloquear o teléfono"
39+msgstr "Esvare o dedo desde o bordo dereito para desbloquear o teléfono"
40
40
41#: qml/Components/EdgeDemo.qml:145
41#: qml/Components/EdgeDemo.qml:145
42msgid "Top edge"
42msgid "Top edge"
@@ -44,7 +44,7 @@ msgstr "Bordo superior"
44
44
45#: qml/Components/EdgeDemo.qml:146
45#: qml/Components/EdgeDemo.qml:146
46msgid "Try swiping from the top edge to access the indicators"
46msgid "Try swiping from the top edge to access the indicators"
47−msgstr "Esvare desde o bordo superior para acceder aos indicadores."
47+msgstr "Esvare o dedo desde o bordo superior para acceder aos indicadores."
48
48
49#: qml/Components/EdgeDemo.qml:171
49#: qml/Components/EdgeDemo.qml:171
50msgid "Close"
50msgid "Close"
@@ -52,7 +52,7 @@ msgstr "Pechar"
52
52
53#: qml/Components/EdgeDemo.qml:172
53#: qml/Components/EdgeDemo.qml:172
54msgid "Swipe up again to close the settings screen"
54msgid "Swipe up again to close the settings screen"
55−msgstr "Esvare cara a arriba para pechar os axustes"
55+msgstr "Esvare o dedo cara a arriba para pechar os axustes"
56
56
57#: qml/Components/EdgeDemo.qml:199
57#: qml/Components/EdgeDemo.qml:199
58msgid "Left edge"
58msgid "Left edge"
@@ -60,7 +60,9 @@ msgstr "Bordo esquerdo"
60
60
61#: qml/Components/EdgeDemo.qml:200
61#: qml/Components/EdgeDemo.qml:200
62msgid "Swipe from the left to reveal the launcher for quick access to apps"
62msgid "Swipe from the left to reveal the launcher for quick access to apps"
63+msgstr ""
63−msgstr "Esvare desde a esquerda para mostrar o iniciador de acceso rápido"
64+"Esvare o dedo desde a esquerda para mostrar o iniciador rápido aos "
65+"aplicativos"
64
66
65#: qml/Components/EdgeDemo.qml:227
67#: qml/Components/EdgeDemo.qml:227
66msgid "Well done"
68msgid "Well done"
@@ -137,7 +139,7 @@ msgstr "Enviar"
137
139
138#: qml/Greeter/Greeter.qml:157
140#: qml/Greeter/Greeter.qml:157
139msgid "Swipe to unlock"
141msgid "Swipe to unlock"
140−msgstr "Esvare para desbloquear"
142+msgstr "Esvare o dedo para desbloquear"
141
143
142#: qml/Hud/HudParametrizedActionsPage.qml:132
144#: qml/Hud/HudParametrizedActionsPage.qml:132
143msgid "Confirm"
145msgid "Confirm"
po/unity8.pot+30−6
@@ -8,22 +8,22 @@ msgid ""
8msgstr ""
8msgstr ""
9"Project-Id-Version: unity8\n"
9"Project-Id-Version: unity8\n"
10"Report-Msgid-Bugs-To: \n"
10"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2014-06-13 09:55+0200\n"
11+"POT-Creation-Date: 2014-07-07 12:15+0100\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
15"Language: \n"
15"Language: \n"
16"MIME-Version: 1.0\n"
16"MIME-Version: 1.0\n"
17−"Content-Type: text/plain; charset=CHARSET\n"
17+"Content-Type: text/plain; charset=UTF-8\n"
18"Content-Transfer-Encoding: 8bit\n"
18"Content-Transfer-Encoding: 8bit\n"
19
19
20#: plugins/Unity/Launcher/launcheritem.cpp:43
20#: plugins/Unity/Launcher/launcheritem.cpp:43
21#: plugins/Unity/Launcher/launcheritem.cpp:73
21#: plugins/Unity/Launcher/launcheritem.cpp:73
22−msgid "Lock to Launcher"
22+msgid "Pin shortcut"
23msgstr ""
23msgstr ""
24
24
25#: plugins/Unity/Launcher/launcheritem.cpp:73
25#: plugins/Unity/Launcher/launcheritem.cpp:73
26−msgid "Unlock from Launcher"
26+msgid "Unpin shortcut"
27msgstr ""
27msgstr ""
28
28
29#: qml/Components/EdgeDemoOverlay.qml:151
29#: qml/Components/EdgeDemoOverlay.qml:151
@@ -80,7 +80,7 @@ msgstr ""
80msgid "OK"
80msgid "OK"
81msgstr ""
81msgstr ""
82
82
83−#: qml/Components/PageHeader.qml:365
83+#: qml/Components/PageHeader.qml:366
84msgid "Recent searches"
84msgid "Recent searches"
85msgstr ""
85msgstr ""
86
86
@@ -165,11 +165,35 @@ msgstr ""
165msgid "Please enter SIM PIN"
165msgid "Please enter SIM PIN"
166msgstr ""
166msgstr ""
167
167
168+#: qml/Panel/Indicators/MenuItemFactory.qml:583
169+msgid "In queue…"
170+msgstr ""
171+
172+#: qml/Panel/Indicators/MenuItemFactory.qml:587
173+msgid "Downloading"
174+msgstr ""
175+
176+#: qml/Panel/Indicators/MenuItemFactory.qml:589
177+msgid "Paused, tap to resume"
178+msgstr ""
179+
180+#: qml/Panel/Indicators/MenuItemFactory.qml:591
181+msgid "Canceled"
182+msgstr ""
183+
184+#: qml/Panel/Indicators/MenuItemFactory.qml:593
185+msgid "Finished"
186+msgstr ""
187+
188+#: qml/Panel/Indicators/MenuItemFactory.qml:595
189+msgid "Failed, tap to retry"
190+msgstr ""
191+
168#: qml/Panel/SearchIndicator.qml:27
192#: qml/Panel/SearchIndicator.qml:27
169msgid "Search"
193msgid "Search"
170msgstr ""
194msgstr ""
171
195
172−#: qml/Shell.qml:334
196+#: qml/Shell.qml:359
173#, qt-format
197#, qt-format
174msgid "Please enter %1"
198msgid "Please enter %1"
175msgstr ""
199msgstr ""
po/update-unity-pot+2−1
@@ -22,6 +22,7 @@ xgettext \
22 --keyword=tr \
22 --keyword=tr \
23 --keyword=tr:1,2 \
23 --keyword=tr:1,2 \
24 --package-name="unity8" \
24 --package-name="unity8" \
25− --copyright-holder="Canonical Ltd."
25+ --copyright-holder="Canonical Ltd." \
26+ --from-code="UTF-8"
26
27
27echo "$PROGNAME: $PO_DIR/auto-generated.pot updated"
28echo "$PROGNAME: $PO_DIR/auto-generated.pot updated"
qml/Panel/Indicators/DefaultIndicatorPage.qml+1
@@ -176,6 +176,7 @@ IndicatorBase {
176
176
177 MenuItemFactory {
177 MenuItemFactory {
178 id: factory
178 id: factory
179+ rootModel: main.menuModel ? main.menuModel : null
179 menuModel: mainMenu.model ? mainMenu.model : null
180 menuModel: mainMenu.model ? mainMenu.model : null
180 }
181 }
181
182
qml/Panel/Indicators/MenuItemFactory.qml+177−13
@@ -19,7 +19,8 @@
19
19
20import QtQuick 2.0
20import QtQuick 2.0
21import Ubuntu.Settings.Menus 0.1 as Menus
21import Ubuntu.Settings.Menus 0.1 as Menus
22+import Ubuntu.Settings.Components 0.1 as SettingsComponents
22−import QMenuModel 0.1 as QMenuModel
23+import QMenuModel 0.1
23import Utils 0.1 as Utils
24import Utils 0.1 as Utils
24import Ubuntu.Components.ListItems 0.1 as ListItems
25import Ubuntu.Components.ListItems 0.1 as ListItems
25import Ubuntu.Components 0.1
26import Ubuntu.Components 0.1
@@ -27,20 +28,23 @@ import Ubuntu.Components 0.1
27Item {
28Item {
28 id: menuFactory
29 id: menuFactory
29
30
31+ property var rootModel: null
30 property var menuModel: null
32 property var menuModel: null
31
33
32 property var _map: {
34 property var _map: {
33 "unity.widgets.systemsettings.tablet.volumecontrol" : sliderMenu,
35 "unity.widgets.systemsettings.tablet.volumecontrol" : sliderMenu,
34 "unity.widgets.systemsettings.tablet.switch" : switchMenu,
36 "unity.widgets.systemsettings.tablet.switch" : switchMenu,
35
37
36− "com.canonical.indicator.button" : buttonMenu,
38+ "com.canonical.indicator.button" : buttonMenu,
37− "com.canonical.indicator.div" : separatorMenu,
39+ "com.canonical.indicator.div" : separatorMenu,
38− "com.canonical.indicator.section" : sectionMenu,
40+ "com.canonical.indicator.section" : sectionMenu,
39− "com.canonical.indicator.progress" : progressMenu,
41+ "com.canonical.indicator.progress" : progressMenu,
40− "com.canonical.indicator.slider" : sliderMenu,
42+ "com.canonical.indicator.slider" : sliderMenu,
41− "com.canonical.indicator.switch" : switchMenu,
43+ "com.canonical.indicator.switch" : switchMenu,
42− "com.canonical.indicator.alarm" : alarmMenu,
44+ "com.canonical.indicator.alarm" : alarmMenu,
43− "com.canonical.indicator.appointment" : appointmentMenu,
45+ "com.canonical.indicator.appointment" : appointmentMenu,
46+ "com.canonical.indicator.transfer" : transferMenu,
47+ "com.canonical.indicator.button-section" : buttonSectionMenu,
44
48
45 "com.canonical.indicator.messages.messageitem" : messageItem,
49 "com.canonical.indicator.messages.messageitem" : messageItem,
46 "com.canonical.indicator.messages.sourceitem" : groupedMessage,
50 "com.canonical.indicator.messages.sourceitem" : groupedMessage,
@@ -64,6 +68,7 @@ Item {
64
68
65 Component {
69 Component {
66 id: separatorMenu;
70 id: separatorMenu;
71+
67 Menus.SeparatorMenu {
72 Menus.SeparatorMenu {
68 objectName: "separatorMenu"
73 objectName: "separatorMenu"
69 }
74 }
@@ -71,6 +76,7 @@ Item {
71
76
72 Component {
77 Component {
73 id: sliderMenu;
78 id: sliderMenu;
79+
74 Menus.SliderMenu {
80 Menus.SliderMenu {
75 objectName: "sliderMenu"
81 objectName: "sliderMenu"
76 property QtObject menuData: null
82 property QtObject menuData: null
@@ -122,6 +128,7 @@ Item {
122
128
123 Component {
129 Component {
124 id: buttonMenu;
130 id: buttonMenu;
131+
125 Menus.ButtonMenu {
132 Menus.ButtonMenu {
126 objectName: "buttonMenu"
133 objectName: "buttonMenu"
127 property QtObject menuData: null
134 property QtObject menuData: null
@@ -139,6 +146,7 @@ Item {
139 }
146 }
140 Component {
147 Component {
141 id: sectionMenu;
148 id: sectionMenu;
149+
142 Menus.SectionMenu {
150 Menus.SectionMenu {
143 objectName: "sectionMenu"
151 objectName: "sectionMenu"
144 property QtObject menuData: null
152 property QtObject menuData: null
@@ -151,6 +159,7 @@ Item {
151
159
152 Component {
160 Component {
153 id: progressMenu;
161 id: progressMenu;
162+
154 Menus.ProgressValueMenu {
163 Menus.ProgressValueMenu {
155 objectName: "progressMenu"
164 objectName: "progressMenu"
156 property QtObject menuData: null
165 property QtObject menuData: null
@@ -165,6 +174,7 @@ Item {
165
174
166 Component {
175 Component {
167 id: standardMenu;
176 id: standardMenu;
177+
168 Menus.StandardMenu {
178 Menus.StandardMenu {
169 objectName: "standardMenu"
179 objectName: "standardMenu"
170 property QtObject menuData: null
180 property QtObject menuData: null
@@ -183,6 +193,7 @@ Item {
183
193
184 Component {
194 Component {
185 id: checkableMenu;
195 id: checkableMenu;
196+
186 Menus.CheckableMenu {
197 Menus.CheckableMenu {
187 objectName: "checkableMenu"
198 objectName: "checkableMenu"
188 property QtObject menuData: null
199 property QtObject menuData: null
@@ -202,6 +213,7 @@ Item {
202
213
203 Component {
214 Component {
204 id: switchMenu;
215 id: switchMenu;
216+
205 Menus.SwitchMenu {
217 Menus.SwitchMenu {
206 objectName: "switchMenu"
218 objectName: "switchMenu"
207 property QtObject menuData: null
219 property QtObject menuData: null
@@ -221,6 +233,7 @@ Item {
221
233
222 Component {
234 Component {
223 id: alarmMenu;
235 id: alarmMenu;
236+
224 Menus.EventMenu {
237 Menus.EventMenu {
225 objectName: "alarmMenu"
238 objectName: "alarmMenu"
226 property QtObject menuData: null
239 property QtObject menuData: null
@@ -258,6 +271,7 @@ Item {
258
271
259 Component {
272 Component {
260 id: appointmentMenu;
273 id: appointmentMenu;
274+
261 Menus.EventMenu {
275 Menus.EventMenu {
262 objectName: "appointmentMenu"
276 objectName: "appointmentMenu"
263 property QtObject menuData: null
277 property QtObject menuData: null
@@ -297,6 +311,7 @@ Item {
297
311
298 Component {
312 Component {
299 id: wifiSection;
313 id: wifiSection;
314+
300 Menus.SectionMenu {
315 Menus.SectionMenu {
301 objectName: "wifiSection"
316 objectName: "wifiSection"
302 property QtObject menuData: null
317 property QtObject menuData: null
@@ -323,6 +338,7 @@ Item {
323
338
324 Component {
339 Component {
325 id: accessPoint;
340 id: accessPoint;
341+
326 Menus.AccessPointMenu {
342 Menus.AccessPointMenu {
327 objectName: "accessPoint"
343 objectName: "accessPoint"
328 property QtObject menuData: null
344 property QtObject menuData: null
@@ -330,7 +346,7 @@ Item {
330 property int menuIndex: -1
346 property int menuIndex: -1
331 property var extendedData: menuData && menuData.ext || undefined
347 property var extendedData: menuData && menuData.ext || undefined
332
348
333− property var strengthAction: QMenuModel.UnityMenuAction {
349+ property var strengthAction: UnityMenuAction {
334 model: menuModel
350 model: menuModel
335 index: menuIndex
351 index: menuIndex
336 name: getExtendedProperty(extendedData, "xCanonicalWifiApStrengthAction", "")
352 name: getExtendedProperty(extendedData, "xCanonicalWifiApStrengthAction", "")
@@ -365,6 +381,7 @@ Item {
365
381
366 Component {
382 Component {
367 id: messageItem
383 id: messageItem
384+
368 MessageMenuItemFactory {
385 MessageMenuItemFactory {
369 objectName: "messageItem"
386 objectName: "messageItem"
370 menuModel: menuFactory.menuModel
387 menuModel: menuFactory.menuModel
@@ -373,6 +390,7 @@ Item {
373
390
374 Component {
391 Component {
375 id: groupedMessage
392 id: groupedMessage
393+
376 Menus.GroupedMessageMenu {
394 Menus.GroupedMessageMenu {
377 objectName: "groupedMessage"
395 objectName: "groupedMessage"
378 property QtObject menuData: null
396 property QtObject menuData: null
@@ -409,6 +427,7 @@ Item {
409
427
410 Component {
428 Component {
411 id: mediaPayerMenu;
429 id: mediaPayerMenu;
430+
412 Menus.MediaPlayerMenu {
431 Menus.MediaPlayerMenu {
413 objectName: "mediaPayerMenu"
432 objectName: "mediaPayerMenu"
414 property QtObject menuData: null
433 property QtObject menuData: null
@@ -435,6 +454,7 @@ Item {
435
454
436 Component {
455 Component {
437 id: playbackItemMenu;
456 id: playbackItemMenu;
457+
438 Menus.PlaybackItemMenu {
458 Menus.PlaybackItemMenu {
439 objectName: "playbackItemMenu"
459 objectName: "playbackItemMenu"
440 property QtObject menuData: null
460 property QtObject menuData: null
@@ -442,17 +462,17 @@ Item {
442 property int menuIndex: -1
462 property int menuIndex: -1
443 property var extendedData: menuData && menuData.ext || undefined
463 property var extendedData: menuData && menuData.ext || undefined
444
464
445− property var playAction: QMenuModel.UnityMenuAction {
465+ property var playAction: UnityMenuAction {
446 model: menuModel
466 model: menuModel
447 index: menuIndex
467 index: menuIndex
448 name: getExtendedProperty(extendedData, "xCanonicalPlayAction", "")
468 name: getExtendedProperty(extendedData, "xCanonicalPlayAction", "")
449 }
469 }
450− property var nextAction: QMenuModel.UnityMenuAction {
470+ property var nextAction: UnityMenuAction {
451 model: menuModel
471 model: menuModel
452 index: menuIndex
472 index: menuIndex
453 name: getExtendedProperty(extendedData, "xCanonicalNextAction", "")
473 name: getExtendedProperty(extendedData, "xCanonicalNextAction", "")
454 }
474 }
455− property var previousAction: QMenuModel.UnityMenuAction {
475+ property var previousAction: UnityMenuAction {
456 model: menuModel
476 model: menuModel
457 index: menuIndex
477 index: menuIndex
458 name: getExtendedProperty(extendedData, "xCanonicalPreviousAction", "")
478 name: getExtendedProperty(extendedData, "xCanonicalPreviousAction", "")
@@ -489,6 +509,150 @@ Item {
489 }
509 }
490 }
510 }
491
511
512+ Component {
513+ id: transferMenu
514+
515+ Menus.TransferMenu {
516+ objectName: "transferMenu"
517+ id: transfer
518+ property QtObject menuData: null
519+ property var menuModel: menuFactory.menuModel
520+ property int menuIndex: -1
521+ property var extendedData: menuData && menuData.ext || undefined
522+ property var uid: getExtendedProperty(extendedData, "xCanonicalUid", undefined)
523+
524+ text: menuData && menuData.label || ""
525+ iconSource: menuData && menuData.icon || ""
526+ maximum: 1.0
527+ enabled: menuData && menuData.sensitive || false
528+ removable: true
529+ confirmRemoval: true
530+
531+ QDBusActionGroup {
532+ id: actionGroup
533+ busType: 1
534+ busName: rootModel.busName
535+ objectPath: rootModel.actions["indicator"]
536+
537+ property var activateAction: action("activate-transfer")
538+ property var cancelAction: action("cancel-transfer")
539+ property var transferStateAction: uid !== undefined ? action("transfer-state."+uid) : null
540+
541+ Component.onCompleted: actionGroup.start()
542+ }
543+
544+ property var transferState: {
545+ if (actionGroup.transferStateAction === null) return undefined;
546+ return actionGroup.transferStateAction.valid ? actionGroup.transferStateAction.state : undefined
547+ }
548+
549+ property var runningState : transferState !== undefined ? transferState["state"] : undefined
550+ property var secondsLeft : transferState !== undefined ? transferState["seconds-left"] : undefined
551+
552+ active: runningState !== undefined && runningState !== Menus.TransferState.Finished
553+ progress: transferState !== undefined ? transferState["percent"] : 0.0
554+
555+ // TODO - Should be in the SDK
556+ property var timeRemaining: {
557+ if (secondsLeft === undefined) return undefined;
558+
559+ var remaining = "";
560+ var hours = Math.floor(secondsLeft / (60 * 60));
561+ var minutes = Math.floor(secondsLeft / 60) % 60;
562+ var seconds = secondsLeft % 60;
563+ if (hours > 0) {
564+ remaining += hours + (hours == 1 ? " hour" : " hours");
565+ }
566+ if (minutes > 0) {
567+ if (remaining != "") remaining += ", ";
568+ remaining += minutes + (minutes == 1 ? " minute" : " minutes");
569+ }
570+ // don't include seconds if hours > 0
571+ if (hours == 0 && minutes < 5 && seconds > 0) {
572+ if (remaining != "") remaining += ", ";
573+ remaining += seconds + (seconds == 1 ? " second" : " seconds");
574+ }
575+ if (remaining == "")
576+ remaining = "0 seconds";
577+ return remaining + " remaining";
578+ }
579+
580+ stateText: {
581+ switch (runningState) {
582+ case Menus.TransferState.Queued:
583+ return i18n.tr("In queue…");
584+ case Menus.TransferState.Hashing:
585+ case Menus.TransferState.Processing:
586+ case Menus.TransferState.Running:
587+ return timeRemaining === undefined ? i18n.tr("Downloading") : timeRemaining;
588+ case Menus.TransferState.Paused:
589+ return i18n.tr("Paused, tap to resume");
590+ case Menus.TransferState.Canceled:
591+ return i18n.tr("Canceled");
592+ case Menus.TransferState.Finished:
593+ return i18n.tr("Finished");
594+ case Menus.TransferState.Error:
595+ return i18n.tr("Failed, tap to retry");
596+ }
597+ return "";
598+ }
599+
600+ onMenuModelChanged: {
601+ loadAttributes();
602+ }
603+ onMenuIndexChanged: {
604+ loadAttributes();
605+ }
606+ onTriggered: {
607+ actionGroup.activateAction.activate(uid);
608+ }
609+ onItemRemoved: {
610+ actionGroup.cancelAction.activate(uid);
611+ }
612+
613+ function loadAttributes() {
614+ if (!menuModel || menuIndex == -1) return;
615+ menuModel.loadExtendedAttributes(menuIndex, {'x-canonical-uid': 'string'});
616+ }
617+ }
618+ }
619+
620+ Component {
621+ id: buttonSectionMenu;
622+
623+ ListItems.Standard {
624+ objectName: "buttonSectionMenu"
625+ property QtObject menuData: null
626+ property var menuModel: menuFactory.menuModel
627+ property int menuIndex: -1
628+ property var extendedData: menuData && menuData.ext || undefined
629+
630+ iconSource: menuData && menuData.icon || ""
631+ enabled: menuData && menuData.sensitive || false
632+ text: menuData && menuData.label || ""
633+ showDivider: false
634+
635+ onMenuModelChanged: {
636+ loadAttributes();
637+ }
638+ onMenuIndexChanged: {
639+ loadAttributes();
640+ }
641+ function loadAttributes() {
642+ if (!menuModel || menuIndex == -1) return;
643+ menuModel.loadExtendedAttributes(menuIndex, {'x-canonical-extra-label': 'string'});
644+ }
645+
646+ control: Button {
647+ text: getExtendedProperty(extendedData, "xCanonicalExtraLabel", "")
648+
649+ onClicked: {
650+ menuModel.activate(menuIndex);
651+ }
652+ }
653+ }
654+ }
655+
492 function load(modelData) {
656 function load(modelData) {
493 if (modelData.type !== undefined) {
657 if (modelData.type !== undefined) {
494 var component = _map[modelData.type];
658 var component = _map[modelData.type];
qml/Panel/Indicators/MessageMenuItemFactory.qml+3
@@ -77,6 +77,7 @@ Item {
77
77
78 Component {
78 Component {
79 id: simpleTextMessage
79 id: simpleTextMessage
80+
80 Menus.SimpleTextMessageMenu {
81 Menus.SimpleTextMessageMenu {
81 id: message
82 id: message
82 objectName: "simpleTextMessage"
83 objectName: "simpleTextMessage"
@@ -115,6 +116,7 @@ Item {
115
116
116 Component {
117 Component {
117 id: textMessage
118 id: textMessage
119+
118 Menus.TextMessageMenu {
120 Menus.TextMessageMenu {
119 id: message
121 id: message
120 objectName: "textMessage"
122 objectName: "textMessage"
@@ -165,6 +167,7 @@ Item {
165 }
167 }
166 Component {
168 Component {
167 id: snapDecision
169 id: snapDecision
170+
168 Menus.SnapDecisionMenu {
171 Menus.SnapDecisionMenu {
169 id: message
172 id: message
170 objectName: "snapDecision"
173 objectName: "snapDecision"
tests/mocks/QMenuModel/QDBusActionGroup.qml+60
@@ -18,10 +18,70 @@
18 */
18 */
19
19
20import QtQuick 2.0
20import QtQuick 2.0
21+import Ubuntu.Settings.Menus 0.1 as Menus
21
22
22QtObject {
23QtObject {
23 property int busType
24 property int busType
24 property string busName
25 property string busName
25 property string objectPath
26 property string objectPath
26 function start() {}
27 function start() {}
28+ function action(actionName) {
29+ switch (actionName) {
30+ case "transfer-state.queued":
31+ return {
32+ 'valid': true,
33+ 'state': {
34+ 'state': Menus.TransferState.Queued,
35+ 'percent': 0.0
36+ }
37+ }
38+ case "transfer-state.running":
39+ return {
40+ 'valid': true,
41+ 'state': {
42+ 'state': Menus.TransferState.Running,
43+ 'seconds-left': 100,
44+ 'percent': 0.1
45+ }
46+ }
47+ case "transfer-state.paused":
48+ return {
49+ 'valid': true,
50+ 'state': {
51+ 'state': Menus.TransferState.Paused,
52+ 'seconds-left': 100,
53+ 'percent': 0.5
54+ }
55+ }
56+ case "transfer-state.cancelled":
57+ return {
58+ 'valid': true,
59+ 'state': {
60+ 'state': Menus.TransferState.Canceled,
61+ 'percent': 0.4
62+ }
63+ }
64+ case "transfer-state.finished": return {
65+ 'valid': true,
66+ 'state': {
67+ 'state': Menus.TransferState.Finished,
68+ 'seconds-left': 0,
69+ 'percent': 1.0
70+ }
71+ }
72+ case "transfer-state.error":
73+ return {
74+ 'valid': true,
75+ 'state': {
76+ 'state': Menus.TransferState.Error,
77+ 'seconds-left': 100,
78+ 'percent': 0.0
79+ }
80+ }
81+ default:
82+ break;
83+ }
84+
85+ return null;
86+ }
27}
87}
tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml+62
@@ -98,6 +98,8 @@ Item {
98 { tag: 'switch2', type: "com.canonical.indicator.switch", objectName: "switchMenu" },
98 { tag: 'switch2', type: "com.canonical.indicator.switch", objectName: "switchMenu" },
99 { tag: 'alarm', type: "com.canonical.indicator.alarm", objectName: "alarmMenu" },
99 { tag: 'alarm', type: "com.canonical.indicator.alarm", objectName: "alarmMenu" },
100 { tag: 'appointment', type: "com.canonical.indicator.appointment", objectName: "appointmentMenu" },
100 { tag: 'appointment', type: "com.canonical.indicator.appointment", objectName: "appointmentMenu" },
101+ { tag: 'transfer', type: "com.canonical.indicator.transfer", objectName: "transferMenu" },
102+ { tag: 'buttonSection', type: "com.canonical.indicator.button-section", objectName: "buttonSectionMenu" },
101
103
102 { tag: 'messageItem', type: "com.canonical.indicator.messages.messageitem", objectName: "messageItem" },
104 { tag: 'messageItem', type: "com.canonical.indicator.messages.messageitem", objectName: "messageItem" },
103 { tag: 'sourceItem', type: "com.canonical.indicator.messages.sourceitem", objectName: "groupedMessage" },
105 { tag: 'sourceItem', type: "com.canonical.indicator.messages.sourceitem", objectName: "groupedMessage" },
@@ -428,6 +430,66 @@ Item {
428 compare(loader.item.enabled, data.enabled, "Enabled does not match data");
430 compare(loader.item.enabled, data.enabled, "Enabled does not match data");
429 }
431 }
430
432
433+ function test_create_transferMenu_data() {
434+ return [
435+ {tag: "queued", label: "testLabel1", enabled: true, active: true, icon: "file:///testIcon1", progress: 0, stateText: "In queue…" },
436+ {tag: "running", label: "testLabel2", enabled: true, active: true, icon: "file:///testIcon2", progress: 0.1, stateText: "1 minute, 40 seconds remaining" },
437+ {tag: "paused", label: "testLabel3", enabled: true, active: true, icon: "file:///testIcon3", progress: 0.5, stateText: "Paused, tap to resume" },
438+ {tag: "cancelled", label: "testLabel4", enabled: true, active: true, icon: "file:///testIcon4", progress: 0.4, stateText: "Canceled" },
439+ {tag: "finished", label: "testLabel5", enabled: false, active: false, icon: "file:///testIcon5", progress: 1.0, stateText: "Finished" },
440+ {tag: "error", label: "testLabel6", enabled: false, active: true, icon: "file:///testIcon6", progress: 0, stateText: "Failed, tap to retry" },
441+ ];
442+ }
443+
444+ function test_create_transferMenu(data) {
445+ menuData.type = "com.canonical.indicator.transfer";
446+ menuData.label = data.label;
447+ menuData.sensitive = data.enabled;
448+ menuData.icon = data.icon;
449+ menuData.ext = {
450+ 'xCanonicalUid': data.tag
451+ };
452+
453+ loader.data = menuData;
454+ loader.sourceComponent = factory.load(menuData);
455+ tryCompareFunction(function() { return loader.item != undefined; }, true);
456+ compare(loader.item.objectName, "transferMenu", "Should have created a transfer menu");
457+
458+ compare(loader.item.text, data.label, "Label does not match data");
459+ compare(loader.item.iconSource, data.icon, "Icon does not match data");
460+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
461+ compare(loader.item.progress, data.progress, "Icon does not match data");
462+ compare(loader.item.active, data.active, "Active does not match data");
463+ compare(loader.item.stateText, data.stateText, "State text does not match data");
464+ }
465+
466+ function test_create_buttonSectionMenu_data() {
467+ return [
468+ {label: "testLabel1", enabled: true, buttonText: "buttonLabel1", icon: "file:///testIcon1" },
469+ {label: "testLabel2", enabled: false, buttonText: "buttonLabel1", icon: "file:///testIcon2" },
470+ ];
471+ }
472+
473+ function test_create_buttonSectionMenu(data) {
474+ menuData.type = "com.canonical.indicator.button-section";
475+ menuData.label = data.label;
476+ menuData.sensitive = data.enabled;
477+ menuData.icon = data.icon;
478+ menuData.ext = {
479+ 'xCanonicalExtraLabel': data.buttonText
480+ };
481+
482+ loader.data = menuData;
483+ loader.sourceComponent = factory.load(menuData);
484+ tryCompareFunction(function() { return loader.item != undefined; }, true);
485+ compare(loader.item.objectName, "buttonSectionMenu", "Should have created a transfer menu");
486+
487+ compare(loader.item.text, data.label, "Label does not match data");
488+ compare(loader.item.iconSource, data.icon, "Icon does not match data");
489+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
490+ compare(loader.item.control.text, data.buttonText, "Button text does not match data");
491+ }
492+
431 function test_create_wifiSection_data() {
493 function test_create_wifiSection_data() {
432 return [
494 return [
433 {label: "testLabel1", busy: false },
495 {label: "testLabel1", busy: false },