on xenial help sign in
merged with trunk
commit2c9da66944052f645c0db89c266ea762ed39a9f6 authorNick Dedekind <nicholas.dedekind@gmail.com> dateWed 15 Jan 2014, 11:08 (13 years ago) parent118426609de2ed
39 files changed+2151−324
debian/control+2−3 plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qml+8 plugins/Unity/Indicators/Network/qml/AccessPoint.qml+2−2 plugins/Unity/Indicators/qml/ButtonMenuItem.qml+1−1 plugins/Unity/Indicators/qml/IndicatorPage.qml−219 plugins/Unity/Indicators/qml/MenuItemFactory.qml+18−3 plugins/Unity/Indicators/qml/qmldir−2 po/ckb.po+158 po/da.po+158 po/en_GB.po+28−26 po/es.po+4−4 po/fo.po+5−5 po/hi.po+158 po/hu.po+5−5 po/mr.po+158 po/pt.po+158 po/ru.po+6−4 po/sw.po+158 po/tr.po+6−4 po/vi.po+158 qml/Panel/Indicators/DefaultIndicatorPage.qml+195−2 qml/Panel/Indicators/DefaultIndicatorWidget.qml+5−3 tests/autopilot/unity8/shell/emulators/create_interactive_notification.py+1−1 tests/mocks/LightDM/CMakeLists.txt+1−1 tests/mocks/QMenuModel/unitymenumodel.cpp+3 tests/mocks/Unity/Indicators/CMakeLists.txt+2 tests/mocks/Unity/Indicators/IndicatorBase.qml+2−1 tests/mocks/Unity/Indicators/IndicatorWidget.qml−28 plugins/Unity/Indicators/qml/IndicatorWidget.qml → tests/mocks/Unity/Indicators/MenuItemFactory.qml+15−5 tests/mocks/Unity/Indicators/fakeplugin.cpp+2 tests/mocks/Unity/Indicators/qmldir+1−1 tests/plugins/LightDM/CMakeLists.txt+1 tests/qmltests/CMakeLists.txt+4 tests/qmltests/Greeter/tst_Lockscreen.qml+1−1 tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml+179 tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml+369 tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml+177 tests/qmltests/Panel/tst_Indicators.qml−1 tests/utils/modules/Unity/Test/UnityTestCase.qml+2−2
debian/control+2−3
@@ -52,7 +52,7 @@ Vcs-Browser: https://bazaar.launchpad.net/~unity-team/unity8/trunk
5252Package: indicators-client
5353Architecture: amd64 armhf i386
5454Depends: qmenumodel-qml (>= 0.2.7),
55− qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.46+13.10.20130829.1-0ubuntu1),
55+ qtdeclarative5-ubuntu-ui-toolkit-plugin,
5656 unity8 (= ${binary:Version}),
5757 ${misc:Depends},
5858 ${shlibs:Depends},
@@ -72,11 +72,10 @@ Package: unity8
7272Architecture: any
7373Provides: indicator-renderer,
7474Depends: gsettings-desktop-schemas,
75− libunity-mir1 (>= 0.2),
7675 qmenumodel-qml (>= 0.2.7),
7776 qtdeclarative5-dee-plugin,
7877 qtdeclarative5-gsettings1.0,
79− qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 0.1.46+13.10.20130829.1-0ubuntu1),
78+ qtdeclarative5-ubuntu-ui-toolkit-plugin,
8079 qtdeclarative5-unity-notifications-plugin | unity-notifications-impl,
8180 qtdeclarative5-xmllistmodel-plugin,
8281 unity-launcher-impl-3,
plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qml+8
@@ -60,6 +60,7 @@ Indicators.BaseMenuItem {
6060
6161 Loader {
6262 id: contents
63+ objectName: "loader"
6364 anchors.fill: parent
6465
6566 sourceComponent: loadMessage(actionsDescription);
@@ -67,6 +68,7 @@ Indicators.BaseMenuItem {
6768 Component {
6869 id: simpleTextMessage
6970 SimpleTextMessage {
71+ objectName: "simpleTextMessage"
7072 // text
7173 title: menuData && menuData.label || ""
7274 time: getExtendedProperty(extendedData, "xCanonicalTime", 0)
@@ -74,6 +76,8 @@ Indicators.BaseMenuItem {
7476 // icons
7577 avatar: getExtendedProperty(extendedData, "icon", "qrc:/indicators/artwork/messaging/default_contact.png")
7678 appIcon: getExtendedProperty(extendedData, "xCanonicalAppIcon", "qrc:/indicators/artwork/messaging/default_app.svg")
79+ // actions
80+ enabled: menuData && menuData.sensitive || false
7781
7882 onActivateApp: {
7983 menuModel.activate(menuIndex, true);
@@ -91,6 +95,7 @@ Indicators.BaseMenuItem {
9195 Component {
9296 id: textMessage
9397 TextMessage {
98+ objectName: "textMessage"
9499 property var replyActionDescription: actionsDescription && actionsDescription.length > 0 ? actionsDescription[0] : undefined
95100
96101 property var replyAction: QMenuModel.UnityMenuAction {
@@ -109,6 +114,7 @@ Indicators.BaseMenuItem {
109114 appIcon: getExtendedProperty(extendedData, "xCanonicalAppIcon", "qrc:/indicators/artwork/messaging/default_app.svg")
110115 // actions
111116 replyEnabled: replyAction.valid && replyAction.enabled
117+ enabled: menuData && menuData.sensitive || false
112118
113119 onActivateApp: {
114120 menuModel.activate(menuIndex, true);
@@ -129,6 +135,7 @@ Indicators.BaseMenuItem {
129135 Component {
130136 id: snapDecision
131137 SnapDecision {
138+ objectName: "snapDecision"
132139 property var activateActionDescription: actionsDescription && actionsDescription.length > 0 ? actionsDescription[0] : undefined
133140 property var replyActionDescription: actionsDescription && actionsDescription.length > 1 ? actionsDescription[1] : undefined
134141
@@ -156,6 +163,7 @@ Indicators.BaseMenuItem {
156163 // actions
157164 activateEnabled: activateAction.valid && activateAction.enabled
158165 replyEnabled: replyAction.valid && replyAction.enabled
166+ enabled: menuData && menuData.sensitive || false
159167
160168 onActivateApp: {
161169 menuModel.activate(menuIndex, true);
plugins/Unity/Indicators/Network/qml/AccessPoint.qml+2−2
@@ -30,7 +30,7 @@ Indicators.BaseMenuItem {
3030 property bool secure: false
3131 property bool adHoc: false
3232 property int signalStrength: 0
33− property alias text: label.text
33+ property alias label: _label.text
3434
3535 signal activate()
3636
@@ -89,7 +89,7 @@ Indicators.BaseMenuItem {
8989 }
9090
9191 Label {
92− id: label
92+ id: _label
9393 anchors {
9494 left: iconSignal.right
9595 leftMargin: units.gu(1)
plugins/Unity/Indicators/qml/ButtonMenuItem.qml+1−1
@@ -26,7 +26,7 @@ BaseMenuItem {
2626 id: menuItem
2727 implicitHeight: units.gu(7)
2828
29− property alias text: button.text
29+ property alias buttonText: button.text
3030
3131 signal activate()
3232
plugins/Unity/Indicators/qml/IndicatorPage.qmldeleted−219
@@ -1,219 +0,0 @@
1−/*
2− * Copyright 2013 Canonical Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU Lesser General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU Lesser General Public License for more details.
12− *
13− * You should have received a copy of the GNU Lesser General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− *
16− * Authors:
17− * Renato Araujo Oliveira Filho <renato@canonical.com>
18− * Nick Dedekind <nick.dedekind@canonical.com>
19− */
20−
21−import QtQuick 2.0
22−import Ubuntu.Components 0.1 as Components
23−import Unity.Indicators 0.1 as Indicators
24−
25−IndicatorBase {
26− id: main
27−
28− //const
29− property bool contentActive: false
30− property string title: rootActionState.title
31− property alias emptyText: emptyLabel.text
32− property alias highlightFollowsCurrentItem : mainMenu.highlightFollowsCurrentItem
33−
34− Indicators.UnityMenuModelStack {
35− id: menuStack
36− head: contentActive ? main.menuModel : null
37−
38− property var rootMenu: null
39−
40− onTailChanged: {
41− if (!tail) {
42− rootMenu = null;
43− } else if (rootMenu != tail) {
44− if (tail.get(0, "type") === rootMenuType) {
45− rootMenu = menuStack.tail.submenu(0);
46− push(rootMenu, 0);
47− } else {
48− rootMenu = null;
49− }
50− }
51− }
52− }
53−
54− Connections {
55− target: menuStack.tail
56− onRowsInserted: {
57− if (menuStack.rootMenu !== menuStack.tail && menuStack.tail.get(0, "type") === rootMenuType) {
58− menuStack.rootMenu = menuStack.tail.submenu(0);
59− menuStack.push(menuStack.rootMenu, 0);
60− }
61− }
62− }
63−
64− ListView {
65− id: mainMenu
66− model: menuStack.rootMenu
67−
68− anchors {
69− fill: parent
70− bottomMargin: Qt.inputMethod.visible ? (Qt.inputMethod.keyboardRectangle.height - main.anchors.bottomMargin) : 0
71−
72− Behavior on bottomMargin {
73− NumberAnimation {
74− duration: 175
75− easing.type: Easing.OutQuad
76− }
77− }
78− // TODO - does ever frame.
79− onBottomMarginChanged: {
80− mainMenu.positionViewAtIndex(mainMenu.currentIndex, ListView.End)
81− }
82− }
83−
84− // Ensure all delegates are cached in order to improve smoothness of scrolling
85− cacheBuffer: 10000
86−
87− // Only allow flicking if the content doesn't fit on the page
88− interactive: contentHeight > height
89−
90− property int selectedIndex: -1
91− property bool blockCurrentIndexChange: false
92− // for count = 0
93− onCountChanged: {
94− if (count == 0 && selectedIndex != -1) {
95− selectedIndex = -1;
96− }
97− }
98− // for highlight following
99− onSelectedIndexChanged: {
100− if (currentIndex != selectedIndex) {
101− var blocked = blockCurrentIndexChange;
102− blockCurrentIndexChange = true;
103−
104− currentIndex = selectedIndex;
105−
106− blockCurrentIndexChange = blocked;
107− }
108− }
109− // for item addition/removal
110− onCurrentIndexChanged: {
111− if (!blockCurrentIndexChange) {
112− if (selectedIndex != -1 && selectedIndex != currentIndex) {
113− selectedIndex = currentIndex;
114− }
115− }
116− }
117−
118− delegate: Item {
119− id: menuDelegate
120−
121− anchors {
122− left: parent.left
123− right: parent.right
124− }
125− height: loader.height
126− visible: height > 0
127−
128− Loader {
129− id: loader
130− asynchronous: false
131−
132− property int modelIndex: index
133−
134− anchors {
135− left: parent.left
136− right: parent.right
137− }
138−
139− sourceComponent: factory.load(model)
140−
141− onLoaded: {
142− if (item.hasOwnProperty("menuSelected")) {
143− item.menuSelected = mainMenu.selectedIndex == index;
144− item.selectMenu.connect(function() { mainMenu.selectedIndex = index; });
145− item.deselectMenu.connect(function() { mainMenu.selectedIndex = -1; });
146− }
147− if (item.hasOwnProperty("menuData")) {
148− item.menuData = Qt.binding(function() { return model; });
149− }
150− if (item.hasOwnProperty("menuIndex")) {
151− item.menuIndex = Qt.binding(function() { return modelIndex; });
152− }
153− }
154−
155− Binding {
156− target: item ? item : null
157− property: "objectName"
158− value: model.action
159− }
160−
161− // TODO: Fixes lp#1243146
162− // This is a workaround for a Qt bug. https://bugreports.qt-project.org/browse/QTBUG-34351
163− Connections {
164− target: mainMenu
165− onSelectedIndexChanged: {
166− if (loader.item && loader.item.hasOwnProperty("menuSelected")) {
167− loader.item.menuSelected = mainMenu.selectedIndex == index;
168− }
169− }
170− }
171− }
172− }
173− }
174−
175− MenuItemFactory {
176− id: factory
177− menuModel: mainMenu.model ? mainMenu.model : null
178− }
179−
180− Components.Label {
181− id: emptyLabel
182− visible: mainMenu.count == 0
183− anchors {
184− top: parent.top
185− left: parent.left
186− right: parent.right
187− topMargin: units.gu(2)
188− }
189− wrapMode: Text.WordWrap
190− horizontalAlignment: Text.AlignHCenter
191−
192− //style
193− color: "#e8e1d0"
194− fontSize: "medium"
195−
196− text: "Empty!"
197− }
198−
199− function start()
200− {
201− reset()
202− if (!contentActive) {
203− contentActive = true;
204− }
205− }
206−
207− function stop()
208− {
209− if (contentActive) {
210− contentActive = false;
211− }
212− }
213−
214− function reset()
215− {
216− mainMenu.selectedIndex = -1;
217− mainMenu.positionViewAtBeginning();
218− }
219−}
plugins/Unity/Indicators/qml/MenuItemFactory.qml+18−3
@@ -57,11 +57,17 @@ Item {
5757 return defaultValue;
5858 }
5959
60− Component { id: divMenu; Indicators.DivMenuItem {} }
60+ Component {
61+ id: divMenu;
62+ Indicators.DivMenuItem {
63+ objectName: "divMenu"
64+ }
65+ }
6166
6267 Component {
6368 id: sliderMenu;
6469 Indicators.SliderMenuItem {
70+ objectName: "sliderMenu"
6571 property QtObject menuData: null
6672 property var menuModel: menuFactory.menuModel
6773 property int menuIndex: -1
@@ -106,11 +112,12 @@ Item {
106112 Component {
107113 id: buttonMenu;
108114 Indicators.ButtonMenuItem {
115+ objectName: "buttonMenu"
109116 property QtObject menuData: null
110117 property var menuModel: menuFactory.menuModel
111118 property int menuIndex: -1
112119
113− text: menuData && menuData.label || ""
120+ buttonText: menuData && menuData.label || ""
114121 enabled: menuData && menuData.sensitive || false
115122
116123 onActivate: {
@@ -122,6 +129,7 @@ Item {
122129 Component {
123130 id: sectionMenu;
124131 Indicators.SectionMenuItem {
132+ objectName: "sectionMenu"
125133 property QtObject menuData: null
126134 property var menuIndex: undefined
127135
@@ -132,6 +140,7 @@ Item {
132140 Component {
133141 id: progressMenu;
134142 Indicators.ProgressMenuItem {
143+ objectName: "progressMenu"
135144 property QtObject menuData: null
136145 property int menuIndex: -1
137146
@@ -145,6 +154,7 @@ Item {
145154 Component {
146155 id: standardMenu;
147156 Indicators.StandardMenuItem {
157+ objectName: "standardMenu"
148158 property QtObject menuData: null
149159 property int menuIndex: -1
150160
@@ -164,6 +174,7 @@ Item {
164174 Component {
165175 id: switchMenu;
166176 Indicators.SwitchMenuItem {
177+ objectName: "switchMenu"
167178 property QtObject menuData: null
168179 property int menuIndex: -1
169180
@@ -182,6 +193,7 @@ Item {
182193 Component {
183194 id: wifiSection;
184195 Indicators.SectionMenuItem {
196+ objectName: "wifiSection"
185197 property QtObject menuData: null
186198 property var menuModel: menuFactory.menuModel
187199 property int menuIndex: -1
@@ -207,6 +219,7 @@ Item {
207219 Component {
208220 id: accessPoint;
209221 ICNetwork.AccessPoint {
222+ objectName: "accessPoint"
210223 property QtObject menuData: null
211224 property var menuModel: menuFactory.menuModel
212225 property int menuIndex: -1
@@ -218,7 +231,7 @@ Item {
218231 name: getExtendedProperty(extendedData, "xCanonicalWifiApStrengthAction", "")
219232 }
220233
221− text: menuData && menuData.label || ""
234+ label: menuData && menuData.label || ""
222235 enabled: menuData && menuData.sensitive || false
223236 secure: getExtendedProperty(extendedData, "xCanonicalWifiApIsSecure", false)
224237 adHoc: getExtendedProperty(extendedData, "xCanonicalWifiApIsAdhoc", false)
@@ -248,6 +261,7 @@ Item {
248261 Component {
249262 id: messageItem
250263 ICMessaging.MessageMenuItemFactory {
264+ objectName: "messageItem"
251265 menuModel: menuFactory.menuModel
252266 }
253267 }
@@ -255,6 +269,7 @@ Item {
255269 Component {
256270 id: groupedMessage
257271 ICMessaging.GroupedMessage {
272+ objectName: "groupedMessage"
258273 property QtObject menuData: null
259274 property var menuModel: menuFactory.menuModel
260275 property int menuIndex: -1
plugins/Unity/Indicators/qml/qmldir−2
@@ -9,8 +9,6 @@ DivMenuItem 0.1 DivMenuItem.qml
99FramedMenuItem 0.1 FramedMenuItem.qml
1010HLine 0.1 HLine.qml
1111IndicatorBase 0.1 IndicatorBase.qml
12−IndicatorPage 0.1 IndicatorPage.qml
13−IndicatorWidget 0.1 IndicatorWidget.qml
1412MenuActionBinding 0.1 MenuActionBinding.qml
1513MenuItemFactory 0.1 MenuItemFactory.qml
1614ProgressMenuItem 0.1 ProgressMenuItem.qml
po/ckb.ponew file+158
@@ -0,0 +1,158 @@
1+# Kurdish (Sorani) translation for unity8
2+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5+#
6+msgid ""
7+msgstr ""
8+"Project-Id-Version: unity8\n"
9+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10+"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11+"PO-Revision-Date: 2014-01-14 20:05+0000\n"
12+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13+"Language-Team: Kurdish (Sorani) <ckb@li.org>\n"
14+"MIME-Version: 1.0\n"
15+"Content-Type: text/plain; charset=UTF-8\n"
16+"Content-Transfer-Encoding: 8bit\n"
17+"Plural-Forms: nplurals=2; plural=n != 1;\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
20+
21+#: Components/EdgeDemoOverlay.qml:151
22+msgid "Skip intro"
23+msgstr ""
24+
25+#: Components/EdgeDemo.qml:112
26+msgid "Right edge"
27+msgstr ""
28+
29+#: Components/EdgeDemo.qml:113
30+msgid "Try swiping from the right edge to unlock the phone"
31+msgstr ""
32+
33+#: Components/EdgeDemo.qml:144
34+msgid "Top edge"
35+msgstr ""
36+
37+#: Components/EdgeDemo.qml:145
38+msgid "Try swiping from the top edge to access the indicators"
39+msgstr ""
40+
41+#: Components/EdgeDemo.qml:170
42+msgid "Close"
43+msgstr ""
44+
45+#: Components/EdgeDemo.qml:171
46+msgid "Swipe up again to close the settings screen"
47+msgstr ""
48+
49+#: Components/EdgeDemo.qml:198
50+msgid "Left edge"
51+msgstr ""
52+
53+#: Components/EdgeDemo.qml:199
54+msgid "Swipe from the left to reveal the launcher for quick access to apps"
55+msgstr ""
56+
57+#: Components/EdgeDemo.qml:226
58+msgid "Well done"
59+msgstr ""
60+
61+#: Components/EdgeDemo.qml:227
62+msgid ""
63+"You have now mastered the edge gestures and can start using the "
64+"phone<br><br>Tap anywhere to start"
65+msgstr ""
66+
67+#: Components/PageHeader.qml:364
68+msgid "Recent searches"
69+msgstr ""
70+
71+#: Dash/Apps/AppPreview.qml:135
72+msgid "Rate this"
73+msgstr ""
74+
75+#. TRANSLATORS: Number of persons who rated this app/video/whatever
76+#: Dash/Previews/Header.qml:93
77+#, qt-format
78+msgid "(%1)"
79+msgstr ""
80+
81+#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
82+#: Dash/Previews/Header.qml:105
83+#, qt-format
84+msgid "%1 review"
85+msgid_plural "%1 reviews"
86+msgstr[0] ""
87+msgstr[1] ""
88+
89+#: Dash/Previews/Reviews.qml:74
90+msgid "Add a review"
91+msgstr ""
92+
93+#: Dash/Previews/Reviews.qml:86
94+msgid "Review"
95+msgstr ""
96+
97+#: Dash/Previews/Reviews.qml:121
98+msgid "Send"
99+msgstr ""
100+
101+#: Dash/Previews/Reviews.qml:139
102+msgid "Comments:"
103+msgstr ""
104+
105+#: Greeter/Lockscreen.qml:149
106+msgid "Emergency Call"
107+msgstr ""
108+
109+#: Greeter/PassphraseLockscreen.qml:59
110+#, qt-format
111+msgid "Hello %1"
112+msgstr ""
113+
114+#: Greeter/PassphraseLockscreen.qml:59
115+msgid "Hello"
116+msgstr ""
117+
118+#: Hud/HudParametrizedActionsPage.qml:132
119+msgid "Confirm"
120+msgstr ""
121+
122+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
123+msgid "Type or say a command"
124+msgstr ""
125+
126+#: Hud/Hud.qml:84
127+msgid "Loading. Please Wait..."
128+msgstr ""
129+
130+#: Hud/Hud.qml:89
131+msgid "Speak Now..."
132+msgstr ""
133+
134+#: Hud/Hud.qml:94
135+msgid "Speaking..."
136+msgstr ""
137+
138+#: Notifications/NotificationMenuItemFactory.qml:89
139+msgid "Show password"
140+msgstr ""
141+
142+#: Panel/SearchIndicator.qml:27
143+msgid "Search"
144+msgstr ""
145+
146+#: plugins/Unity/Launcher/launcheritem.cpp:43
147+#: plugins/Unity/Launcher/launcheritem.cpp:73
148+msgid "Lock to Launcher"
149+msgstr ""
150+
151+#: plugins/Unity/Launcher/launcheritem.cpp:73
152+msgid "Unlock from Launcher"
153+msgstr ""
154+
155+#: Shell.qml:439
156+#, qt-format
157+msgid "Please enter %1"
158+msgstr ""
po/da.ponew file+158
@@ -0,0 +1,158 @@
1+# Danish translation for unity8
2+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5+#
6+msgid ""
7+msgstr ""
8+"Project-Id-Version: unity8\n"
9+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10+"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11+"PO-Revision-Date: 2014-01-14 20:16+0000\n"
12+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13+"Language-Team: Danish <da@li.org>\n"
14+"MIME-Version: 1.0\n"
15+"Content-Type: text/plain; charset=UTF-8\n"
16+"Content-Transfer-Encoding: 8bit\n"
17+"Plural-Forms: nplurals=2; plural=n != 1;\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
20+
21+#: Components/EdgeDemoOverlay.qml:151
22+msgid "Skip intro"
23+msgstr ""
24+
25+#: Components/EdgeDemo.qml:112
26+msgid "Right edge"
27+msgstr ""
28+
29+#: Components/EdgeDemo.qml:113
30+msgid "Try swiping from the right edge to unlock the phone"
31+msgstr ""
32+
33+#: Components/EdgeDemo.qml:144
34+msgid "Top edge"
35+msgstr ""
36+
37+#: Components/EdgeDemo.qml:145
38+msgid "Try swiping from the top edge to access the indicators"
39+msgstr ""
40+
41+#: Components/EdgeDemo.qml:170
42+msgid "Close"
43+msgstr ""
44+
45+#: Components/EdgeDemo.qml:171
46+msgid "Swipe up again to close the settings screen"
47+msgstr ""
48+
49+#: Components/EdgeDemo.qml:198
50+msgid "Left edge"
51+msgstr ""
52+
53+#: Components/EdgeDemo.qml:199
54+msgid "Swipe from the left to reveal the launcher for quick access to apps"
55+msgstr ""
56+
57+#: Components/EdgeDemo.qml:226
58+msgid "Well done"
59+msgstr ""
60+
61+#: Components/EdgeDemo.qml:227
62+msgid ""
63+"You have now mastered the edge gestures and can start using the "
64+"phone<br><br>Tap anywhere to start"
65+msgstr ""
66+
67+#: Components/PageHeader.qml:364
68+msgid "Recent searches"
69+msgstr ""
70+
71+#: Dash/Apps/AppPreview.qml:135
72+msgid "Rate this"
73+msgstr ""
74+
75+#. TRANSLATORS: Number of persons who rated this app/video/whatever
76+#: Dash/Previews/Header.qml:93
77+#, qt-format
78+msgid "(%1)"
79+msgstr ""
80+
81+#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
82+#: Dash/Previews/Header.qml:105
83+#, qt-format
84+msgid "%1 review"
85+msgid_plural "%1 reviews"
86+msgstr[0] ""
87+msgstr[1] ""
88+
89+#: Dash/Previews/Reviews.qml:74
90+msgid "Add a review"
91+msgstr ""
92+
93+#: Dash/Previews/Reviews.qml:86
94+msgid "Review"
95+msgstr ""
96+
97+#: Dash/Previews/Reviews.qml:121
98+msgid "Send"
99+msgstr ""
100+
101+#: Dash/Previews/Reviews.qml:139
102+msgid "Comments:"
103+msgstr ""
104+
105+#: Greeter/Lockscreen.qml:149
106+msgid "Emergency Call"
107+msgstr ""
108+
109+#: Greeter/PassphraseLockscreen.qml:59
110+#, qt-format
111+msgid "Hello %1"
112+msgstr ""
113+
114+#: Greeter/PassphraseLockscreen.qml:59
115+msgid "Hello"
116+msgstr ""
117+
118+#: Hud/HudParametrizedActionsPage.qml:132
119+msgid "Confirm"
120+msgstr ""
121+
122+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
123+msgid "Type or say a command"
124+msgstr ""
125+
126+#: Hud/Hud.qml:84
127+msgid "Loading. Please Wait..."
128+msgstr ""
129+
130+#: Hud/Hud.qml:89
131+msgid "Speak Now..."
132+msgstr ""
133+
134+#: Hud/Hud.qml:94
135+msgid "Speaking..."
136+msgstr ""
137+
138+#: Notifications/NotificationMenuItemFactory.qml:89
139+msgid "Show password"
140+msgstr ""
141+
142+#: Panel/SearchIndicator.qml:27
143+msgid "Search"
144+msgstr ""
145+
146+#: plugins/Unity/Launcher/launcheritem.cpp:43
147+#: plugins/Unity/Launcher/launcheritem.cpp:73
148+msgid "Lock to Launcher"
149+msgstr ""
150+
151+#: plugins/Unity/Launcher/launcheritem.cpp:73
152+msgid "Unlock from Launcher"
153+msgstr ""
154+
155+#: Shell.qml:439
156+#, qt-format
157+msgid "Please enter %1"
158+msgstr ""
po/en_GB.po+28−26
@@ -8,61 +8,63 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2013-06-27 08:53+0000\n"
12−"Last-Translator: Michał Sawicz <michal.sawicz@canonical.com>\n"
11+"PO-Revision-Date: 2014-01-14 20:46+0000\n"
12+"Last-Translator: Dan Bishop <dan@danbishop.org>\n"
1313"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2013-12-29 06:04+0000\n"
19−"X-Generator: Launchpad (build 16877)\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
2020
2121#: Components/EdgeDemoOverlay.qml:151
2222msgid "Skip intro"
23−msgstr ""
23+msgstr "Skip intro"
2424
2525#: Components/EdgeDemo.qml:112
2626msgid "Right edge"
27−msgstr ""
27+msgstr "Right edge"
2828
2929#: Components/EdgeDemo.qml:113
3030msgid "Try swiping from the right edge to unlock the phone"
31−msgstr ""
31+msgstr "Try swiping from the right edge to unlock the phone"
3232
3333#: Components/EdgeDemo.qml:144
3434msgid "Top edge"
35−msgstr ""
35+msgstr "Top edge"
3636
3737#: Components/EdgeDemo.qml:145
3838msgid "Try swiping from the top edge to access the indicators"
39−msgstr ""
39+msgstr "Try swiping from the top edge to access the indicators"
4040
4141#: Components/EdgeDemo.qml:170
4242msgid "Close"
43−msgstr ""
43+msgstr "Close"
4444
4545#: Components/EdgeDemo.qml:171
4646msgid "Swipe up again to close the settings screen"
47−msgstr ""
47+msgstr "Swipe up again to close the settings screen"
4848
4949#: Components/EdgeDemo.qml:198
5050msgid "Left edge"
51−msgstr ""
51+msgstr "Left edge"
5252
5353#: Components/EdgeDemo.qml:199
5454msgid "Swipe from the left to reveal the launcher for quick access to apps"
55−msgstr ""
55+msgstr "Swipe from the left to reveal the launcher for quick access to apps"
5656
5757#: Components/EdgeDemo.qml:226
5858msgid "Well done"
59−msgstr ""
59+msgstr "Well done"
6060
6161#: Components/EdgeDemo.qml:227
6262msgid ""
6363"You have now mastered the edge gestures and can start using the "
6464"phone<br><br>Tap anywhere to start"
6565msgstr ""
66+"You have now mastered the edge gestures and can start using the "
67+"phone<br><br>Tap anywhere to start"
6668
6769#: Components/PageHeader.qml:364
6870msgid "Recent searches"
@@ -70,41 +72,41 @@ msgstr "Recent searches"
7072
7173#: Dash/Apps/AppPreview.qml:135
7274msgid "Rate this"
73−msgstr ""
75+msgstr "Rate this"
7476
7577#. TRANSLATORS: Number of persons who rated this app/video/whatever
7678#: Dash/Previews/Header.qml:93
7779#, qt-format
7880msgid "(%1)"
79−msgstr ""
81+msgstr "(%1)"
8082
8183#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
8284#: Dash/Previews/Header.qml:105
8385#, qt-format
8486msgid "%1 review"
8587msgid_plural "%1 reviews"
86−msgstr[0] ""
87−msgstr[1] ""
88+msgstr[0] "%1 review"
89+msgstr[1] "%1 reviews"
8890
8991#: Dash/Previews/Reviews.qml:74
9092msgid "Add a review"
91−msgstr ""
93+msgstr "Add a review"
9294
9395#: Dash/Previews/Reviews.qml:86
9496msgid "Review"
95−msgstr ""
97+msgstr "Review"
9698
9799#: Dash/Previews/Reviews.qml:121
98100msgid "Send"
99−msgstr ""
101+msgstr "Send"
100102
101103#: Dash/Previews/Reviews.qml:139
102104msgid "Comments:"
103−msgstr ""
105+msgstr "Comments:"
104106
105107#: Greeter/Lockscreen.qml:149
106108msgid "Emergency Call"
107−msgstr ""
109+msgstr "Emergency Call"
108110
109111#: Greeter/PassphraseLockscreen.qml:59
110112#, qt-format
@@ -137,7 +139,7 @@ msgstr "Speaking..."
137139
138140#: Notifications/NotificationMenuItemFactory.qml:89
139141msgid "Show password"
140−msgstr ""
142+msgstr "Show password"
141143
142144#: Panel/SearchIndicator.qml:27
143145msgid "Search"
@@ -146,11 +148,11 @@ msgstr "Search"
146148#: plugins/Unity/Launcher/launcheritem.cpp:43
147149#: plugins/Unity/Launcher/launcheritem.cpp:73
148150msgid "Lock to Launcher"
149−msgstr ""
151+msgstr "Lock to Launcher"
150152
151153#: plugins/Unity/Launcher/launcheritem.cpp:73
152154msgid "Unlock from Launcher"
153−msgstr ""
155+msgstr "Unlock from Launcher"
154156
155157#: Shell.qml:439
156158#, qt-format
po/es.po+4−4
@@ -8,15 +8,15 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2013-11-20 08:46+0000\n"
11+"PO-Revision-Date: 2014-01-14 21:06+0000\n"
1212"Last-Translator: Adolfo Jayme <fitoschido@gmail.com>\n"
1313"Language-Team: Spanish <es@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2013-12-29 06:04+0000\n"
19−"X-Generator: Launchpad (build 16877)\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
2020
2121#: Components/EdgeDemoOverlay.qml:151
2222msgid "Skip intro"
@@ -113,7 +113,7 @@ msgstr "Llamada de emergencia"
113113#: Greeter/PassphraseLockscreen.qml:59
114114#, qt-format
115115msgid "Hello %1"
116−msgstr "Hola %1"
116+msgstr "Hola, %1"
117117
118118#: Greeter/PassphraseLockscreen.qml:59
119119msgid "Hello"
po/fo.po+5−5
@@ -8,15 +8,15 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2013-10-01 15:13+0000\n"
11+"PO-Revision-Date: 2014-01-14 20:08+0000\n"
1212"Last-Translator: Jógvan Olsen <jeggy@jebster.net>\n"
1313"Language-Team: Faroese <fo@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2013-12-29 06:04+0000\n"
19−"X-Generator: Launchpad (build 16877)\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
2020
2121#: Components/EdgeDemoOverlay.qml:151
2222msgid "Skip intro"
@@ -24,7 +24,7 @@ msgstr ""
2424
2525#: Components/EdgeDemo.qml:112
2626msgid "Right edge"
27−msgstr ""
27+msgstr "Høgra kant"
2828
2929#: Components/EdgeDemo.qml:113
3030msgid "Try swiping from the right edge to unlock the phone"
@@ -32,7 +32,7 @@ msgstr ""
3232
3333#: Components/EdgeDemo.qml:144
3434msgid "Top edge"
35−msgstr ""
35+msgstr "Topp kantur"
3636
3737#: Components/EdgeDemo.qml:145
3838msgid "Try swiping from the top edge to access the indicators"
po/hi.ponew file+158
@@ -0,0 +1,158 @@
1+# Hindi translation for unity8
2+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5+#
6+msgid ""
7+msgstr ""
8+"Project-Id-Version: unity8\n"
9+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10+"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11+"PO-Revision-Date: 2014-01-15 01:49+0000\n"
12+"Last-Translator: Siddhanathan S. <Unknown>\n"
13+"Language-Team: Hindi <hi@li.org>\n"
14+"MIME-Version: 1.0\n"
15+"Content-Type: text/plain; charset=UTF-8\n"
16+"Content-Transfer-Encoding: 8bit\n"
17+"Plural-Forms: nplurals=2; plural=n != 1;\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
20+
21+#: Components/EdgeDemoOverlay.qml:151
22+msgid "Skip intro"
23+msgstr "परिचय छोड़"
24+
25+#: Components/EdgeDemo.qml:112
26+msgid "Right edge"
27+msgstr "दायाँ किनारा"
28+
29+#: Components/EdgeDemo.qml:113
30+msgid "Try swiping from the right edge to unlock the phone"
31+msgstr ""
32+
33+#: Components/EdgeDemo.qml:144
34+msgid "Top edge"
35+msgstr "ऊपर किनारे"
36+
37+#: Components/EdgeDemo.qml:145
38+msgid "Try swiping from the top edge to access the indicators"
39+msgstr ""
40+
41+#: Components/EdgeDemo.qml:170
42+msgid "Close"
43+msgstr "बंद करें"
44+
45+#: Components/EdgeDemo.qml:171
46+msgid "Swipe up again to close the settings screen"
47+msgstr ""
48+
49+#: Components/EdgeDemo.qml:198
50+msgid "Left edge"
51+msgstr "बायाँ किनारा"
52+
53+#: Components/EdgeDemo.qml:199
54+msgid "Swipe from the left to reveal the launcher for quick access to apps"
55+msgstr ""
56+
57+#: Components/EdgeDemo.qml:226
58+msgid "Well done"
59+msgstr "शाबाश"
60+
61+#: Components/EdgeDemo.qml:227
62+msgid ""
63+"You have now mastered the edge gestures and can start using the "
64+"phone<br><br>Tap anywhere to start"
65+msgstr ""
66+
67+#: Components/PageHeader.qml:364
68+msgid "Recent searches"
69+msgstr "पिछले खोजों"
70+
71+#: Dash/Apps/AppPreview.qml:135
72+msgid "Rate this"
73+msgstr ""
74+
75+#. TRANSLATORS: Number of persons who rated this app/video/whatever
76+#: Dash/Previews/Header.qml:93
77+#, qt-format
78+msgid "(%1)"
79+msgstr ""
80+
81+#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
82+#: Dash/Previews/Header.qml:105
83+#, qt-format
84+msgid "%1 review"
85+msgid_plural "%1 reviews"
86+msgstr[0] ""
87+msgstr[1] ""
88+
89+#: Dash/Previews/Reviews.qml:74
90+msgid "Add a review"
91+msgstr "समीक्षा दे"
92+
93+#: Dash/Previews/Reviews.qml:86
94+msgid "Review"
95+msgstr "समीक्षा"
96+
97+#: Dash/Previews/Reviews.qml:121
98+msgid "Send"
99+msgstr "भेजें"
100+
101+#: Dash/Previews/Reviews.qml:139
102+msgid "Comments:"
103+msgstr ""
104+
105+#: Greeter/Lockscreen.qml:149
106+msgid "Emergency Call"
107+msgstr "आपातकालीन कॉल"
108+
109+#: Greeter/PassphraseLockscreen.qml:59
110+#, qt-format
111+msgid "Hello %1"
112+msgstr ""
113+
114+#: Greeter/PassphraseLockscreen.qml:59
115+msgid "Hello"
116+msgstr "नमस्ते"
117+
118+#: Hud/HudParametrizedActionsPage.qml:132
119+msgid "Confirm"
120+msgstr ""
121+
122+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
123+msgid "Type or say a command"
124+msgstr ""
125+
126+#: Hud/Hud.qml:84
127+msgid "Loading. Please Wait..."
128+msgstr "काम कर रहा है | कृपया प्रतीक्षा करे |"
129+
130+#: Hud/Hud.qml:89
131+msgid "Speak Now..."
132+msgstr "अब बात करें"
133+
134+#: Hud/Hud.qml:94
135+msgid "Speaking..."
136+msgstr "अब बोल रहे हैं"
137+
138+#: Notifications/NotificationMenuItemFactory.qml:89
139+msgid "Show password"
140+msgstr ""
141+
142+#: Panel/SearchIndicator.qml:27
143+msgid "Search"
144+msgstr "खोजें"
145+
146+#: plugins/Unity/Launcher/launcheritem.cpp:43
147+#: plugins/Unity/Launcher/launcheritem.cpp:73
148+msgid "Lock to Launcher"
149+msgstr ""
150+
151+#: plugins/Unity/Launcher/launcheritem.cpp:73
152+msgid "Unlock from Launcher"
153+msgstr ""
154+
155+#: Shell.qml:439
156+#, qt-format
157+msgid "Please enter %1"
158+msgstr ""
po/hu.po+5−5
@@ -8,15 +8,15 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2014-01-07 18:02+0000\n"
12−"Last-Translator: Gabor Kelemen <kelemeng@gnome.hu>\n"
11+"PO-Revision-Date: 2014-01-14 23:02+0000\n"
12+"Last-Translator: Kristóf Kiszel <Unknown>\n"
1313"Language-Team: Hungarian <hu@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2014-01-08 05:43+0000\n"
19−"X-Generator: Launchpad (build 16877)\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
2020
2121#: Components/EdgeDemoOverlay.qml:151
2222msgid "Skip intro"
@@ -133,7 +133,7 @@ msgstr "Betöltés, kis türelmet…"
133133
134134#: Hud/Hud.qml:89
135135msgid "Speak Now..."
136−msgstr "Beszéljen most…"
136+msgstr "Most beszéljen…"
137137
138138#: Hud/Hud.qml:94
139139msgid "Speaking..."
po/mr.ponew file+158
@@ -0,0 +1,158 @@
1+# Marathi translation for unity8
2+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5+#
6+msgid ""
7+msgstr ""
8+"Project-Id-Version: unity8\n"
9+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10+"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11+"PO-Revision-Date: 2014-01-14 19:54+0000\n"
12+"Last-Translator: Rohan Deshmukh <Unknown>\n"
13+"Language-Team: Marathi <mr@li.org>\n"
14+"MIME-Version: 1.0\n"
15+"Content-Type: text/plain; charset=UTF-8\n"
16+"Content-Transfer-Encoding: 8bit\n"
17+"Plural-Forms: nplurals=2; plural=n != 1;\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
20+
21+#: Components/EdgeDemoOverlay.qml:151
22+msgid "Skip intro"
23+msgstr "परिचय वगळा"
24+
25+#: Components/EdgeDemo.qml:112
26+msgid "Right edge"
27+msgstr "उजवा काठ"
28+
29+#: Components/EdgeDemo.qml:113
30+msgid "Try swiping from the right edge to unlock the phone"
31+msgstr "फोन अनलॉक करण्यासाठी उजव्या काठावरुन स्वाइप करण्याचा प्रयत्न करा"
32+
33+#: Components/EdgeDemo.qml:144
34+msgid "Top edge"
35+msgstr "वरचा काठ"
36+
37+#: Components/EdgeDemo.qml:145
38+msgid "Try swiping from the top edge to access the indicators"
39+msgstr "इंडिकेटर वापरण्याकरिता वरचा काठावरून स्वाइप करण्याचा प्रयत्न करा"
40+
41+#: Components/EdgeDemo.qml:170
42+msgid "Close"
43+msgstr "बंद करा"
44+
45+#: Components/EdgeDemo.qml:171
46+msgid "Swipe up again to close the settings screen"
47+msgstr "सेटिंग्ज स्क्रीन बंद करण्यासाठी पुन्हा एकदा स्वाइप करा"
48+
49+#: Components/EdgeDemo.qml:198
50+msgid "Left edge"
51+msgstr "डावा काठ"
52+
53+#: Components/EdgeDemo.qml:199
54+msgid "Swipe from the left to reveal the launcher for quick access to apps"
55+msgstr "लाँचर वरील अॕप्प्स त्वरित वापरण्याकरिता डाव्या बाजूने स्वाइप करा"
56+
57+#: Components/EdgeDemo.qml:226
58+msgid "Well done"
59+msgstr "कौशल्यपूर्वक केले"
60+
61+#: Components/EdgeDemo.qml:227
62+msgid ""
63+"You have now mastered the edge gestures and can start using the "
64+"phone<br><br>Tap anywhere to start"
65+msgstr ""
66+
67+#: Components/PageHeader.qml:364
68+msgid "Recent searches"
69+msgstr ""
70+
71+#: Dash/Apps/AppPreview.qml:135
72+msgid "Rate this"
73+msgstr ""
74+
75+#. TRANSLATORS: Number of persons who rated this app/video/whatever
76+#: Dash/Previews/Header.qml:93
77+#, qt-format
78+msgid "(%1)"
79+msgstr ""
80+
81+#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
82+#: Dash/Previews/Header.qml:105
83+#, qt-format
84+msgid "%1 review"
85+msgid_plural "%1 reviews"
86+msgstr[0] ""
87+msgstr[1] ""
88+
89+#: Dash/Previews/Reviews.qml:74
90+msgid "Add a review"
91+msgstr ""
92+
93+#: Dash/Previews/Reviews.qml:86
94+msgid "Review"
95+msgstr ""
96+
97+#: Dash/Previews/Reviews.qml:121
98+msgid "Send"
99+msgstr ""
100+
101+#: Dash/Previews/Reviews.qml:139
102+msgid "Comments:"
103+msgstr ""
104+
105+#: Greeter/Lockscreen.qml:149
106+msgid "Emergency Call"
107+msgstr ""
108+
109+#: Greeter/PassphraseLockscreen.qml:59
110+#, qt-format
111+msgid "Hello %1"
112+msgstr ""
113+
114+#: Greeter/PassphraseLockscreen.qml:59
115+msgid "Hello"
116+msgstr ""
117+
118+#: Hud/HudParametrizedActionsPage.qml:132
119+msgid "Confirm"
120+msgstr ""
121+
122+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
123+msgid "Type or say a command"
124+msgstr ""
125+
126+#: Hud/Hud.qml:84
127+msgid "Loading. Please Wait..."
128+msgstr ""
129+
130+#: Hud/Hud.qml:89
131+msgid "Speak Now..."
132+msgstr ""
133+
134+#: Hud/Hud.qml:94
135+msgid "Speaking..."
136+msgstr ""
137+
138+#: Notifications/NotificationMenuItemFactory.qml:89
139+msgid "Show password"
140+msgstr ""
141+
142+#: Panel/SearchIndicator.qml:27
143+msgid "Search"
144+msgstr ""
145+
146+#: plugins/Unity/Launcher/launcheritem.cpp:43
147+#: plugins/Unity/Launcher/launcheritem.cpp:73
148+msgid "Lock to Launcher"
149+msgstr ""
150+
151+#: plugins/Unity/Launcher/launcheritem.cpp:73
152+msgid "Unlock from Launcher"
153+msgstr ""
154+
155+#: Shell.qml:439
156+#, qt-format
157+msgid "Please enter %1"
158+msgstr ""
po/pt.ponew file+158
@@ -0,0 +1,158 @@
1+# Portuguese translation for unity8
2+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5+#
6+msgid ""
7+msgstr ""
8+"Project-Id-Version: unity8\n"
9+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10+"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11+"PO-Revision-Date: 2014-01-14 19:18+0000\n"
12+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13+"Language-Team: Portuguese <pt@li.org>\n"
14+"MIME-Version: 1.0\n"
15+"Content-Type: text/plain; charset=UTF-8\n"
16+"Content-Transfer-Encoding: 8bit\n"
17+"Plural-Forms: nplurals=2; plural=n != 1;\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
20+
21+#: Components/EdgeDemoOverlay.qml:151
22+msgid "Skip intro"
23+msgstr ""
24+
25+#: Components/EdgeDemo.qml:112
26+msgid "Right edge"
27+msgstr ""
28+
29+#: Components/EdgeDemo.qml:113
30+msgid "Try swiping from the right edge to unlock the phone"
31+msgstr ""
32+
33+#: Components/EdgeDemo.qml:144
34+msgid "Top edge"
35+msgstr ""
36+
37+#: Components/EdgeDemo.qml:145
38+msgid "Try swiping from the top edge to access the indicators"
39+msgstr ""
40+
41+#: Components/EdgeDemo.qml:170
42+msgid "Close"
43+msgstr ""
44+
45+#: Components/EdgeDemo.qml:171
46+msgid "Swipe up again to close the settings screen"
47+msgstr ""
48+
49+#: Components/EdgeDemo.qml:198
50+msgid "Left edge"
51+msgstr ""
52+
53+#: Components/EdgeDemo.qml:199
54+msgid "Swipe from the left to reveal the launcher for quick access to apps"
55+msgstr ""
56+
57+#: Components/EdgeDemo.qml:226
58+msgid "Well done"
59+msgstr ""
60+
61+#: Components/EdgeDemo.qml:227
62+msgid ""
63+"You have now mastered the edge gestures and can start using the "
64+"phone<br><br>Tap anywhere to start"
65+msgstr ""
66+
67+#: Components/PageHeader.qml:364
68+msgid "Recent searches"
69+msgstr ""
70+
71+#: Dash/Apps/AppPreview.qml:135
72+msgid "Rate this"
73+msgstr ""
74+
75+#. TRANSLATORS: Number of persons who rated this app/video/whatever
76+#: Dash/Previews/Header.qml:93
77+#, qt-format
78+msgid "(%1)"
79+msgstr ""
80+
81+#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
82+#: Dash/Previews/Header.qml:105
83+#, qt-format
84+msgid "%1 review"
85+msgid_plural "%1 reviews"
86+msgstr[0] ""
87+msgstr[1] ""
88+
89+#: Dash/Previews/Reviews.qml:74
90+msgid "Add a review"
91+msgstr ""
92+
93+#: Dash/Previews/Reviews.qml:86
94+msgid "Review"
95+msgstr ""
96+
97+#: Dash/Previews/Reviews.qml:121
98+msgid "Send"
99+msgstr ""
100+
101+#: Dash/Previews/Reviews.qml:139
102+msgid "Comments:"
103+msgstr ""
104+
105+#: Greeter/Lockscreen.qml:149
106+msgid "Emergency Call"
107+msgstr ""
108+
109+#: Greeter/PassphraseLockscreen.qml:59
110+#, qt-format
111+msgid "Hello %1"
112+msgstr ""
113+
114+#: Greeter/PassphraseLockscreen.qml:59
115+msgid "Hello"
116+msgstr ""
117+
118+#: Hud/HudParametrizedActionsPage.qml:132
119+msgid "Confirm"
120+msgstr ""
121+
122+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
123+msgid "Type or say a command"
124+msgstr ""
125+
126+#: Hud/Hud.qml:84
127+msgid "Loading. Please Wait..."
128+msgstr ""
129+
130+#: Hud/Hud.qml:89
131+msgid "Speak Now..."
132+msgstr ""
133+
134+#: Hud/Hud.qml:94
135+msgid "Speaking..."
136+msgstr ""
137+
138+#: Notifications/NotificationMenuItemFactory.qml:89
139+msgid "Show password"
140+msgstr ""
141+
142+#: Panel/SearchIndicator.qml:27
143+msgid "Search"
144+msgstr ""
145+
146+#: plugins/Unity/Launcher/launcheritem.cpp:43
147+#: plugins/Unity/Launcher/launcheritem.cpp:73
148+msgid "Lock to Launcher"
149+msgstr ""
150+
151+#: plugins/Unity/Launcher/launcheritem.cpp:73
152+msgid "Unlock from Launcher"
153+msgstr ""
154+
155+#: Shell.qml:439
156+#, qt-format
157+msgid "Please enter %1"
158+msgstr ""
po/ru.po+6−4
@@ -8,16 +8,16 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2014-01-07 05:21+0000\n"
12−"Last-Translator: Ivlev Denis <Unknown>\n"
11+"PO-Revision-Date: 2014-01-14 19:17+0000\n"
12+"Last-Translator: alex <sos987@gmail.com>\n"
1313"Language-Team: Russian <ru@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
1818"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
19−"X-Launchpad-Export-Date: 2014-01-08 05:43+0000\n"
20−"X-Generator: Launchpad (build 16877)\n"
19+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
20+"X-Generator: Launchpad (build 16890)\n"
2121
2222#: Components/EdgeDemoOverlay.qml:151
2323msgid "Skip intro"
@@ -69,6 +69,8 @@ msgid ""
6969"You have now mastered the edge gestures and can start using the "
7070"phone<br><br>Tap anywhere to start"
7171msgstr ""
72+"Теперь, когда вы изучили основные движения, вы можете начать использовать "
73+"телефон.<br><br>Нажмите, чтобы начать"
7274
7375#: Components/PageHeader.qml:364
7476msgid "Recent searches"
po/sw.ponew file+158
@@ -0,0 +1,158 @@
1+# Swahili translation for unity8
2+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5+#
6+msgid ""
7+msgstr ""
8+"Project-Id-Version: unity8\n"
9+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10+"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11+"PO-Revision-Date: 2014-01-14 19:28+0000\n"
12+"Last-Translator: Damas Mlabwa <Unknown>\n"
13+"Language-Team: Swahili <sw@li.org>\n"
14+"MIME-Version: 1.0\n"
15+"Content-Type: text/plain; charset=UTF-8\n"
16+"Content-Transfer-Encoding: 8bit\n"
17+"Plural-Forms: nplurals=2; plural=n != 1;\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
20+
21+#: Components/EdgeDemoOverlay.qml:151
22+msgid "Skip intro"
23+msgstr ""
24+
25+#: Components/EdgeDemo.qml:112
26+msgid "Right edge"
27+msgstr ""
28+
29+#: Components/EdgeDemo.qml:113
30+msgid "Try swiping from the right edge to unlock the phone"
31+msgstr ""
32+
33+#: Components/EdgeDemo.qml:144
34+msgid "Top edge"
35+msgstr ""
36+
37+#: Components/EdgeDemo.qml:145
38+msgid "Try swiping from the top edge to access the indicators"
39+msgstr ""
40+
41+#: Components/EdgeDemo.qml:170
42+msgid "Close"
43+msgstr "Funga"
44+
45+#: Components/EdgeDemo.qml:171
46+msgid "Swipe up again to close the settings screen"
47+msgstr ""
48+
49+#: Components/EdgeDemo.qml:198
50+msgid "Left edge"
51+msgstr ""
52+
53+#: Components/EdgeDemo.qml:199
54+msgid "Swipe from the left to reveal the launcher for quick access to apps"
55+msgstr ""
56+
57+#: Components/EdgeDemo.qml:226
58+msgid "Well done"
59+msgstr ""
60+
61+#: Components/EdgeDemo.qml:227
62+msgid ""
63+"You have now mastered the edge gestures and can start using the "
64+"phone<br><br>Tap anywhere to start"
65+msgstr ""
66+
67+#: Components/PageHeader.qml:364
68+msgid "Recent searches"
69+msgstr ""
70+
71+#: Dash/Apps/AppPreview.qml:135
72+msgid "Rate this"
73+msgstr ""
74+
75+#. TRANSLATORS: Number of persons who rated this app/video/whatever
76+#: Dash/Previews/Header.qml:93
77+#, qt-format
78+msgid "(%1)"
79+msgstr ""
80+
81+#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
82+#: Dash/Previews/Header.qml:105
83+#, qt-format
84+msgid "%1 review"
85+msgid_plural "%1 reviews"
86+msgstr[0] ""
87+msgstr[1] ""
88+
89+#: Dash/Previews/Reviews.qml:74
90+msgid "Add a review"
91+msgstr ""
92+
93+#: Dash/Previews/Reviews.qml:86
94+msgid "Review"
95+msgstr ""
96+
97+#: Dash/Previews/Reviews.qml:121
98+msgid "Send"
99+msgstr "Tuma"
100+
101+#: Dash/Previews/Reviews.qml:139
102+msgid "Comments:"
103+msgstr "Maoni:"
104+
105+#: Greeter/Lockscreen.qml:149
106+msgid "Emergency Call"
107+msgstr ""
108+
109+#: Greeter/PassphraseLockscreen.qml:59
110+#, qt-format
111+msgid "Hello %1"
112+msgstr ""
113+
114+#: Greeter/PassphraseLockscreen.qml:59
115+msgid "Hello"
116+msgstr ""
117+
118+#: Hud/HudParametrizedActionsPage.qml:132
119+msgid "Confirm"
120+msgstr "Thibitisha"
121+
122+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
123+msgid "Type or say a command"
124+msgstr ""
125+
126+#: Hud/Hud.qml:84
127+msgid "Loading. Please Wait..."
128+msgstr ""
129+
130+#: Hud/Hud.qml:89
131+msgid "Speak Now..."
132+msgstr ""
133+
134+#: Hud/Hud.qml:94
135+msgid "Speaking..."
136+msgstr ""
137+
138+#: Notifications/NotificationMenuItemFactory.qml:89
139+msgid "Show password"
140+msgstr ""
141+
142+#: Panel/SearchIndicator.qml:27
143+msgid "Search"
144+msgstr "Tafuta"
145+
146+#: plugins/Unity/Launcher/launcheritem.cpp:43
147+#: plugins/Unity/Launcher/launcheritem.cpp:73
148+msgid "Lock to Launcher"
149+msgstr ""
150+
151+#: plugins/Unity/Launcher/launcheritem.cpp:73
152+msgid "Unlock from Launcher"
153+msgstr ""
154+
155+#: Shell.qml:439
156+#, qt-format
157+msgid "Please enter %1"
158+msgstr ""
po/tr.po+6−4
@@ -8,15 +8,15 @@ msgstr ""
88"Project-Id-Version: unity\n"
99"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1010"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11−"PO-Revision-Date: 2013-12-12 16:06+0000\n"
12−"Last-Translator: Arda Ünlü <aarda.uunlu@gmail.com>\n"
11+"PO-Revision-Date: 2014-01-14 19:05+0000\n"
12+"Last-Translator: Osman Coşkun <Unknown>\n"
1313"Language-Team: Turkish <tr@li.org>\n"
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=2; plural=n != 1;\n"
18−"X-Launchpad-Export-Date: 2013-12-29 06:04+0000\n"
19−"X-Generator: Launchpad (build 16877)\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
2020
2121#: Components/EdgeDemoOverlay.qml:151
2222msgid "Skip intro"
@@ -64,6 +64,8 @@ msgid ""
6464"You have now mastered the edge gestures and can start using the "
6565"phone<br><br>Tap anywhere to start"
6666msgstr ""
67+"Kenar hareketlerini öğrendiniz ve herhangi bir yere dokunarak telefonunuzu "
68+"<br><br> kullanmaya başlayabilirsiniz"
6769
6870#: Components/PageHeader.qml:364
6971msgid "Recent searches"
po/vi.ponew file+158
@@ -0,0 +1,158 @@
1+# Vietnamese translation for unity8
2+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
3+# This file is distributed under the same license as the unity8 package.
4+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5+#
6+msgid ""
7+msgstr ""
8+"Project-Id-Version: unity8\n"
9+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10+"POT-Creation-Date: 2013-11-29 09:21+0100\n"
11+"PO-Revision-Date: 2014-01-15 01:19+0000\n"
12+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13+"Language-Team: Vietnamese <vi@li.org>\n"
14+"MIME-Version: 1.0\n"
15+"Content-Type: text/plain; charset=UTF-8\n"
16+"Content-Transfer-Encoding: 8bit\n"
17+"Plural-Forms: nplurals=1; plural=0;\n"
18+"X-Launchpad-Export-Date: 2014-01-15 06:35+0000\n"
19+"X-Generator: Launchpad (build 16890)\n"
20+
21+#: Components/EdgeDemoOverlay.qml:151
22+msgid "Skip intro"
23+msgstr ""
24+
25+#: Components/EdgeDemo.qml:112
26+msgid "Right edge"
27+msgstr ""
28+
29+#: Components/EdgeDemo.qml:113
30+msgid "Try swiping from the right edge to unlock the phone"
31+msgstr ""
32+
33+#: Components/EdgeDemo.qml:144
34+msgid "Top edge"
35+msgstr ""
36+
37+#: Components/EdgeDemo.qml:145
38+msgid "Try swiping from the top edge to access the indicators"
39+msgstr ""
40+
41+#: Components/EdgeDemo.qml:170
42+msgid "Close"
43+msgstr ""
44+
45+#: Components/EdgeDemo.qml:171
46+msgid "Swipe up again to close the settings screen"
47+msgstr ""
48+
49+#: Components/EdgeDemo.qml:198
50+msgid "Left edge"
51+msgstr ""
52+
53+#: Components/EdgeDemo.qml:199
54+msgid "Swipe from the left to reveal the launcher for quick access to apps"
55+msgstr ""
56+
57+#: Components/EdgeDemo.qml:226
58+msgid "Well done"
59+msgstr ""
60+
61+#: Components/EdgeDemo.qml:227
62+msgid ""
63+"You have now mastered the edge gestures and can start using the "
64+"phone<br><br>Tap anywhere to start"
65+msgstr ""
66+
67+#: Components/PageHeader.qml:364
68+msgid "Recent searches"
69+msgstr ""
70+
71+#: Dash/Apps/AppPreview.qml:135
72+msgid "Rate this"
73+msgstr ""
74+
75+#. TRANSLATORS: Number of persons who rated this app/video/whatever
76+#: Dash/Previews/Header.qml:93
77+#, qt-format
78+msgid "(%1)"
79+msgstr ""
80+
81+#. TRANSLATORS: Number of persons who wrote reviews for this app/video/whatever
82+#: Dash/Previews/Header.qml:105
83+#, qt-format
84+msgid "%1 review"
85+msgid_plural "%1 reviews"
86+msgstr[0] ""
87+msgstr[1] ""
88+
89+#: Dash/Previews/Reviews.qml:74
90+msgid "Add a review"
91+msgstr ""
92+
93+#: Dash/Previews/Reviews.qml:86
94+msgid "Review"
95+msgstr ""
96+
97+#: Dash/Previews/Reviews.qml:121
98+msgid "Send"
99+msgstr ""
100+
101+#: Dash/Previews/Reviews.qml:139
102+msgid "Comments:"
103+msgstr ""
104+
105+#: Greeter/Lockscreen.qml:149
106+msgid "Emergency Call"
107+msgstr ""
108+
109+#: Greeter/PassphraseLockscreen.qml:59
110+#, qt-format
111+msgid "Hello %1"
112+msgstr ""
113+
114+#: Greeter/PassphraseLockscreen.qml:59
115+msgid "Hello"
116+msgstr ""
117+
118+#: Hud/HudParametrizedActionsPage.qml:132
119+msgid "Confirm"
120+msgstr ""
121+
122+#: Hud/Hud.qml:61 Hud/Hud.qml:99 Hud/Hud.qml:372
123+msgid "Type or say a command"
124+msgstr ""
125+
126+#: Hud/Hud.qml:84
127+msgid "Loading. Please Wait..."
128+msgstr ""
129+
130+#: Hud/Hud.qml:89
131+msgid "Speak Now..."
132+msgstr ""
133+
134+#: Hud/Hud.qml:94
135+msgid "Speaking..."
136+msgstr ""
137+
138+#: Notifications/NotificationMenuItemFactory.qml:89
139+msgid "Show password"
140+msgstr ""
141+
142+#: Panel/SearchIndicator.qml:27
143+msgid "Search"
144+msgstr ""
145+
146+#: plugins/Unity/Launcher/launcheritem.cpp:43
147+#: plugins/Unity/Launcher/launcheritem.cpp:73
148+msgid "Lock to Launcher"
149+msgstr ""
150+
151+#: plugins/Unity/Launcher/launcheritem.cpp:73
152+msgid "Unlock from Launcher"
153+msgstr ""
154+
155+#: Shell.qml:439
156+#, qt-format
157+msgid "Please enter %1"
158+msgstr ""
qml/Panel/Indicators/DefaultIndicatorPage.qml+195−2
@@ -14,12 +14,205 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 *
1616 * Authors:
17+ * Renato Araujo Oliveira Filho <renato@canonical.com>
1718 * Nick Dedekind <nick.dedekind@canonical.com>
1819 */
1920
2021import QtQuick 2.0
22+import Ubuntu.Components 0.1 as Components
2123import Unity.Indicators 0.1 as Indicators
2224
23−Indicators.IndicatorPage {
24− anchors.fill: parent
25+Indicators.IndicatorBase {
26+ id: main
27+
28+ //const
29+ property bool contentActive: false
30+ property string title: rootActionState.title
31+ property alias emptyText: emptyLabel.text
32+ property alias highlightFollowsCurrentItem : mainMenu.highlightFollowsCurrentItem
33+
34+ Indicators.UnityMenuModelStack {
35+ id: menuStack
36+ head: contentActive ? main.menuModel : null
37+
38+ property var rootMenu: null
39+
40+ onTailChanged: {
41+ if (!tail) {
42+ rootMenu = null;
43+ } else if (rootMenu != tail) {
44+ if (tail.get(0, "type") === rootMenuType) {
45+ rootMenu = menuStack.tail.submenu(0);
46+ push(rootMenu, 0);
47+ } else {
48+ rootMenu = null;
49+ }
50+ }
51+ }
52+ }
53+
54+ Connections {
55+ target: menuStack.tail
56+ onRowsInserted: {
57+ if (menuStack.rootMenu !== menuStack.tail && menuStack.tail.get(0, "type") === rootMenuType) {
58+ menuStack.rootMenu = menuStack.tail.submenu(0);
59+ menuStack.push(menuStack.rootMenu, 0);
60+ }
61+ }
62+ onModelReset: {
63+ if (menuStack.rootMenu !== menuStack.tail && menuStack.tail.get(0, "type") === rootMenuType) {
64+ menuStack.rootMenu = menuStack.tail.submenu(0);
65+ menuStack.push(menuStack.rootMenu, 0);
66+ }
67+ }
68+ }
69+
70+ ListView {
71+ id: mainMenu
72+ objectName: "mainMenu"
73+ model: menuStack.rootMenu
74+
75+ anchors {
76+ fill: parent
77+ bottomMargin: Qt.inputMethod.visible ? (Qt.inputMethod.keyboardRectangle.height - main.anchors.bottomMargin) : 0
78+
79+ Behavior on bottomMargin {
80+ NumberAnimation {
81+ duration: 175
82+ easing.type: Easing.OutQuad
83+ }
84+ }
85+ // TODO - does ever frame.
86+ onBottomMarginChanged: {
87+ mainMenu.positionViewAtIndex(mainMenu.currentIndex, ListView.End)
88+ }
89+ }
90+
91+ // Ensure all delegates are cached in order to improve smoothness of scrolling
92+ cacheBuffer: 10000
93+
94+ // Only allow flicking if the content doesn't fit on the page
95+ interactive: contentHeight > height
96+
97+ property int selectedIndex: -1
98+ property bool blockCurrentIndexChange: false
99+ // for count = 0
100+ onCountChanged: {
101+ if (count == 0 && selectedIndex != -1) {
102+ selectedIndex = -1;
103+ }
104+ }
105+ // for highlight following
106+ onSelectedIndexChanged: {
107+ if (currentIndex != selectedIndex) {
108+ var blocked = blockCurrentIndexChange;
109+ blockCurrentIndexChange = true;
110+
111+ currentIndex = selectedIndex;
112+
113+ blockCurrentIndexChange = blocked;
114+ }
115+ }
116+ // for item addition/removal
117+ onCurrentIndexChanged: {
118+ if (!blockCurrentIndexChange) {
119+ if (selectedIndex != -1 && selectedIndex != currentIndex) {
120+ selectedIndex = currentIndex;
121+ }
122+ }
123+ }
124+
125+ delegate: Loader {
126+ id: loader
127+ objectName: "menuItem" + index
128+ asynchronous: false
129+ visible: height > 0
130+
131+ property int modelIndex: index
132+
133+ anchors {
134+ left: parent.left
135+ right: parent.right
136+ }
137+
138+ sourceComponent: factory.load(model)
139+
140+ onLoaded: {
141+ if (item.hasOwnProperty("menuSelected")) {
142+ item.menuSelected = mainMenu.selectedIndex == index;
143+ item.selectMenu.connect(function() { mainMenu.selectedIndex = index; });
144+ item.deselectMenu.connect(function() { mainMenu.selectedIndex = -1; });
145+ }
146+ if (item.hasOwnProperty("menuData")) {
147+ item.menuData = Qt.binding(function() { return model; });
148+ }
149+ if (item.hasOwnProperty("menuIndex")) {
150+ item.menuIndex = Qt.binding(function() { return modelIndex; });
151+ }
152+ }
153+
154+ Binding {
155+ target: item ? item : null
156+ property: "objectName"
157+ value: model.action
158+ }
159+
160+ // TODO: Fixes lp#1243146
161+ // This is a workaround for a Qt bug. https://bugreports.qt-project.org/browse/QTBUG-34351
162+ Connections {
163+ target: mainMenu
164+ onSelectedIndexChanged: {
165+ if (loader.item && loader.item.hasOwnProperty("menuSelected")) {
166+ loader.item.menuSelected = mainMenu.selectedIndex == index;
167+ }
168+ }
169+ }
170+ }
171+ }
172+
173+ Indicators.MenuItemFactory {
174+ id: factory
175+ menuModel: mainMenu.model ? mainMenu.model : null
176+ }
177+
178+ Components.Label {
179+ id: emptyLabel
180+ objectName: "emptyLabel"
181+ visible: mainMenu.count == 0
182+ anchors {
183+ top: parent.top
184+ left: parent.left
185+ right: parent.right
186+ topMargin: units.gu(2)
187+ }
188+ wrapMode: Text.WordWrap
189+ horizontalAlignment: Text.AlignHCenter
190+
191+ //style
192+ color: "#e8e1d0"
193+ fontSize: "medium"
194+
195+ text: "Empty!"
196+ }
197+
198+ function start()
199+ {
200+ reset()
201+ if (!contentActive) {
202+ contentActive = true;
203+ }
204+ }
205+
206+ function stop()
207+ {
208+ if (contentActive) {
209+ contentActive = false;
210+ }
211+ }
212+
213+ function reset()
214+ {
215+ mainMenu.selectedIndex = -1;
216+ mainMenu.positionViewAtBeginning();
217+ }
25218}
qml/Panel/Indicators/DefaultIndicatorWidget.qml+5−3
@@ -21,15 +21,17 @@ import QtQuick 2.0
2121import Ubuntu.Components 0.1
2222import Unity.Indicators 0.1 as Indicators
2323
24−Indicators.IndicatorWidget {
24+Indicators.IndicatorBase {
2525 id: indicatorWidget
2626
27− width: itemRow.width
28−
27+ property int iconSize: height
2928 property alias leftLabel: itemLeftLabel.text
3029 property alias rightLabel: itemRightLabel.text
3130 property var icons: undefined
3231
32+ width: itemRow.width
33+ enabled: false
34+
3335 Row {
3436 id: itemRow
3537 width: childrenRect.width
tests/autopilot/unity8/shell/emulators/create_interactive_notification.py+1−1
@@ -87,7 +87,7 @@ if __name__ == '__main__':
8787 action_id,
8888 action_label,
8989 action_callback,
90− None,
90+ (None, ),
9191 None
9292 )
9393
tests/mocks/LightDM/CMakeLists.txt+1−1
@@ -33,7 +33,7 @@ add_library(MockLightDM-qml MODULE
3333# installed on the system. So we make sure we link to our full fake version
3434# At run time, we can point to whichever version we happen to be using via
3535# LD_LIBRARY_PATH.
36−add_dependencies(MockLightDM-qml MockLightDM-full)
36+add_dependencies(MockLightDM-qml MockLightDM-full MockUserMetrics)
3737target_link_libraries(MockLightDM-qml
3838 -L${CMAKE_CURRENT_BINARY_DIR}/full
3939 -llightdm-qt5-2
tests/mocks/QMenuModel/unitymenumodel.cpp+3
@@ -143,6 +143,9 @@ QVariant UnityMenuModel::data(const QModelIndex &index, int role) const
143143
144144QVariantMap UnityMenuModel::rowData(int row) const
145145{
146+ if (m_modelData.count() <= row) {
147+ return QVariantMap();
148+ }
146149 return m_modelData[row].toMap()["rowData"].toMap();
147150}
148151
tests/mocks/Unity/Indicators/CMakeLists.txt+2
@@ -7,12 +7,14 @@ include_directories(
77 ${CMAKE_CURRENT_SOURCE_DIR}
88 ${CMAKE_CURRENT_BINARY_DIR}
99 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators
10+ ${CMAKE_SOURCE_DIR}/tests/mocks/QMenuModel
1011)
1112
1213set(IndicatorsFakeQml_SOURCES
1314 fakeplugin.cpp
1415 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/indicators.h
1516 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/menucontentactivator.cpp
17+ ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/unitymenumodelstack.cpp
1618 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/visibleindicatorsmodel.cpp
1719)
1820
tests/mocks/Unity/Indicators/IndicatorBase.qml+2−1
@@ -26,8 +26,9 @@ Item {
2626 //const
2727 property string busName
2828 property string actionsObjectPath
29+ property string menuObjectPath
2930 property string rootMenuType: "com.canonical.indicator.root"
30− property string deviceMenuObjectPath
31+ property string deviceMenuObjectPath: menuObjectPath
3132
3233 property var menuModel: UnityMenuModel {}
3334
tests/mocks/Unity/Indicators/IndicatorWidget.qmldeleted−28
@@ -1,28 +0,0 @@
1−/*
2− * Copyright 2013 Canonical Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU Lesser General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU Lesser General Public License for more details.
12− *
13− * You should have received a copy of the GNU Lesser General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− *
16− * Authors:
17− * Nick Dedekind <nick.dedekind@canonical.com>
18− */
19−
20−import QtQuick 2.0
21−import Unity.Indicators 0.1 as Indicators
22−
23−IndicatorBase {
24− id: indicatorWidget
25−
26− enabled: false
27− property int iconSize: height
28−}
plugins/Unity/Indicators/qml/IndicatorWidget.qml → tests/mocks/Unity/Indicators/MenuItemFactory.qmlrenamed+15−5
@@ -18,11 +18,21 @@
1818 */
1919
2020import QtQuick 2.0
21−import Unity.Indicators 0.1 as Indicators
21+import Ubuntu.Components.ListItems 0.1 as ListItem
2222
23−IndicatorBase {
24− id: indicatorWidget
23+Item {
24+ id: menuFactory
2525
26− enabled: false
27− property int iconSize: height
26+ property var menuModel: null
27+
28+ Component {
29+ id: standardMenu;
30+ ListItem.Standard {
31+ objectName: "standardMenu"
32+ }
33+ }
34+
35+ function load(modelData) {
36+ return standardMenu;
37+ }
2838}
tests/mocks/Unity/Indicators/fakeplugin.cpp+2
@@ -25,6 +25,7 @@
2525// local
2626#include "indicators.h"
2727#include "menucontentactivator.h"
28+#include "unitymenumodelstack.h"
2829#include "visibleindicatorsmodel.h"
2930
3031void IndicatorsFakePlugin::registerTypes(const char * uri)
@@ -32,6 +33,7 @@ void IndicatorsFakePlugin::registerTypes(const char * uri)
3233 Q_INIT_RESOURCE(indicators_fake);
3334
3435 qmlRegisterType<MenuContentActivator>(uri, 0, 1, "MenuContentActivator");
36+ qmlRegisterType<UnityMenuModelStack>(uri, 0, 1, "UnityMenuModelStack");
3537 qmlRegisterType<VisibleIndicatorsModel>(uri, 0, 1, "VisibleIndicatorsModel");
3638
3739 qmlRegisterUncreatableType<MenuContentState>(uri, 0, 1, "MenuContentState", "Can't create MenuContentState class");
tests/mocks/Unity/Indicators/qmldir+1−1
@@ -3,7 +3,7 @@ plugin IndicatorsFakeQml
33
44CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml
55IndicatorBase 0.1 IndicatorBase.qml
6−IndicatorWidget 0.1 IndicatorWidget.qml
76IndicatorsModel 0.1 IndicatorsModel.qml
87FakeMenuPage 0.1 FakeMenuPage.qml
8+MenuItemFactory 0.1 MenuItemFactory.qml
99RootActionState 0.1 RootActionState.qml
tests/plugins/LightDM/CMakeLists.txt+1
@@ -11,6 +11,7 @@ include_directories(
1111 ${LIBLIGHTDM_INCLUDE_DIRS}
1212 )
1313
14+add_dependencies(test-lightdm-dbus MockLightDM-full)
1415target_link_libraries(test-lightdm-dbus
1516 -L${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full
1617 -llightdm-qt5-2
tests/qmltests/CMakeLists.txt+4
@@ -74,6 +74,10 @@ add_qml_test(Panel Panel IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFA
7474add_qml_test(Panel SearchIndicator)
7575add_qml_test(Panel/Indicators DefaultIndicatorWidget IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
7676 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")
77+add_qml_test(Panel/Indicators DefaultIndicatorPage IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
78+ ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/QMenuModel")
79+add_qml_test(Panel/Indicators MenuItemFactory IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)
80+add_qml_test(Panel/Indicators MessageMenuItemFactory IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins)
7781add_qml_test(SideStage SideStage IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS}
7882 ${CMAKE_BINARY_DIR}/tests/mocks
7983 ${CMAKE_BINARY_DIR}/plugins)
tests/qmltests/Greeter/tst_Lockscreen.qml+1−1
@@ -134,7 +134,7 @@ Rectangle {
134134 if (data.pinPadAvailable) {
135135 compare(findChild(lockscreen, "pinPadButton8").text, "8", "Could not find number 8 on PinPad")
136136 } else {
137− compare(findChild(lockscreen, "pinPadButton8"), undefined, "Could find number 8 on PinPad even though it should be only OSK")
137+ compare(findChild(lockscreen, "pinPadButton8"), null, "Could find number 8 on PinPad even though it should be only OSK")
138138 }
139139 }
140140
tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qmlnew file+179
@@ -0,0 +1,179 @@
1+/*
2+ * Copyright 2013 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import QtTest 1.0
19+import Unity.Test 0.1 as UT
20+import QMenuModel 0.1
21+import "../../../../qml/Panel/Indicators"
22+
23+Item {
24+ id: testView
25+ width: units.gu(40)
26+ height: units.gu(70)
27+
28+ DefaultIndicatorPage {
29+ id: page
30+
31+ anchors.fill: parent
32+ contentActive: true
33+
34+ busName: "test"
35+ actionsObjectPath: "test"
36+ menuObjectPath: "test"
37+
38+ rootMenuType: ""
39+ }
40+
41+ property var fullMenuData: [{
42+ "rowData": { // 1
43+ "label": "root",
44+ "sensitive": true,
45+ "isSeparator": false,
46+ "icon": "",
47+ "type": "com.canonical.indicator.root",
48+ "ext": {},
49+ "action": "",
50+ "actionState": {},
51+ "isCheck": false,
52+ "isRadio": false,
53+ "isToggled": false,
54+ },
55+ "submenu": [{
56+ "rowData": { // 1.1
57+ "label": "menu1",
58+ "sensitive": true,
59+ "isSeparator": false,
60+ "icon": "",
61+ "type": "",
62+ "ext": {},
63+ "action": "",
64+ "actionState": {},
65+ "isCheck": false,
66+ "isRadio": false,
67+ "isToggled": false,
68+ }}, {
69+ "rowData": { // 1.2
70+ "label": "menu2",
71+ "sensitive": true,
72+ "isSeparator": false,
73+ "icon": "",
74+ "type": "",
75+ "ext": {},
76+ "action": "",
77+ "actionState": {},
78+ "isCheck": false,
79+ "isRadio": false,
80+ "isToggled": false,
81+ }}, {
82+ "rowData": { // row 1.2
83+ "label": "menu3",
84+ "sensitive": true,
85+ "isSeparator": false,
86+ "icon": "",
87+ "type": "",
88+ "ext": {},
89+ "action": "",
90+ "actionState": {},
91+ "isCheck": false,
92+ "isRadio": false,
93+ "isToggled": false,
94+ }}
95+ ]
96+ }]; // end row 1
97+
98+ property var emptySubMenuData: [{
99+ "rowData": { // 1
100+ "label": "root",
101+ "sensitive": true,
102+ "isSeparator": false,
103+ "icon": "",
104+ "type": "com.canonical.indicator.root",
105+ "ext": {},
106+ "action": "",
107+ "actionState": {},
108+ "isCheck": false,
109+ "isRadio": false,
110+ "isToggled": false,
111+ },
112+ "submenu": []
113+ }]; // end row 1
114+
115+ UT.UnityTestCase {
116+ name: "DefaultIndicatorPage"
117+
118+ function init() {
119+ page.stop();
120+ var mainMenu = findChild(page, "mainMenu");
121+ verify(mainMenu.model === undefined);
122+
123+ page.rootMenuType = "com.canonical.indicator.root";
124+ page.start();
125+
126+ verify(mainMenu.model !== null);
127+ }
128+
129+ function test_reloadData() {
130+ var mainMenu = findChild(page, "mainMenu");
131+
132+ console.log("setting empty data");
133+ page.menuModel.modelData = [];
134+ tryCompare(mainMenu, "count", 0);
135+ console.log("set empty data");
136+
137+ console.log("setting full data");
138+ page.menuModel.modelData = fullMenuData;
139+ console.log("set full data");
140+ tryCompare(mainMenu, "count", 3);
141+
142+ page.menuModel.modelData = [];
143+ tryCompare(mainMenu, "count", 0);
144+
145+ page.menuModel.modelData = fullMenuData;
146+ tryCompare(mainMenu, "count", 3);
147+ }
148+
149+ function test_traverse_rootMenuType_data() {
150+ return [
151+ { tag: "Incorrect", rootMenuType: "com.canonical.indicator", expectedCount: 0},
152+ { tag: "Correct", rootMenuType: "com.canonical.indicator.root", expectedCount: 3},
153+ ]
154+ }
155+
156+ function test_traverse_rootMenuType(data) {
157+ page.rootMenuType = data.rootMenuType;
158+ page.menuModel.modelData = fullMenuData;
159+
160+ var mainMenu = findChild(page, "mainMenu");
161+ tryCompare(mainMenu, "count", data.expectedCount);
162+ }
163+
164+ function test_empty_data() {
165+ return [
166+ { tag: "EmptyNoData", modelData: [], visible: true},
167+ { tag: "EmptySubmenu", modelData: emptySubMenuData, visible: true},
168+ { tag: "NotEmpty", modelData: fullMenuData, visible: false},
169+ ]
170+ }
171+
172+ function test_empty(data) {
173+ page.menuModel.modelData = data.modelData;
174+
175+ var emptyLabel = findChild(page, "emptyLabel");
176+ tryCompare(emptyLabel, "visible", data.visible);
177+ }
178+ }
179+}
tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qmlnew file+369
@@ -0,0 +1,369 @@
1+/*
2+ * Copyright 2013 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import QtTest 1.0
19+import Unity.Test 0.1 as UT
20+import QMenuModel 0.1
21+import Unity.Indicators 0.1 as Indicators
22+
23+Item {
24+ id: testView
25+ width: units.gu(40)
26+ height: units.gu(70)
27+
28+ Indicators.MenuItemFactory {
29+ id: factory
30+ menuModel: UnityMenuModel {}
31+ }
32+
33+ Loader {
34+ id: loader
35+ property int modelIndex: 0
36+ property var data
37+
38+ onLoaded: {
39+ if (item.hasOwnProperty("menuData")) {
40+ item.menuData = data;
41+ }
42+ }
43+ }
44+
45+ UT.UnityTestCase {
46+ name: "MenuItemFactory"
47+
48+ property QtObject menuData: QtObject {
49+ property string label: "root"
50+ property bool sensitive: true
51+ property bool isSeparator: false
52+ property string icon: ""
53+ property string type: ""
54+ property var ext: undefined
55+ property string action: ""
56+ property var actionState: undefined
57+ property bool isCheck: false
58+ property bool isRadio: false
59+ property bool isToggled: false
60+ }
61+
62+ function init() {
63+ menuData.label = "";
64+ menuData.sensitive = true;
65+ menuData.isSeparator = false;
66+ menuData.icon = "";
67+ menuData.type = "";
68+ menuData.ext = undefined;
69+ menuData.action = "";
70+ menuData.actionState = undefined;
71+ menuData.isCheck = false;
72+ menuData.isRadio = false;
73+ menuData.isToggled = false;
74+
75+ loader.sourceComponent = null;
76+ loader.data = undefined;
77+
78+ verify(loader.item == null);
79+ }
80+
81+ function test_createTypes_data() {
82+ return [
83+ { tag: 'volume', type: "unity.widgets.systemsettings.tablet.volumecontrol", objectName: "sliderMenu" },
84+ { tag: 'switch1', type: "unity.widgets.systemsettings.tablet.switch", objectName: "switchMenu" },
85+
86+ { tag: 'button', type: "com.canonical.indicator.button", objectName: "buttonMenu" },
87+ { tag: 'separator', type: "com.canonical.indicator.div", objectName: "divMenu" },
88+ { tag: 'section', type: "com.canonical.indicator.section", objectName: "sectionMenu" },
89+ { tag: 'progress', type: "com.canonical.indicator.progress", objectName: "progressMenu" },
90+ { tag: 'slider1', type: "com.canonical.indicator.slider", objectName: "sliderMenu" },
91+ { tag: 'switch2', type: "com.canonical.indicator.switch", objectName: "switchMenu" },
92+
93+ { tag: 'messageItem', type: "com.canonical.indicator.messages.messageitem", objectName: "messageItem" },
94+ { tag: 'sourceItem', type: "com.canonical.indicator.messages.sourceitem", objectName: "groupedMessage" },
95+
96+ { tag: 'slider2', type: "com.canonical.unity.slider", objectName: "sliderMenu" },
97+ { tag: 'switch3', type: "com.canonical.unity.switch", objectName: "switchMenu" },
98+
99+ { tag: 'mediaplayer', type: "com.canonical.unity.media-player", objectName: "standardMenu" },
100+ { tag: 'playbackitem', type: "com.canonical.unity.playback-item", objectName: "standardMenu" },
101+
102+ { tag: 'wifisection', type: "unity.widgets.systemsettings.tablet.wifisection", objectName: "wifiSection" },
103+ { tag: 'accesspoint', type: "unity.widgets.systemsettings.tablet.accesspoint", objectName: "accessPoint" },
104+
105+ { tag: 'unknown', type: "", objectName: "standardMenu"}
106+ ];
107+ }
108+
109+ function test_createTypes(data) {
110+ menuData.type = data.type;
111+
112+ loader.data = menuData;
113+ loader.sourceComponent = factory.load(menuData);
114+ tryCompareFunction(function() { return loader.item != undefined; }, true);
115+ compare(loader.item.objectName, data.objectName, "Created object name does not match intended object (" + loader.item.objectName + " != " + data.objectName + ")");
116+ }
117+
118+ function test_create_radio() {
119+ skip("No radio component");
120+ menuData.isRadio = true;
121+
122+ loader.data = menuData;
123+ loader.sourceComponent = factory.load(menuData);
124+ tryCompareFunction(function() { return loader.item != undefined; }, true);
125+ compare(loader.item.objectName, "checkableMenu", "Should have created a checkable menu");
126+ }
127+
128+ function test_create_separator() {
129+ menuData.isSeparator = true;
130+
131+ loader.data = menuData;
132+ loader.sourceComponent = factory.load(menuData);
133+ tryCompareFunction(function() { return loader.item != undefined; }, true);
134+ compare(loader.item.objectName, "divMenu", "Should have created a separator menu");
135+ }
136+
137+ function test_create_sliderMenu_data() {
138+ return [
139+ {label: "testLabel1", enabled: false, minValue: 0, maxValue: 100, value: 10.5 },
140+ {label: "testLabel2", enabled: true, minValue: 0, maxValue: 100, value: 100 },
141+ ];
142+ }
143+
144+ function test_create_sliderMenu(data) {
145+ menuData.type = "com.canonical.indicator.slider"
146+ menuData.label = data.label;
147+ menuData.sensitive = data.enabled;
148+ menuData.actionState = data.value;
149+ menuData.ext = {
150+ 'minIcon': "file:///testMinIcon",
151+ 'maxIcon': "file:///testMaxIcon",
152+ 'minValue': data.minValue,
153+ 'maxValue': data.maxValue
154+ };
155+
156+ loader.data = menuData;
157+ loader.sourceComponent = factory.load(menuData);
158+ tryCompareFunction(function() { return loader.item != undefined; }, true);
159+ compare(loader.item.objectName, "sliderMenu", "Should have created a slider menu");
160+
161+ compare(loader.item.text, data.label, "Label does not match data");
162+ compare(loader.item.minIcon, "file:///testMinIcon", "MinIcon does not match data");
163+ compare(loader.item.maxIcon, "file:///testMaxIcon", "MaxIcon does not match data");
164+ compare(loader.item.minimumValue, data.minValue, "MinValue does not match data");
165+ compare(loader.item.maximumValue, data.maxValue, "MaxValue does not match data");
166+ compare(loader.item.value, data.value, "Calue does not match data");
167+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
168+ }
169+
170+ function test_create_buttonMenu_data() {
171+ return [
172+ {label: "testLabel1", enabled: false },
173+ {label: "testLabel2", enabled: true },
174+ ];
175+ }
176+
177+ function test_create_buttonMenu(data) {
178+ menuData.type = "com.canonical.indicator.button"
179+ menuData.label = data.label;
180+ menuData.sensitive = data.enabled;
181+
182+ loader.data = menuData;
183+ loader.sourceComponent = factory.load(menuData);
184+ tryCompareFunction(function() { return loader.item != undefined; }, true);
185+ compare(loader.item.objectName, "buttonMenu", "Should have created a button menu");
186+
187+ compare(loader.item.buttonText, data.label, "Label does not match data");
188+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
189+ }
190+
191+ function test_create_sectionMenu_data() {
192+ return [
193+ {label: "testLabel1" },
194+ {label: "testLabel2" },
195+ ];
196+ }
197+
198+ function test_create_sectionMenu(data) {
199+ menuData.type = "com.canonical.indicator.section"
200+ menuData.label = data.label;
201+
202+ loader.data = menuData;
203+ loader.sourceComponent = factory.load(menuData);
204+ tryCompareFunction(function() { return loader.item != undefined; }, true);
205+ compare(loader.item.objectName, "sectionMenu", "Should have created a section menu");
206+
207+ compare(loader.item.text, data.label, "Label does not match data");
208+ }
209+
210+ function test_create_progressMenu_data() {
211+ return [
212+ {label: "testLabel1", enabled: true, value: 10 },
213+ {label: "testLabel2", enabled: false, value: 55 },
214+ ];
215+ }
216+
217+ function test_create_progressMenu(data) {
218+ menuData.type = "com.canonical.indicator.progress"
219+ menuData.label = data.label;
220+ menuData.sensitive = data.enabled;
221+ menuData.actionState = data.value;
222+
223+ loader.data = menuData;
224+ loader.sourceComponent = factory.load(menuData);
225+ tryCompareFunction(function() { return loader.item != undefined; }, true);
226+ compare(loader.item.objectName, "progressMenu", "Should have created a progress menu");
227+
228+ compare(loader.item.text, data.label, "Label does not match data");
229+ compare(loader.item.value, data.value, "Value does not match data");
230+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
231+ }
232+
233+ function test_create_standardMenu_data() {
234+ return [
235+ {label: "testLabel1", enabled: true, icon: "file:///testIcon" },
236+ {label: "testLabel2", enabled: false, icon: "file:///testIcon2"},
237+ ];
238+ }
239+
240+ function test_create_standardMenu(data) {
241+ menuData.type = ""
242+ menuData.label = data.label;
243+ menuData.sensitive = data.enabled;
244+ menuData.icon = data.icon;
245+
246+ loader.data = menuData;
247+ loader.sourceComponent = factory.load(menuData);
248+ tryCompareFunction(function() { return loader.item != undefined; }, true);
249+ compare(loader.item.objectName, "standardMenu", "Should have created a standard menu");
250+
251+ compare(loader.item.text, data.label, "Label does not match data");
252+ compare(loader.item.iconSource, data.icon, "MaxIcon does not match data");
253+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
254+ }
255+
256+ function test_create_switchMenu_data() {
257+ return [
258+ {label: "testLabel1", enabled: true, checked: false },
259+ {label: "testLabel2", enabled: false, checked: true },
260+ ];
261+ }
262+
263+ function test_create_switchMenu(data) {
264+ menuData.type = "com.canonical.indicator.switch";
265+ menuData.label = data.label;
266+ menuData.sensitive = data.enabled;
267+ menuData.icon = "file:///testIcon";
268+ menuData.isToggled = data.checked;
269+
270+ loader.data = menuData;
271+ loader.sourceComponent = factory.load(menuData);
272+ tryCompareFunction(function() { return loader.item != undefined; }, true);
273+ compare(loader.item.objectName, "switchMenu", "Should have created a standard menu");
274+
275+ compare(loader.item.text, data.label, "Label does not match data");
276+ compare(loader.item.icon, "file:///testIcon", "MaxIcon does not match data");
277+ compare(loader.item.checked, data.checked, "Checked does not match data");
278+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
279+ }
280+
281+ function test_create_wifiSection_data() {
282+ return [
283+ {label: "testLabel1", busy: false },
284+ {label: "testLabel2", busy: true },
285+ ];
286+ }
287+
288+ function test_create_wifiSection(data) {
289+ menuData.type = "unity.widgets.systemsettings.tablet.wifisection";
290+ menuData.label = data.label;
291+ menuData.ext = { 'xCanonicalBusyAction': data.busy }
292+
293+ loader.data = menuData;
294+ loader.sourceComponent = factory.load(menuData);
295+ tryCompareFunction(function() { return loader.item != undefined; }, true);
296+ compare(loader.item.objectName, "wifiSection", "Should have created a wifi section menu");
297+
298+ compare(loader.item.text, data.label, "Label does not match data");
299+ compare(loader.item.busy, data.busy, "Busy does not match data");
300+ }
301+
302+ function test_create_accessPoint_data() {
303+ return [
304+ {label: "testLabel1", enabled: true, checked: false, secure: true, adHoc: false },
305+ {label: "testLabel2", enabled: false, checked: true, secure: false, adHoc: true },
306+ ];
307+ }
308+
309+ function test_create_accessPoint(data) {
310+ menuData.type = "unity.widgets.systemsettings.tablet.accesspoint";
311+ menuData.label = data.label;
312+ menuData.sensitive = data.enabled;
313+ menuData.isToggled = data.checked;
314+ menuData.ext = {
315+ 'xCanonicalWifiApStrengthAction': "action::strength",
316+ 'xCanonicalWifiApIsSecure': data.secure,
317+ 'xCanonicalWifiApIsAdhoc': data.adHoc,
318+ };
319+
320+ loader.data = menuData;
321+ loader.sourceComponent = factory.load(menuData);
322+ tryCompareFunction(function() { return loader.item != undefined; }, true);
323+ compare(loader.item.objectName, "accessPoint", "Should have created a access point menu");
324+
325+ compare(loader.item.label, data.label, "Label does not match data");
326+ compare(loader.item.strengthAction.name, "action::strength", "Strength action incorrect");
327+ compare(loader.item.secure, data.secure, "Secure does not match data");
328+ compare(loader.item.adHoc, data.adHoc, "AdHoc does not match data");
329+ compare(loader.item.checked, data.checked, "Checked does not match data");
330+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
331+ }
332+
333+ function test_create_messageItem() {
334+ menuData.type = "com.canonical.indicator.messages.messageitem";
335+
336+ loader.data = menuData;
337+ loader.sourceComponent = factory.load(menuData);
338+ tryCompareFunction(function() { return loader.item != undefined; }, true);
339+ compare(loader.item.objectName, "messageItem", "Should have created a message menu");
340+ }
341+
342+ function test_create_groupedMessage_data() {
343+ return [
344+ {label: "testLabel1", enabled: true, count: "5", appIcon: "file:///testIcon" },
345+ {label: "testLabel2", enabled: false, count: "10", appIcon: "file:///testIcon2" },
346+ ];
347+ }
348+
349+ function test_create_groupedMessage(data) {
350+ menuData.type = "com.canonical.indicator.messages.sourceitem";
351+ menuData.label = data.label;
352+ menuData.sensitive = data.enabled;
353+ menuData.icon = data.appIcon;
354+ menuData.ext = { 'icon': data.appIcon };
355+ menuData.actionState = [data.count];
356+ menuData.isToggled = true;
357+
358+ loader.data = menuData;
359+ loader.sourceComponent = factory.load(menuData);
360+ tryCompareFunction(function() { return loader.item != undefined; }, true);
361+ compare(loader.item.objectName, "groupedMessage", "Should have created a group message menu");
362+
363+ compare(loader.item.title, data.label, "Label does not match data");
364+ compare(loader.item.count, data.count, "Count does not match data");
365+ compare(loader.item.appIcon, data.appIcon, "App Icon does not match data");
366+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
367+ }
368+ }
369+}
tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qmlnew file+177
@@ -0,0 +1,177 @@
1+/*
2+ * Copyright 2013 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import QtTest 1.0
19+import Unity.Test 0.1 as UT
20+import QMenuModel 0.1
21+import Unity.Indicators.Messaging 0.1 as Indicators
22+
23+Item {
24+ id: testView
25+ width: units.gu(40)
26+ height: units.gu(70)
27+
28+ Indicators.MessageMenuItemFactory {
29+ id: factory
30+ menuModel: UnityMenuModel {}
31+ menuIndex: 0
32+ }
33+
34+ UT.UnityTestCase {
35+ name: "MessageMenuItemFactory"
36+
37+ property QtObject menuData: QtObject {
38+ property string label: "root"
39+ property bool sensitive: true
40+ property bool isSeparator: false
41+ property string icon: ""
42+ property string type: ""
43+ property var ext: undefined
44+ property string action: ""
45+ property var actionState: undefined
46+ property bool isCheck: false
47+ property bool isRadio: false
48+ property bool isToggled: false
49+ }
50+
51+ function init() {
52+ menuData.label = "";
53+ menuData.sensitive = true;
54+ menuData.isSeparator = false;
55+ menuData.icon = "";
56+ menuData.type = "";
57+ menuData.ext = undefined;
58+ menuData.action = "";
59+ menuData.actionState = undefined;
60+ menuData.isCheck = false;
61+ menuData.isRadio = false;
62+ menuData.isToggled = false;
63+
64+ factory.menuData = null;
65+ }
66+
67+ function test_create_simpleTextmessage_data() {
68+ return [
69+ { title: "Title1", time: new Date(2013, 10, 10).getTime()*1000, message: "This is a text message 1", avatar: "file:///avatar1", appIcon: "file:///appIcon1", enabled: true},
70+ { title: "Title2", time: new Date(2014, 12, 10).getTime()*1000, message: "This is a text message 2", avatar: "file:///avatar2", appIcon: "file:///appIcon2", enabled: false},
71+ ];
72+ }
73+
74+ function test_create_simpleTextmessage(data) {
75+ menuData.type = "com.canonical.indicator.messages.messageitem";
76+ menuData.label = data.title;
77+ menuData.sensitive = data.enabled;
78+ menuData.ext = {
79+ 'xCanonicalTime': data.time,
80+ 'xCanonicalText': data.message,
81+ 'icon': data.avatar,
82+ 'xCanonicalAppIcon': data.appIcon,
83+ };
84+ factory.menuData = menuData;
85+
86+ var loader = findChild(factory, "loader");
87+ verify(loader !== undefined);
88+
89+ tryCompare(loader.item, "objectName", "simpleTextMessage");
90+ compare(loader.item.title, data.title, "Title does not match data");
91+ compare(loader.item.time, data.time, "Time does not match data");
92+ compare(loader.item.message, data.message, "Message does not match data");
93+ compare(loader.item.avatar, data.avatar, "Avatar does not match data");
94+ compare(loader.item.appIcon, data.appIcon, "App icon does not match data");
95+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
96+ }
97+
98+ function test_create_textmessage_data() {
99+ return [
100+ { title: "Title1", time: new Date(2013, 10, 10).getTime()*1000, message: "This is a text message 1", avatar: "file:///avatar1", appIcon: "file:///appIcon1", enabled: true},
101+ { title: "Title2", time: new Date(2014, 12, 10).getTime()*1000, message: "This is a text message 2", avatar: "file:///avatar2", appIcon: "file:///appIcon2", enabled: false},
102+ ];
103+ }
104+
105+ function test_create_textmessage(data) {
106+ menuData.type = "com.canonical.indicator.messages.messageitem";
107+ menuData.label = data.title;
108+ menuData.sensitive = data.enabled;
109+ menuData.ext = {
110+ 'xCanonicalTime': data.time,
111+ 'xCanonicalText': data.message,
112+ 'icon': data.avatar,
113+ 'xCanonicalAppIcon': data.appIcon,
114+ 'xCanonicalMessageActions': [{
115+ 'parameter-type': "s",
116+ 'name': "action::reply",
117+ 'label': "Reply1"
118+ }
119+ ]
120+ };
121+ factory.menuData = menuData;
122+
123+ var loader = findChild(factory, "loader");
124+ verify(loader !== undefined);
125+
126+ tryCompare(loader.item, "objectName", "textMessage");
127+ compare(loader.item.title, data.title, "Title does not match data");
128+ compare(loader.item.time, data.time, "Time does not match data");
129+ compare(loader.item.message, data.message, "Message does not match data");
130+ compare(loader.item.avatar, data.avatar, "Avatar does not match data");
131+ compare(loader.item.appIcon, data.appIcon, "App icon does not match data");
132+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
133+ }
134+
135+
136+ function test_create_snapDecision_data() {
137+ return [
138+ { title: "Title1", time: new Date(2013, 10, 10).getTime()*1000, message: "This is a text message 1", avatar: "file:///avatar1", appIcon: "file:///appIcon1", enabled: true},
139+ { title: "Title2", time: new Date(2014, 12, 10).getTime()*1000, message: "This is a text message 2", avatar: "file:///avatar2", appIcon: "file:///appIcon2", enabled: false},
140+ ];
141+ }
142+
143+ function test_create_snapDecision(data) {
144+ menuData.type = "com.canonical.indicator.messages.messageitem";
145+ menuData.label = data.title;
146+ menuData.sensitive = data.enabled;
147+ menuData.ext = {
148+ 'xCanonicalTime': data.time,
149+ 'xCanonicalText': data.message,
150+ 'icon': data.avatar,
151+ 'xCanonicalAppIcon': data.appIcon,
152+ 'xCanonicalMessageActions': [{
153+ 'name': "action::callback",
154+ 'label': "Callback1"
155+ },{
156+ 'parameter-type': "s",
157+ 'name': "action::reply",
158+ 'label': "Reply1"
159+ }
160+ ]
161+ };
162+ factory.menuData = menuData;
163+
164+ var loader = findChild(factory, "loader");
165+ verify(loader !== undefined);
166+
167+ tryCompare(loader.item, "objectName", "snapDecision");
168+ compare(loader.item.title, data.title, "Title does not match data");
169+ compare(loader.item.time, data.time, "Time does not match data");
170+ compare(loader.item.message, data.message, "Message does not match data");
171+ compare(loader.item.avatar, data.avatar, "Avatar does not match data");
172+ compare(loader.item.appIcon, data.appIcon, "App icon does not match data");
173+ compare(loader.item.enabled, data.enabled, "Enabled does not match data");
174+ }
175+
176+ }
177+}
tests/qmltests/Panel/tst_Indicators.qml−1
@@ -227,7 +227,6 @@ Item {
227227 tryCompare(indicatorRow, "currentItemIndex", data.expected);
228228 // check for current selected tab
229229 tryCompareFunction(function() { return findChild(indicatorTabs, "indicator-fake" + (data.expected + 1)) === indicatorTabs.selectedTab }, true);
230−
231230 }
232231 }
233232}
tests/utils/modules/Unity/Test/UnityTestCase.qml+2−2
@@ -83,7 +83,7 @@ TestCase {
8383 }
8484 childs.splice(0, 1);
8585 }
86− return undefined;
86+ return null;
8787 }
8888
8989 // Find an object with the given name in the children tree of "obj"
@@ -103,7 +103,7 @@ TestCase {
103103 }
104104 childs.splice(0, 1);
105105 }
106− return undefined;
106+ return null;
107107 }
108108
109109 // Type a full string instead of keyClick letter by letter