on xenial help sign in
Merge
commit44cd05643b1827ff461d7bba4f178d918b5200f1 authorAlbert Astals <albert.astals@canonical.com> dateFri 6 Dec 2013, 09:18 (13 years ago) parent6c454b6e08a660
9 files changed+52−11
Components/EdgeDemo.qml+1 Dash/Generic/GenericCarousel.qml+1 Greeter/Greeter.qml+1−1 Shell.qml+9−1 plugins/Unity/Launcher/backend/launcherbackend.cpp+4−2 po/ar.po+5−5 tests/mocks/Unity/fake_scope.cpp+1−1 tests/qmltests/Dash/tst_GenericScopeView.qml+29 tests/qmltests/Greeter/tst_Phone.qml+1−1
Components/EdgeDemo.qml+1
@@ -31,6 +31,7 @@ Item {
3131 property bool dashEnabled: true
3232 property bool panelEnabled: true
3333 property bool panelContentEnabled: true
34+ property bool running: !launcherEnabled || !dashEnabled || !panelEnabled || !panelContentEnabled
3435
3536 property bool paused: false
3637
Dash/Generic/GenericCarousel.qml+1
@@ -28,6 +28,7 @@ DashCarousel {
2828
2929 BaseCarouselDelegate {
3030 id: item
31+ objectName: "carouselDelegate"
3132
3233 UbuntuShape {
3334 anchors.fill: parent
Greeter/Greeter.qml+1−1
@@ -51,7 +51,7 @@ Showable {
5151 signal unlocked(int uid)
5252
5353 onRightTeaserPressedChanged: {
54− if (rightTeaserPressed && !locked && x == 0) {
54+ if (rightTeaserPressed && (!locked || narrowMode) && x == 0) {
5555 teasingTimer.start();
5656 }
5757 }
Shell.qml+9−1
@@ -667,7 +667,12 @@ FocusScope {
667667 dragAreaWidth: shell.edgeSize
668668 available: (!greeter.shown || greeter.narrowMode) && edgeDemo.launcherEnabled
669669
670− onDashItemSelected: showHome()
670+ onDashItemSelected: {
671+ if (edgeDemo.running)
672+ return;
673+
674+ showHome()
675+ }
671676 onDash: {
672677 if (stages.shown) {
673678 stages.hide();
@@ -676,6 +681,9 @@ FocusScope {
676681 }
677682 onDashSwipeChanged: if (dashSwipe && stages.shown) dash.setCurrentScope("applications.scope", false, true)
678683 onLauncherApplicationSelected:{
684+ if (edgeDemo.running)
685+ return;
686+
679687 greeter.hide()
680688 shell.activateApplication(appId)
681689 }
plugins/Unity/Launcher/backend/launcherbackend.cpp+4−2
@@ -183,8 +183,10 @@ void LauncherBackend::syncFromAccounts()
183183
184184 if (m_accounts && !m_user.isEmpty()) {
185185 QVariant variant = m_accounts->getUserProperty(m_user, "com.canonical.unity.AccountsService", "launcher-items");
186− apps = qdbus_cast<QList<QVariantMap>>(variant.value<QDBusArgument>());
187− defaults = isDefaultsItem(apps);
186+ if (variant.isValid() && variant.canConvert<QDBusArgument>()) {
187+ apps = qdbus_cast<QList<QVariantMap>>(variant.value<QDBusArgument>());
188+ defaults = isDefaultsItem(apps);
189+ }
188190 }
189191
190192 if (m_accounts && defaults) { // Checking accounts as it'll be null when !useStorage
po/ar.po+5−5
@@ -8,7 +8,7 @@ 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-15 12:29+0000\n"
11+"PO-Revision-Date: 2013-12-05 06:55+0000\n"
1212"Last-Translator: Ibrahim Saed <ibraheem5000@gmail.com>\n"
1313"Language-Team: Arabic <ar@li.org>\n"
1414"MIME-Version: 1.0\n"
@@ -16,8 +16,8 @@ msgstr ""
1616"Content-Transfer-Encoding: 8bit\n"
1717"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n % 100 >= "
1818"3 && n % 100 <= 10 ? 3 : n % 100 >= 11 && n % 100 <= 99 ? 4 : 5;\n"
19−"X-Launchpad-Export-Date: 2013-11-30 05:33+0000\n"
20−"X-Generator: Launchpad (build 16856)\n"
19+"X-Launchpad-Export-Date: 2013-12-06 06:30+0000\n"
20+"X-Generator: Launchpad (build 16863)\n"
2121
2222#: Components/EdgeDemoOverlay.qml:151
2323msgid "Skip intro"
@@ -154,11 +154,11 @@ msgstr "ابحث"
154154#: plugins/Unity/Launcher/launcheritem.cpp:43
155155#: plugins/Unity/Launcher/launcheritem.cpp:73
156156msgid "Lock to Launcher"
157−msgstr ""
157+msgstr "ثبّت في الشريط"
158158
159159#: plugins/Unity/Launcher/launcheritem.cpp:73
160160msgid "Unlock from Launcher"
161−msgstr ""
161+msgstr "فُك التثبيت من الشريط"
162162
163163#: Shell.qml:439
164164#, qt-format
tests/mocks/Unity/fake_scope.cpp+1−1
@@ -204,7 +204,7 @@ DeeModel* create_categories_model(unsigned category_count) {
204204 std::to_string(i).c_str(),
205205 ("Category "+std::to_string(i)).c_str(),
206206 "gtk-apply",
207− "grid",
207+ i % 2 == 0 ? "grid" : "carousel",
208208 hints);
209209 }
210210 return category_model;
tests/qmltests/Dash/tst_GenericScopeView.qml+29
@@ -245,6 +245,35 @@ Item {
245245 verify(category.expandable);
246246 tryCompare(category, "filtered", true);
247247 }
248+
249+ function test_showPreviewCarousel() {
250+ tryCompareFunction(function() { return findChild(genericScopeView, "carouselDelegate") != undefined; }, true);
251+ var tile = findChild(genericScopeView, "carouselDelegate");
252+ mouseClick(tile, tile.width / 2, tile.height / 2);
253+ var openEffect = findChild(genericScopeView, "openEffect");
254+ tryCompare(openEffect, "gap", 1);
255+
256+ // check for it opening successfully
257+ var previewListView = findChild(genericScopeView, "previewListView");
258+ var currentPreviewItem = findChild(genericScopeView, "previewLoader0");
259+ tryCompareFunction(function() {
260+ var parts = currentPreviewItem.source.toString().split("/");
261+ var name = parts[parts.length - 1];
262+ return name == "DashPreviewPlaceholder.qml";
263+ },
264+ true);
265+ tryCompareFunction(function() {
266+ var parts = currentPreviewItem.source.toString().split("/");
267+ var name = parts[parts.length - 1];
268+ return name == "GenericPreview.qml";
269+ },
270+ true);
271+ tryCompare(currentPreviewItem, "progress", 1);
272+ tryCompare(previewListView, "open", true);
273+
274+ closePreview();
275+ tryCompare(previewListView, "open", false);
276+ }
248277 }
249278 }
250279}
tests/qmltests/Greeter/tst_Phone.qml+1−1
@@ -103,7 +103,7 @@ Item {
103103 mouseClick(greeter, greeter.width - units.gu(5), greeter.height - units.gu(1));
104104 greeter.minX = 0; // This is needed because the transition actually makes x jump once before animating
105105
106− if (!data.locked && !data.moved) {
106+ if (!data.moved) {
107107 // Check if it has been moved over by 2 GUs. Give it a 2 pixel grace area
108108 // because animation duration and teaseTimer are the same duration and
109109 // might cause slight offsets