Merge lp:~ci-train-bot/unity8/unity8-ubuntu-yakkety-landing-078 into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Merged at revision: 2649
Proposed branch: lp:~ci-train-bot/unity8/unity8-ubuntu-yakkety-landing-078
Merge into: lp:unity8
Diff against target: 12730 lines (+6137/-1336)
231 files modified
CMakeLists.txt (+1/-1)
data/unity8-greeter-wrapper (+11/-3)
debian/changelog (+77/-0)
debian/control (+8/-4)
debian/rules (+3/-2)
debian/unity8-private.install (+1/-0)
plugins/CMakeLists.txt (+1/-0)
plugins/Cursor/CMakeLists.txt (+2/-2)
plugins/Cursor/MousePointer.cpp (+92/-15)
plugins/Cursor/MousePointer.h (+23/-0)
plugins/Dash/CardCreator.js (+12/-10)
plugins/Dash/listviewwithpageheader.cpp (+5/-4)
plugins/ImageCache/CMakeLists.txt (+8/-0)
plugins/ImageCache/ImageCache.cpp (+135/-0)
plugins/ImageCache/ImageCache.h (+53/-0)
plugins/ImageCache/plugin.cpp (+39/-0)
plugins/ImageCache/plugin.h (+31/-0)
plugins/ImageCache/qmldir (+2/-0)
plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp (+0/-5)
plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h (+0/-2)
plugins/LightDM/SessionsModel.cpp (+22/-16)
plugins/LightDM/plugin.cpp (+1/-1)
plugins/SessionBroadcast/SessionBroadcast.cpp (+36/-10)
plugins/SessionBroadcast/SessionBroadcast.h (+10/-3)
plugins/Ubuntu/DownloadDaemonListener/CMakeLists.txt (+3/-1)
plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.cpp (+2/-1)
plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.h (+2/-1)
plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.cpp (+2/-2)
plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.h (+71/-4)
plugins/Ubuntu/DownloadDaemonListener/interface/metatypes.h (+3/-6)
plugins/Ubuntu/Gestures/TouchGestureArea.h (+2/-2)
plugins/Utils/CMakeLists.txt (+1/-0)
plugins/Utils/URLDispatcher.cpp (+77/-0)
plugins/Utils/URLDispatcher.h (+47/-0)
plugins/Utils/plugin.cpp (+2/-0)
plugins/Utils/windowstatestorage.cpp (+5/-4)
plugins/Utils/windowstatestorage.h (+8/-3)
po/unity8.pot (+92/-138)
qml/Components/Carousel.qml (+1/-2)
qml/Components/Flickable.qml (+24/-0)
qml/Components/FloatingFlickable.qml (+1/-0)
qml/Components/GridView.qml (+24/-0)
qml/Components/ListView.qml (+24/-0)
qml/Components/Lockscreen.qml (+1/-28)
qml/Components/PanelState/PanelState.qml (+0/-1)
qml/Components/PassphraseLockscreen.qml (+0/-4)
qml/Components/PinLockscreen.qml (+0/-4)
qml/Components/ResponsiveGridView.qml (+1/-0)
qml/Components/VolumeControl.qml (+3/-3)
qml/Components/Wallpaper.qml (+44/-0)
qml/Components/WallpaperResolver.qml (+28/-42)
qml/Components/WindowControlButtons.qml (+7/-5)
qml/Components/ZoomableImage.qml (+1/-1)
qml/Components/flickableUtils.js (+28/-0)
qml/Dash/CardTool.qml (+14/-2)
qml/Dash/DashBackground.qml (+2/-2)
qml/Dash/DashContent.qml (+0/-2)
qml/Dash/DashNavigation.qml (+1/-0)
qml/Dash/DashPageHeader.qml (+2/-0)
qml/Dash/FiltersPopover.qml (+1/-0)
qml/Dash/GenericScopeView.qml (+16/-0)
qml/Dash/PageHeaderExtraPanel.qml (+2/-0)
qml/Dash/Previews/PreviewCommentInput.qml (+15/-0)
qml/Dash/Previews/PreviewInlineVideo.qml (+47/-0)
qml/Dash/Previews/PreviewProgress.qml (+5/-1)
qml/Dash/Previews/PreviewRatingInput.qml (+27/-1)
qml/Dash/Previews/PreviewSingleton/PreviewSingleton.qml (+22/-0)
qml/Dash/Previews/PreviewSingleton/qmldir (+1/-0)
qml/Dash/PullToRefreshScopeStyle.qml (+1/-0)
qml/Dash/ScopeListView.qml (+4/-2)
qml/Dash/ScopesList.qml (+2/-0)
qml/Dash/ScopesListCategory.qml (+1/-0)
qml/Greeter/Circle.qml (+40/-5)
qml/Greeter/Clock.qml (+0/-2)
qml/Greeter/CoverPage.qml (+6/-6)
qml/Greeter/DelayedLockscreen.qml (+6/-15)
qml/Greeter/FullLightDMImpl.qml (+2/-0)
qml/Greeter/Greeter.qml (+60/-24)
qml/Greeter/GreeterPrompt.qml (+40/-9)
qml/Greeter/Infographics.qml (+19/-20)
qml/Greeter/IntegratedLightDMImpl.qml (+2/-1)
qml/Greeter/LightDMService.qml (+2/-0)
qml/Greeter/LoginAreaContainer.qml (+38/-0)
qml/Greeter/LoginList.qml (+96/-22)
qml/Greeter/NarrowView.qml (+151/-65)
qml/Greeter/SessionIcon.qml (+47/-0)
qml/Greeter/SessionsList.qml (+187/-0)
qml/Greeter/WideView.qml (+116/-45)
qml/Launcher/LauncherPanel.qml (+1/-1)
qml/Panel/IndicatorPage.qml (+1/-0)
qml/Panel/Indicators/client/IndicatorRepresentation.qml (+27/-23)
qml/Panel/Indicators/client/IndicatorsClient.qml (+1/-1)
qml/Panel/Indicators/client/IndicatorsList.qml (+22/-27)
qml/Panel/Indicators/client/IndicatorsTree.qml (+5/-8)
qml/Panel/Panel.qml (+10/-14)
qml/Shell.qml (+107/-16)
qml/Stages/AbstractStage.qml (+3/-0)
qml/Stages/DecoratedWindow.qml (+20/-0)
qml/Stages/DesktopStage.qml (+150/-76)
qml/Stages/FakeMaximizeDelegate.qml (+233/-0)
qml/Stages/MoveHandler.qml (+179/-0)
qml/Stages/Splash.qml (+3/-6)
qml/Stages/TabletStage.qml (+7/-5)
qml/Stages/TopLevelSurfaceRepeater.qml (+7/-1)
qml/Stages/WindowControlsOverlay.qml (+80/-42)
qml/Stages/WindowDecoration.qml (+12/-43)
qml/Stages/WindowResizeArea.qml (+13/-24)
qml/Wizard/Pages/10-welcome.qml (+1/-0)
qml/Wizard/Pages/20-keyboard.qml (+1/-0)
qml/Wizard/Pages/30-wifi.qml (+1/-0)
qml/Wizard/Pages/50-timezone.qml (+1/-0)
qml/Wizard/Pages/70-passwd-type.qml (+1/-0)
qml/Wizard/Pages/passcode-confirm.qml (+2/-2)
qml/Wizard/Pages/passcode-desktop.qml (+1/-0)
qml/Wizard/Pages/passcode-set.qml (+2/-2)
qml/Wizard/Pages/password-set.qml (+1/-0)
qml/Wizard/WizardItemSelector.qml (+1/-0)
tests/CMakeLists.txt (+7/-12)
tests/imports/check_imports.py (+58/-0)
tests/mocks/AccountsService/AccountsService.cpp (+19/-3)
tests/mocks/AccountsService/AccountsService.h (+3/-0)
tests/mocks/AccountsService/CMakeLists.txt (+14/-0)
tests/mocks/CMakeLists.txt (+1/-0)
tests/mocks/Cursor/CMakeLists.txt (+1/-1)
tests/mocks/Cursor/Cursor.qml (+10/-1)
tests/mocks/LightDM/IntegratedLightDM/MockSessionsModel.cpp (+29/-0)
tests/mocks/LightDM/IntegratedLightDM/MockSessionsModel.h (+12/-2)
tests/mocks/LightDM/IntegratedLightDM/MockUsersModel.cpp (+5/-0)
tests/mocks/LightDM/IntegratedLightDM/MockUsersModel.h (+2/-0)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp (+0/-5)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.h (+0/-2)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp (+22/-0)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h (+3/-3)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModelPrivate.cpp (+27/-17)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModelPrivate.h (+5/-1)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModelPrivate.cpp (+15/-1)
tests/mocks/LightDM/IntegratedLightDM/plugin.cpp (+1/-1)
tests/mocks/QtMultimedia/mediaplayer.cpp (+1/-0)
tests/mocks/QtMultimedia/mediaplayer.h (+1/-0)
tests/mocks/SessionBroadcast/CMakeLists.txt (+8/-0)
tests/mocks/SessionBroadcast/SessionBroadcast.cpp (+34/-0)
tests/mocks/SessionBroadcast/SessionBroadcast.h (+39/-0)
tests/mocks/SessionBroadcast/plugin.cpp (+31/-0)
tests/mocks/SessionBroadcast/plugin.h (+32/-0)
tests/mocks/SessionBroadcast/qmldir (+2/-0)
tests/mocks/Ubuntu/DownloadDaemonListener/MockDownloadTracker.cpp (+3/-1)
tests/mocks/Ubuntu/DownloadDaemonListener/MockDownloadTracker.h (+2/-1)
tests/mocks/Ubuntu/Telephony/MockTelepathyHelper.cpp (+27/-0)
tests/mocks/Ubuntu/Telephony/MockTelepathyHelper.h (+22/-0)
tests/mocks/Unity/Application/ApplicationInfo.cpp (+1/-1)
tests/mocks/Unity/Application/MirSurface.h (+2/-0)
tests/mocks/Unity/Indicators/CMakeLists.txt (+1/-0)
tests/mocks/Unity/Indicators/IndicatorsModel.qml (+32/-7)
tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.js (+1106/-0)
tests/mocks/Unity/Indicators/fakeplugin.cpp (+2/-0)
tests/mocks/Utils/CMakeLists.txt (+1/-0)
tests/mocks/Utils/URLDispatcher.cpp (+38/-0)
tests/mocks/Utils/URLDispatcher.h (+47/-0)
tests/mocks/Utils/plugin.cpp (+2/-0)
tests/mocks/Utils/windowstatestorage.cpp (+2/-2)
tests/mocks/Utils/windowstatestorage.h (+8/-3)
tests/plugins/CMakeLists.txt (+2/-0)
tests/plugins/Dash/cardcreator/1.res (+8/-7)
tests/plugins/Dash/cardcreator/1.res.cardcreator (+0/-8)
tests/plugins/Dash/cardcreator/10.res (+0/-1)
tests/plugins/Dash/cardcreator/11.res (+10/-9)
tests/plugins/Dash/cardcreator/11.res.cardcreator (+0/-8)
tests/plugins/Dash/cardcreator/12.res (+8/-7)
tests/plugins/Dash/cardcreator/12.res.cardcreator (+0/-8)
tests/plugins/Dash/cardcreator/2.res (+0/-1)
tests/plugins/Dash/cardcreator/3.res (+0/-1)
tests/plugins/Dash/cardcreator/4.res (+8/-7)
tests/plugins/Dash/cardcreator/4.res.cardcreator (+0/-8)
tests/plugins/Dash/cardcreator/5.res (+0/-1)
tests/plugins/Dash/cardcreator/6.res (+8/-7)
tests/plugins/Dash/cardcreator/6.res.cardcreator (+0/-8)
tests/plugins/Dash/cardcreator/7.res (+0/-1)
tests/plugins/Dash/cardcreator/8.res (+8/-7)
tests/plugins/Dash/cardcreator/8.res.cardcreator (+0/-8)
tests/plugins/Dash/cardcreator/9.res (+10/-9)
tests/plugins/Dash/cardcreator/9.res.cardcreator (+1/-9)
tests/plugins/Dash/listviewwithpageheadertest.cpp (+30/-0)
tests/plugins/ImageCache/CMakeLists.txt (+20/-0)
tests/plugins/ImageCache/test.cpp (+214/-0)
tests/plugins/ImageCache/test.qml (+23/-0)
tests/plugins/LightDM/IntegratedLightDM/CMakeLists.txt (+0/-3)
tests/plugins/LightDM/IntegratedLightDM/sessionsmodel.cpp (+32/-0)
tests/plugins/LightDM/IntegratedLightDM/usersmodel.cpp (+2/-2)
tests/plugins/SessionBroadcast/BroadcastServer.cpp (+33/-0)
tests/plugins/SessionBroadcast/BroadcastServer.h (+40/-0)
tests/plugins/SessionBroadcast/CMakeLists.txt (+45/-0)
tests/plugins/SessionBroadcast/interfaces.xml (+18/-0)
tests/plugins/SessionBroadcast/server.cpp (+37/-0)
tests/plugins/SessionBroadcast/sessionbroadcasttest.cpp (+111/-0)
tests/plugins/Utils/CMakeLists.txt (+9/-0)
tests/plugins/Utils/URLDispatcherTest.cpp (+78/-0)
tests/qmltests/CMakeLists.txt (+10/-10)
tests/qmltests/Components/tst_Carousel.qml (+0/-1)
tests/qmltests/Components/tst_Lockscreen.qml (+2/-41)
tests/qmltests/Components/tst_WallpaperResolver.qml (+28/-42)
tests/qmltests/Components/tst_ZoomableImage.qml (+1/-1)
tests/qmltests/Dash/Previews/tst_Preview.qml (+0/-2)
tests/qmltests/Dash/Previews/tst_PreviewActions.qml (+2/-1)
tests/qmltests/Dash/Previews/tst_PreviewCommentInput.qml (+28/-0)
tests/qmltests/Dash/Previews/tst_PreviewExpandable.qml (+3/-3)
tests/qmltests/Dash/Previews/tst_PreviewHeader.qml (+0/-4)
tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml (+6/-6)
tests/qmltests/Dash/Previews/tst_PreviewInlineVideo.qml (+42/-1)
tests/qmltests/Dash/Previews/tst_PreviewProgress.qml (+14/-1)
tests/qmltests/Dash/Previews/tst_PreviewRatingDisplayCreationRanges.qml (+1/-0)
tests/qmltests/Dash/Previews/tst_PreviewRatingInput.qml (+32/-0)
tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qml (+7/-7)
tests/qmltests/Dash/tst_Card.qml (+7/-2)
tests/qmltests/Dash/tst_CardTool.qml (+4/-4)
tests/qmltests/Dash/tst_Dash.qml (+25/-15)
tests/qmltests/Dash/tst_DashContent.qml (+5/-7)
tests/qmltests/Dash/tst_GenericScopeView.qml (+66/-69)
tests/qmltests/Greeter/TestView.qml (+4/-3)
tests/qmltests/Greeter/tst_Greeter.qml (+8/-1)
tests/qmltests/Greeter/tst_NarrowView.qml (+47/-12)
tests/qmltests/Greeter/tst_WideView.qml (+154/-7)
tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml (+1/-1)
tests/qmltests/Panel/tst_IndicatorItem.qml (+4/-3)
tests/qmltests/Panel/tst_IndicatorPage.qml (+0/-2)
tests/qmltests/Panel/tst_Panel.qml (+19/-2)
tests/qmltests/Stages/tst_DesktopStage.qml (+3/-3)
tests/qmltests/Stages/tst_Splash.qml (+15/-1)
tests/qmltests/Stages/tst_WindowResizeArea.qml (+9/-1)
tests/qmltests/tst_OrientedShell.qml (+1/-0)
tests/qmltests/tst_Shell.qml (+160/-7)
tests/qmltests/tst_ShellWithPin.qml (+51/-47)
To merge this branch: bzr merge lp:~ci-train-bot/unity8/unity8-ubuntu-yakkety-landing-078
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+305480@code.launchpad.net

Description of the change

want to see a diff

To post a comment you must log in.
2609. By Andrea Cimitan

override some Qt Components definitions so we can have sane default values for flick speeds

Approved by: Albert Astals Cid

2610. By Andrea Cimitan

Elide the label text inside recent searches panel (LP: #1611796)

Approved by: Albert Astals Cid

2611. By Andrea Cimitan

Add a PreviewSingleton module to store some data for previews (LP: #1595235)

Approved by: Albert Astals Cid

2612. By Andrea Cimitan

Use PreviewSingleton for PreviewRatingInput and PreviewCommentInput (LP: #1595235)

Approved by: Albert Astals Cid

2613. By Andrea Cimitan

rework GenericScopeView PullToRefresh test

Approved by: Albert Astals Cid

2614. By Andrea Cimitan

use mouseFlick instead touchFlick for manage_dash_move_current

Approved by: Albert Astals Cid

2615. By Andrea Cimitan

add a couple of waiting tricks for a flaky dash test

Approved by: Albert Astals Cid

2616. By Albert Astals Cid

LVWPH: update clipItem height when list height changes (LP: #1606935)

Approved by: Andrea Cimitan

2617. By Albert Astals Cid

Put the touchdown shape inside a loader

We only create the shape when needed, saving a bit of CPU time when we're just scrolling around the scopes

Doesn't seem to make the touchdown appear time on press noticeably slower

Approved by: Andrea Cimitan, Josh Arenson, Michael Terry, Unity8 CI Bot

2618. By Albert Astals Cid

No need for the touchdown in the card for the cardtool

We only use that card to get some size measurements so the touchdown code adds nothing

Approved by: Andrea Cimitan

2619. By Albert Astals Cid

Add bottom gradient to the Show Less floating button

Approved by: Andrea Cimitan

2620. By Albert Astals Cid

Remove artShapeSize from non cardtool cards

artShapeSize is only used in the cardtool card to read the value them we pass down in fixedArtShapeSize

According to qmlprofiler evaluating this useless binding accounts for ~0.5% when scrolling up and down a very long scope

Approved by: Andrea Cimitan

2621. By Albert Astals Cid

LVWPH: Fix case in which header was shown incorrectly

Making the list smaller did not move the header so it ended up being in view

Approved by: Josh Arenson

2622. By Albert Astals Cid

LVWPH: Fix items cut on top in the dash (or at least some instances of it)

This reverts a workaround for tests failing introduced in r2121

The commit log of that revision says "The other solutions involve implementing maxYExtent"
which we actually implemented in r2351 so the workaround would not seem needed anymore
and on top of it is causing brokenness so remove it

Approved by: Josh Arenson

2623. By Albert Astals Cid

Reduce calls to CardCreatorCache.getCardComponent while the component is being created

As it is right now on the phone we do calls with empty cardTool.artShapeStyle and cardTool.categoryLayout
that are useless so protect against it to save time. This is not reproducible on the desktop (there's a different Qt though 5.6 vs 5.4) (LP: #1615675)

Approved by: Andrea Cimitan

2624. By Albert Astals Cid

Dash::test_cardIconStyle change compare into tryCompareFunction

On very slow machines (CI or valgrind) the UCProportionalShape is not created immediately so give it some slack

Approved by: Andrea Cimitan

2625. By Albert Astals Cid

Make PreviewActionsTest::test_comboButton more stable

We also wait for the buttonGroup height to have settled otherwise the mouse clicks can end up in the wrong place

Approved by: Andrea Cimitan

2626. By Albert Astals Cid

Adapt onShiftedContentXChanged to work when the content changes very abruptly

This happens in CI quite a bit (and locally when run under xvfb)

Approved by: Michael Zanetti

2627. By Albert Astals Cid

Make tryGenericScopeView show the scope correctly

Approved by: Andrea Cimitan

2628. By Albert Astals Cid

Make sure the spinner does not get too close to the title text (LP: #1597392)

Approved by: Lukáš Tinkl

2629. By Albert Astals Cid

Show "Pull to refresh" in white when overlaid in low luminance colors (LP: #1596849)

Approved by: Michael Terry

2630. By Josh Arenson

Add a frontend to the sessions model and enable a session chooser in the greeter.

Approved by: Michael Terry

2631. By Michael Terry

Support launching apps inside a unity8 session from the greeter and support emergency dialing inside the greeter.

2632. By Michael Terry

Fix tryShell to actually show appropriate backgrounds for each mock user.

Approved by: Albert Astals Cid

2633. By Michael Terry

Add an indicator to the greeter when a user is logged in (only shown if we have more than one user)

Approved by: Albert Astals Cid

2634. By Michael Terry

Hide the greeter OSK if indicators are open and don't show the edge tutorial during an emergency call.

Approved by: Albert Astals Cid

2635. By Michael Terry

Switch from lockscreen PIN pad to a passcode entry box that uses the OSK.

Approved by: Albert Astals Cid

2636. By Michael Terry

Use the default system wallpaper instead of our custom one.

Additionally, crop the default wallpaper instead of rotating it, only darken the wallpaper if it's not the default one, and avoid reloading the wallpaper when the device is rotated.

2637. By Daniel d'Andrada

Set progress bar indeterminate when processing signal received. (LP: #1249349)

Approved by: Daniel d'Andrada

2638. By Daniel d'Andrada

Implement cursor confinement (LP: #1590099)

Approved by: Lukáš Tinkl

2639. By Lukáš Tinkl

Implement edge maximizing (aka window snapping) (LP: #1602628)

Approved by: Daniel d'Andrada

2640. By Albert Astals Cid

Make test_Shell non ultra slow again

By setting the timeout to 0 to findChild we know may return null (LP: #1597366)

Approved by: Lukáš Tinkl, Michael Zanetti

2641. By Albert Astals Cid

Improve findChild calls inside tryCompareFunction.

findChild has a timeout retry since a while ago. This means that if we have a findChild inside a tryCompareFunction the retries multiply and it takes around 30 minutes for the tryCompareFunction to fail if the findChild is failing, so what we do is set the timeout of findChild to 0.

In other cases we just had a tryCompareFunction that made sure the findChild after it would succeed, since now findChild has a retry mechanism we can just remove that tryCompareFunction altogether.

Approved by: Michał Sawicz, Unity8 CI Bot

2642. By Lukáš Tinkl

On the PC platform (as opposed to running on $devices), use the "mute" action instead of silent mode

Approved by: Albert Astals Cid, Unity8 CI Bot

2643. By Lukáš Tinkl

Respect Fitt's law wrt the window control buttons in panel (LP: #1611959)

Approved by: Albert Astals Cid

2644. By Lukáš Tinkl

Fix 2 failing color-related tests

Approved by: Michał Sawicz

2645. By Michael Terry

Update look of infographic a bit

Approved by: Albert Astals Cid

2646. By Michael Terry

Make infographic bubbles white even on the default wallpaper.

Approved by: Albert Astals Cid

2647. By Marco Trevisan (Treviño)

Indicators, mocks: add fake indicators menuitem to populate mocks with different menu types

Also allow to use fake indicators model in IndicatorsClient

Approved by: Albert Astals Cid, Lukáš Tinkl

2648. By Marco Trevisan (Treviño)

IndicatorsClient: use PageHeader and ListItemLayout's

Approved by: Albert Astals Cid

2649. By CI Train Bot Account

Releasing 8.14+16.10.20160922-0ubuntu1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-08-22 16:58:28 +0000
3+++ CMakeLists.txt 2016-09-22 07:47:54 +0000
4@@ -57,7 +57,7 @@
5 find_package(Qt5Concurrent 5.4 REQUIRED)
6 find_package(Qt5Sql 5.4 REQUIRED)
7
8-pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=21)
9+pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=22)
10 pkg_check_modules(GEONAMES REQUIRED geonames>=0.2)
11 pkg_check_modules(GIO REQUIRED gio-2.0>=2.32)
12 pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32)
13
14=== modified file 'data/unity8-greeter-wrapper'
15--- data/unity8-greeter-wrapper 2016-06-14 17:53:56 +0000
16+++ data/unity8-greeter-wrapper 2016-09-22 07:47:54 +0000
17@@ -1,8 +1,7 @@
18 #!/bin/sh
19 # -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
20 #
21-# Copyright (C) 2011,2013 Canonical Ltd
22-# Author: Michael Terry <michael.terry@canonical.com>
23+# Copyright (C) 2011,2013,2016 Canonical Ltd
24 #
25 # This program is free software: you can redistribute it and/or modify it under
26 # the terms of the GNU General Public License as published by the Free Software
27@@ -42,6 +41,8 @@
28 SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
29 rm -f $SUB_SOCKET # clear socket in case we were hard shut down
30
31+echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >"$XDG_RUNTIME_DIR/dbus-session"
32+
33 # If touch session script (which sets up grid units and mir variables) is available, use it
34 TOUCH_WRAPPER=
35 if [ -x /usr/bin/ubuntu-touch-session ]; then
36@@ -65,7 +66,14 @@
37 MIR_SOCKET=$SUB_SOCKET $TOUCH_WRAPPER /sbin/upstart --user --no-startup-event &
38 INIT_PID=$!
39 while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0.1; done
40-export UPSTART_SESSION=$(/sbin/initctl list-sessions | grep "^$INIT_PID " | cut -d' ' -f2)
41+. "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session"
42+export UPSTART_SESSION
43+
44+# Connect upstart to system, but do first command in a loop to avoid any
45+# race condition between the session file above being written and upstart being
46+# ready to handle requests.
47+while ! /sbin/initctl notify-dbus-address "$DBUS_SESSION_BUS_ADDRESS"; do sleep 0.1; done
48+/sbin/initctl start notify-cgmanager
49
50 # Start any pre-greeter tasks if needed (like wizard)
51 /sbin/initctl emit unity8-greeter-starting
52
53=== modified file 'debian/changelog'
54--- debian/changelog 2016-08-31 11:56:09 +0000
55+++ debian/changelog 2016-09-22 07:47:54 +0000
56@@ -1,3 +1,80 @@
57+unity8 (8.14+16.10.20160922-0ubuntu1) yakkety; urgency=medium
58+
59+ [ Albert Astals Cid ]
60+ * LVWPH: update clipItem height when list height changes (LP:
61+ #1606935)
62+ * Put the touchdown shape inside a loader
63+ * No need for the touchdown in the card for the cardtool
64+ * Add bottom gradient to the Show Less floating button
65+ * Remove artShapeSize from non cardtool cards
66+ * LVWPH: Fix case in which header was shown incorrectly
67+ * LVWPH: Fix items cut on top in the dash (or at least some instances
68+ of it)
69+ * Reduce calls to CardCreatorCache.getCardComponent while the
70+ component is being created (LP: #1615675)
71+ * Dash::test_cardIconStyle change compare into tryCompareFunction
72+ * Make PreviewActionsTest::test_comboButton more stable
73+ * Adapt onShiftedContentXChanged to work when the content changes very
74+ abruptly
75+ * Make tryGenericScopeView show the scope correctly
76+ * Make sure the spinner does not get too close to the title text (LP:
77+ #1597392)
78+ * Show "Pull to refresh" in white when overlaid in low luminance
79+ colors (LP: #1596849)
80+ * Make test_Shell non ultra slow again (LP: #1597366)
81+ * Improve findChild calls inside tryCompareFunction.
82+
83+ [ Andrea Cimitan ]
84+ * override some Qt Components definitions so we can have sane default
85+ values for flick speeds
86+ * Elide the label text inside recent searches panel (LP: #1611796)
87+ * Add a PreviewSingleton module to store some data for previews (LP:
88+ #1595235)
89+ * Use PreviewSingleton for PreviewRatingInput and PreviewCommentInput
90+ (LP: #1595235)
91+ * rework GenericScopeView PullToRefresh test
92+ * use mouseFlick instead touchFlick for manage_dash_move_current
93+ * add a couple of waiting tricks for a flaky dash test
94+
95+ [ Daniel d'Andrada ]
96+ * Set progress bar indeterminate when processing signal received. (LP:
97+ #1249349)
98+ * Implement cursor confinement (LP: #1590099)
99+
100+ [ Josh Arenson ]
101+ * Add a frontend to the sessions model and enable a session chooser in
102+ the greeter.
103+
104+ [ Lukáš Tinkl ]
105+ * Implement edge maximizing (aka window snapping) (LP: #1602628)
106+ * On the PC platform (as opposed to running on $devices), use the
107+ "mute" action instead of silent mode
108+ * Respect Fitt's law wrt the window control buttons in panel (LP:
109+ #1611959)
110+ * Fix 2 failing color-related tests
111+
112+ [ Marco Trevisan (Treviño) ]
113+ * Indicators, mocks: add fake indicators menuitem to populate mocks
114+ with different menu types
115+ * IndicatorsClient: use PageHeader and ListItemLayout's
116+
117+ [ Michael Terry ]
118+ * Support launching apps inside a unity8 session from the greeter and
119+ support emergency dialing inside the greeter.
120+ * Fix tryShell to actually show appropriate backgrounds for each mock
121+ user.
122+ * Add an indicator to the greeter when a user is logged in (only shown
123+ if we have more than one user)
124+ * Hide the greeter OSK if indicators are open and don't show the edge
125+ tutorial during an emergency call.
126+ * Switch from lockscreen PIN pad to a passcode entry box that uses the
127+ OSK.
128+ * Use the default system wallpaper instead of our custom one.
129+ * Update look of infographic a bit
130+ * Make infographic bubbles white even on the default wallpaper.
131+
132+ -- Michał Sawicz <michal.sawicz@canonical.com> Thu, 22 Sep 2016 07:46:57 +0000
133+
134 unity8 (8.14+16.10.20160831.3-0ubuntu1) yakkety; urgency=medium
135
136 [ Daniel d'Andrada ]
137
138=== modified file 'debian/control'
139--- debian/control 2016-08-22 16:58:28 +0000
140+++ debian/control 2016-09-22 07:47:54 +0000
141@@ -11,9 +11,9 @@
142 # to g++ so we don't try to run arm g++
143 # on an x86 CPU for example, when cross-compiling.
144 g++:native,
145- libandroid-properties-dev,
146 graphviz,
147 gsettings-ubuntu-schemas (>= 0.0.2+14.10.20140815),
148+ libandroid-properties-dev,
149 libconnectivity-qt1-dev (>= 0.7.1),
150 libevdev-dev,
151 libgeonames-dev (>= 0.2),
152@@ -32,10 +32,12 @@
153 libqt5svg5-dev,
154 libqt5xmlpatterns5-dev,
155 libsystemsettings-dev,
156+ libubuntu-download-manager-common-dev,
157 libubuntugestures5-dev (>= 1.3.2030),
158 libubuntugestures5-private-dev (>= 1.3.2030),
159 libudev-dev,
160- libunity-api-dev (>= 7.118),
161+ libudm-common-dev,
162+ libunity-api-dev (>= 7.119),
163 libusermetricsoutput1-dev,
164 # Need those X11 libs touch emulation from mouse events in manual QML tests on a X11 desktop
165 libx11-dev[!arm64 !armhf],
166@@ -133,6 +135,7 @@
167 ${shlibs:Depends},
168 Recommends: indicator-keyboard,
169 indicator-session,
170+ unity-greeter-session-broadcast,
171 unity-scope-click,
172 unity-scope-mediascanner2,
173 Breaks: indicator-network (<< 0.5.1+14.10.20141014),
174@@ -153,7 +156,8 @@
175 qtdeclarative5-ubuntu-settings-components (>= 0.7),
176 qtdeclarative5-unity-notifications-plugin (>= 0.1.2) | unity-notifications-impl,
177 ubuntu-thumbnailer-impl-0,
178- unity-application-impl-21,
179+ ubuntu-wallpapers,
180+ unity-application-impl-22,
181 unity-notifications-impl-3,
182 unity-plugin-scopes | unity-scopes-impl,
183 unity-scopes-impl-12,
184@@ -199,7 +203,7 @@
185 Depends: ${misc:Depends},
186 ${shlibs:Depends},
187 Provides: unity-application-impl,
188- unity-application-impl-21,
189+ unity-application-impl-22,
190 Replaces: unity8-autopilot (<< 8.02+15.04.20150422-0ubuntu1)
191 Description: Fake environment for running Unity 8 shell
192 Provides fake implementations of some QML modules used by Unity 8 shell
193
194=== modified file 'debian/rules'
195--- debian/rules 2016-06-20 14:56:40 +0000
196+++ debian/rules 2016-09-22 07:47:54 +0000
197@@ -37,6 +37,7 @@
198 override_dh_makeshlibs:
199 dh_makeshlibs -Nunity8-private -Nunity8-fake-env
200
201-# libMockLightDM-qml.so links against liblightdm-qt5-3.so which doesn't exist
202 override_dh_shlibdeps:
203- dh_shlibdeps -XlibMockLightDM-qml.so
204+ # Some mock libraries link against liblightdm-qt5-3.so which we want to
205+ # avoid, since we only really link against our mock one, not the system one.
206+ dh_shlibdeps -XlibMockLightDM-qml.so -XlibMockAccountsService-qml.so
207
208=== modified file 'debian/unity8-private.install'
209--- debian/unity8-private.install 2016-06-07 16:10:36 +0000
210+++ debian/unity8-private.install 2016-09-22 07:47:54 +0000
211@@ -4,6 +4,7 @@
212 usr/lib/*/unity8/qml/Dash
213 usr/lib/*/unity8/qml/GlobalShortcut
214 usr/lib/*/unity8/qml/Greeter
215+usr/lib/*/unity8/qml/ImageCache
216 usr/lib/*/unity8/qml/LightDM
217 usr/lib/*/unity8/qml/Lights
218 usr/lib/*/unity8/qml/Powerd
219
220=== modified file 'plugins/CMakeLists.txt'
221--- plugins/CMakeLists.txt 2016-05-25 22:11:50 +0000
222+++ plugins/CMakeLists.txt 2016-09-22 07:47:54 +0000
223@@ -15,6 +15,7 @@
224 add_subdirectory(Cursor)
225 add_subdirectory(GlobalShortcut)
226 add_subdirectory(Greeter)
227+add_subdirectory(ImageCache)
228 add_subdirectory(LightDM)
229 add_subdirectory(Lights)
230 add_subdirectory(Dash)
231
232=== modified file 'plugins/Cursor/CMakeLists.txt'
233--- plugins/Cursor/CMakeLists.txt 2016-06-02 09:32:33 +0000
234+++ plugins/Cursor/CMakeLists.txt 2016-09-22 07:47:54 +0000
235@@ -28,6 +28,6 @@
236 ${QT5PLATFORM_SUPPORT_LDFLAGS}
237 )
238
239-qt5_use_modules(Cursor-qml Qml Quick DBus Network Gui Sql Concurrent Svg)
240+qt5_use_modules(Cursor-qml Qml Quick Svg)
241
242-add_unity8_plugin(Cursor 1.0 Cursor TARGETS Cursor-qml)
243+add_unity8_plugin(Cursor 1.1 Cursor TARGETS Cursor-qml)
244
245=== modified file 'plugins/Cursor/MousePointer.cpp'
246--- plugins/Cursor/MousePointer.cpp 2016-06-20 07:27:19 +0000
247+++ plugins/Cursor/MousePointer.cpp 2016-09-22 07:47:54 +0000
248@@ -22,6 +22,7 @@
249
250 #include <QQuickWindow>
251 #include <QGuiApplication>
252+#include <QtMath>
253
254 #include <qpa/qwindowsysteminterface.h>
255
256@@ -49,28 +50,77 @@
257 m_accumulatedMovement -= appliedMovement;
258
259 qreal newX = x() + appliedMovement.x();
260- if (newX < 0) {
261+ qreal newY = y() + appliedMovement.y();
262+ const qreal sceneWidth = parentItem()->width();
263+ const qreal sceneHeight = parentItem()->height();
264+
265+ if (newX <= 0 && newY < m_topBoundaryOffset) { // top left corner
266+ const auto distance = qSqrt(qPow(newX, 2) + qPow(newY-m_topBoundaryOffset, 2));
267+ Q_EMIT pushedTopLeftCorner(qAbs(distance), buttons);
268+ m_pushing = true;
269+ } else if (newX >= sceneWidth-1 && newY < m_topBoundaryOffset) { // top right corner
270+ const auto distance = qSqrt(qPow(newX-sceneWidth, 2) + qPow(newY-m_topBoundaryOffset, 2));
271+ Q_EMIT pushedTopRightCorner(qAbs(distance), buttons);
272+ m_pushing = true;
273+ } else if (newX < 0 && newY >= sceneHeight-1) { // bottom left corner
274+ const auto distance = qSqrt(qPow(newX, 2) + qPow(newY-sceneHeight, 2));
275+ Q_EMIT pushedBottomLeftCorner(qAbs(distance), buttons);
276+ m_pushing = true;
277+ } else if (newX >= sceneWidth-1 && newY >= sceneHeight-1) { // bottom right corner
278+ const auto distance = qSqrt(qPow(newX-sceneWidth, 2) + qPow(newY-sceneHeight, 2));
279+ Q_EMIT pushedBottomRightCorner(qAbs(distance), buttons);
280+ m_pushing = true;
281+ } else if (newX < 0) { // left edge
282 Q_EMIT pushedLeftBoundary(qAbs(newX), buttons);
283- newX = 0;
284- } else if (newX >= parentItem()->width()) {
285- Q_EMIT pushedRightBoundary(newX - (parentItem()->width() - 1), buttons);
286- newX = parentItem()->width() - 1;
287- }
288- setX(newX);
289-
290- qreal newY = y() + appliedMovement.y();
291- if (newY < 0) {
292- newY = 0;
293- } else if (newY >= parentItem()->height()) {
294- newY = parentItem()->height() - 1;
295- }
296- setY(newY);
297+ m_pushing = true;
298+ } else if (newX >= sceneWidth) { // right edge
299+ Q_EMIT pushedRightBoundary(newX - (sceneWidth - 1), buttons);
300+ m_pushing = true;
301+ } else if (newY < m_topBoundaryOffset) { // top edge
302+ Q_EMIT pushedTopBoundary(qAbs(newY - m_topBoundaryOffset), buttons);
303+ m_pushing = true;
304+ } else if (Q_LIKELY(newX > 0 && newX < sceneWidth-1 && newY > 0 && newY < sceneHeight-1)) { // normal pos, not pushing
305+ if (m_pushing) {
306+ Q_EMIT pushStopped();
307+ m_pushing = false;
308+ }
309+ }
310+
311+ applyItemConfinement(newX, newY);
312+
313+ setX(qBound(0.0, newX, sceneWidth - 1));
314+ setY(qBound(0.0, newY, sceneHeight - 1));
315
316 QPointF scenePosition = mapToItem(nullptr, QPointF(0, 0));
317 QWindowSystemInterface::handleMouseEvent(window(), timestamp, scenePosition /*local*/, scenePosition /*global*/,
318 buttons, modifiers);
319 }
320
321+void MousePointer::applyItemConfinement(qreal &newX, qreal &newY)
322+{
323+ Q_ASSERT(parentItem() != nullptr);
324+
325+ if (m_confiningItem.isNull()) {
326+ return;
327+ }
328+
329+ QRectF confiningItemGeometry(0, 0, m_confiningItem->width(), m_confiningItem->height());
330+
331+ QRectF confiningRect = m_confiningItem->mapRectToItem(parentItem(), confiningItemGeometry);
332+
333+ if (newX < confiningRect.x()) {
334+ newX = confiningRect.x();
335+ } else if (newX > confiningRect.right()) {
336+ newX = confiningRect.right();
337+ }
338+
339+ if (newY < confiningRect.y()) {
340+ newY = confiningRect.y();
341+ } else if (newY > confiningRect.bottom()) {
342+ newY = confiningRect.bottom();
343+ }
344+}
345+
346 void MousePointer::handleWheelEvent(ulong timestamp, QPoint angleDelta, Qt::KeyboardModifiers modifiers)
347 {
348 if (!parentItem()) {
349@@ -82,6 +132,20 @@
350 QPoint() /* pixelDelta */, angleDelta, modifiers, Qt::ScrollUpdate);
351 }
352
353+int MousePointer::topBoundaryOffset() const
354+{
355+ return m_topBoundaryOffset;
356+}
357+
358+void MousePointer::setTopBoundaryOffset(int topBoundaryOffset)
359+{
360+ if (m_topBoundaryOffset == topBoundaryOffset)
361+ return;
362+
363+ m_topBoundaryOffset = topBoundaryOffset;
364+ Q_EMIT topBoundaryOffsetChanged(topBoundaryOffset);
365+}
366+
367 void MousePointer::itemChange(ItemChange change, const ItemChangeData &value)
368 {
369 if (change == ItemSceneChange) {
370@@ -156,3 +220,16 @@
371 {
372 CursorImageProvider::instance()->setCustomCursor(customCursor);
373 }
374+
375+QQuickItem* MousePointer::confiningItem() const
376+{
377+ return m_confiningItem.data();
378+}
379+
380+void MousePointer::setConfiningItem(QQuickItem *item)
381+{
382+ if (item != m_confiningItem) {
383+ m_confiningItem = item;
384+ Q_EMIT confiningItemChanged();
385+ }
386+}
387
388=== modified file 'plugins/Cursor/MousePointer.h'
389--- plugins/Cursor/MousePointer.h 2016-06-17 01:13:22 +0000
390+++ plugins/Cursor/MousePointer.h 2016-09-22 07:47:54 +0000
391@@ -27,6 +27,8 @@
392
393 class MousePointer : public MirMousePointerInterface {
394 Q_OBJECT
395+ Q_PROPERTY(QQuickItem* confiningItem READ confiningItem WRITE setConfiningItem NOTIFY confiningItemChanged)
396+ Q_PROPERTY(int topBoundaryOffset READ topBoundaryOffset WRITE setTopBoundaryOffset NOTIFY topBoundaryOffsetChanged)
397 public:
398 MousePointer(QQuickItem *parent = nullptr);
399
400@@ -38,6 +40,12 @@
401
402 void setCustomCursor(const QCursor &) override;
403
404+ QQuickItem* confiningItem() const;
405+ void setConfiningItem(QQuickItem*);
406+
407+ int topBoundaryOffset() const;
408+ void setTopBoundaryOffset(int topBoundaryOffset);
409+
410 public Q_SLOTS:
411 void handleMouseEvent(ulong timestamp, QPointF movement, Qt::MouseButtons buttons,
412 Qt::KeyboardModifiers modifiers) override;
413@@ -46,7 +54,16 @@
414 Q_SIGNALS:
415 void pushedLeftBoundary(qreal amount, Qt::MouseButtons buttons);
416 void pushedRightBoundary(qreal amount, Qt::MouseButtons buttons);
417+ void pushedTopBoundary(qreal amount, Qt::MouseButtons buttons);
418+ void pushedTopLeftCorner(qreal amount, Qt::MouseButtons buttons);
419+ void pushedTopRightCorner(qreal amount, Qt::MouseButtons buttons);
420+ void pushedBottomLeftCorner(qreal amount, Qt::MouseButtons buttons);
421+ void pushedBottomRightCorner(qreal amount, Qt::MouseButtons buttons);
422+ void pushStopped();
423 void mouseMoved();
424+ void confiningItemChanged();
425+
426+ void topBoundaryOffsetChanged(int topBoundaryOffset);
427
428 protected:
429 void itemChange(ItemChange change, const ItemChangeData &value) override;
430@@ -56,6 +73,7 @@
431
432 private:
433 void registerWindow(QWindow *window);
434+ void applyItemConfinement(qreal &newX, qreal &newY);
435
436 QPointer<QWindow> m_registeredWindow;
437 QPointer<QScreen> m_registeredScreen;
438@@ -64,6 +82,11 @@
439
440 // Accumulated, unapplied, mouse movement.
441 QPointF m_accumulatedMovement;
442+
443+ QPointer<QQuickItem> m_confiningItem;
444+
445+ int m_topBoundaryOffset{0};
446+ bool m_pushing{false};
447 };
448
449 #endif // MOUSEPOINTER_H
450
451=== modified file 'plugins/Dash/CardCreator.js'
452--- plugins/Dash/CardCreator.js 2016-08-08 08:32:27 +0000
453+++ plugins/Dash/CardCreator.js 2016-09-22 07:47:54 +0000
454@@ -331,13 +331,15 @@
455 }\n';
456
457 // %1 is used as anchors of touchdown effect
458-var kTouchdownCode = 'UbuntuShape { \n\
459- id: touchdown; \n\
460- objectName: "touchdown"; \n\
461+var kTouchdownCode = 'Loader { \n\
462+ active: root.pressed; \n\
463 anchors { %1 } \n\
464- visible: root.pressed; \n\
465- radius: "medium"; \n\
466- borderSource: "radius_pressed.sci" \n\
467+ sourceComponent: UbuntuShape { \n\
468+ objectName: "touchdown"; \n\
469+ anchors.fill: parent; \n\
470+ radius: "medium"; \n\
471+ borderSource: "radius_pressed.sci" \n\
472+ } \n\
473 }\n';
474
475 // %1 is used as anchors of subtitleLabel
476@@ -506,10 +508,10 @@
477 }
478
479 if (hasArt) {
480- code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
481-
482 var artShapeAspect;
483 if (isCardTool) {
484+ code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
485+
486 var artShapeAspect = components["art"] && components["art"]["aspect-ratio"] || 1;
487 if (isNaN(artShapeAspect)) {
488 artShapeAspect = 1;
489@@ -573,7 +575,7 @@
490 .arg(artShapeHolderShapeCode)
491 .arg(fallbackStatusCode)
492 .arg(fallbackURICode);
493- } else {
494+ } else if (isCardTool) {
495 code += 'readonly property size artShapeSize: Qt.size(-1, -1);\n'
496 }
497
498@@ -923,7 +925,7 @@
499 code += kSocialActionsRowCode.arg(socialAnchors).arg(socialColor);
500 }
501
502- if (artShapeStyle != "shadow" && artShapeStyle != "icon") {
503+ if (artShapeStyle != "shadow" && artShapeStyle != "icon" && !isCardTool) {
504 var touchdownAnchors;
505 if (hasBackground) {
506 touchdownAnchors = 'fill: backgroundLoader';
507
508=== modified file 'plugins/Dash/listviewwithpageheader.cpp'
509--- plugins/Dash/listviewwithpageheader.cpp 2016-06-27 18:45:19 +0000
510+++ plugins/Dash/listviewwithpageheader.cpp 2016-09-22 07:47:54 +0000
511@@ -587,6 +587,10 @@
512 } else {
513 m_headerItem->setY(-m_minYExtent);
514 }
515+ } else if (m_headerItemShownHeight == 0 && m_previousContentY > m_headerItem->y() && contentY() < m_headerItem->y()) {
516+ // The header was hidden but now that we've moved up (e.g. because of item removed) it's visible
517+ // make sure it isn't
518+ m_headerItem->setY(-m_minYExtent);
519 }
520 Q_EMIT headerItemShownHeightChanged();
521 } else {
522@@ -978,6 +982,7 @@
523
524 void ListViewWithPageHeader::onHeightChanged()
525 {
526+ m_clipItem->setHeight(height() - m_headerItemShownHeight);
527 polish();
528 }
529
530@@ -1388,10 +1393,6 @@
531
532 m_contentHeightDirty = false;
533 adjustMinYExtent();
534- if (contentHeight + m_minYExtent < height()) {
535- // need this since in the previous call to adjustMinYExtent contentHeight is not set yet
536- m_minYExtent = 0;
537- }
538 m_inContentHeightKeepHeaderShown = m_headerItem && m_headerItem->y() == contentY();
539 setContentHeight(contentHeight);
540 m_inContentHeightKeepHeaderShown = false;
541
542=== added directory 'plugins/ImageCache'
543=== added file 'plugins/ImageCache/CMakeLists.txt'
544--- plugins/ImageCache/CMakeLists.txt 1970-01-01 00:00:00 +0000
545+++ plugins/ImageCache/CMakeLists.txt 2016-09-22 07:47:54 +0000
546@@ -0,0 +1,8 @@
547+add_library(ImageCache-qml MODULE
548+ ImageCache.cpp
549+ plugin.cpp
550+ )
551+
552+qt5_use_modules(ImageCache-qml Gui Qml Quick)
553+
554+add_unity8_plugin(ImageCache 0.1 ImageCache TARGETS ImageCache-qml)
555
556=== added file 'plugins/ImageCache/ImageCache.cpp'
557--- plugins/ImageCache/ImageCache.cpp 1970-01-01 00:00:00 +0000
558+++ plugins/ImageCache/ImageCache.cpp 2016-09-22 07:47:54 +0000
559@@ -0,0 +1,135 @@
560+/*
561+ * Copyright (C) 2016 Canonical, Ltd.
562+ *
563+ * This program is free software; you can redistribute it and/or modify
564+ * it under the terms of the GNU General Public License as published by
565+ * the Free Software Foundation; version 3.
566+ *
567+ * This program is distributed in the hope that it will be useful,
568+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
569+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
570+ * GNU General Public License for more details.
571+ *
572+ * You should have received a copy of the GNU General Public License
573+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
574+ */
575+
576+#include <QDateTime>
577+#include <QDebug>
578+#include <QDir>
579+#include <QUrl>
580+#include <QUrlQuery>
581+
582+#include "ImageCache.h"
583+
584+ImageCache::ImageCache()
585+ : QQuickImageProvider(QQmlImageProviderBase::Image,
586+ QQmlImageProviderBase::ForceAsynchronousImageLoading)
587+{
588+}
589+
590+QString ImageCache::imageCacheRoot()
591+{
592+ QString xdgCache(qgetenv("XDG_CACHE_HOME"));
593+ if (xdgCache.isEmpty()) {
594+ xdgCache = QDir::homePath() + QStringLiteral("/.cache");
595+ }
596+
597+ return QDir::cleanPath(xdgCache) + QStringLiteral("/unity8/imagecache");
598+}
599+
600+QFileInfo ImageCache::imagePath(const QUrl &image)
601+{
602+ QUrlQuery query(image);
603+
604+ auto name = query.queryItemValue(QStringLiteral("name"));
605+ if (name.isEmpty()) {
606+ name = QStringLiteral("/paths") + image.toLocalFile();
607+ } else {
608+ name = QStringLiteral("/names/") + name;
609+ }
610+
611+ return QFileInfo(imageCacheRoot() + name);
612+}
613+
614+bool ImageCache::needsUpdate(const QUrl &image, const QFileInfo &cachePath, const QSize &imageSize, const QSize &requestedSize, QSize &finalSize)
615+{
616+ if (!cachePath.exists())
617+ return true;
618+
619+ QFileInfo imageInfo(image.toLocalFile());
620+ if (imageInfo.lastModified() > cachePath.lastModified())
621+ return true;
622+
623+ QSize cacheSize(QImageReader(cachePath.filePath()).size());
624+ finalSize = calculateSize(imageSize, requestedSize);
625+ if (finalSize.isValid() && cacheSize != finalSize)
626+ return true;
627+
628+ return false;
629+}
630+
631+QSize ImageCache::calculateSize(const QSize &imageSize, const QSize &requestedSize)
632+{
633+ QSize finalSize(requestedSize);
634+
635+ if (finalSize.width() == 0) {
636+ finalSize.setWidth(imageSize.width() * (((double)finalSize.height()) / imageSize.height()));
637+ } else if (finalSize.height() == 0) {
638+ finalSize.setHeight(imageSize.height() * (((double)finalSize.width()) / imageSize.width()));
639+ }
640+
641+ return finalSize;
642+}
643+
644+QImage ImageCache::loadAndCacheImage(QImageReader &reader, const QFileInfo &cachePath, const QSize &finalSize)
645+{
646+ reader.setQuality(100);
647+ reader.setScaledSize(finalSize);
648+ auto format = reader.format(); // can't get this after reading
649+
650+ QImage loadedImage(reader.read());
651+ if (loadedImage.isNull()) {
652+ qWarning() << "ImageCache could not read image" << reader.fileName() << ":" << reader.errorString();
653+ return QImage();
654+ }
655+
656+ cachePath.dir().mkpath(QStringLiteral("."));
657+ loadedImage.save(cachePath.filePath(), format, 100);
658+
659+ return loadedImage;
660+}
661+
662+QImage ImageCache::requestImage(const QString &id, QSize *size, const QSize &requestedSize)
663+{
664+ QUrl image(id);
665+ QImageReader imageReader(image.toLocalFile());
666+ QSize imageSize(imageReader.size());
667+ QImage result;
668+
669+ // Early exit here, with no sourceSize, scaled-up sourceSize, or bad source image
670+ if ((requestedSize.width() <= 0 && requestedSize.height() <= 0) ||
671+ imageSize.isEmpty() ||
672+ requestedSize.height() >= imageSize.height() ||
673+ requestedSize.width() >= imageSize.width()) {
674+ // We're only interested in scaling down, not up.
675+ result = imageReader.read();
676+ *size = result.size();
677+ return result;
678+ }
679+
680+ auto cachePath = imagePath(image);
681+ QSize finalSize;
682+
683+ if (needsUpdate(image, cachePath, imageSize, requestedSize, finalSize)) {
684+ if (finalSize.isEmpty()) {
685+ finalSize = calculateSize(imageSize, requestedSize);
686+ }
687+ result = loadAndCacheImage(imageReader, cachePath, finalSize);
688+ } else {
689+ result = QImage(cachePath.filePath());
690+ }
691+
692+ *size = result.size();
693+ return result;
694+}
695
696=== added file 'plugins/ImageCache/ImageCache.h'
697--- plugins/ImageCache/ImageCache.h 1970-01-01 00:00:00 +0000
698+++ plugins/ImageCache/ImageCache.h 2016-09-22 07:47:54 +0000
699@@ -0,0 +1,53 @@
700+/*
701+ * Copyright (C) 2016 Canonical, Ltd.
702+ *
703+ * This program is free software; you can redistribute it and/or modify
704+ * it under the terms of the GNU General Public License as published by
705+ * the Free Software Foundation; version 3.
706+ *
707+ * This program is distributed in the hope that it will be useful,
708+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
709+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
710+ * GNU General Public License for more details.
711+ *
712+ * You should have received a copy of the GNU General Public License
713+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
714+ */
715+
716+#pragma once
717+
718+#include <QFileInfo>
719+#include <QImageReader>
720+#include <QQuickImageProvider>
721+#include <QSize>
722+
723+/**
724+ * This class accepts an id formulated like a URL. So you'd use something like:
725+ *
726+ * Image {
727+ * source: "image://unity8imagecache/file:///usr/share/..."
728+ * }
729+ *
730+ * Right now, we only support file:/// URLs. We do accept some flags though:
731+ *
732+ * ?name=NAME
733+ * - This will use NAME as the cache lookup key instead of the provided URL.
734+ *
735+ * We don't do any cleaning of old cached files yet. So you may want to always
736+ * provide a name to avoid leaving lots of files around.
737+ */
738+
739+class ImageCache: public QQuickImageProvider
740+{
741+public:
742+ ImageCache();
743+
744+ QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) override;
745+
746+private:
747+ static QString imageCacheRoot();
748+ static QFileInfo imagePath(const QUrl &image);
749+ static bool needsUpdate(const QUrl &image, const QFileInfo &cachePath, const QSize &imageSize, const QSize &requestedSize, QSize &finalSize);
750+ static QSize calculateSize(const QSize &imageSize, const QSize &requestedSize);
751+ static QImage loadAndCacheImage(QImageReader &reader, const QFileInfo &cachePath, const QSize &finalSize);
752+};
753
754=== added file 'plugins/ImageCache/plugin.cpp'
755--- plugins/ImageCache/plugin.cpp 1970-01-01 00:00:00 +0000
756+++ plugins/ImageCache/plugin.cpp 2016-09-22 07:47:54 +0000
757@@ -0,0 +1,39 @@
758+/*
759+ * Copyright (C) 2016 Canonical, Ltd.
760+ *
761+ * This program is free software; you can redistribute it and/or modify
762+ * it under the terms of the GNU General Public License as published by
763+ * the Free Software Foundation; version 3.
764+ *
765+ * This program is distributed in the hope that it will be useful,
766+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
767+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
768+ * GNU General Public License for more details.
769+ *
770+ * You should have received a copy of the GNU General Public License
771+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
772+ */
773+
774+#include <QQmlEngine>
775+
776+#include "ImageCache.h"
777+#include "plugin.h"
778+
779+#include <QtQml>
780+
781+void ImageCachePlugin::registerTypes(const char *uri)
782+{
783+ Q_ASSERT(uri == QLatin1String("ImageCache"));
784+
785+ qmlRegisterTypeNotAvailable(uri, 0, 1, "__ImageCacheIgnoreMe",
786+ QStringLiteral("Ignore this: QML plugins must contain at least one type"));
787+}
788+
789+void ImageCachePlugin::initializeEngine(QQmlEngine* engine, const char* uri)
790+{
791+ Q_ASSERT(uri == QLatin1String("ImageCache"));
792+
793+ QQmlExtensionPlugin::initializeEngine(engine, uri);
794+
795+ engine->addImageProvider("unity8imagecache", new ImageCache);
796+}
797
798=== added file 'plugins/ImageCache/plugin.h'
799--- plugins/ImageCache/plugin.h 1970-01-01 00:00:00 +0000
800+++ plugins/ImageCache/plugin.h 2016-09-22 07:47:54 +0000
801@@ -0,0 +1,31 @@
802+/*
803+ * Copyright (C) 2016 Canonical, Ltd.
804+ *
805+ * This program is free software; you can redistribute it and/or modify
806+ * it under the terms of the GNU General Public License as published by
807+ * the Free Software Foundation; version 3.
808+ *
809+ * This program is distributed in the hope that it will be useful,
810+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
811+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
812+ * GNU General Public License for more details.
813+ *
814+ * You should have received a copy of the GNU General Public License
815+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
816+ */
817+
818+#pragma once
819+
820+#include <QQmlExtensionPlugin>
821+
822+class QQmlEngine;
823+
824+class ImageCachePlugin : public QQmlExtensionPlugin
825+{
826+ Q_OBJECT
827+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
828+
829+public:
830+ void registerTypes(const char* uri) override;
831+ void initializeEngine(QQmlEngine* engine, const char* uri) override;
832+};
833
834=== added file 'plugins/ImageCache/qmldir'
835--- plugins/ImageCache/qmldir 1970-01-01 00:00:00 +0000
836+++ plugins/ImageCache/qmldir 2016-09-22 07:47:54 +0000
837@@ -0,0 +1,2 @@
838+module ImageCache
839+plugin ImageCache-qml
840
841=== modified file 'plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp'
842--- plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp 2016-03-02 02:37:37 +0000
843+++ plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp 2016-09-22 07:47:54 +0000
844@@ -78,11 +78,6 @@
845 return true;
846 }
847
848-bool Greeter::lockHint () const
849-{
850- return false;
851-}
852-
853 QString Greeter::selectUserHint() const
854 {
855 return QLatin1String("");
856
857=== modified file 'plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h'
858--- plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h 2015-09-11 13:38:45 +0000
859+++ plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h 2016-09-22 07:47:54 +0000
860@@ -45,7 +45,6 @@
861
862 Q_PROPERTY(QString hostname READ hostname CONSTANT)
863 Q_PROPERTY(bool hasGuestAccount READ hasGuestAccountHint CONSTANT)
864- Q_PROPERTY(bool locked READ lockHint CONSTANT)
865
866 Q_ENUMS(PromptType MessageType)
867
868@@ -68,7 +67,6 @@
869 bool hideUsersHint() const;
870 bool showManualLoginHint() const;
871 bool showRemoteLoginHint() const;
872- bool lockHint () const;
873 bool hasGuestAccountHint() const;
874 QString selectUserHint() const;
875 bool selectGuestHint() const;
876
877=== modified file 'plugins/LightDM/SessionsModel.cpp'
878--- plugins/LightDM/SessionsModel.cpp 2016-06-14 20:08:43 +0000
879+++ plugins/LightDM/SessionsModel.cpp 2016-09-22 07:47:54 +0000
880@@ -47,15 +47,15 @@
881 Q_EMIT iconSearchDirectoriesChanged();
882 }
883
884-QUrl SessionsModel::iconUrl(const QString sessionName) const
885+QUrl SessionsModel::iconUrl(const QString sessionKey) const
886 {
887 Q_FOREACH(const QUrl& searchDirectory, m_iconSearchDirectories)
888 {
889 // This is an established icon naming convention
890 QString customIconUrl = searchDirectory.toString(QUrl::StripTrailingSlash) +
891- "/custom_" + sessionName + "_badge.png";
892+ "/custom_" + sessionKey + "_badge.png";
893 QString iconUrl = searchDirectory.toString(QUrl::StripTrailingSlash) +
894- "/" + sessionName + "_badge.png";
895+ "/" + sessionKey + "_badge.png";
896
897 QFile customIconFile(customIconUrl);
898 QFile iconFile(iconUrl);
899@@ -63,29 +63,35 @@
900 return QUrl(customIconUrl);
901 } else if (iconFile.exists()) {
902 return QUrl(iconUrl);
903- } else{
904+ } else {
905 // Search the legacy way
906 QString path = searchDirectory.toString(QUrl::StripTrailingSlash) + "/";
907- if (sessionName == "ubuntu" || sessionName == "ubuntu-2d") {
908+ bool iconFound = false;
909+ if (sessionKey == "ubuntu" || sessionKey == "ubuntu-2d") {
910 path += "ubuntu_badge.png";
911+ iconFound = true;
912 } else if(
913- sessionName == "gnome-classic" ||
914- sessionName == "gnome-flashback-compiz" ||
915- sessionName == "gnome-flashback-metacity" ||
916- sessionName == "gnome-shell" ||
917- sessionName == "gnome-wayland" ||
918- sessionName == "gnome"
919+ sessionKey == "gnome-classic" ||
920+ sessionKey == "gnome-flashback-compiz" ||
921+ sessionKey == "gnome-flashback-metacity" ||
922+ sessionKey == "gnome-shell" ||
923+ sessionKey == "gnome-wayland" ||
924+ sessionKey == "gnome"
925 ){
926 path += "gnome_badge.png";
927- } else if (sessionName == "plasma") {
928+ iconFound = true;
929+ } else if (sessionKey == "plasma") {
930 path += "kde_badge.png";
931- } else if (sessionName == "xterm") {
932+ iconFound = true;
933+ } else if (sessionKey == "xterm") {
934 path += "recovery_console_badge.png";
935- } else if (sessionName == "remote-login") {
936+ iconFound = true;
937+ } else if (sessionKey == "remote-login") {
938 path += "remote_login_help.png";
939+ iconFound = true;
940 }
941
942- if (QFile(path).exists()) {
943+ if (QFile(path).exists() && iconFound) {
944 return path;
945 }
946 }
947@@ -99,7 +105,7 @@
948 {
949 switch (role) {
950 case SessionsModel::IconRole:
951- return iconUrl(m_model->data(index, Qt::DisplayRole).toString());
952+ return iconUrl(m_model->data(index, QLightDM::SessionsModel::KeyRole).toString());
953 default:
954 return m_model->data(index, role);
955 }
956
957=== modified file 'plugins/LightDM/plugin.cpp'
958--- plugins/LightDM/plugin.cpp 2015-11-18 03:52:01 +0000
959+++ plugins/LightDM/plugin.cpp 2016-09-22 07:47:54 +0000
960@@ -82,7 +82,7 @@
961 qRegisterMetaType<QLightDM::Greeter::PromptType>("QLightDM::Greeter::PromptType");
962
963 qmlRegisterSingletonType<SessionsModel>(uri, 0, 1, "Sessions", sessions_provider);
964- qmlRegisterUncreatableType<SessionsModel>(uri, 0, 1, "SessionRoles", QStringLiteral("Type is not instantiable"));
965+ qmlRegisterUncreatableType<QLightDM::SessionsModel>(uri, 0, 1, "SessionRoles", QStringLiteral("Type is not instantiable"));
966
967 qmlRegisterSingletonType<UsersModel>(uri, 0, 1, "Users", users_provider);
968 qmlRegisterUncreatableType<QLightDM::UsersModel>(uri, 0, 1, "UserRoles", QStringLiteral("Type is not instantiable"));
969
970=== modified file 'plugins/SessionBroadcast/SessionBroadcast.cpp'
971--- plugins/SessionBroadcast/SessionBroadcast.cpp 2016-04-19 20:36:29 +0000
972+++ plugins/SessionBroadcast/SessionBroadcast.cpp 2016-09-22 07:47:54 +0000
973@@ -1,5 +1,5 @@
974 /*
975- * Copyright (C) 2013 Canonical, Ltd.
976+ * Copyright (C) 2013,2016 Canonical, Ltd.
977 *
978 * This program is free software; you can redistribute it and/or modify
979 * it under the terms of the GNU General Public License as published by
980@@ -12,12 +12,12 @@
981 *
982 * You should have received a copy of the GNU General Public License
983 * along with this program. If not, see <http://www.gnu.org/licenses/>.
984- *
985- * Author: Michael Terry <michael.terry@canonical.com>
986 */
987
988 #include "SessionBroadcast.h"
989 #include <QDBusConnection>
990+#include <QDBusConnectionInterface>
991+#include <QDBusInterface>
992
993 #include <glib.h>
994
995@@ -27,13 +27,39 @@
996 m_username = QString::fromUtf8(g_get_user_name());
997
998 auto connection = QDBusConnection::SM_BUSNAME();
999-
1000- connection.connect(QStringLiteral("com.canonical.Unity.Greeter.Broadcast"),
1001- QStringLiteral("/com/canonical/Unity/Greeter/Broadcast"),
1002- QStringLiteral("com.canonical.Unity.Greeter.Broadcast"),
1003- QStringLiteral("ShowHome"),
1004- this,
1005- SLOT(onShowHome(const QString &)));
1006+ auto interface = connection.interface();
1007+ interface->startService(QStringLiteral("com.canonical.Unity.Greeter.Broadcast"));
1008+
1009+ m_broadcaster = new QDBusInterface(QStringLiteral("com.canonical.Unity.Greeter.Broadcast"),
1010+ QStringLiteral("/com/canonical/Unity/Greeter/Broadcast"),
1011+ QStringLiteral("com.canonical.Unity.Greeter.Broadcast"),
1012+ connection, this);
1013+
1014+ connect(m_broadcaster, SIGNAL(StartUrl(const QString &, const QString &)),
1015+ this, SLOT(onStartUrl(const QString &, const QString &)));
1016+
1017+ connect(m_broadcaster, SIGNAL(ShowHome(const QString &)),
1018+ this, SLOT(onShowHome(const QString &)));
1019+}
1020+
1021+void SessionBroadcast::requestUrlStart(const QString &username, const QString &url)
1022+{
1023+ m_broadcaster->asyncCall(QStringLiteral("RequestUrlStart"), username, url);
1024+}
1025+
1026+void SessionBroadcast::requestHomeShown(const QString &username)
1027+{
1028+ m_broadcaster->asyncCall(QStringLiteral("RequestHomeShown"), username);
1029+}
1030+
1031+void SessionBroadcast::onStartUrl(const QString &username, const QString &url)
1032+{
1033+ // Since this signal is just used for testing, we don't *really* care if
1034+ // username matches, but just in case we do eventually use the signal, we
1035+ // should only listen to our own requests.
1036+ if (username == m_username) {
1037+ Q_EMIT startUrl(url);
1038+ }
1039 }
1040
1041 void SessionBroadcast::onShowHome(const QString &username)
1042
1043=== modified file 'plugins/SessionBroadcast/SessionBroadcast.h'
1044--- plugins/SessionBroadcast/SessionBroadcast.h 2016-04-06 19:03:42 +0000
1045+++ plugins/SessionBroadcast/SessionBroadcast.h 2016-09-22 07:47:54 +0000
1046@@ -1,5 +1,5 @@
1047 /*
1048- * Copyright (C) 2013 Canonical, Ltd.
1049+ * Copyright (C) 2013,2016 Canonical, Ltd.
1050 *
1051 * This program is free software; you can redistribute it and/or modify
1052 * it under the terms of the GNU General Public License as published by
1053@@ -12,8 +12,6 @@
1054 *
1055 * You should have received a copy of the GNU General Public License
1056 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1057- *
1058- * Authors: Michael Terry <michael.terry@canonical.com>
1059 */
1060
1061 #ifndef UNITY_SESSIONBROADCAST_H
1062@@ -31,14 +29,23 @@
1063 public:
1064 explicit SessionBroadcast(QObject *parent = 0);
1065
1066+ Q_INVOKABLE void requestUrlStart(const QString &username, const QString &url);
1067+ Q_INVOKABLE void requestHomeShown(const QString &username);
1068+
1069 Q_SIGNALS:
1070+ // This signal isn't actually used by the shell
1071+ // (unity-greeter-session-broadcast handles launching an app for us), but
1072+ // it's useful for testing the plugin.
1073+ void startUrl(const QString &url);
1074 void showHome();
1075
1076 private Q_SLOTS:
1077+ void onStartUrl(const QString &username, const QString &url);
1078 void onShowHome(const QString &username);
1079
1080 private:
1081 QString m_username;
1082+ QDBusInterface *m_broadcaster;
1083 };
1084
1085 #endif
1086
1087=== modified file 'plugins/Ubuntu/DownloadDaemonListener/CMakeLists.txt'
1088--- plugins/Ubuntu/DownloadDaemonListener/CMakeLists.txt 2016-06-02 09:32:33 +0000
1089+++ plugins/Ubuntu/DownloadDaemonListener/CMakeLists.txt 2016-09-22 07:47:54 +0000
1090@@ -12,5 +12,7 @@
1091 add_library(DownloadDaemonListener MODULE ${DOWNLOADDAEMONLISTENER_SOURCES})
1092
1093 qt5_use_modules(DownloadDaemonListener Qml Quick DBus Core)
1094-
1095+pkg_check_modules(DDLADAPTER REQUIRED udm-common)
1096+add_definitions(${DDLADAPTER_CFLAGS} ${DDLADAPTER_CFLAGS_OTHER})
1097+target_link_libraries(DownloadDaemonListener ${DDLADAPTER_LIBRARIES})
1098 add_unity8_plugin(Ubuntu.DownloadDaemonListener 0.1 Ubuntu/DownloadDaemonListener TARGETS DownloadDaemonListener)
1099
1100=== modified file 'plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.cpp'
1101--- plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.cpp 2015-08-19 13:56:21 +0000
1102+++ plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.cpp 2016-09-22 07:47:54 +0000
1103@@ -1,5 +1,5 @@
1104 /*
1105- * Copyright (C) 2013 - Canonical Ltd.
1106+ * Copyright (C) 2013-2016 Canonical Ltd.
1107 *
1108 * This program is free software: you can redistribute it and/or modify it
1109 * under the terms of the GNU Lesser General Public License, as
1110@@ -78,6 +78,7 @@
1111 connect(m_adaptor, static_cast<void (DownloadTrackerAdaptor::*)(qulonglong, qulonglong)>(&DownloadTrackerAdaptor::progress), this, &DownloadTracker::progress);
1112 connect(m_adaptor, &DownloadTrackerAdaptor::resumed, this, &DownloadTracker::resumed);
1113 connect(m_adaptor, &DownloadTrackerAdaptor::started, this, &DownloadTracker::started);
1114+ connect(m_adaptor, &DownloadTrackerAdaptor::processing, this, &DownloadTracker::processing);
1115 }
1116 // FIXME find a better way of determining if the service is ready
1117 Q_EMIT serviceReadyChanged(m_adaptor && m_adaptor->isValid());
1118
1119=== modified file 'plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.h'
1120--- plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.h 2015-11-20 15:01:39 +0000
1121+++ plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.h 2016-09-22 07:47:54 +0000
1122@@ -1,5 +1,5 @@
1123 /*
1124- * Copyright (C) 2013 - Canonical Ltd.
1125+ * Copyright (C) 2013-2016 Canonical Ltd.
1126 *
1127 * This program is free software: you can redistribute it and/or modify it
1128 * under the terms of the GNU Lesser General Public License, as
1129@@ -54,6 +54,7 @@
1130 void error(const QString &error);
1131 void finished(const QString &path);
1132 void paused(bool success);
1133+ void processing(const QString &path);
1134 void progress(qulonglong received, qulonglong total);
1135 void resumed(bool success);
1136 void started(bool success);
1137
1138=== modified file 'plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.cpp'
1139--- plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.cpp 2013-07-24 14:18:23 +0000
1140+++ plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.cpp 2016-09-22 07:47:54 +0000
1141@@ -1,8 +1,8 @@
1142 /*
1143 * This file was generated by qdbusxml2cpp version 0.8
1144- * Command line was: qdbusxml2cpp -v -c DownloadTrackerAdaptor -p downloadtrackeradaptor.h:downloadtrackeradaptor.cpp -i metatypes.h com.canonical.applications.download.xml
1145+ * Command line was: qdbusxml2cpp -v -c DownloadTrackerAdaptor -p downloadtrackeradaptor.h:downloadtrackeradaptor.cpp -i metatypes.h ../../../../../../ubuntu-download-manager/trunk/docs/dbus/com.canonical.applications.download.xml
1146 *
1147- * qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
1148+ * qdbusxml2cpp is Copyright (C) 2015 The Qt Company Ltd.
1149 *
1150 * This is an auto-generated file.
1151 * This file may have been hand-edited. Look for HAND-EDIT comments
1152
1153=== modified file 'plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.h'
1154--- plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.h 2015-09-14 09:11:08 +0000
1155+++ plugins/Ubuntu/DownloadDaemonListener/interface/downloadtrackeradaptor.h 2016-09-22 07:47:54 +0000
1156@@ -1,15 +1,15 @@
1157 /*
1158 * This file was generated by qdbusxml2cpp version 0.8
1159- * Command line was: qdbusxml2cpp -v -c DownloadTrackerAdaptor -p downloadtrackeradaptor.h:downloadtrackeradaptor.cpp -i metatypes.h com.canonical.applications.download.xml
1160+ * Command line was: qdbusxml2cpp -v -c DownloadTrackerAdaptor -p downloadtrackeradaptor.h:downloadtrackeradaptor.cpp -i metatypes.h ../../../../../../ubuntu-download-manager/trunk/docs/dbus/com.canonical.applications.download.xml
1161 *
1162- * qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
1163+ * qdbusxml2cpp is Copyright (C) 2015 The Qt Company Ltd.
1164 *
1165 * This is an auto-generated file.
1166 * Do not edit! All changes made to it will be lost.
1167 */
1168
1169-#ifndef DOWNLOADTRACKERADAPTOR_H_1374434371
1170-#define DOWNLOADTRACKERADAPTOR_H_1374434371
1171+#ifndef DOWNLOADTRACKERADAPTOR_H
1172+#define DOWNLOADTRACKERADAPTOR_H
1173
1174 #include <QtCore/QObject>
1175 #include <QtCore/QByteArray>
1176@@ -36,6 +36,22 @@
1177
1178 ~DownloadTrackerAdaptor();
1179
1180+ Q_PROPERTY(QString ClickPackage READ clickPackage)
1181+ inline QString clickPackage() const
1182+ { return qvariant_cast< QString >(property("ClickPackage")); }
1183+
1184+ Q_PROPERTY(QString DestinationApp READ destinationApp)
1185+ inline QString destinationApp() const
1186+ { return qvariant_cast< QString >(property("DestinationApp")); }
1187+
1188+ Q_PROPERTY(bool ShowInIndicator READ showInIndicator)
1189+ inline bool showInIndicator() const
1190+ { return qvariant_cast< bool >(property("ShowInIndicator")); }
1191+
1192+ Q_PROPERTY(QString Title READ title)
1193+ inline QString title() const
1194+ { return qvariant_cast< QString >(property("Title")); }
1195+
1196 public Q_SLOTS: // METHODS
1197 inline QDBusPendingReply<> allowGSMDownload(bool allowed)
1198 {
1199@@ -50,6 +66,24 @@
1200 return asyncCallWithArgumentList(QStringLiteral("cancel"), argumentList);
1201 }
1202
1203+ inline QDBusPendingReply<> collected()
1204+ {
1205+ QList<QVariant> argumentList;
1206+ return asyncCallWithArgumentList(QStringLiteral("collected"), argumentList);
1207+ }
1208+
1209+ inline QDBusPendingReply<QString> filePath()
1210+ {
1211+ QList<QVariant> argumentList;
1212+ return asyncCallWithArgumentList(QStringLiteral("filePath"), argumentList);
1213+ }
1214+
1215+ inline QDBusPendingReply<StringMap> headers()
1216+ {
1217+ QList<QVariant> argumentList;
1218+ return asyncCallWithArgumentList(QStringLiteral("headers"), argumentList);
1219+ }
1220+
1221 inline QDBusPendingReply<bool> isGSMDownloadAllowed()
1222 {
1223 QList<QVariant> argumentList;
1224@@ -80,6 +114,27 @@
1225 return asyncCallWithArgumentList(QStringLiteral("resume"), argumentList);
1226 }
1227
1228+ inline QDBusPendingReply<> setDestinationDir(const QString &path)
1229+ {
1230+ QList<QVariant> argumentList;
1231+ argumentList << QVariant::fromValue(path);
1232+ return asyncCallWithArgumentList(QStringLiteral("setDestinationDir"), argumentList);
1233+ }
1234+
1235+ inline QDBusPendingReply<> setHeaders(StringMap headers)
1236+ {
1237+ QList<QVariant> argumentList;
1238+ argumentList << QVariant::fromValue(headers);
1239+ return asyncCallWithArgumentList(QStringLiteral("setHeaders"), argumentList);
1240+ }
1241+
1242+ inline QDBusPendingReply<> setMetadata(const QVariantMap &data)
1243+ {
1244+ QList<QVariant> argumentList;
1245+ argumentList << QVariant::fromValue(data);
1246+ return asyncCallWithArgumentList(QStringLiteral("setMetadata"), argumentList);
1247+ }
1248+
1249 inline QDBusPendingReply<> setThrottle(qulonglong speed)
1250 {
1251 QList<QVariant> argumentList;
1252@@ -93,6 +148,12 @@
1253 return asyncCallWithArgumentList(QStringLiteral("start"), argumentList);
1254 }
1255
1256+ inline QDBusPendingReply<int> state()
1257+ {
1258+ QList<QVariant> argumentList;
1259+ return asyncCallWithArgumentList(QStringLiteral("state"), argumentList);
1260+ }
1261+
1262 inline QDBusPendingReply<qulonglong> throttle()
1263 {
1264 QList<QVariant> argumentList;
1265@@ -106,10 +167,16 @@
1266 }
1267
1268 Q_SIGNALS: // SIGNALS
1269+ void authError(AuthErrorStruct error);
1270 void canceled(bool success);
1271 void error(const QString &error);
1272 void finished(const QString &path);
1273+ void hashError(HashErrorStruct error);
1274+ void httpError(HttpErrorStruct error);
1275+ void networkError(NetworkErrorStruct error);
1276 void paused(bool success);
1277+ void processError(ProcessErrorStruct error);
1278+ void processing(const QString &path);
1279 void progress(qulonglong received, qulonglong total);
1280 void resumed(bool success);
1281 void started(bool success);
1282
1283=== modified file 'plugins/Ubuntu/DownloadDaemonListener/interface/metatypes.h'
1284--- plugins/Ubuntu/DownloadDaemonListener/interface/metatypes.h 2013-07-24 14:18:23 +0000
1285+++ plugins/Ubuntu/DownloadDaemonListener/interface/metatypes.h 2016-09-22 07:47:54 +0000
1286@@ -1,5 +1,5 @@
1287 /*
1288- * Copyright 2013 2013 Canonical Ltd.
1289+ * Copyright 2013-2016 Canonical Ltd.
1290 *
1291 * This library is free software; you can redistribute it and/or
1292 * modify it under the terms of version 3 of the GNU Lesser General Public
1293@@ -19,10 +19,7 @@
1294 #ifndef DOWNLOADER_LIB_APP_METATYPES_H
1295 #define DOWNLOADER_LIB_APP_METATYPES_H
1296
1297-#include <QMap>
1298-
1299-typedef QMap<QString, QString> StringMap;
1300-
1301-Q_DECLARE_METATYPE(StringMap)
1302+// Just include the system file so we're always up to date.
1303+#include <ubuntu/download_manager/metatypes.h>
1304
1305 #endif // METATYPES_H
1306
1307=== modified file 'plugins/Ubuntu/Gestures/TouchGestureArea.h'
1308--- plugins/Ubuntu/Gestures/TouchGestureArea.h 2016-08-08 14:15:49 +0000
1309+++ plugins/Ubuntu/Gestures/TouchGestureArea.h 2016-09-22 07:47:54 +0000
1310@@ -76,7 +76,7 @@
1311 return *this;
1312 }
1313
1314- bool operator=(const GestureTouchPoint& rhs) const {
1315+ bool operator==(const GestureTouchPoint& rhs) const {
1316 if (&rhs == this) return true;
1317 return m_id == rhs.m_id &&
1318 m_pressed == rhs.m_pressed &&
1319@@ -84,7 +84,7 @@
1320 m_y == rhs.m_y &&
1321 m_dragging == rhs.m_dragging;
1322 }
1323- bool operator!=(const GestureTouchPoint& rhs) const { return !operator=(rhs); }
1324+ bool operator!=(const GestureTouchPoint& rhs) const { return !operator==(rhs); }
1325
1326 void setPos(const QPointF &pos);
1327
1328
1329=== modified file 'plugins/Utils/CMakeLists.txt'
1330--- plugins/Utils/CMakeLists.txt 2016-06-27 18:45:27 +0000
1331+++ plugins/Utils/CMakeLists.txt 2016-09-22 07:47:54 +0000
1332@@ -29,6 +29,7 @@
1333 inputeventgenerator.cpp
1334 deviceconfigparser.cpp
1335 globalfunctions.cpp
1336+ URLDispatcher.cpp
1337 plugin.cpp
1338 )
1339
1340
1341=== added file 'plugins/Utils/URLDispatcher.cpp'
1342--- plugins/Utils/URLDispatcher.cpp 1970-01-01 00:00:00 +0000
1343+++ plugins/Utils/URLDispatcher.cpp 2016-09-22 07:47:54 +0000
1344@@ -0,0 +1,77 @@
1345+/*
1346+ * Copyright (C) 2016 Canonical, Ltd.
1347+ *
1348+ * This program is free software; you can redistribute it and/or modify
1349+ * it under the terms of the GNU General Public License as published by
1350+ * the Free Software Foundation; version 3.
1351+ *
1352+ * This program is distributed in the hope that it will be useful,
1353+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1354+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1355+ * GNU General Public License for more details.
1356+ *
1357+ * You should have received a copy of the GNU General Public License
1358+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1359+ */
1360+
1361+#include "URLDispatcher.h"
1362+
1363+#include <QDBusConnection>
1364+
1365+class URLDispatcherInterface : public QObject
1366+{
1367+ Q_OBJECT
1368+ Q_CLASSINFO("D-Bus Interface", "com.canonical.URLDispatcher")
1369+
1370+public:
1371+ explicit URLDispatcherInterface(URLDispatcher *parent);
1372+
1373+ Q_SCRIPTABLE void DispatchURL(const QString &url, const QString &package);
1374+};
1375+
1376+URLDispatcherInterface::URLDispatcherInterface(URLDispatcher *parent)
1377+ : QObject(parent)
1378+{
1379+}
1380+
1381+void URLDispatcherInterface::DispatchURL(const QString &url, const QString &package)
1382+{
1383+ Q_UNUSED(package);
1384+ Q_EMIT static_cast<URLDispatcher *>(parent())->urlRequested(url);
1385+}
1386+
1387+URLDispatcher::URLDispatcher(QObject *parent)
1388+ : QObject(parent)
1389+ , m_dispatcher(nullptr)
1390+{
1391+}
1392+
1393+bool URLDispatcher::active() const
1394+{
1395+ return m_dispatcher != nullptr;
1396+}
1397+
1398+void URLDispatcher::setActive(bool value)
1399+{
1400+ if (value == active())
1401+ return;
1402+
1403+ QDBusConnection connection = QDBusConnection::sessionBus();
1404+
1405+ if (value) {
1406+ URLDispatcherInterface *dispatcher = new URLDispatcherInterface(this);
1407+ connection.registerObject(QStringLiteral("/com/canonical/URLDispatcher"),
1408+ dispatcher,
1409+ QDBusConnection::ExportScriptableContents);
1410+ connection.registerService(QStringLiteral("com.canonical.URLDispatcher"));
1411+ m_dispatcher = dispatcher;
1412+ } else {
1413+ connection.unregisterService(QStringLiteral("com.canonical.URLDispatcher"));
1414+ delete m_dispatcher;
1415+ m_dispatcher = nullptr;
1416+ }
1417+
1418+ Q_EMIT activeChanged();
1419+}
1420+
1421+#include "URLDispatcher.moc"
1422
1423=== added file 'plugins/Utils/URLDispatcher.h'
1424--- plugins/Utils/URLDispatcher.h 1970-01-01 00:00:00 +0000
1425+++ plugins/Utils/URLDispatcher.h 2016-09-22 07:47:54 +0000
1426@@ -0,0 +1,47 @@
1427+/*
1428+ * Copyright (C) 2016 Canonical, Ltd.
1429+ *
1430+ * This program is free software; you can redistribute it and/or modify
1431+ * it under the terms of the GNU General Public License as published by
1432+ * the Free Software Foundation; version 3.
1433+ *
1434+ * This program is distributed in the hope that it will be useful,
1435+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1436+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1437+ * GNU General Public License for more details.
1438+ *
1439+ * You should have received a copy of the GNU General Public License
1440+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1441+ */
1442+
1443+#ifndef UNITY_URLDISPATCHER_H
1444+#define UNITY_URLDISPATCHER_H
1445+
1446+#include <QObject>
1447+#include <QString>
1448+
1449+// This class manages our url-dispatcher interception. We intercept
1450+// url-dispatcher because rather than spawning the handler for the URL
1451+// in our own session, we want to notify the user session to do it for us
1452+// (and start an unlock in the process).
1453+
1454+class URLDispatcher : public QObject
1455+{
1456+ Q_OBJECT
1457+ Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged)
1458+
1459+public:
1460+ explicit URLDispatcher(QObject *parent=0);
1461+
1462+ bool active() const;
1463+ void setActive(bool active);
1464+
1465+Q_SIGNALS:
1466+ void urlRequested(const QString &url);
1467+ void activeChanged();
1468+
1469+private:
1470+ QObject *m_dispatcher;
1471+};
1472+
1473+#endif
1474
1475=== modified file 'plugins/Utils/plugin.cpp'
1476--- plugins/Utils/plugin.cpp 2016-04-29 20:07:03 +0000
1477+++ plugins/Utils/plugin.cpp 2016-09-22 07:47:54 +0000
1478@@ -38,6 +38,7 @@
1479 #include "inputeventgenerator.h"
1480 #include "deviceconfigparser.h"
1481 #include "globalfunctions.h"
1482+#include "URLDispatcher.h"
1483
1484 static QObject *createWindowStateStorage(QQmlEngine *engine, QJSEngine *scriptEngine)
1485 {
1486@@ -80,4 +81,5 @@
1487 qmlRegisterType<InputEventGenerator>(uri, 0, 1, "InputEventGenerator");
1488 qmlRegisterType<DeviceConfigParser>(uri, 0, 1, "DeviceConfigParser");
1489 qmlRegisterSingletonType<GlobalFunctions>(uri, 0, 1, "Functions", createGlobalFunctions);
1490+ qmlRegisterType<URLDispatcher>(uri, 0, 1, "URLDispatcher");
1491 }
1492
1493=== modified file 'plugins/Utils/windowstatestorage.cpp'
1494--- plugins/Utils/windowstatestorage.cpp 2016-08-08 14:15:49 +0000
1495+++ plugins/Utils/windowstatestorage.cpp 2016-09-22 07:47:54 +0000
1496@@ -76,7 +76,7 @@
1497 return (WindowState)query.value(QStringLiteral("state")).toInt();
1498 }
1499
1500-void WindowStateStorage::saveGeometry(const QString &windowId, const QRect rect)
1501+void WindowStateStorage::saveGeometry(const QString &windowId, const QRect &rect)
1502 {
1503 const QString queryString = QStringLiteral("INSERT OR REPLACE INTO geometry (windowId, x, y, width, height) values ('%1', '%2', '%3', '%4', '%5');")
1504 .arg(sanitiseString(windowId))
1505@@ -92,7 +92,7 @@
1506 {
1507 const QString queryString = QStringLiteral("INSERT OR REPLACE INTO stage (appId, stage) values ('%1', '%2');")
1508 .arg(sanitiseString(appId))
1509- .arg((int)stage);
1510+ .arg(stage);
1511
1512 saveValue(queryString);
1513 }
1514@@ -123,7 +123,7 @@
1515 }
1516 }
1517
1518-QRect WindowStateStorage::getGeometry(const QString &windowId, const QRect defaultValue) const
1519+QRect WindowStateStorage::getGeometry(const QString &windowId, const QRect &defaultValue) const
1520 {
1521 QString queryString = QStringLiteral("SELECT * FROM geometry WHERE windowId = '%1';")
1522 .arg(sanitiseString(windowId));
1523@@ -133,7 +133,8 @@
1524 if (!query.first()) {
1525 return defaultValue;
1526 }
1527- return QRect(query.value(QStringLiteral("x")).toInt(), query.value(QStringLiteral("y")).toInt(), query.value(QStringLiteral("width")).toInt(), query.value(QStringLiteral("height")).toInt());
1528+ return QRect(query.value(QStringLiteral("x")).toInt(), query.value(QStringLiteral("y")).toInt(),
1529+ query.value(QStringLiteral("width")).toInt(), query.value(QStringLiteral("height")).toInt());
1530 }
1531
1532 void WindowStateStorage::initdb()
1533
1534=== modified file 'plugins/Utils/windowstatestorage.h'
1535--- plugins/Utils/windowstatestorage.h 2016-06-20 14:26:27 +0000
1536+++ plugins/Utils/windowstatestorage.h 2016-09-22 07:47:54 +0000
1537@@ -32,7 +32,12 @@
1538 WindowStateMaximizedLeft = 1 << 4,
1539 WindowStateMaximizedRight = 1 << 5,
1540 WindowStateMaximizedHorizontally = 1 << 6,
1541- WindowStateMaximizedVertically = 1 << 7
1542+ WindowStateMaximizedVertically = 1 << 7,
1543+ WindowStateMaximizedTopLeft = 1 << 8,
1544+ WindowStateMaximizedTopRight = 1 << 9,
1545+ WindowStateMaximizedBottomLeft = 1 << 10,
1546+ WindowStateMaximizedBottomRight = 1 << 11,
1547+ WindowStateRestored = 1 << 12
1548 };
1549 Q_DECLARE_FLAGS(WindowStates, WindowState)
1550 #if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
1551@@ -45,8 +50,8 @@
1552 Q_INVOKABLE void saveState(const QString &windowId, WindowState state);
1553 Q_INVOKABLE WindowState getState(const QString &windowId, WindowState defaultValue) const;
1554
1555- Q_INVOKABLE void saveGeometry(const QString &windowId, const QRect rect);
1556- Q_INVOKABLE QRect getGeometry(const QString &windowId, const QRect defaultValue) const;
1557+ Q_INVOKABLE void saveGeometry(const QString &windowId, const QRect &rect);
1558+ Q_INVOKABLE QRect getGeometry(const QString &windowId, const QRect &defaultValue) const;
1559
1560 Q_INVOKABLE void saveStage(const QString &appId, int stage);
1561 Q_INVOKABLE int getStage(const QString &appId, int defaultValue) const;
1562
1563=== modified file 'po/unity8.pot'
1564--- po/unity8.pot 2016-08-31 11:56:09 +0000
1565+++ po/unity8.pot 2016-09-22 07:47:54 +0000
1566@@ -1,6 +1,6 @@
1567 # SOME DESCRIPTIVE TITLE.
1568 # Copyright (C) YEAR Canonical Ltd.
1569-# This file is distributed under the same license as the PACKAGE package.
1570+# This file is distributed under the same license as the unity8 package.
1571 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
1572 #
1573 #, fuzzy
1574@@ -8,7 +8,7 @@
1575 msgstr ""
1576 "Project-Id-Version: unity8\n"
1577 "Report-Msgid-Bugs-To: \n"
1578-"POT-Creation-Date: 2016-08-31 11:56+0000\n"
1579+"POT-Creation-Date: 2016-09-22 07:46+0000\n"
1580 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1581 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1582 "Language-Team: LANGUAGE <LL@li.org>\n"
1583@@ -35,25 +35,6 @@
1584 msgid "Unpin shortcut"
1585 msgstr ""
1586
1587-#: qml/Components/DelayedLockscreen.qml:50
1588-msgid "Device Locked"
1589-msgstr ""
1590-
1591-#: qml/Components/DelayedLockscreen.qml:65
1592-msgid "You have been locked out due to too many failed passphrase attempts."
1593-msgstr ""
1594-
1595-#: qml/Components/DelayedLockscreen.qml:66
1596-msgid "You have been locked out due to too many failed passcode attempts."
1597-msgstr ""
1598-
1599-#: qml/Components/DelayedLockscreen.qml:75
1600-#, qt-format
1601-msgid "Please wait %1 minute and then try again…"
1602-msgid_plural "Please wait %1 minutes and then try again…"
1603-msgstr[0] ""
1604-msgstr[1] ""
1605-
1606 #: qml/Components/Dialogs.qml:149
1607 msgctxt "Title: Lock/Log out dialog"
1608 msgid "Log out"
1609@@ -74,7 +55,8 @@
1610 msgstr ""
1611
1612 #: qml/Components/Dialogs.qml:166 qml/Components/Dialogs.qml:222
1613-#: qml/Dash/DashPageHeader.qml:322 qml/Wizard/Pages/passcode-confirm.qml:32
1614+#: qml/Dash/DashPageHeader.qml:324 qml/Greeter/NarrowView.qml:232
1615+#: qml/Wizard/Pages/passcode-confirm.qml:32
1616 #: qml/Wizard/Pages/passcode-set.qml:32
1617 msgid "Cancel"
1618 msgstr ""
1619@@ -277,15 +259,15 @@
1620 msgid "Closes the current window."
1621 msgstr ""
1622
1623-#: qml/Components/Lockscreen.qml:239
1624+#: qml/Components/Lockscreen.qml:212 qml/Greeter/NarrowView.qml:252
1625 msgid "Return to Call"
1626 msgstr ""
1627
1628-#: qml/Components/Lockscreen.qml:239
1629+#: qml/Components/Lockscreen.qml:212
1630 msgid "Emergency Call"
1631 msgstr ""
1632
1633-#: qml/Components/Lockscreen.qml:271
1634+#: qml/Components/Lockscreen.qml:244
1635 msgid "OK"
1636 msgstr ""
1637
1638@@ -329,55 +311,55 @@
1639 msgid "Preview Share Item"
1640 msgstr ""
1641
1642-#: qml/Dash/DashPageHeader.qml:360
1643+#: qml/Dash/DashPageHeader.qml:362
1644 msgctxt "Button: Open the Ubuntu Store"
1645 msgid "Store"
1646 msgstr ""
1647
1648-#: qml/Dash/DashPageHeader.qml:367
1649+#: qml/Dash/DashPageHeader.qml:369
1650 msgctxt "Button: Start a search in the current dash scope"
1651 msgid "Search"
1652 msgstr ""
1653
1654-#: qml/Dash/DashPageHeader.qml:377
1655+#: qml/Dash/DashPageHeader.qml:379
1656 msgctxt "Button: Show the current dash scope settings"
1657 msgid "Settings"
1658 msgstr ""
1659
1660-#: qml/Dash/DashPageHeader.qml:384
1661+#: qml/Dash/DashPageHeader.qml:386
1662 msgid "Remove from Favorites"
1663 msgstr ""
1664
1665-#: qml/Dash/DashPageHeader.qml:384
1666+#: qml/Dash/DashPageHeader.qml:386
1667 msgid "Add to Favorites"
1668 msgstr ""
1669
1670-#: qml/Dash/FiltersPopover.qml:60
1671+#: qml/Dash/FiltersPopover.qml:61
1672 msgid "Refine your results"
1673 msgstr ""
1674
1675-#: qml/Dash/FiltersPopover.qml:69
1676+#: qml/Dash/FiltersPopover.qml:70
1677 msgid "Reset"
1678 msgstr ""
1679
1680-#: qml/Dash/GenericScopeView.qml:585 qml/Dash/GenericScopeView.qml:780
1681+#: qml/Dash/GenericScopeView.qml:586 qml/Dash/GenericScopeView.qml:782
1682 msgid "Show less"
1683 msgstr ""
1684
1685-#: qml/Dash/GenericScopeView.qml:585
1686+#: qml/Dash/GenericScopeView.qml:586
1687 msgid "Show all"
1688 msgstr ""
1689
1690-#: qml/Dash/GenericScopeView.qml:642
1691+#: qml/Dash/GenericScopeView.qml:643
1692 msgctxt "Label: Hint for dash search line edit"
1693 msgid "Search"
1694 msgstr ""
1695
1696-#: qml/Dash/PageHeaderExtraPanel.qml:56
1697+#: qml/Dash/PageHeaderExtraPanel.qml:57
1698 msgid "Recent Searches"
1699 msgstr ""
1700
1701-#: qml/Dash/PageHeaderExtraPanel.qml:67
1702+#: qml/Dash/PageHeaderExtraPanel.qml:68
1703 msgid "Clear All"
1704 msgstr ""
1705
1706@@ -389,24 +371,24 @@
1707 msgid "Less..."
1708 msgstr ""
1709
1710-#: qml/Dash/Previews/PreviewCommentInput.qml:68
1711-#: qml/Dash/Previews/PreviewRatingInput.qml:175
1712+#: qml/Dash/Previews/PreviewCommentInput.qml:83
1713+#: qml/Dash/Previews/PreviewRatingInput.qml:201
1714 msgid "Send"
1715 msgstr ""
1716
1717-#: qml/Dash/Previews/PreviewRatingInput.qml:82
1718+#: qml/Dash/Previews/PreviewRatingInput.qml:108
1719 msgid "Rate this"
1720 msgstr ""
1721
1722-#: qml/Dash/Previews/PreviewRatingInput.qml:157
1723+#: qml/Dash/Previews/PreviewRatingInput.qml:183
1724 msgid "Add a review"
1725 msgstr ""
1726
1727-#: qml/Dash/PullToRefreshScopeStyle.qml:55
1728+#: qml/Dash/PullToRefreshScopeStyle.qml:56
1729 msgid "Pull to refresh…"
1730 msgstr ""
1731
1732-#: qml/Dash/PullToRefreshScopeStyle.qml:60
1733+#: qml/Dash/PullToRefreshScopeStyle.qml:61
1734 msgid "Release to refresh…"
1735 msgstr ""
1736
1737@@ -414,15 +396,15 @@
1738 msgid "Enable location data"
1739 msgstr ""
1740
1741-#: qml/Dash/ScopesList.qml:55
1742+#: qml/Dash/ScopesList.qml:57
1743 msgid "Manage"
1744 msgstr ""
1745
1746-#: qml/Dash/ScopesList.qml:102
1747+#: qml/Dash/ScopesList.qml:104
1748 msgid "Home"
1749 msgstr ""
1750
1751-#: qml/Dash/ScopesList.qml:103
1752+#: qml/Dash/ScopesList.qml:105
1753 msgid "Also installed"
1754 msgstr ""
1755
1756@@ -436,79 +418,51 @@
1757 msgid "Unlock"
1758 msgstr ""
1759
1760-#: qml/Greeter/Greeter.qml:561
1761+#: qml/Greeter/DelayedLockscreen.qml:43
1762+msgid "Device Locked"
1763+msgstr ""
1764+
1765+#: qml/Greeter/DelayedLockscreen.qml:58
1766+msgid "You have been locked out due to too many failed passphrase attempts."
1767+msgstr ""
1768+
1769+#: qml/Greeter/DelayedLockscreen.qml:59
1770+msgid "You have been locked out due to too many failed passcode attempts."
1771+msgstr ""
1772+
1773+#: qml/Greeter/DelayedLockscreen.qml:68
1774+#, qt-format
1775+msgid "Please wait %1 minute and then try again…"
1776+msgid_plural "Please wait %1 minutes and then try again…"
1777+msgstr[0] ""
1778+msgstr[1] ""
1779+
1780+#: qml/Greeter/Greeter.qml:596
1781 msgid "Try again"
1782 msgstr ""
1783
1784-#: qml/Greeter/LoginList.qml:63
1785+#: qml/Greeter/LoginList.qml:70
1786 msgid "Passphrase"
1787 msgstr ""
1788
1789-#: qml/Greeter/LoginList.qml:64
1790+#: qml/Greeter/LoginList.qml:71
1791 msgid "Passcode"
1792 msgstr ""
1793
1794-#: qml/Greeter/LoginList.qml:87
1795+#: qml/Greeter/LoginList.qml:98
1796 msgid "Retry"
1797 msgstr ""
1798
1799-#: qml/Greeter/LoginList.qml:88
1800+#: qml/Greeter/LoginList.qml:99
1801 msgid "Log In"
1802 msgstr ""
1803
1804-#: qml/Greeter/NarrowView.qml:55
1805-msgid "Sorry, incorrect passphrase."
1806-msgstr ""
1807-
1808-#: qml/Greeter/NarrowView.qml:56
1809-msgid "Sorry, incorrect passcode."
1810-msgstr ""
1811-
1812-#: qml/Greeter/NarrowView.qml:57
1813-msgid "This will be your last attempt."
1814-msgstr ""
1815-
1816-#: qml/Greeter/NarrowView.qml:59
1817-msgid ""
1818-"If passphrase is entered incorrectly, your phone will conduct a factory "
1819-"reset and all personal data will be deleted."
1820-msgstr ""
1821-
1822-#: qml/Greeter/NarrowView.qml:60
1823-msgid ""
1824-"If passcode is entered incorrectly, your phone will conduct a factory reset "
1825-"and all personal data will be deleted."
1826-msgstr ""
1827-
1828-#: qml/Greeter/NarrowView.qml:129
1829-#, qt-format
1830-msgid "Enter %1"
1831-msgstr ""
1832-
1833-#: qml/Greeter/NarrowView.qml:130
1834-msgid "Enter passphrase"
1835-msgstr ""
1836-
1837-#: qml/Greeter/NarrowView.qml:131
1838-msgid "Enter passcode"
1839-msgstr ""
1840-
1841-#: qml/Greeter/NarrowView.qml:135
1842-#, qt-format
1843-msgid "Sorry, incorrect %1"
1844-msgstr ""
1845-
1846-#: qml/Greeter/NarrowView.qml:136
1847-msgid "Sorry, incorrect passphrase"
1848-msgstr ""
1849-
1850-#: qml/Greeter/NarrowView.qml:137
1851-msgctxt "passphrase"
1852-msgid "Please re-enter"
1853-msgstr ""
1854-
1855-#: qml/Greeter/NarrowView.qml:138
1856-msgid "Sorry, incorrect passcode"
1857+#: qml/Greeter/NarrowView.qml:252
1858+msgid "Emergency"
1859+msgstr ""
1860+
1861+#: qml/Greeter/SessionsList.qml:122
1862+msgid "Select desktop environment"
1863 msgstr ""
1864
1865 #: qml/Notifications/NotificationMenuItemFactory.qml:124
1866@@ -627,51 +581,51 @@
1867 msgid "Back"
1868 msgstr ""
1869
1870-#: qml/Wizard/Pages/10-welcome.qml:27
1871+#: qml/Wizard/Pages/10-welcome.qml:28
1872 msgid "Language"
1873 msgstr ""
1874
1875-#: qml/Wizard/Pages/10-welcome.qml:172 qml/Wizard/Pages/20-keyboard.qml:151
1876-#: qml/Wizard/Pages/30-wifi.qml:206 qml/Wizard/Pages/40-location.qml:271
1877-#: qml/Wizard/Pages/50-timezone.qml:270 qml/Wizard/Pages/60-account.qml:65
1878-#: qml/Wizard/Pages/70-passwd-type.qml:144
1879+#: qml/Wizard/Pages/10-welcome.qml:173 qml/Wizard/Pages/20-keyboard.qml:152
1880+#: qml/Wizard/Pages/30-wifi.qml:207 qml/Wizard/Pages/40-location.qml:271
1881+#: qml/Wizard/Pages/50-timezone.qml:271 qml/Wizard/Pages/60-account.qml:65
1882+#: qml/Wizard/Pages/70-passwd-type.qml:145
1883 #: qml/Wizard/Pages/75-report-check.qml:84
1884-#: qml/Wizard/Pages/passcode-desktop.qml:141
1885-#: qml/Wizard/Pages/password-set.qml:141
1886+#: qml/Wizard/Pages/passcode-desktop.qml:142
1887+#: qml/Wizard/Pages/password-set.qml:142
1888 msgid "Next"
1889 msgstr ""
1890
1891-#: qml/Wizard/Pages/20-keyboard.qml:30
1892+#: qml/Wizard/Pages/20-keyboard.qml:31
1893 msgid "Select Keyboard"
1894 msgstr ""
1895
1896-#: qml/Wizard/Pages/20-keyboard.qml:70
1897+#: qml/Wizard/Pages/20-keyboard.qml:71
1898 msgid "Keyboard language"
1899 msgstr ""
1900
1901-#: qml/Wizard/Pages/20-keyboard.qml:92
1902+#: qml/Wizard/Pages/20-keyboard.qml:93
1903 msgid "Keyboard layout"
1904 msgstr ""
1905
1906-#: qml/Wizard/Pages/20-keyboard.qml:151 qml/Wizard/Pages/30-wifi.qml:206
1907-#: qml/Wizard/Pages/60-account.qml:65
1908-#: qml/Wizard/Pages/77-system-update.qml:152 qml/Wizard/Pages/sim.qml:101
1909+#: qml/Wizard/Pages/20-keyboard.qml:152 qml/Wizard/Pages/30-wifi.qml:207
1910+#: qml/Wizard/Pages/60-account.qml:65 qml/Wizard/Pages/77-system-update.qml:152
1911+#: qml/Wizard/Pages/sim.qml:101
1912 msgid "Skip"
1913 msgstr ""
1914
1915-#: qml/Wizard/Pages/30-wifi.qml:30
1916+#: qml/Wizard/Pages/30-wifi.qml:31
1917 msgid "Connect to Wi‑Fi"
1918 msgstr ""
1919
1920-#: qml/Wizard/Pages/30-wifi.qml:131
1921+#: qml/Wizard/Pages/30-wifi.qml:132
1922 msgid "Connected"
1923 msgstr ""
1924
1925-#: qml/Wizard/Pages/30-wifi.qml:164
1926+#: qml/Wizard/Pages/30-wifi.qml:165
1927 msgid "Available Wi-Fi networks"
1928 msgstr ""
1929
1930-#: qml/Wizard/Pages/30-wifi.qml:165
1931+#: qml/Wizard/Pages/30-wifi.qml:166
1932 msgid "No available Wi-Fi networks"
1933 msgstr ""
1934
1935@@ -707,11 +661,11 @@
1936 msgid "You can change it later in System Settings."
1937 msgstr ""
1938
1939-#: qml/Wizard/Pages/50-timezone.qml:29
1940+#: qml/Wizard/Pages/50-timezone.qml:30
1941 msgid "Time Zone"
1942 msgstr ""
1943
1944-#: qml/Wizard/Pages/50-timezone.qml:181
1945+#: qml/Wizard/Pages/50-timezone.qml:182
1946 msgid "Enter your city"
1947 msgstr ""
1948
1949@@ -723,21 +677,21 @@
1950 msgid "Preferred Name"
1951 msgstr ""
1952
1953-#: qml/Wizard/Pages/70-passwd-type.qml:39
1954+#: qml/Wizard/Pages/70-passwd-type.qml:40
1955 msgid "Lock Screen"
1956 msgstr ""
1957
1958-#: qml/Wizard/Pages/70-passwd-type.qml:101
1959+#: qml/Wizard/Pages/70-passwd-type.qml:102
1960 msgctxt "Label: Type of security method"
1961 msgid "Create new password"
1962 msgstr ""
1963
1964-#: qml/Wizard/Pages/70-passwd-type.qml:103
1965+#: qml/Wizard/Pages/70-passwd-type.qml:104
1966 msgctxt "Label: Type of security method"
1967 msgid "Create passcode (numbers only)"
1968 msgstr ""
1969
1970-#: qml/Wizard/Pages/70-passwd-type.qml:105
1971+#: qml/Wizard/Pages/70-passwd-type.qml:106
1972 msgctxt "Label: Type of security method"
1973 msgid "No lock code"
1974 msgstr ""
1975@@ -830,7 +784,7 @@
1976 msgstr ""
1977
1978 #: qml/Wizard/Pages/passcode-confirm.qml:43
1979-#: qml/Wizard/Pages/passcode-desktop.qml:96
1980+#: qml/Wizard/Pages/passcode-desktop.qml:97
1981 msgid "Confirm passcode"
1982 msgstr ""
1983
1984@@ -843,28 +797,28 @@
1985 msgid "Please re-enter."
1986 msgstr ""
1987
1988-#: qml/Wizard/Pages/passcode-desktop.qml:30
1989+#: qml/Wizard/Pages/passcode-desktop.qml:31
1990 msgid "Lock Screen Passcode"
1991 msgstr ""
1992
1993-#: qml/Wizard/Pages/passcode-desktop.qml:60
1994+#: qml/Wizard/Pages/passcode-desktop.qml:61
1995 msgid "Enter 4 numbers to setup your passcode"
1996 msgstr ""
1997
1998-#: qml/Wizard/Pages/passcode-desktop.qml:76
1999+#: qml/Wizard/Pages/passcode-desktop.qml:77
2000 #: qml/Wizard/Pages/passcode-set.qml:54
2001 msgid "Choose passcode"
2002 msgstr ""
2003
2004-#: qml/Wizard/Pages/passcode-desktop.qml:126
2005+#: qml/Wizard/Pages/passcode-desktop.qml:127
2006 msgid "Passcode too short"
2007 msgstr ""
2008
2009-#: qml/Wizard/Pages/passcode-desktop.qml:128
2010+#: qml/Wizard/Pages/passcode-desktop.qml:129
2011 msgid "Passcodes match"
2012 msgstr ""
2013
2014-#: qml/Wizard/Pages/passcode-desktop.qml:130
2015+#: qml/Wizard/Pages/passcode-desktop.qml:131
2016 msgid "Passcodes do not match"
2017 msgstr ""
2018
2019@@ -872,19 +826,19 @@
2020 msgid "Passcode must be 4 characters long"
2021 msgstr ""
2022
2023-#: qml/Wizard/Pages/password-set.qml:30
2024+#: qml/Wizard/Pages/password-set.qml:31
2025 msgid "Lock Screen Password"
2026 msgstr ""
2027
2028-#: qml/Wizard/Pages/password-set.qml:61
2029+#: qml/Wizard/Pages/password-set.qml:62
2030 msgid "Enter at least 8 characters"
2031 msgstr ""
2032
2033-#: qml/Wizard/Pages/password-set.qml:73
2034+#: qml/Wizard/Pages/password-set.qml:74
2035 msgid "Choose password"
2036 msgstr ""
2037
2038-#: qml/Wizard/Pages/password-set.qml:103
2039+#: qml/Wizard/Pages/password-set.qml:104
2040 msgid "Confirm password"
2041 msgstr ""
2042
2043
2044=== modified file 'qml/Components/Carousel.qml'
2045--- qml/Components/Carousel.qml 2015-09-14 07:47:24 +0000
2046+++ qml/Components/Carousel.qml 2016-09-22 07:47:54 +0000
2047@@ -17,6 +17,7 @@
2048 import QtQuick 2.4
2049 import Ubuntu.Components 1.3
2050 import "carousel.js" as CarouselJS
2051+import "."
2052
2053 /*! The Carousel component presents the items of a model in a carousel view. It's similar to a
2054 cover flow. But it stops at it's boundaries (therefore no PathView is used).
2055@@ -141,8 +142,6 @@
2056
2057 boundsBehavior: Flickable.DragOverBounds
2058 cacheBuffer: carousel.cacheBuffer
2059- flickDeceleration: Math.max(1500 * Math.pow(realWidth / referenceWidth, 1.5), 1500) // 1500 is platform default
2060- maximumFlickVelocity: Math.max(2500 * Math.pow(realWidth / referenceWidth, 1.5), 2500) // 2500 is platform default
2061 orientation: ListView.Horizontal
2062
2063 function getXFromContinuousIndex(index) {
2064
2065=== added file 'qml/Components/Flickable.qml'
2066--- qml/Components/Flickable.qml 1970-01-01 00:00:00 +0000
2067+++ qml/Components/Flickable.qml 2016-09-22 07:47:54 +0000
2068@@ -0,0 +1,24 @@
2069+/*
2070+ * Copyright (C) 2016 Canonical, Ltd.
2071+ *
2072+ * This program is free software; you can redistribute it and/or modify
2073+ * it under the terms of the GNU General Public License as published by
2074+ * the Free Software Foundation; version 3.
2075+ *
2076+ * This program is distributed in the hope that it will be useful,
2077+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2078+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2079+ * GNU General Public License for more details.
2080+ *
2081+ * You should have received a copy of the GNU General Public License
2082+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2083+ */
2084+
2085+import QtQuick 2.4 as QtQuick
2086+import Ubuntu.Components 1.3
2087+import "flickableUtils.js" as FlickableUtilsJS
2088+
2089+QtQuick.Flickable {
2090+ flickDeceleration: FlickableUtilsJS.getFlickDeceleration(units.gridUnit)
2091+ maximumFlickVelocity: FlickableUtilsJS.getMaximumFlickVelocity(units.gridUnit)
2092+}
2093\ No newline at end of file
2094
2095=== modified file 'qml/Components/FloatingFlickable.qml'
2096--- qml/Components/FloatingFlickable.qml 2016-01-11 16:57:07 +0000
2097+++ qml/Components/FloatingFlickable.qml 2016-09-22 07:47:54 +0000
2098@@ -17,6 +17,7 @@
2099 import QtQuick 2.4
2100 import Ubuntu.Components 1.3
2101 import Ubuntu.Gestures 0.1
2102+import "."
2103
2104 /*
2105 A Flickable that can be put in front of the item to be flicked and
2106
2107=== added file 'qml/Components/GridView.qml'
2108--- qml/Components/GridView.qml 1970-01-01 00:00:00 +0000
2109+++ qml/Components/GridView.qml 2016-09-22 07:47:54 +0000
2110@@ -0,0 +1,24 @@
2111+/*
2112+ * Copyright (C) 2016 Canonical, Ltd.
2113+ *
2114+ * This program is free software; you can redistribute it and/or modify
2115+ * it under the terms of the GNU General Public License as published by
2116+ * the Free Software Foundation; version 3.
2117+ *
2118+ * This program is distributed in the hope that it will be useful,
2119+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2120+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2121+ * GNU General Public License for more details.
2122+ *
2123+ * You should have received a copy of the GNU General Public License
2124+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2125+ */
2126+
2127+import QtQuick 2.4 as QtQuick
2128+import Ubuntu.Components 1.3
2129+import "flickableUtils.js" as FlickableUtilsJS
2130+
2131+QtQuick.GridView {
2132+ flickDeceleration: FlickableUtilsJS.getFlickDeceleration(units.gridUnit)
2133+ maximumFlickVelocity: FlickableUtilsJS.getMaximumFlickVelocity(units.gridUnit)
2134+}
2135\ No newline at end of file
2136
2137=== added file 'qml/Components/ListView.qml'
2138--- qml/Components/ListView.qml 1970-01-01 00:00:00 +0000
2139+++ qml/Components/ListView.qml 2016-09-22 07:47:54 +0000
2140@@ -0,0 +1,24 @@
2141+/*
2142+ * Copyright (C) 2016 Canonical, Ltd.
2143+ *
2144+ * This program is free software; you can redistribute it and/or modify
2145+ * it under the terms of the GNU General Public License as published by
2146+ * the Free Software Foundation; version 3.
2147+ *
2148+ * This program is distributed in the hope that it will be useful,
2149+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2150+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2151+ * GNU General Public License for more details.
2152+ *
2153+ * You should have received a copy of the GNU General Public License
2154+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2155+ */
2156+
2157+import QtQuick 2.4 as QtQuick
2158+import Ubuntu.Components 1.3
2159+import "flickableUtils.js" as FlickableUtilsJS
2160+
2161+QtQuick.ListView {
2162+ flickDeceleration: FlickableUtilsJS.getFlickDeceleration(units.gridUnit)
2163+ maximumFlickVelocity: FlickableUtilsJS.getMaximumFlickVelocity(units.gridUnit)
2164+}
2165\ No newline at end of file
2166
2167=== modified file 'qml/Components/Lockscreen.qml'
2168--- qml/Components/Lockscreen.qml 2016-05-26 20:59:30 +0000
2169+++ qml/Components/Lockscreen.qml 2016-09-22 07:47:54 +0000
2170@@ -41,9 +41,6 @@
2171 // The text to be displayed in case the login failed
2172 property string errorText: ""
2173
2174- // If > 0, a forced delay is happening
2175- property int delayMinutes: 0
2176-
2177 // Set those to a value greater 0 to restrict the pin length.
2178 // If both are unset, the Lockscreen will show a confirm button and allow typing any length of pin before
2179 // confirming. If minPinLength is set to a value > 0, the confirm button will only become active when the
2180@@ -91,14 +88,6 @@
2181 popup.z = Number.MAX_VALUE
2182 }
2183
2184- function showText(text) {
2185- // Programmatically enters the given text into the lockscreen
2186- if (pinPadLoader.item) {
2187- pinPadLoader.item.showText(text);
2188- pinPadLoader.waiting = true;
2189- }
2190- }
2191-
2192 Rectangle {
2193 // In case background fails to load
2194 id: backgroundBackup
2195@@ -107,17 +96,13 @@
2196 visible: root.background.toString() !== ""
2197 }
2198
2199- Image {
2200+ Wallpaper {
2201 id: backgroundImage
2202 objectName: "lockscreenBackground"
2203 anchors {
2204 fill: parent
2205 }
2206- // Limit how much memory we'll reserve for this image
2207- sourceSize.height: height
2208- sourceSize.width: width
2209 source: root.required ? root.background : ""
2210- fillMode: Image.PreserveAspectCrop
2211 }
2212
2213 // This is to
2214@@ -141,8 +126,6 @@
2215 source: {
2216 if (resetting || !root.required) {
2217 return ""
2218- } else if (root.delayMinutes > 0) {
2219- return "DelayedLockscreen.qml"
2220 } else if (root.alphaNumeric) {
2221 return "PassphraseLockscreen.qml"
2222 } else {
2223@@ -199,16 +182,6 @@
2224 }
2225 Binding {
2226 target: pinPadLoader.item
2227- property: "alphaNumeric"
2228- value: root.alphaNumeric
2229- }
2230- Binding {
2231- target: pinPadLoader.item
2232- property: "delayMinutes"
2233- value: root.delayMinutes
2234- }
2235- Binding {
2236- target: pinPadLoader.item
2237 property: "showCancelButton"
2238 value: root.showCancelButton
2239 }
2240
2241=== modified file 'qml/Components/PanelState/PanelState.qml'
2242--- qml/Components/PanelState/PanelState.qml 2016-05-30 19:52:41 +0000
2243+++ qml/Components/PanelState/PanelState.qml 2016-09-22 07:47:54 +0000
2244@@ -30,5 +30,4 @@
2245 signal closeClicked()
2246 signal minimizeClicked()
2247 signal restoreClicked()
2248- signal focusMaximizedApp()
2249 }
2250
2251=== modified file 'qml/Components/PassphraseLockscreen.qml'
2252--- qml/Components/PassphraseLockscreen.qml 2016-05-25 19:25:51 +0000
2253+++ qml/Components/PassphraseLockscreen.qml 2016-09-22 07:47:54 +0000
2254@@ -43,10 +43,6 @@
2255 }
2256 }
2257
2258- function showText(text) {
2259- pinentryField.text = text;
2260- }
2261-
2262 Column {
2263 id: shakeContainer
2264 anchors.horizontalCenter: parent.horizontalCenter
2265
2266=== modified file 'qml/Components/PinLockscreen.qml'
2267--- qml/Components/PinLockscreen.qml 2016-05-25 19:25:51 +0000
2268+++ qml/Components/PinLockscreen.qml 2016-09-22 07:47:54 +0000
2269@@ -46,10 +46,6 @@
2270 }
2271 }
2272
2273- function showText(text) {
2274- pinentryField.text = text;
2275- }
2276-
2277 Keys.onPressed: {
2278 if (pinentryField.text.length == root.maxPinLength)
2279 return;
2280
2281=== modified file 'qml/Components/ResponsiveGridView.qml'
2282--- qml/Components/ResponsiveGridView.qml 2016-01-13 09:00:03 +0000
2283+++ qml/Components/ResponsiveGridView.qml 2016-09-22 07:47:54 +0000
2284@@ -16,6 +16,7 @@
2285
2286 import QtQuick 2.4
2287 import Ubuntu.Components 1.3
2288+import "."
2289
2290 /*
2291 Essentially a GridView
2292
2293=== modified file 'qml/Components/VolumeControl.qml'
2294--- qml/Components/VolumeControl.qml 2016-01-05 06:09:56 +0000
2295+++ qml/Components/VolumeControl.qml 2016-09-22 07:47:54 +0000
2296@@ -17,6 +17,7 @@
2297 import QtQuick 2.4
2298 import QMenuModel 0.1 as QMenuModel
2299 import GlobalShortcut 1.0
2300+import Unity.Platform 1.0
2301
2302 Item {
2303 id: root
2304@@ -27,8 +28,6 @@
2305 readonly property int stepUp: 1
2306 readonly property int stepDown: -1
2307
2308- property var indicators // passed from Shell.qml
2309-
2310 GlobalShortcut {
2311 id: muteShortcut
2312 shortcut: Qt.Key_VolumeMute
2313@@ -42,7 +41,8 @@
2314 objectPath: "/com/canonical/indicator/sound"
2315
2316 property variant actionObject: action("volume")
2317- property variant muteActionObject: indicators.indicatorsModel.profile === "desktop" ? action("mute") : action("silent-mode")
2318+ // temporary workaround for lp:1623166
2319+ property variant muteActionObject: Platform.isPC ? action("mute") : action("silent-mode")
2320 }
2321
2322 function volumeUp() {
2323
2324=== added file 'qml/Components/Wallpaper.qml'
2325--- qml/Components/Wallpaper.qml 1970-01-01 00:00:00 +0000
2326+++ qml/Components/Wallpaper.qml 2016-09-22 07:47:54 +0000
2327@@ -0,0 +1,44 @@
2328+/*
2329+ * Copyright (C) 2013-2016 Canonical, Ltd.
2330+ *
2331+ * This program is free software; you can redistribute it and/or modify
2332+ * it under the terms of the GNU General Public License as published by
2333+ * the Free Software Foundation; version 3.
2334+ *
2335+ * This program is distributed in the hope that it will be useful,
2336+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2337+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2338+ * GNU General Public License for more details.
2339+ *
2340+ * You should have received a copy of the GNU General Public License
2341+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2342+ */
2343+
2344+import QtQuick 2.4
2345+import QtQuick.Window 2.2
2346+import Ubuntu.Components 1.3
2347+
2348+Item {
2349+ id: root
2350+ property url source
2351+
2352+ CrossFadeImage {
2353+ anchors.fill: parent
2354+ fillMode: Image.PreserveAspectCrop
2355+
2356+ // Limit how much memory we reserve and avoid reloading when item size
2357+ // changes or is rotated by specifying sourceSize.
2358+ //
2359+ // FIXME: If the source image has a portrait aspect ratio, we should swap
2360+ // sourceSize.width and sourceSize.height to prevent blurriness from double
2361+ // scaling. We could easily do that with a tiny image loader to check
2362+ // the aspect ratio first, but when we change sourceSize, we lose all
2363+ // the benefits of CrossFadeImage. So we need to fix that component
2364+ // first to gracefully handle sourceSize changes (LP: #1599203).
2365+ readonly property int maxSize: Math.max(Screen.width, Screen.height)
2366+ sourceSize.width: 0
2367+ sourceSize.height: maxSize
2368+
2369+ source: root.source
2370+ }
2371+}
2372
2373=== modified file 'qml/Components/WallpaperResolver.qml'
2374--- qml/Components/WallpaperResolver.qml 2016-05-18 13:38:27 +0000
2375+++ qml/Components/WallpaperResolver.qml 2016-09-22 07:47:54 +0000
2376@@ -15,49 +15,35 @@
2377 */
2378
2379 import QtQuick 2.4
2380-import AccountsService 0.1
2381-import GSettings 1.0
2382 import Ubuntu.Components 1.3
2383
2384-/*
2385- Defines the background URL based on several factors, such as:
2386- - default, fallback, background
2387- - Background set in AccountSettings, if any
2388- - Background set in GSettings, if any
2389- */
2390-QtObject {
2391- // Users should set their UI width here.
2392- property real width
2393-
2394- property url defaultBackground: Qt.resolvedUrl(width >= units.gu(60) ? "../graphics/tablet_background.jpg"
2395- : "../graphics/phone_background.jpg")
2396-
2397- // That's the property users of this component are going to consume.
2398- readonly property url background: asImageTester.status == Image.Ready ? asImageTester.source
2399- : gsImageTester.status == Image.Ready ? gsImageTester.source : defaultBackground
2400-
2401- // This is a dummy image to detect if the custom AS set wallpaper loads successfully.
2402- property var _asImageTester: Image {
2403- id: asImageTester
2404- source: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : ""
2405- height: 0
2406- width: 0
2407- sourceSize.height: 0
2408- sourceSize.width: 0
2409- }
2410-
2411- // This is a dummy image to detect if the custom GSettings set wallpaper loads successfully.
2412- property var _gsImageTester: Image {
2413- id: gsImageTester
2414- source: backgroundSettings.pictureUri && backgroundSettings.pictureUri.length > 0 ? backgroundSettings.pictureUri : ""
2415- height: 0
2416- width: 0
2417- sourceSize.height: 0
2418- sourceSize.width: 0
2419- }
2420-
2421- property var _gsettings: GSettings {
2422- id: backgroundSettings
2423- schema.id: "org.gnome.desktop.background"
2424+Item {
2425+ id: root
2426+
2427+ // Provide a list of wallpapers to resolve here, preferred ones first
2428+ property var candidates: []
2429+
2430+ readonly property url background: {
2431+ for (var i = 0; i < repeater.count; i++) {
2432+ if (repeater.itemAt(i).status === Image.Ready)
2433+ return candidates[i];
2434+ }
2435+ if (i > 0) {
2436+ return candidates[i - 1]; // last item is last resort
2437+ } else {
2438+ return "";
2439+ }
2440+ }
2441+
2442+ Repeater {
2443+ id: repeater
2444+ model: root.candidates
2445+ delegate: Image {
2446+ source: modelData
2447+ height: 0
2448+ width: 0
2449+ sourceSize.height: 0
2450+ sourceSize.width: 0
2451+ }
2452 }
2453 }
2454
2455=== modified file 'qml/Components/WindowControlButtons.qml'
2456--- qml/Components/WindowControlButtons.qml 2016-06-20 10:31:44 +0000
2457+++ qml/Components/WindowControlButtons.qml 2016-09-22 07:47:54 +0000
2458@@ -19,13 +19,12 @@
2459
2460 Row {
2461 id: root
2462- spacing: overlayShown ? units.gu(2) : units.gu(1)
2463+ spacing: overlayShown ? units.gu(2) : windowIsMaximized ? 0 : units.gu(1)
2464 Behavior on spacing {
2465 UbuntuNumberAnimation {}
2466 }
2467
2468 // to be set from outside
2469- property Item target
2470 property bool active: false
2471 property bool windowIsMaximized: false
2472 property bool closeButtonShown: true
2473@@ -49,13 +48,14 @@
2474
2475 Rectangle {
2476 anchors.fill: parent
2477+ anchors.margins: windowIsMaximized ? units.dp(3) : 0
2478 radius: height / 2
2479 color: theme.palette.normal.negative
2480 visible: parent.containsMouse && !overlayShown
2481 }
2482 Icon {
2483 anchors.fill: parent
2484- anchors.margins: units.dp(3)
2485+ anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
2486 source: "graphics/window-close.svg"
2487 color: root.active ? "white" : UbuntuColors.slate
2488 }
2489@@ -71,13 +71,14 @@
2490
2491 Rectangle {
2492 anchors.fill: parent
2493+ anchors.margins: windowIsMaximized ? units.dp(3) : 0
2494 radius: height / 2
2495 color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
2496 visible: parent.containsMouse && !overlayShown
2497 }
2498 Icon {
2499 anchors.fill: parent
2500- anchors.margins: units.dp(3)
2501+ anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
2502 source: "graphics/window-minimize.svg"
2503 color: root.active ? "white" : UbuntuColors.slate
2504 }
2505@@ -103,13 +104,14 @@
2506
2507 Rectangle {
2508 anchors.fill: parent
2509+ anchors.margins: windowIsMaximized ? units.dp(3) : 0
2510 radius: height / 2
2511 color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
2512 visible: parent.containsMouse && !overlayShown
2513 }
2514 Icon {
2515 anchors.fill: parent
2516- anchors.margins: units.dp(3)
2517+ anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
2518 source: root.windowIsMaximized ? "graphics/window-window.svg" : "graphics/window-maximize.svg"
2519 color: root.active ? "white" : UbuntuColors.slate
2520 }
2521
2522=== modified file 'qml/Components/ZoomableImage.qml'
2523--- qml/Components/ZoomableImage.qml 2016-01-22 23:16:50 +0000
2524+++ qml/Components/ZoomableImage.qml 2016-09-22 07:47:54 +0000
2525@@ -16,7 +16,7 @@
2526
2527 import QtQuick 2.4
2528 import Ubuntu.Components 1.3
2529-import "../Components"
2530+import "."
2531
2532 /*! \brief Zoomable for image.
2533
2534
2535=== added file 'qml/Components/flickableUtils.js'
2536--- qml/Components/flickableUtils.js 1970-01-01 00:00:00 +0000
2537+++ qml/Components/flickableUtils.js 2016-09-22 07:47:54 +0000
2538@@ -0,0 +1,28 @@
2539+/*
2540+ * Copyright (C) 2016 Canonical, Ltd.
2541+ *
2542+ * This program is free software; you can redistribute it and/or modify
2543+ * it under the terms of the GNU General Public License as published by
2544+ * the Free Software Foundation; version 3.
2545+ *
2546+ * This program is distributed in the hope that it will be useful,
2547+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2548+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2549+ * GNU General Public License for more details.
2550+ *
2551+ * You should have received a copy of the GNU General Public License
2552+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2553+ */
2554+
2555+.pragma library
2556+
2557+/* TODO the "8" is is DEFAULT_GRID_UNIT_PX, we use it to normalize the values with the current grid unit size.
2558+ Add a way to fetch this default grid unit px value from UITK. */
2559+
2560+function getFlickDeceleration(gridUnit) {
2561+ return 1500 * gridUnit / 8;
2562+}
2563+
2564+function getMaximumFlickVelocity(gridUnit) {
2565+ return 2500 * gridUnit / 8;
2566+}
2567\ No newline at end of file
2568
2569=== modified file 'qml/Dash/CardTool.qml'
2570--- qml/Dash/CardTool.qml 2016-07-25 10:12:34 +0000
2571+++ qml/Dash/CardTool.qml 2016-09-22 07:47:54 +0000
2572@@ -71,7 +71,17 @@
2573 // Not readonly because gets overwritten from GenericScopeView in some cases
2574 property string artShapeStyle: categoryLayout === "carousel" ? "shadow" : "inset"
2575
2576- property var cardComponent: CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, false, cardTool.artShapeStyle, cardTool.categoryLayout);
2577+ // FIXME ? This seems like it should not be needed, but on Qt 5.4 + phone
2578+ // we are doing unneeded calls to getCardComponent with artShapeStyle and categoryLayout being empty
2579+ // Check when we move to newer Qts on the phone if we still need this
2580+ readonly property bool askForCardComponent: cardTool.template !== undefined &&
2581+ cardTool.components !== undefined &&
2582+ cardTool.artShapeStyle !== "" &&
2583+ cardTool.categoryLayout !== ""
2584+
2585+ property var cardComponent: askForCardComponent
2586+ ? CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, false, cardTool.artShapeStyle, cardTool.categoryLayout)
2587+ : undefined
2588
2589 // FIXME: Saviq
2590 // Only way for the card below to actually be laid out completely.
2591@@ -213,7 +223,9 @@
2592 "attributes": attributesModel.model,
2593 "socialActions": socialActionsModel.model
2594 }
2595- sourceComponent: CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, true, cardTool.artShapeStyle, cardTool.categoryLayout);
2596+ sourceComponent: askForCardComponent
2597+ ? CardCreatorCache.getCardComponent(cardTool.template, cardTool.components, true, cardTool.artShapeStyle, cardTool.categoryLayout)
2598+ : undefined
2599 onLoaded: {
2600 item.objectName = "cardToolCard";
2601 item.width = Qt.binding(function() { return cardTool.cardWidth !== -1 ? cardTool.cardWidth : item.implicitWidth; });
2602
2603=== modified file 'qml/Dash/DashBackground.qml'
2604--- qml/Dash/DashBackground.qml 2015-12-18 09:05:24 +0000
2605+++ qml/Dash/DashBackground.qml 2016-09-22 07:47:54 +0000
2606@@ -16,10 +16,10 @@
2607
2608 import QtQuick 2.4
2609 import QtQuick.Window 2.2
2610-import Ubuntu.Thumbnailer 0.1
2611+import ImageCache 0.1
2612
2613 Image {
2614- source: "image://thumbnailer/" + Qt.resolvedUrl("graphics/paper.png")
2615+ source: "image://unity8imagecache/" + Qt.resolvedUrl("graphics/paper.png")
2616 fillMode: Image.PreserveAspectCrop
2617 horizontalAlignment: Image.AlignRight
2618 verticalAlignment: Image.AlignTop
2619
2620=== modified file 'qml/Dash/DashContent.qml'
2621--- qml/Dash/DashContent.qml 2016-03-29 03:47:39 +0000
2622+++ qml/Dash/DashContent.qml 2016-09-22 07:47:54 +0000
2623@@ -112,8 +112,6 @@
2624 anchors.fill: parent
2625 orientation: ListView.Horizontal
2626 boundsBehavior: Flickable.DragAndOvershootBounds
2627- flickDeceleration: units.gu(625)
2628- maximumFlickVelocity: width * 5
2629 snapMode: ListView.SnapOneItem
2630 highlightMoveDuration: 250
2631 highlightRangeMode: ListView.StrictlyEnforceRange
2632
2633=== modified file 'qml/Dash/DashNavigation.qml'
2634--- qml/Dash/DashNavigation.qml 2016-03-29 03:47:39 +0000
2635+++ qml/Dash/DashNavigation.qml 2016-09-22 07:47:54 +0000
2636@@ -17,6 +17,7 @@
2637 import QtQuick 2.4
2638 import Ubuntu.Components 1.3
2639 import Dash 0.1
2640+import "../Components"
2641
2642 Item {
2643 id: root
2644
2645=== modified file 'qml/Dash/DashPageHeader.qml'
2646--- qml/Dash/DashPageHeader.qml 2016-08-03 15:51:32 +0000
2647+++ qml/Dash/DashPageHeader.qml 2016-09-22 07:47:54 +0000
2648@@ -18,6 +18,7 @@
2649 import Ubuntu.Components 1.3
2650 import Ubuntu.Components.Popups 1.3
2651 import Ubuntu.Components.ListItems 1.3
2652+import Utils 0.1
2653 import "../Components"
2654
2655 Item {
2656@@ -25,6 +26,7 @@
2657 objectName: "pageHeader"
2658 implicitHeight: headerContainer.height + signatureLineHeight
2659 readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
2660+ readonly property real headerDividerLuminance: Style.luminance(bottomBorder.color)
2661
2662 property int activeFiltersCount: 0
2663 property bool scopeHasFilters: false
2664
2665=== modified file 'qml/Dash/FiltersPopover.qml'
2666--- qml/Dash/FiltersPopover.qml 2016-03-14 08:54:07 +0000
2667+++ qml/Dash/FiltersPopover.qml 2016-09-22 07:47:54 +0000
2668@@ -19,6 +19,7 @@
2669 import Ubuntu.Components.Popups 1.3
2670 import Ubuntu.Components.ListItems 1.3 as ListItems
2671 import "Filters" as Filters
2672+import "../Components"
2673
2674 Popover {
2675 id: root
2676
2677=== modified file 'qml/Dash/GenericScopeView.qml'
2678--- qml/Dash/GenericScopeView.qml 2016-08-11 06:23:42 +0000
2679+++ qml/Dash/GenericScopeView.qml 2016-09-22 07:47:54 +0000
2680@@ -23,6 +23,7 @@
2681 import Dash 0.1
2682 import "../Components"
2683 import "../Components/ListItems" as ListItems
2684+import "Previews/PreviewSingleton"
2685
2686 FocusScope {
2687 id: scopeView
2688@@ -722,6 +723,7 @@
2689 target: categoryView
2690
2691 readonly property real contentY: categoryView.contentY - categoryView.originY
2692+ readonly property real headerDividerLuminance: categoryView.pageHeader.headerDividerLuminance
2693 y: -contentY - units.gu(5)
2694
2695 onRefresh: {
2696@@ -787,6 +789,17 @@
2697 color: scopeStyle ? scopeStyle.foreground : theme.palette.normal.baseText
2698 }
2699
2700+ Image {
2701+ anchors {
2702+ bottom: parent.bottom
2703+ left: parent.left
2704+ right: parent.right
2705+ }
2706+ fillMode: Image.Stretch
2707+ source: "graphics/dash_divider_top_darkgrad.png"
2708+ z: -1
2709+ }
2710+
2711 Connections {
2712 target: floatingSeeLess.companionTo ? categoryView : null
2713 onContentYChanged: floatingSeeLess.updateVisibility();
2714@@ -824,6 +837,9 @@
2715 }
2716
2717 function closeSubPage() {
2718+ if (subPage == "preview") {
2719+ PreviewSingleton.widgetExtraData = new Object();
2720+ }
2721 open = false;
2722 }
2723
2724
2725=== modified file 'qml/Dash/PageHeaderExtraPanel.qml'
2726--- qml/Dash/PageHeaderExtraPanel.qml 2016-05-05 18:16:20 +0000
2727+++ qml/Dash/PageHeaderExtraPanel.qml 2016-09-22 07:47:54 +0000
2728@@ -18,6 +18,7 @@
2729 import Ubuntu.Components 1.3
2730 import Ubuntu.Components.ListItems 1.3 as ListItems
2731 import "Filters" as Filters
2732+import "../Components"
2733
2734 Item {
2735 id: root
2736@@ -123,6 +124,7 @@
2737 }
2738 text: query
2739 color: "#888888"
2740+ elide: Text.ElideRight
2741 }
2742
2743 divider.visible: index != recentSearchesRepeater.count - 1 || (scope && scope.hasNavigation) || primaryFilter.active
2744
2745=== modified file 'qml/Dash/Previews/PreviewCommentInput.qml'
2746--- qml/Dash/Previews/PreviewCommentInput.qml 2015-09-14 07:47:24 +0000
2747+++ qml/Dash/Previews/PreviewCommentInput.qml 2016-09-22 07:47:54 +0000
2748@@ -17,6 +17,7 @@
2749 import QtQuick 2.4
2750 import Ubuntu.Components 1.3
2751 import "../../Components"
2752+import "PreviewSingleton"
2753
2754 /*! \brief Preview widget for commenting.
2755
2756@@ -35,6 +36,20 @@
2757 triggered(root.widgetId, "commented", data);
2758 }
2759
2760+ property alias commentText: commentTextArea.text
2761+
2762+ onCommentTextChanged: storeCommentState()
2763+ onWidgetIdChanged: restoreCommentState()
2764+
2765+ function storeCommentState() {
2766+ PreviewSingleton.widgetExtraData[widgetId] = commentText;
2767+ }
2768+
2769+ function restoreCommentState() {
2770+ if (!PreviewSingleton.widgetExtraData[widgetId]) return;
2771+ if (PreviewSingleton.widgetExtraData[widgetId] != "") commentText = PreviewSingleton.widgetExtraData[widgetId];
2772+ }
2773+
2774 TextArea {
2775 id: commentTextArea
2776 objectName: "commentTextArea"
2777
2778=== modified file 'qml/Dash/Previews/PreviewInlineVideo.qml'
2779--- qml/Dash/Previews/PreviewInlineVideo.qml 2016-06-01 16:05:12 +0000
2780+++ qml/Dash/Previews/PreviewInlineVideo.qml 2016-09-22 07:47:54 +0000
2781@@ -18,6 +18,7 @@
2782 import QtMultimedia 5.0
2783 import Ubuntu.Components 1.3
2784 import Ubuntu.Thumbnailer 0.1
2785+import "PreviewSingleton"
2786 import "../../Components"
2787 import "../../Components/MediaServices"
2788
2789@@ -36,9 +37,35 @@
2790 orientationLock: services.fullscreen
2791
2792 property alias rootItem: services.rootItem
2793+ readonly property string widgetExtraDataKey: services.source.toString()
2794+
2795+ onWidgetExtraDataKeyChanged: {
2796+ root.restorePlaybackState();
2797+ }
2798+
2799+ function seek() {
2800+ services.mediaPlayer.seek(services.initialPosition);
2801+ services.initialPosition = -1;
2802+ }
2803+
2804+ function storePlaybackState() {
2805+ if ((services.mediaPlayer.duration - services.mediaPlayer.position) < 1000) {
2806+ // we're at the end of the video
2807+ PreviewSingleton.widgetExtraData[widgetExtraDataKey] = 0;
2808+ } else {
2809+ PreviewSingleton.widgetExtraData[widgetExtraDataKey] = services.mediaPlayer.position;
2810+ }
2811+ }
2812+
2813+ function restorePlaybackState() {
2814+ if (PreviewSingleton.widgetExtraData[widgetExtraDataKey] > 0) {
2815+ services.initialPosition = PreviewSingleton.widgetExtraData[widgetExtraDataKey];
2816+ }
2817+ }
2818
2819 MediaServices {
2820 id: services
2821+ objectName: "services"
2822 width: parent.width
2823
2824 actions: sharingAction
2825@@ -47,8 +74,28 @@
2826 fullscreen: false
2827 maximumEmbeddedHeight: rootItem.height / 2
2828
2829+ property int initialPosition: -1
2830+
2831+ readonly property var mediaPlayer: footer.mediaPlayer
2832+ readonly property url source: mediaPlayer.source
2833+ readonly property int position: mediaPlayer.position
2834+
2835 onClose: fullscreen = false
2836
2837+ onPositionChanged: {
2838+ if (mediaPlayer.playbackState === MediaPlayer.StoppedState) return;
2839+ root.storePlaybackState();
2840+ }
2841+
2842+ Connections {
2843+ target: services.mediaPlayer
2844+ ignoreUnknownSignals: true
2845+ onPlaying: {
2846+ // at the first playback of the file, do a seek()
2847+ if (services.initialPosition > 0) root.seek();
2848+ }
2849+ }
2850+
2851 Action {
2852 id: sharingAction
2853 iconName: "share"
2854
2855=== modified file 'qml/Dash/Previews/PreviewProgress.qml'
2856--- qml/Dash/Previews/PreviewProgress.qml 2015-07-15 15:07:19 +0000
2857+++ qml/Dash/Previews/PreviewProgress.qml 2016-09-22 07:47:54 +0000
2858@@ -1,5 +1,5 @@
2859 /*
2860- * Copyright (C) 2014 Canonical, Ltd.
2861+ * Copyright (C) 2014-2016 Canonical, Ltd.
2862 *
2863 * This program is free software; you can redistribute it and/or modify
2864 * it under the terms of the GNU General Public License as published by
2865@@ -59,6 +59,10 @@
2866 }
2867 }
2868
2869+ onProcessing: {
2870+ progressBar.indeterminate = true;
2871+ }
2872+
2873 onFinished: {
2874 root.triggered(widgetId, "finished", widgetData)
2875 }
2876
2877=== modified file 'qml/Dash/Previews/PreviewRatingInput.qml'
2878--- qml/Dash/Previews/PreviewRatingInput.qml 2016-05-20 14:21:59 +0000
2879+++ qml/Dash/Previews/PreviewRatingInput.qml 2016-09-22 07:47:54 +0000
2880@@ -17,6 +17,7 @@
2881 import QtQuick 2.4
2882 import Ubuntu.Components 1.3
2883 import "../../Components"
2884+import "PreviewSingleton"
2885
2886 /*! \brief Preview widget for rating.
2887
2888@@ -53,6 +54,31 @@
2889 property alias ratingValue: rating.value
2890 property alias reviewText: reviewTextArea.text
2891
2892+ onRatingValueChanged: storeRatingState()
2893+ onReviewTextChanged: storeTextState()
2894+ onWidgetIdChanged: restoreReviewState()
2895+
2896+ function initializeWidgetExtraData() {
2897+ if (typeof(PreviewSingleton.widgetExtraData[widgetId]) == "undefined") PreviewSingleton.widgetExtraData[widgetId] = [];
2898+ }
2899+
2900+ function storeRatingState() {
2901+ initializeWidgetExtraData();
2902+ PreviewSingleton.widgetExtraData[widgetId][0] = ratingValue;
2903+ }
2904+
2905+ function storeTextState() {
2906+ initializeWidgetExtraData();
2907+ PreviewSingleton.widgetExtraData[widgetId][1] = reviewText;
2908+ }
2909+
2910+ function restoreReviewState() {
2911+ if (!PreviewSingleton.widgetExtraData[widgetId]) return;
2912+ if (PreviewSingleton.widgetExtraData[widgetId][0] > 0) ratingValue = PreviewSingleton.widgetExtraData[widgetId][0];
2913+ if (typeof(PreviewSingleton.widgetExtraData[widgetId][1]) != "undefined" &&
2914+ PreviewSingleton.widgetExtraData[widgetId][1] != "") reviewText = PreviewSingleton.widgetExtraData[widgetId][1];
2915+ }
2916+
2917 function submit() {
2918 // checks rating-input requirements
2919 if (((widgetData["required"] === "both" ||
2920@@ -89,7 +115,7 @@
2921 size: 5
2922 height: units.gu(4)
2923 onValueChanged: {
2924- if (widgetData["visible"] === "rating") root.submit();
2925+ if (widgetData && widgetData["visible"] === "rating") root.submit();
2926 }
2927
2928 property var urlIconEmpty: widgetData["rating-icon-empty"] || "image://theme/non-starred"
2929
2930=== added directory 'qml/Dash/Previews/PreviewSingleton'
2931=== added file 'qml/Dash/Previews/PreviewSingleton/PreviewSingleton.qml'
2932--- qml/Dash/Previews/PreviewSingleton/PreviewSingleton.qml 1970-01-01 00:00:00 +0000
2933+++ qml/Dash/Previews/PreviewSingleton/PreviewSingleton.qml 2016-09-22 07:47:54 +0000
2934@@ -0,0 +1,22 @@
2935+/*
2936+ * Copyright (C) 2016 Canonical, Ltd.
2937+ *
2938+ * This program is free software; you can redistribute it and/or modify
2939+ * it under the terms of the GNU General Public License as published by
2940+ * the Free Software Foundation; version 3.
2941+ *
2942+ * This program is distributed in the hope that it will be useful,
2943+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2944+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2945+ * GNU General Public License for more details.
2946+ *
2947+ * You should have received a copy of the GNU General Public License
2948+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2949+ */
2950+
2951+pragma Singleton
2952+import QtQuick 2.4
2953+
2954+QtObject {
2955+ property var widgetExtraData: new Object();
2956+}
2957\ No newline at end of file
2958
2959=== added file 'qml/Dash/Previews/PreviewSingleton/qmldir'
2960--- qml/Dash/Previews/PreviewSingleton/qmldir 1970-01-01 00:00:00 +0000
2961+++ qml/Dash/Previews/PreviewSingleton/qmldir 2016-09-22 07:47:54 +0000
2962@@ -0,0 +1,1 @@
2963+singleton PreviewSingleton 1.0 PreviewSingleton.qml
2964
2965=== modified file 'qml/Dash/PullToRefreshScopeStyle.qml'
2966--- qml/Dash/PullToRefreshScopeStyle.qml 2016-06-07 19:22:13 +0000
2967+++ qml/Dash/PullToRefreshScopeStyle.qml 2016-09-22 07:47:54 +0000
2968@@ -48,6 +48,7 @@
2969 anchors.horizontalCenter: parent.horizontalCenter
2970 horizontalAlignment: Text.AlignHCenter
2971 verticalAlignment: Text.AlignVCenter
2972+ color: styledItem.headerDividerLuminance < 0.3 ? UbuntuColors.porcelain : UbuntuColors.jet
2973 states: [
2974 State {
2975 name: "pulling"
2976
2977=== modified file 'qml/Dash/ScopeListView.qml'
2978--- qml/Dash/ScopeListView.qml 2015-07-15 15:07:19 +0000
2979+++ qml/Dash/ScopeListView.qml 2016-09-22 07:47:54 +0000
2980@@ -15,11 +15,13 @@
2981 */
2982
2983 import QtQuick 2.4
2984+import Ubuntu.Components 1.3
2985 import Dash 0.1
2986+import "../Components/flickableUtils.js" as FlickableUtilsJS
2987
2988 ListViewWithPageHeader {
2989- maximumFlickVelocity: height * 10
2990- flickDeceleration: height * 2
2991+ flickDeceleration: FlickableUtilsJS.getFlickDeceleration(units.gridUnit)
2992+ maximumFlickVelocity: FlickableUtilsJS.getMaximumFlickVelocity(units.gridUnit)
2993 // 1073741823 is s^30 -1. A quite big number so that you have "infinite" cache, but not so
2994 // big so that if you add if with itself you're outside the 2^31 int range
2995 cacheBuffer: 1073741823
2996
2997=== modified file 'qml/Dash/ScopesList.qml'
2998--- qml/Dash/ScopesList.qml 2016-06-08 13:13:43 +0000
2999+++ qml/Dash/ScopesList.qml 2016-09-22 07:47:54 +0000
3000@@ -15,7 +15,9 @@
3001 */
3002
3003 import QtQuick 2.4
3004+import Ubuntu.Components 1.3
3005 import Dash 0.1
3006+import "../Components"
3007
3008 Item {
3009 id: root
3010
3011=== modified file 'qml/Dash/ScopesListCategory.qml'
3012--- qml/Dash/ScopesListCategory.qml 2015-07-15 15:07:19 +0000
3013+++ qml/Dash/ScopesListCategory.qml 2016-09-22 07:47:54 +0000
3014@@ -17,6 +17,7 @@
3015 import QtQuick 2.4
3016 import Ubuntu.Components 1.3
3017 import Dash 0.1
3018+import "../Components"
3019 import "../Components/ListItems" as ListItems
3020
3021 Item {
3022
3023=== renamed file 'qml/Components/Circle.qml' => 'qml/Greeter/Circle.qml'
3024--- qml/Components/Circle.qml 2015-07-15 15:07:19 +0000
3025+++ qml/Greeter/Circle.qml 2016-09-22 07:47:54 +0000
3026@@ -1,5 +1,5 @@
3027 /*
3028- * Copyright (C) 2013 Canonical, Ltd.
3029+ * Copyright (C) 2013,2016 Canonical, Ltd.
3030 *
3031 * This program is free software; you can redistribute it and/or modify
3032 * it under the terms of the GNU General Public License as published by
3033@@ -16,7 +16,42 @@
3034
3035 import QtQuick 2.4
3036
3037-Rectangle {
3038- antialiasing: true
3039- radius: width / 2
3040- }
3041+Canvas {
3042+ id: root
3043+ property color color
3044+ property real circleScale
3045+ property var centerCircle
3046+
3047+ onColorChanged: requestPaint()
3048+ onCircleScaleChanged: requestPaint()
3049+ onCenterCircleChanged: requestPaint()
3050+
3051+ onPaint: {
3052+ if (circleScale <= 0) {
3053+ return;
3054+ }
3055+
3056+ var ctx = getContext("2d");
3057+
3058+ // draw big circle
3059+ ctx.save();
3060+ ctx.fillStyle = color;
3061+ ctx.beginPath();
3062+ ctx.arc(width / 2, height / 2, circleScale * width / 2, 0, 2 * Math.PI, false);
3063+ ctx.fill();
3064+ ctx.restore();
3065+
3066+ // chop out inner infographics circle
3067+ if (centerCircle) {
3068+ var circleMiddle = mapFromItem(centerCircle,
3069+ centerCircle.width / 2,
3070+ centerCircle.height / 2);
3071+ ctx.save();
3072+ ctx.globalCompositeOperation = "destination-out";
3073+ ctx.beginPath();
3074+ ctx.arc(circleMiddle.x, circleMiddle.y, centerCircle.width / 2, 0, 2 * Math.PI, false);
3075+ ctx.fill();
3076+ ctx.restore();
3077+ }
3078+ }
3079+}
3080
3081=== modified file 'qml/Greeter/Clock.qml'
3082--- qml/Greeter/Clock.qml 2015-07-15 15:07:19 +0000
3083+++ qml/Greeter/Clock.qml 2016-09-22 07:47:54 +0000
3084@@ -73,7 +73,6 @@
3085 anchors.horizontalCenter: parent.horizontalCenter
3086 font.pixelSize: units.gu(7.5)
3087 color: "white"
3088- opacity: 0.5
3089 text: Qt.formatTime(clock.currentDate)
3090 font.weight: Font.Light
3091 }
3092@@ -85,7 +84,6 @@
3093 anchors.horizontalCenter: parent.horizontalCenter
3094 fontSize: "medium"
3095 color: "white"
3096- opacity: 0.5
3097 text: Qt.formatDate(clock.currentDate, Qt.DefaultLocaleLongDate)
3098 font.weight: Font.Light
3099 }
3100
3101=== modified file 'qml/Greeter/CoverPage.qml'
3102--- qml/Greeter/CoverPage.qml 2016-06-18 22:37:48 +0000
3103+++ qml/Greeter/CoverPage.qml 2016-09-22 07:47:54 +0000
3104@@ -25,13 +25,14 @@
3105 property real dragHandleLeftMargin
3106 property real launcherOffset
3107 property alias background: greeterBackground.source
3108+ property alias hasCustomBackground: backgroundShade.visible
3109 property real backgroundTopMargin
3110 property var infographicModel
3111 property bool draggable: true
3112
3113 property alias infographics: infographics
3114
3115- readonly property real showProgress: MathUtils.clamp((width - Math.abs(x)) / width, 0, 1)
3116+ readonly property real showProgress: MathUtils.clamp((width - Math.abs(x + launcherOffset)) / width, 0, 1)
3117
3118 signal tease()
3119 signal clicked()
3120@@ -82,24 +83,23 @@
3121 color: "black"
3122 }
3123
3124- CrossFadeImage {
3125+ Wallpaper {
3126 id: greeterBackground
3127 objectName: "greeterBackground"
3128 anchors {
3129 fill: parent
3130 topMargin: root.backgroundTopMargin
3131 }
3132- fillMode: Image.PreserveAspectCrop
3133- // Limit how much memory we'll reserve for this image
3134- sourceSize.height: height
3135- sourceSize.width: width
3136 }
3137
3138 // Darkens wallpaper so that we can read text on it and see infographic
3139 Rectangle {
3140+ id: backgroundShade
3141+ objectName: "backgroundShade"
3142 anchors.fill: parent
3143 color: "black"
3144 opacity: 0.4
3145+ visible: false
3146 }
3147
3148 Infographics {
3149
3150=== renamed file 'qml/Components/DelayedLockscreen.qml' => 'qml/Greeter/DelayedLockscreen.qml'
3151--- qml/Components/DelayedLockscreen.qml 2016-05-25 19:25:51 +0000
3152+++ qml/Greeter/DelayedLockscreen.qml 2016-09-22 07:47:54 +0000
3153@@ -1,5 +1,5 @@
3154 /*
3155- * Copyright (C) 2013,2014 Canonical, Ltd.
3156+ * Copyright (C) 2013-2016 Canonical, Ltd.
3157 *
3158 * This program is free software; you can redistribute it and/or modify
3159 * it under the terms of the GNU General Public License as published by
3160@@ -16,7 +16,6 @@
3161
3162 import QtQuick 2.4
3163 import Ubuntu.Components 1.3
3164-import "../Components"
3165
3166 Item {
3167 id: root
3168@@ -24,12 +23,6 @@
3169 property int delayMinutes
3170 property bool alphaNumeric
3171
3172- signal entered(string passphrase) // unused
3173- signal cancel() // unused
3174-
3175- function clear(playAnimation) {}
3176- function showText(text) {}
3177-
3178 Column {
3179 anchors.left: parent.left
3180 anchors.right: parent.right
3181@@ -46,7 +39,7 @@
3182 horizontalAlignment: Text.AlignHCenter
3183 wrapMode: Text.Wrap
3184 fontSize: "x-large"
3185- color: "#f3f3e7"
3186+ color: "white"
3187 text: i18n.tr("Device Locked")
3188 }
3189
3190@@ -60,7 +53,7 @@
3191 anchors.right: parent.right
3192 horizontalAlignment: Text.AlignHCenter
3193 wrapMode: Text.Wrap
3194- color: "#f3f3e7"
3195+ color: "white"
3196 text: alphaNumeric ?
3197 i18n.tr("You have been locked out due to too many failed passphrase attempts.") :
3198 i18n.tr("You have been locked out due to too many failed passcode attempts.")
3199@@ -71,7 +64,7 @@
3200 anchors.right: parent.right
3201 horizontalAlignment: Text.AlignHCenter
3202 wrapMode: Text.Wrap
3203- color: "#f3f3e7"
3204+ color: "white"
3205 text: i18n.tr("Please wait %1 minute and then try again…",
3206 "Please wait %1 minutes and then try again…",
3207 root.delayMinutes).arg(root.delayMinutes)
3208@@ -83,10 +76,8 @@
3209 }
3210
3211 Icon {
3212- // It would be nice to use a less network-specific name,
3213- // but this is the only lock icon we have.
3214- name: "network-secure"
3215- color: "#f3f3e7"
3216+ name: "lock"
3217+ color: "white"
3218 height: units.gu(4)
3219 width: units.gu(4)
3220 anchors.horizontalCenter: parent.horizontalCenter
3221
3222=== modified file 'qml/Greeter/FullLightDMImpl.qml'
3223--- qml/Greeter/FullLightDMImpl.qml 2015-11-09 15:30:25 +0000
3224+++ qml/Greeter/FullLightDMImpl.qml 2016-09-22 07:47:54 +0000
3225@@ -22,6 +22,8 @@
3226
3227 property var greeter: LightDM.Greeter
3228 property var infographic: LightDM.Infographic
3229+ property var sessions: LightDM.Sessions
3230+ property var sessionRoles: LightDM.SessionRoles
3231 property var users: LightDM.Users
3232 property var userRoles: LightDM.UserRoles
3233
3234
3235=== modified file 'qml/Greeter/Greeter.qml'
3236--- qml/Greeter/Greeter.qml 2016-07-19 19:11:20 +0000
3237+++ qml/Greeter/Greeter.qml 2016-09-22 07:47:54 +0000
3238@@ -34,6 +34,7 @@
3239 property real dragHandleLeftMargin: 0
3240
3241 property url background
3242+ property bool hasCustomBackground
3243
3244 // How far to offset the top greeter layer during a launcher left-drag
3245 property real launcherOffset
3246@@ -72,9 +73,12 @@
3247 }
3248 forcedUnlock = false;
3249 if (required) {
3250+ if (loader.item) {
3251+ loader.item.reset(true /* forceShow */);
3252+ }
3253 // Normally loader.onLoaded will select a user, but if we're
3254 // already shown, do it manually.
3255- d.selectUser(d.currentIndex, true);
3256+ d.selectUser(d.currentIndex, false);
3257 }
3258
3259 // Even though we may already be shown, we want to call show() for its
3260@@ -105,8 +109,8 @@
3261 }
3262 }
3263
3264- // Notify that the user has explicitly requested the given app through unity8 GUI.
3265- function notifyUserRequestedApp(appId) {
3266+ // Notify that the user has explicitly requested an app
3267+ function notifyUserRequestedApp() {
3268 if (!active) {
3269 return;
3270 }
3271@@ -132,6 +136,22 @@
3272 return d.startUnlock(true /* toTheRight */);
3273 }
3274
3275+ function sessionToStart() {
3276+ for (var i = 0; i < LightDMService.sessions.count; i++) {
3277+ var session = LightDMService.sessions.data(i,
3278+ LightDMService.sessionRoles.KeyRole);
3279+ if (loader.item.sessionToStart === session) {
3280+ return session;
3281+ }
3282+ }
3283+
3284+ if (loader.item.sessionToStart === LightDMService.greeter.defaultSession) {
3285+ return LightDMService.greeter.defaultSession;
3286+ } else {
3287+ return "ubuntu"; // The default / fallback
3288+ }
3289+ }
3290+
3291 QtObject {
3292 id: d
3293
3294@@ -178,7 +198,7 @@
3295 return;
3296 d.waiting = true;
3297 if (reset) {
3298- loader.item.reset();
3299+ loader.item.reset(false /* forceShow */);
3300 }
3301 currentIndex = index;
3302 var user = LightDMService.users.data(index, LightDMService.userRoles.NameRole);
3303@@ -197,7 +217,7 @@
3304
3305 function login() {
3306 d.waiting = true;
3307- if (LightDMService.greeter.startSessionSync()) {
3308+ if (LightDMService.greeter.startSessionSync(root.sessionToStart())) {
3309 sessionStarted();
3310 hideView();
3311 } else if (loader.item) {
3312@@ -222,6 +242,29 @@
3313 }
3314 }
3315 }
3316+
3317+ function showPromptMessage(text, isError) {
3318+ // inefficient, but we only rarely deal with messages
3319+ var html = text.replace(/&/g, "&amp;")
3320+ .replace(/</g, "&lt;")
3321+ .replace(/>/g, "&gt;")
3322+ .replace(/\n/g, "<br>");
3323+ if (isError) {
3324+ html = "<font color=\"#df382c\">" + html + "</font>";
3325+ }
3326+
3327+ if (loader.item) {
3328+ loader.item.showMessage(html);
3329+ }
3330+ }
3331+
3332+ function showFingerprintMessage(msg) {
3333+ if (loader.item) {
3334+ loader.item.reset(false /* forceShow */);
3335+ loader.item.showErrorMessage(msg);
3336+ }
3337+ showPromptMessage(msg, true);
3338+ }
3339 }
3340
3341 onLauncherOffsetChanged: {
3342@@ -395,6 +438,12 @@
3343
3344 Binding {
3345 target: loader.item
3346+ property: "hasCustomBackground"
3347+ value: root.hasCustomBackground
3348+ }
3349+
3350+ Binding {
3351+ target: loader.item
3352 property: "locked"
3353 value: root.locked
3354 }
3355@@ -436,20 +485,7 @@
3356 onShowGreeter: root.forceShow()
3357 onHideGreeter: root.forcedUnlock = true
3358
3359- onShowMessage: {
3360- // inefficient, but we only rarely deal with messages
3361- var html = text.replace(/&/g, "&amp;")
3362- .replace(/</g, "&lt;")
3363- .replace(/>/g, "&gt;")
3364- .replace(/\n/g, "<br>");
3365- if (isError) {
3366- html = "<font color=\"#df382c\">" + html + "</font>";
3367- }
3368-
3369- if (loader.item) {
3370- loader.item.showMessage(html);
3371- }
3372- }
3373+ onShowMessage: d.showPromptMessage(text, isError)
3374
3375 onShowPrompt: {
3376 if (loader.item) {
3377@@ -557,10 +593,8 @@
3378 if (!d.secureFingerprint) {
3379 d.startUnlock(false /* toTheRight */); // use normal login instead
3380 }
3381- if (loader.item) {
3382- var msg = d.secureFingerprint ? i18n.tr("Try again") : "";
3383- loader.item.showErrorMessage(msg);
3384- }
3385+ var msg = d.secureFingerprint ? i18n.tr("Try again") : "";
3386+ d.showFingerprintMessage(msg);
3387 }
3388
3389 Component.onCompleted: restartOperation()
3390@@ -578,8 +612,10 @@
3391 return;
3392 }
3393 console.log("Identified user by fingerprint:", result);
3394- if (loader.item)
3395+ if (loader.item) {
3396+ loader.item.enabled = false;
3397 loader.item.notifyAuthenticationSucceeded(true /* showFakePassword */);
3398+ }
3399 if (root.active)
3400 root.forcedUnlock = true;
3401 }
3402
3403=== modified file 'qml/Greeter/GreeterPrompt.qml'
3404--- qml/Greeter/GreeterPrompt.qml 2016-07-08 13:25:40 +0000
3405+++ qml/Greeter/GreeterPrompt.qml 2016-09-22 07:47:54 +0000
3406@@ -38,6 +38,16 @@
3407 d.enabled = true;
3408 }
3409
3410+ function showFakePassword() {
3411+ // Just a silly hack for looking like 4 pin numbers got entered, if
3412+ // a fingerprint was used and we happen to be using a pin. This was
3413+ // a request from Design.
3414+ if (isSecret && isPrompt && !isAlphanumeric) {
3415+ d.enabled = false;
3416+ text = "...."; // actual text doesn't matter
3417+ }
3418+ }
3419+
3420 StyledItem {
3421 id: d
3422
3423@@ -50,6 +60,12 @@
3424 : theme.palette.disabled.raisedSecondaryText
3425 readonly property color errorColor: passwordInput.enabled ? theme.palette.normal.negative
3426 : theme.palette.disabled.negative
3427+
3428+ onEnabledChanged: {
3429+ if (!enabled) {
3430+ fakeLabel.text = passwordInput.displayText;
3431+ }
3432+ }
3433 }
3434
3435 Rectangle {
3436@@ -70,19 +86,36 @@
3437 }
3438 }
3439
3440- AbstractButton {
3441+ Rectangle {
3442 id: promptButton
3443 objectName: "promptButton"
3444 anchors.fill: parent
3445 visible: !root.isPrompt
3446
3447- onClicked: {
3448+ function triggered() {
3449 if (d.enabled) {
3450 d.enabled = false;
3451 root.clicked();
3452 }
3453 }
3454
3455+ Rectangle {
3456+ height: parent.height;
3457+ width: parent.width
3458+ color: "transparent"
3459+ border {
3460+ color: d.textColor
3461+ width: units.dp(1)
3462+ }
3463+ }
3464+
3465+ Keys.onReturnPressed: triggered();
3466+ Keys.onEnterPressed: triggered();
3467+ MouseArea {
3468+ anchors.fill: parent
3469+ onClicked: parent.triggered();
3470+ }
3471+
3472 Label {
3473 anchors.centerIn: parent
3474 color: d.textColor
3475@@ -142,15 +175,13 @@
3476 }
3477 }
3478
3479- onAccepted: {
3480- if (d.enabled)
3481- respond();
3482- }
3483+ onAccepted: respond()
3484
3485 function respond() {
3486- d.enabled = false;
3487- fakeLabel.text = displayText;
3488- root.responded(text);
3489+ if (d.enabled) {
3490+ d.enabled = false;
3491+ root.responded(text);
3492+ }
3493 }
3494
3495 Keys.onEscapePressed: {
3496
3497=== modified file 'qml/Greeter/Infographics.qml'
3498--- qml/Greeter/Infographics.qml 2016-02-02 22:07:04 +0000
3499+++ qml/Greeter/Infographics.qml 2016-09-22 07:47:54 +0000
3500@@ -14,7 +14,6 @@
3501 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3502 */
3503
3504-import "../Components"
3505 import "Gradient.js" as Gradient
3506 import QtQuick 2.4
3507 import Ubuntu.Components 1.3
3508@@ -36,6 +35,13 @@
3509 || circleChangeAnimTimer.running
3510 }
3511
3512+ QtObject {
3513+ id: whiteTheme
3514+ property color main: "white"
3515+ property color start: "white"
3516+ property color end: "white"
3517+ }
3518+
3519 Connections {
3520 target: model
3521 ignoreUnknownSignals: model === undefined
3522@@ -142,9 +148,10 @@
3523 width: dataCircle.width / divisor
3524 height: dataCircle.height / divisor
3525 opacity: 0.0
3526- scale: 0.0
3527+ circleScale: 0.0
3528 visible: modelData !== undefined
3529 color: "transparent"
3530+ centerCircle: dataCircle
3531
3532 SequentialAnimation {
3533 id: pastCircleChangeAnim
3534@@ -160,7 +167,7 @@
3535 }
3536 PropertyAnimation {
3537 target: pastCircle
3538- property: "scale"
3539+ property: "circleScale"
3540 to: modelData
3541 easing.type: Easing.OutCurve
3542 duration: circleChangeAnimTimer.interval * d.circleModifier
3543@@ -168,7 +175,7 @@
3544 ColorAnimation {
3545 target: pastCircle
3546 property: "color"
3547- to: Gradient.threeColorByIndex(index, count, infographic.model.secondColor)
3548+ to: Gradient.threeColorByIndex(index, count, whiteTheme)
3549 easing.type: Easing.OutCurve
3550 duration: circleChangeAnimTimer.interval * d.circleModifier
3551 }
3552@@ -202,9 +209,10 @@
3553 width: dataCircle.width / divisor
3554 height: dataCircle.height / divisor
3555 opacity: 0.0
3556- scale: 0.0
3557+ circleScale: 0.0
3558 visible: modelData !== undefined
3559 color: "transparent"
3560+ centerCircle: dataCircle
3561
3562 SequentialAnimation {
3563 id: presentCircleChangeAnim
3564@@ -221,7 +229,7 @@
3565 }
3566 PropertyAnimation {
3567 target: presentCircle
3568- property: "scale"
3569+ property: "circleScale"
3570 to: modelData
3571 easing.type: Easing.OutCurve
3572 duration: circleChangeAnimTimer.interval * d.circleModifier
3573@@ -229,7 +237,7 @@
3574 ColorAnimation {
3575 target: presentCircle
3576 property: "color"
3577- to: Gradient.threeColorByIndex(index, infographic.model.currentDay, infographic.model.firstColor)
3578+ to: Gradient.threeColorByIndex(index, infographic.model.currentDay, whiteTheme)
3579 easing.type: Easing.OutCurve
3580 duration: circleChangeAnimTimer.interval * d.circleModifier
3581 }
3582@@ -239,15 +247,6 @@
3583 }
3584 }
3585
3586- Image {
3587- id: backgroundCircle
3588- objectName: "backgroundCircle"
3589-
3590- anchors.fill: parent
3591-
3592- source: "graphics/infographic_circle_back.png"
3593- }
3594-
3595 Timer {
3596 id: dotShowAnimTimer
3597
3598@@ -318,7 +317,7 @@
3599
3600 index: model.index
3601 count: dots.count
3602- radius: backgroundCircle.width / 2
3603+ radius: dataCircle.width / 2
3604 halfSize: dot.width / 2
3605 posOffset: radius / dot.width / 3
3606 state: dot.state
3607@@ -327,7 +326,7 @@
3608 id: dot
3609 objectName: "dot" + index
3610
3611- property real baseOpacity: 0.4
3612+ property real baseOpacity: 1
3613
3614 width: units.dp(5) * parent.radius / 200
3615 height: units.dp(5) * parent.radius / 200
3616@@ -363,10 +362,10 @@
3617 property alias hideAnim: decreaseOpacity
3618 property alias showAnim: increaseOpacity
3619
3620- property real baseOpacity: 0.6
3621+ property real baseOpacity: 1
3622 property real duration: dotShowAnimTimer.interval * 5
3623
3624- height: 0.7 * backgroundCircle.width
3625+ height: 0.7 * dataCircle.width
3626 width: notification.height
3627 anchors.centerIn: parent
3628
3629
3630=== modified file 'qml/Greeter/IntegratedLightDMImpl.qml'
3631--- qml/Greeter/IntegratedLightDMImpl.qml 2015-11-07 00:12:17 +0000
3632+++ qml/Greeter/IntegratedLightDMImpl.qml 2016-09-22 07:47:54 +0000
3633@@ -22,7 +22,8 @@
3634
3635 property var greeter: LightDM.Greeter
3636 property var infographic: LightDM.Infographic
3637+ property var sessions: LightDM.Sessions
3638+ property var sessionRoles: LightDM.SessionRoles
3639 property var users: LightDM.Users
3640 property var userRoles: LightDM.UserRoles
3641-
3642 }
3643
3644=== modified file 'qml/Greeter/LightDMService.qml'
3645--- qml/Greeter/LightDMService.qml 2015-11-06 19:43:38 +0000
3646+++ qml/Greeter/LightDMService.qml 2016-09-22 07:47:54 +0000
3647@@ -27,6 +27,8 @@
3648
3649 property var greeter: d.valid ? loader.item.greeter : null
3650 property var infographic: d.valid ? loader.item.infographic : null
3651+ property var sessions: d.valid ? loader.item.sessions : null
3652+ property var sessionRoles: d.valid ? loader.item.sessionRoles : null
3653 property var users: d.valid ? loader.item.users : null
3654 property var userRoles: d.valid ? loader.item.userRoles : null
3655
3656
3657=== added file 'qml/Greeter/LoginAreaContainer.qml'
3658--- qml/Greeter/LoginAreaContainer.qml 1970-01-01 00:00:00 +0000
3659+++ qml/Greeter/LoginAreaContainer.qml 2016-09-22 07:47:54 +0000
3660@@ -0,0 +1,38 @@
3661+/*
3662+ * Copyright (C) 2015 Canonical, Ltd.
3663+ *
3664+ * This program is free software; you can redistribute it and/or modify
3665+ * it under the terms of the GNU General Public License as published by
3666+ * the Free Software Foundation; version 3.
3667+ *
3668+ * This program is distributed in the hope that it will be useful,
3669+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3670+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3671+ * GNU General Public License for more details.
3672+ *
3673+ * You should have received a copy of the GNU General Public License
3674+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3675+ */
3676+
3677+import QtQuick 2.4
3678+import Ubuntu.Components 1.3
3679+
3680+Item {
3681+ BorderImage {
3682+ anchors {
3683+ fill: parent
3684+ topMargin: -units.gu(1)
3685+ leftMargin: -units.gu(1.5)
3686+ rightMargin: -units.gu(1.5)
3687+ bottomMargin: -units.gu(1.5)
3688+ }
3689+ source: "../Stages/graphics/dropshadow2gu.sci"
3690+ opacity: 0.35
3691+ }
3692+
3693+ UbuntuShape {
3694+ anchors.fill: parent
3695+ aspect: UbuntuShape.Flat
3696+ backgroundColor: theme.palette.normal.raised
3697+ }
3698+}
3699
3700=== modified file 'qml/Greeter/LoginList.qml'
3701--- qml/Greeter/LoginList.qml 2016-06-27 18:32:47 +0000
3702+++ qml/Greeter/LoginList.qml 2016-09-22 07:47:54 +0000
3703@@ -18,6 +18,7 @@
3704 import QtGraphicalEffects 1.0
3705 import Ubuntu.Components 1.3
3706 import "../Components"
3707+import "." 0.1
3708
3709 StyledItem {
3710 id: root
3711@@ -28,16 +29,22 @@
3712 property int currentIndex
3713 property bool locked
3714 property bool waiting
3715+ property alias boxVerticalOffset: highlightItem.y
3716
3717+ readonly property alias passwordInput: passwordInput
3718 readonly property int numAboveBelow: 4
3719 readonly property int cellHeight: units.gu(5)
3720 readonly property int highlightedHeight: units.gu(15)
3721- readonly property int moveDuration: 200
3722+ readonly property int moveDuration: UbuntuAnimation.FastDuration
3723+ property string selectedSession
3724+ property string currentSession
3725 readonly property string currentUser: userList.currentItem.username
3726 property bool wasPrompted: false
3727
3728+ signal loginListSessionChanged(string session)
3729+ signal responded(string response)
3730 signal selected(int index)
3731- signal responded(string response)
3732+ signal sessionChooserButtonClicked()
3733
3734 function tryToUnlock() {
3735 if (wasPrompted) {
3736@@ -78,6 +85,10 @@
3737 root.resetAuthentication();
3738 }
3739
3740+ function showFakePassword() {
3741+ passwordInput.showFakePassword();
3742+ }
3743+
3744 QtObject {
3745 id: d
3746
3747@@ -114,30 +125,17 @@
3748 userList.currentIndex = currentIndex;
3749 }
3750
3751- BorderImage {
3752- anchors {
3753- fill: highlightItem
3754- topMargin: -units.gu(1)
3755- leftMargin: -units.gu(1.5)
3756- rightMargin: -units.gu(1.5)
3757- bottomMargin: -units.gu(1.5)
3758- }
3759- source: "../Stages/graphics/dropshadow2gu.sci"
3760- opacity: 0.35
3761- }
3762-
3763- UbuntuShape {
3764+ LoginAreaContainer {
3765 id: highlightItem
3766+ objectName: "highlightItem"
3767 anchors {
3768 left: parent.left
3769 leftMargin: units.gu(2)
3770 right: parent.right
3771 rightMargin: units.gu(2)
3772- verticalCenter: parent.verticalCenter
3773 }
3774+
3775 height: root.highlightedHeight
3776- aspect: UbuntuShape.Flat
3777- backgroundColor: theme.palette.normal.raised
3778 }
3779
3780 ListView {
3781@@ -148,11 +146,10 @@
3782 anchors.leftMargin: units.gu(2)
3783 anchors.rightMargin: units.gu(2)
3784
3785- preferredHighlightBegin: userList.height / 2 - root.highlightedHeight / 2
3786- preferredHighlightEnd: userList.height / 2 - root.highlightedHeight / 2
3787+ preferredHighlightBegin: highlightItem.y
3788+ preferredHighlightEnd: highlightItem.y
3789 highlightRangeMode: ListView.StrictlyEnforceRange
3790 highlightMoveDuration: root.moveDuration
3791- flickDeceleration: 10000
3792 interactive: count > 1
3793
3794 readonly property bool movingInternally: moveTimer.running || userList.moving
3795@@ -173,6 +170,7 @@
3796
3797 readonly property bool belowHighlight: (userList.currentIndex < 0 && index > 0) || (userList.currentIndex >= 0 && index > userList.currentIndex)
3798 readonly property int belowOffset: root.highlightedHeight - root.cellHeight
3799+ readonly property string userSession: session
3800 readonly property string username: name
3801
3802 opacity: {
3803@@ -206,9 +204,22 @@
3804 bottomMargin: -(units.gu(4) + (parent.belowHighlight ? parent.belowOffset : 0))
3805 }
3806 text: realName
3807- color: userList.currentIndex !== index ? theme.palette.normal.raised : theme.palette.normal.raisedText
3808+ color: userList.currentIndex !== index ? theme.palette.normal.raised
3809+ : theme.palette.normal.raisedText
3810
3811 Behavior on anchors.topMargin { NumberAnimation { duration: root.moveDuration; easing.type: Easing.InOutQuad; } }
3812+
3813+ Rectangle {
3814+ id: activeIndicator
3815+ anchors.horizontalCenter: parent.left
3816+ anchors.horizontalCenterOffset: -units.gu(1)
3817+ anchors.verticalCenter: parent.verticalCenter
3818+ color: userList.currentIndex !== index ? theme.palette.normal.raised
3819+ : theme.palette.normal.focus
3820+ visible: userList.count > 1 && loggedIn
3821+ height: units.gu(0.5)
3822+ width: height
3823+ }
3824 }
3825
3826 MouseArea {
3827@@ -237,6 +248,67 @@
3828 }
3829 }
3830
3831+ // Use an AbstractButton due to icon limitations with Button
3832+ AbstractButton {
3833+ id: sessionChooser
3834+ objectName: "sessionChooserButton"
3835+
3836+ readonly property alias icon: badge.source
3837+
3838+ visible: LightDMService.sessions.count > 1 &&
3839+ !LightDMService.users.data(userList.currentIndex, LightDMService.userRoles.LoggedInRole)
3840+
3841+ height: units.gu(3.5)
3842+ width: units.gu(3.5)
3843+
3844+ activeFocusOnTab: true
3845+ anchors {
3846+ right: highlightItem.right
3847+ rightMargin: units.gu(2)
3848+
3849+ top: highlightItem.top
3850+ topMargin: units.gu(1.5)
3851+ }
3852+
3853+ Rectangle {
3854+ id: badgeHighlight
3855+
3856+ anchors.fill: parent
3857+ visible: parent.activeFocus
3858+ color: "transparent"
3859+ border.color: theme.palette.normal.focus
3860+ border.width: units.dp(1)
3861+ radius: 3
3862+ }
3863+
3864+ Icon {
3865+ id: badge
3866+ anchors.fill: parent
3867+ anchors.margins: units.dp(3)
3868+ keyColor: "#ffffff" // icon providers give us white icons
3869+ color: theme.palette.normal.raisedSecondaryText
3870+ source: LightDMService.sessions.iconUrl(root.currentSession)
3871+ }
3872+
3873+ Keys.onReturnPressed: {
3874+ sessionChooserButtonClicked();
3875+ event.accepted = true;
3876+ }
3877+
3878+ onClicked: {
3879+ sessionChooserButtonClicked();
3880+ }
3881+
3882+ // Refresh the icon path if looking at different places at runtime
3883+ // this is mainly for testing
3884+ Connections {
3885+ target: LightDMService.sessions
3886+ onIconSearchDirectoriesChanged: {
3887+ badge.source = LightDMService.sessions.iconUrl(root.currentSession)
3888+ }
3889+ }
3890+ }
3891+
3892 FadingLabel {
3893 id: infoLabel
3894 objectName: "infoLabel"
3895@@ -271,6 +343,7 @@
3896 width: highlightItem.width - anchors.margins * 2
3897 opacity: userList.movingInternally ? 0 : 1
3898
3899+ activeFocusOnTab: true
3900 isAlphanumeric: root.alphanumeric
3901
3902 onClicked: root.tryToUnlock()
3903@@ -283,6 +356,7 @@
3904
3905 WrongPasswordAnimation {
3906 id: wrongPasswordAnimation
3907+ objectName: "wrongPasswordAnimation"
3908 target: passwordInput
3909 }
3910 }
3911
3912=== modified file 'qml/Greeter/NarrowView.qml'
3913--- qml/Greeter/NarrowView.qml 2016-06-27 18:59:20 +0000
3914+++ qml/Greeter/NarrowView.qml 2016-09-22 07:47:54 +0000
3915@@ -15,7 +15,9 @@
3916 */
3917
3918 import QtQuick 2.4
3919+import QtQuick.Window 2.2
3920 import Ubuntu.Components 1.3
3921+import Ubuntu.Telephony 0.1 as Telephony
3922 import "../Components"
3923
3924 FocusScope {
3925@@ -23,34 +25,40 @@
3926
3927 property alias dragHandleLeftMargin: coverPage.dragHandleLeftMargin
3928 property alias launcherOffset: coverPage.launcherOffset
3929- property int currentIndex // unused
3930- property alias delayMinutes: lockscreen.delayMinutes
3931+ property alias currentIndex: loginList.currentIndex
3932+ property alias delayMinutes: delayedLockscreen.delayMinutes
3933 property alias backgroundTopMargin: coverPage.backgroundTopMargin
3934 property url background
3935+ property bool hasCustomBackground
3936 property bool locked
3937- property bool alphanumeric
3938- property var userModel // unused
3939+ property alias alphanumeric: loginList.alphanumeric
3940+ property alias userModel: loginList.model
3941 property alias infographicModel: coverPage.infographicModel
3942+ property string sessionToStart
3943 property bool waiting
3944 readonly property bool fullyShown: coverPage.showProgress === 1 || lockscreen.shown
3945 readonly property bool required: coverPage.required || lockscreen.required
3946 readonly property bool animating: coverPage.showAnimation.running || coverPage.hideAnimation.running
3947
3948- signal selected(int index) // unused
3949+ // so that it can be replaced in tests with a mock object
3950+ property var inputMethod: Qt.inputMethod
3951+
3952+ signal selected(int index)
3953 signal responded(string response)
3954 signal tease()
3955 signal emergencyCall()
3956
3957 function showMessage(html) {
3958- // TODO
3959+ loginList.showMessage(html);
3960 }
3961
3962 function showPrompt(text, isSecret, isDefaultPrompt) {
3963- lockscreen.promptText = isDefaultPrompt ? "" : text.toLowerCase();
3964- lockscreen.maybeShow();
3965+ loginList.showPrompt(text, isSecret, isDefaultPrompt);
3966 }
3967
3968 function showLastChance() {
3969+ /* TODO: when we finish support for resetting device after too many
3970+ failed logins, we should re-add this popup.
3971 var title = lockscreen.alphaNumeric ?
3972 i18n.tr("Sorry, incorrect passphrase.") :
3973 i18n.tr("Sorry, incorrect passcode.");
3974@@ -59,6 +67,7 @@
3975 i18n.tr("If passphrase is entered incorrectly, your phone will conduct a factory reset and all personal data will be deleted.") :
3976 i18n.tr("If passcode is entered incorrectly, your phone will conduct a factory reset and all personal data will be deleted."));
3977 lockscreen.showInfoPopup(title, text);
3978+ */
3979 }
3980
3981 function hide() {
3982@@ -67,27 +76,24 @@
3983 }
3984
3985 function notifyAuthenticationSucceeded(showFakePassword) {
3986- // When using an alternate log in mechanism like fingerprints, the
3987- // design is it looks like the user entered a passcode.
3988- if (!alphanumeric && showFakePassword) {
3989- lockscreen.showText("...."); // actual text doesn't matter, we show bullets
3990+ if (showFakePassword) {
3991+ loginList.showFakePassword();
3992 }
3993 }
3994
3995 function notifyAuthenticationFailed() {
3996- lockscreen.customError = "";
3997- lockscreen.clear(true);
3998+ loginList.showError();
3999 }
4000
4001 function showErrorMessage(msg) {
4002 coverPage.showErrorMessage(msg);
4003- lockscreen.customError = msg ? msg : " "; // avoid default message
4004- lockscreen.clear(true);
4005 }
4006
4007- function reset() {
4008- lockscreen.customError = "";
4009- coverPage.show();
4010+ function reset(forceShow) {
4011+ loginList.reset();
4012+ if (forceShow) {
4013+ coverPage.show();
4014+ }
4015 }
4016
4017 function tryToUnlock(toTheRight) {
4018@@ -109,48 +115,59 @@
4019 }
4020 }
4021
4022- Lockscreen {
4023+ Showable {
4024 id: lockscreen
4025 objectName: "lockscreen"
4026-
4027+ anchors.fill: parent
4028 shown: false
4029+
4030 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
4031 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
4032- anchors.fill: parent
4033- visible: required
4034- enabled: !coverPage.shown
4035- background: root.background
4036- darkenBackground: 0.4
4037- alphaNumeric: root.alphanumeric
4038- minPinLength: 4
4039- maxPinLength: 4
4040-
4041- property string promptText
4042- infoText: promptText !== "" ? i18n.tr("Enter %1").arg(promptText) :
4043- alphaNumeric ? i18n.tr("Enter passphrase") :
4044- i18n.tr("Enter passcode")
4045-
4046- property string customError
4047- errorText: customError !== "" ? customError :
4048- promptText !== "" ? i18n.tr("Sorry, incorrect %1").arg(promptText) :
4049- alphaNumeric ? i18n.tr("Sorry, incorrect passphrase") + "\n" +
4050- i18n.ctr("passphrase", "Please re-enter") :
4051- i18n.tr("Sorry, incorrect passcode")
4052-
4053- onEntered: root.responded(passphrase)
4054- onCancel: coverPage.show()
4055- onEmergencyCall: root.emergencyCall()
4056-
4057- onEnabledChanged: {
4058- if (enabled) {
4059- lockscreen.forceActiveFocus();
4060- }
4061- }
4062-
4063- onVisibleChanged: {
4064- if (visible) {
4065- lockscreen.forceActiveFocus();
4066- }
4067+
4068+ Wallpaper {
4069+ id: lockscreenBackground
4070+ objectName: "lockscreenBackground"
4071+ anchors {
4072+ fill: parent
4073+ topMargin: root.backgroundTopMargin
4074+ }
4075+ source: root.background
4076+ }
4077+
4078+ // Darken background to match CoverPage
4079+ Rectangle {
4080+ objectName: "lockscreenShade"
4081+ anchors.fill: parent
4082+ color: "black"
4083+ opacity: root.hasCustomBackground ? 0.4 : 0
4084+ }
4085+
4086+ LoginList {
4087+ id: loginList
4088+ objectName: "loginList"
4089+
4090+ anchors {
4091+ horizontalCenter: parent.horizontalCenter
4092+ top: parent.top
4093+ bottom: parent.bottom
4094+ }
4095+ width: units.gu(40)
4096+ boxVerticalOffset: units.gu(14)
4097+ enabled: !coverPage.shown && visible
4098+ visible: !delayedLockscreen.visible
4099+
4100+ locked: root.locked
4101+
4102+ onSelected: if (enabled) root.selected(index)
4103+ onResponded: root.responded(response)
4104+ }
4105+
4106+ DelayedLockscreen {
4107+ id: delayedLockscreen
4108+ objectName: "delayedLockscreen"
4109+ anchors.fill: parent
4110+ visible: delayMinutes > 0
4111+ alphaNumeric: loginList.alphanumeric
4112 }
4113
4114 function maybeShow() {
4115@@ -172,21 +189,16 @@
4116 height: parent.height
4117 width: parent.width
4118 background: root.background
4119+ hasCustomBackground: root.hasCustomBackground
4120 draggable: !root.waiting
4121 onTease: root.tease()
4122 onClicked: hide()
4123
4124 onShowProgressChanged: {
4125 if (showProgress === 1) {
4126- lockscreen.reset();
4127- }
4128-
4129- if (showProgress === 0) {
4130- if (root.locked) {
4131- lockscreen.clear(false); // to reset focus if necessary
4132- } else {
4133- root.responded("");
4134- }
4135+ loginList.reset();
4136+ } else if (showProgress === 0) {
4137+ loginList.tryToUnlock();
4138 }
4139 }
4140
4141@@ -198,4 +210,78 @@
4142 }
4143 }
4144 }
4145+
4146+ StyledItem {
4147+ id: bottomBar
4148+ visible: lockscreen.shown
4149+ height: units.gu(4)
4150+
4151+ anchors.left: parent.left
4152+ anchors.right: parent.right
4153+ anchors.top: parent.bottom
4154+ anchors.topMargin: - height * (1 - coverPage.showProgress)
4155+ - (inputMethod && inputMethod.visible ?
4156+ inputMethod.keyboardRectangle.height : 0)
4157+
4158+ Rectangle {
4159+ color: UbuntuColors.porcelain // matches OSK background
4160+ anchors.fill: parent
4161+ }
4162+
4163+ Label {
4164+ text: i18n.tr("Cancel")
4165+ anchors.left: parent.left
4166+ anchors.leftMargin: units.gu(2)
4167+ anchors.top: parent.top
4168+ anchors.bottom: parent.bottom
4169+ verticalAlignment: Text.AlignVCenter
4170+ font.weight: Font.Light
4171+ fontSize: "small"
4172+ color: UbuntuColors.slate
4173+
4174+ AbstractButton {
4175+ anchors.fill: parent
4176+ anchors.leftMargin: -units.gu(2)
4177+ anchors.rightMargin: -units.gu(2)
4178+ onClicked: coverPage.show()
4179+ }
4180+ }
4181+
4182+ Label {
4183+ objectName: "emergencyCallLabel"
4184+ text: callManager.hasCalls ? i18n.tr("Return to Call") : i18n.tr("Emergency")
4185+ anchors.right: parent.right
4186+ anchors.rightMargin: units.gu(2)
4187+ anchors.top: parent.top
4188+ anchors.bottom: parent.bottom
4189+ verticalAlignment: Text.AlignVCenter
4190+ font.weight: Font.Light
4191+ fontSize: "small"
4192+ color: UbuntuColors.slate
4193+ // TODO: uncomment once bug 1616538 is fixed
4194+ // visible: telepathyHelper.ready && telepathyHelper.emergencyCallsAvailable
4195+ enabled: visible
4196+
4197+ AbstractButton {
4198+ anchors.fill: parent
4199+ anchors.leftMargin: -units.gu(2)
4200+ anchors.rightMargin: -units.gu(2)
4201+ onClicked: root.emergencyCall()
4202+ }
4203+ }
4204+ }
4205+
4206+ // FIXME: It's difficult to keep something tied closely to the OSK (bug
4207+ // 1616163). But as a hack to avoid the background peeking out,
4208+ // we add an extra Rectangle that just serves to hide the background
4209+ // during OSK animations.
4210+ Rectangle {
4211+ visible: bottomBar.visible
4212+ height: inputMethod && inputMethod.visible ?
4213+ inputMethod.keyboardRectangle.height : 0
4214+ anchors.bottom: parent.bottom
4215+ anchors.left: parent.left
4216+ anchors.right: parent.right
4217+ color: UbuntuColors.porcelain
4218+ }
4219 }
4220
4221=== added file 'qml/Greeter/SessionIcon.qml'
4222--- qml/Greeter/SessionIcon.qml 1970-01-01 00:00:00 +0000
4223+++ qml/Greeter/SessionIcon.qml 2016-09-22 07:47:54 +0000
4224@@ -0,0 +1,47 @@
4225+/*
4226+ * Copyright (C) 2016 Canonical, Ltd.
4227+ *
4228+ * This program is free software; you can redistribute it and/or modify
4229+ * it under the terms of the GNU General Public License as published by
4230+ * the Free Software Foundation; version 3.
4231+ *
4232+ * This program is distributed in the hope that it will be useful,
4233+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4234+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4235+ * GNU General Public License for more details.
4236+ *
4237+ * You should have received a copy of the GNU General Public License
4238+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4239+ */
4240+
4241+import QtQuick 2.4
4242+
4243+Image {
4244+ id: root
4245+
4246+ property color color
4247+ readonly property string fragColorShader:
4248+ "
4249+ varying highp vec2 qt_TexCoord0;
4250+ uniform sampler2D source;
4251+ uniform lowp vec4 color;
4252+ uniform lowp float qt_Opacity;
4253+
4254+ void main()
4255+ {
4256+ lowp vec4 sourceColor = texture2D(source, qt_TexCoord0);
4257+ gl_FragColor = color * sourceColor.a * qt_Opacity;
4258+ }
4259+ "
4260+
4261+ fillMode: Image.PreserveAspectFit
4262+ height: sourceSize.height
4263+
4264+ ShaderEffect {
4265+ readonly property color color: root.color
4266+ readonly property Image source: parent
4267+
4268+ height: source.height; width: source.width
4269+ fragmentShader: fragColorShader
4270+ }
4271+}
4272
4273=== added file 'qml/Greeter/SessionsList.qml'
4274--- qml/Greeter/SessionsList.qml 1970-01-01 00:00:00 +0000
4275+++ qml/Greeter/SessionsList.qml 2016-09-22 07:47:54 +0000
4276@@ -0,0 +1,187 @@
4277+/*
4278+ * Copyright (C) 2015 Canonical, Ltd.
4279+ *
4280+ * This program is free software; you can redistribute it and/or modify
4281+ * it under the terms of the GNU General Public License as published by
4282+ * the Free Software Foundation; version 3.
4283+ *
4284+ * This program is distributed in the hope that it will be useful,
4285+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4286+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4287+ * GNU General Public License for more details.
4288+ *
4289+ * You should have received a copy of the GNU General Public License
4290+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4291+ */
4292+
4293+import QtQuick 2.4
4294+import Ubuntu.Components 1.3
4295+import Ubuntu.Components.ListItems 1.3
4296+import "." 0.1
4297+import "../Components"
4298+
4299+Item {
4300+ id: root
4301+ objectName: "sessionsList"
4302+
4303+ property string initiallySelectedSession
4304+ signal sessionSelected(string sessionKey)
4305+ signal showLoginList()
4306+
4307+ onInitiallySelectedSessionChanged: {
4308+ sessionsList.currentIndex = getSelectedIndex();
4309+ sessionsList.positionViewAtIndex(sessionsList.currentIndex, ListView.Contain);
4310+ }
4311+
4312+ function getSelectedIndex() {
4313+ for (var i = 0; i < sessionsList.model.count; i++) {
4314+ var key = sessionsList.model.get(i).key
4315+ if (key === initiallySelectedSession) {
4316+ return i;
4317+ }
4318+ }
4319+ }
4320+
4321+ function currentKey() {
4322+ var session = LightDMService.sessions.data(
4323+ sessionsList.currentIndex, LightDMService.sessionRoles.KeyRole)
4324+ return session;
4325+ }
4326+
4327+ Keys.onEnterPressed: {
4328+ showLoginList(); // Session is already selected
4329+ event.accepted = true;
4330+ }
4331+
4332+ Keys.onEscapePressed: {
4333+ showLoginList();
4334+ event.accepted = true;
4335+ }
4336+
4337+ Keys.onReturnPressed: {
4338+ showLoginList();
4339+ event.accepted = true;
4340+ }
4341+
4342+ Keys.onDownPressed: {
4343+ if (sessionsList.currentIndex < sessionsList.model.count - 1)
4344+ sessionsList.currentIndex++;
4345+ sessionSelected(currentKey());
4346+ event.accepted = true;
4347+ }
4348+
4349+ Keys.onUpPressed: {
4350+ if (sessionsList.currentIndex > 0)
4351+ sessionsList.currentIndex--;
4352+ sessionSelected(currentKey());
4353+ event.accepted = true;
4354+ }
4355+
4356+ LoginAreaContainer {
4357+ readonly property real margins: sessionsList.anchors.margins
4358+ readonly property real prefferedHeight: {
4359+ if (sessionsList.currentItem) {
4360+ return (sessionsList.currentItem.height *
4361+ (1 + sessionsList.model.count)) + 2 * margins
4362+ } else {
4363+ return sessionsList.headerItem.height + 2 * margins
4364+ }
4365+ }
4366+
4367+ height: prefferedHeight < parent.height ? prefferedHeight : parent.height - units.gu(4)
4368+ width: parent.width
4369+
4370+ anchors {
4371+ left: parent.left
4372+ right: parent.right
4373+ verticalCenter: parent.verticalCenter
4374+ }
4375+
4376+ UbuntuListView {
4377+ id: sessionsList
4378+
4379+ anchors {
4380+ top: parent.top
4381+ left: parent.left
4382+ right: parent.right
4383+ margins: units.gu(2)
4384+ }
4385+
4386+ height: parent.height - headerItem.height
4387+
4388+ boundsBehavior: Flickable.StopAtBounds
4389+
4390+ model: LightDMService.sessions
4391+ header: ListItemLayout {
4392+ id: header
4393+
4394+ padding.leading: 0 // handled by parent's margins
4395+
4396+ title.color: theme.palette.normal.raisedText
4397+ title.font.pixelSize: units.gu(2.1)
4398+ title.text: i18n.tr("Select desktop environment")
4399+
4400+ Icon {
4401+ id: icon
4402+ width: units.gu(3)
4403+ SlotsLayout.position: SlotsLayout.Leading
4404+ name: "go-previous"
4405+
4406+ MouseArea {
4407+ anchors.fill: parent
4408+ onClicked: showLoginList()
4409+ }
4410+ }
4411+ }
4412+
4413+ headerPositioning: ListView.OverlayHeader
4414+ highlightFollowsCurrentItem: false
4415+
4416+ delegate: ListItem {
4417+ id: delegate
4418+ objectName: "sessionDelegate" + index
4419+
4420+ divider.visible: false
4421+
4422+ visible: y > sessionsList.headerItem.y
4423+ + sessionsList.headerItem.height
4424+ - sessionsList.anchors.margins
4425+
4426+ MouseArea {
4427+ anchors.fill: parent
4428+ onClicked: {
4429+ sessionsList.currentIndex = index
4430+ sessionSelected(key)
4431+ showLoginList()
4432+ }
4433+ }
4434+
4435+ Rectangle {
4436+ height: parent.height
4437+ width: parent.width
4438+ color: "transparent"
4439+ border {
4440+ color: theme.palette.normal.focus
4441+ width: units.gu(0.2)
4442+ }
4443+
4444+ visible: index === sessionsList.currentIndex
4445+ }
4446+
4447+ ListItemLayout {
4448+ id: layout
4449+
4450+ SessionIcon {
4451+ id: sessionIcon
4452+ source: icon_url
4453+ SlotsLayout.position: SlotsLayout.Leading
4454+ color: theme.palette.normal.raisedSecondaryText
4455+ }
4456+
4457+ title.text: display
4458+ title.color: theme.palette.normal.raisedText
4459+ }
4460+ }
4461+ }
4462+ }
4463+}
4464
4465=== modified file 'qml/Greeter/WideView.qml'
4466--- qml/Greeter/WideView.qml 2016-07-07 19:52:57 +0000
4467+++ qml/Greeter/WideView.qml 2016-09-22 07:47:54 +0000
4468@@ -16,25 +16,29 @@
4469
4470 import QtQuick 2.4
4471 import Ubuntu.Components 1.3
4472+import "." 0.1
4473
4474 FocusScope {
4475 id: root
4476 focus: true
4477
4478+ property alias background: coverPage.background
4479+ property alias backgroundTopMargin: coverPage.backgroundTopMargin
4480+ property alias hasCustomBackground: coverPage.hasCustomBackground
4481 property alias dragHandleLeftMargin: coverPage.dragHandleLeftMargin
4482+ property alias infographicModel: coverPage.infographicModel
4483 property alias launcherOffset: coverPage.launcherOffset
4484 property alias currentIndex: loginList.currentIndex
4485 property int delayMinutes // TODO
4486- property alias backgroundTopMargin: coverPage.backgroundTopMargin
4487- property alias background: coverPage.background
4488- property bool locked
4489 property alias alphanumeric: loginList.alphanumeric
4490- property alias userModel: loginList.model
4491- property alias infographicModel: coverPage.infographicModel
4492- property bool waiting
4493+ property alias locked: loginList.locked
4494+ property alias sessionToStart: loginList.currentSession
4495+ property alias waiting: loginList.waiting
4496+ property var userModel // Set from outside
4497+
4498+ readonly property bool animating: coverPage.showAnimation.running || coverPage.hideAnimation.running
4499 readonly property bool fullyShown: coverPage.showProgress === 1
4500 readonly property bool required: coverPage.required
4501- readonly property bool animating: coverPage.showAnimation.running || coverPage.hideAnimation.running
4502
4503 // so that it can be replaced in tests with a mock object
4504 property var inputMethod: Qt.inputMethod
4505@@ -44,6 +48,14 @@
4506 signal tease()
4507 signal emergencyCall() // unused
4508
4509+ function notifyAuthenticationFailed() {
4510+ loginList.showError();
4511+ }
4512+
4513+ function reset(forceShow) {
4514+ loginList.reset();
4515+ }
4516+
4517 function showMessage(html) {
4518 loginList.showMessage(html);
4519 }
4520@@ -52,30 +64,6 @@
4521 loginList.showPrompt(text, isSecret, isDefaultPrompt);
4522 }
4523
4524- function showLastChance() {
4525- // TODO
4526- }
4527-
4528- function hide() {
4529- coverPage.hide();
4530- }
4531-
4532- function notifyAuthenticationSucceeded(showFakePassword) {
4533- // Nothing needed
4534- }
4535-
4536- function notifyAuthenticationFailed() {
4537- loginList.showError();
4538- }
4539-
4540- function showErrorMessage(msg) {
4541- coverPage.showErrorMessage(msg);
4542- }
4543-
4544- function reset() {
4545- loginList.reset();
4546- }
4547-
4548 function tryToUnlock(toTheRight) {
4549 if (root.locked) {
4550 coverPage.show();
4551@@ -92,6 +80,20 @@
4552 }
4553 }
4554
4555+ function hide() {
4556+ coverPage.hide();
4557+ }
4558+
4559+ function notifyAuthenticationSucceeded(showFakePassword) {
4560+ if (showFakePassword) {
4561+ loginList.showFakePassword();
4562+ }
4563+ }
4564+
4565+ function showLastChance() {
4566+ // TODO
4567+ }
4568+
4569 Rectangle {
4570 anchors.fill: parent
4571 color: "black"
4572@@ -104,6 +106,7 @@
4573 height: parent.height
4574 width: parent.width
4575 draggable: !root.locked && !root.waiting
4576+ state: "LoginList"
4577
4578 infographics {
4579 height: 0.75 * parent.height
4580@@ -122,21 +125,89 @@
4581 id: loginList
4582 objectName: "loginList"
4583
4584- anchors {
4585- left: parent.left
4586- leftMargin: Math.min(parent.width * 0.16, units.gu(20))
4587- top: parent.top
4588- }
4589 width: units.gu(40)
4590- height: inputMethod && inputMethod.visible ? parent.height - inputMethod.keyboardRectangle.height
4591- : parent.height
4592- Behavior on height { UbuntuNumberAnimation {} }
4593-
4594- locked: root.locked
4595- waiting: root.waiting
4596-
4597+ anchors {
4598+ left: parent.left
4599+ leftMargin: Math.min(parent.width * 0.16, units.gu(20))
4600+ top: parent.top
4601+ bottom: parent.bottom
4602+ }
4603+
4604+ boxVerticalOffset: (height - highlightedHeight -
4605+ (inputMethod && inputMethod.visible ?
4606+ inputMethod.keyboardRectangle.height : 0)) / 2
4607+ Behavior on boxVerticalOffset { UbuntuNumberAnimation {} }
4608+
4609+ model: root.userModel
4610+ currentSession: LightDMService.greeter.defaultSession
4611+ onResponded: root.responded(response)
4612 onSelected: root.selected(index)
4613- onResponded: root.responded(response)
4614- }
4615+ onSessionChooserButtonClicked: parent.state = "SessionsList"
4616+
4617+ Keys.forwardTo: [sessionChooserLoader.item]
4618+ }
4619+
4620+ Loader {
4621+ id: sessionChooserLoader
4622+
4623+ height: loginList.height
4624+ width: loginList.width
4625+ anchors {
4626+ left: parent.left
4627+ leftMargin: Math.min(parent.width * 0.16, units.gu(20))
4628+ top: parent.top
4629+ }
4630+
4631+ active: false
4632+
4633+ onLoaded: sessionChooserLoader.item.forceActiveFocus();
4634+ Binding {
4635+ target: sessionChooserLoader.item
4636+ property: "initiallySelectedSession"
4637+ value: loginList.currentSession
4638+ }
4639+
4640+ Connections {
4641+ target: sessionChooserLoader.item
4642+ onSessionSelected: loginList.currentSession = sessionKey
4643+ onShowLoginList: {
4644+ coverPage.state = "LoginList"
4645+ loginList.passwordInput.forceActiveFocus();
4646+ }
4647+ ignoreUnknownSignals: true
4648+ }
4649+ }
4650+
4651+ states: [
4652+ State {
4653+ name: "SessionsList"
4654+ PropertyChanges { target: loginList; opacity: 0 }
4655+ PropertyChanges { target: sessionChooserLoader;
4656+ active: true;
4657+ opacity: 1
4658+ source: "SessionsList.qml"
4659+ }
4660+ },
4661+
4662+ State {
4663+ name: "LoginList"
4664+ PropertyChanges { target: loginList; opacity: 1 }
4665+ PropertyChanges { target: sessionChooserLoader;
4666+ active: false;
4667+ opacity: 0
4668+ source: "";
4669+ }
4670+ }
4671+ ]
4672+
4673+ transitions: [
4674+ Transition {
4675+ from: "*"
4676+ to: "*"
4677+ UbuntuNumberAnimation {
4678+ property: "opacity";
4679+ }
4680+ }
4681+ ]
4682 }
4683 }
4684
4685=== removed file 'qml/Greeter/graphics/infographic_circle_back.png'
4686Binary files qml/Greeter/graphics/infographic_circle_back.png 2016-06-03 23:00:28 +0000 and qml/Greeter/graphics/infographic_circle_back.png 1970-01-01 00:00:00 +0000 differ
4687=== added directory 'qml/Greeter/graphics/session_icons'
4688=== added file 'qml/Greeter/graphics/session_icons/gnome_badge.png'
4689Binary files qml/Greeter/graphics/session_icons/gnome_badge.png 1970-01-01 00:00:00 +0000 and qml/Greeter/graphics/session_icons/gnome_badge.png 2016-09-22 07:47:54 +0000 differ
4690=== added file 'qml/Greeter/graphics/session_icons/kde_badge.png'
4691Binary files qml/Greeter/graphics/session_icons/kde_badge.png 1970-01-01 00:00:00 +0000 and qml/Greeter/graphics/session_icons/kde_badge.png 2016-09-22 07:47:54 +0000 differ
4692=== added file 'qml/Greeter/graphics/session_icons/recovery_console_badge.png'
4693Binary files qml/Greeter/graphics/session_icons/recovery_console_badge.png 1970-01-01 00:00:00 +0000 and qml/Greeter/graphics/session_icons/recovery_console_badge.png 2016-09-22 07:47:54 +0000 differ
4694=== added file 'qml/Greeter/graphics/session_icons/ubuntu_badge.png'
4695Binary files qml/Greeter/graphics/session_icons/ubuntu_badge.png 1970-01-01 00:00:00 +0000 and qml/Greeter/graphics/session_icons/ubuntu_badge.png 2016-09-22 07:47:54 +0000 differ
4696=== added file 'qml/Greeter/graphics/session_icons/unknown_badge.png'
4697Binary files qml/Greeter/graphics/session_icons/unknown_badge.png 1970-01-01 00:00:00 +0000 and qml/Greeter/graphics/session_icons/unknown_badge.png 2016-09-22 07:47:54 +0000 differ
4698=== modified file 'qml/Launcher/LauncherPanel.qml'
4699--- qml/Launcher/LauncherPanel.qml 2016-07-27 14:51:26 +0000
4700+++ qml/Launcher/LauncherPanel.qml 2016-09-22 07:47:54 +0000
4701@@ -19,7 +19,7 @@
4702 import Unity.Launcher 0.1
4703 import Ubuntu.Components.Popups 1.3
4704 import "../Components/ListItems"
4705-import "../Components/"
4706+import "../Components"
4707
4708 Rectangle {
4709 id: root
4710
4711=== modified file 'qml/Panel/IndicatorPage.qml'
4712--- qml/Panel/IndicatorPage.qml 2015-09-29 12:28:10 +0000
4713+++ qml/Panel/IndicatorPage.qml 2016-09-22 07:47:54 +0000
4714@@ -17,6 +17,7 @@
4715 import QtQuick 2.4
4716 import Ubuntu.Components 1.3 as Components
4717 import Unity.Indicators 0.1 as Indicators
4718+import "../Components"
4719 import "Indicators"
4720
4721 IndicatorBase {
4722
4723=== modified file 'qml/Panel/Indicators/client/IndicatorRepresentation.qml'
4724--- qml/Panel/Indicators/client/IndicatorRepresentation.qml 2015-09-29 12:28:10 +0000
4725+++ qml/Panel/Indicators/client/IndicatorRepresentation.qml 2016-09-22 07:47:54 +0000
4726@@ -20,25 +20,42 @@
4727
4728 import QtQuick 2.4
4729 import Ubuntu.Components 1.3
4730-import Ubuntu.Components.ListItems 1.3 as ListItem
4731 import "../.."
4732
4733 Page {
4734 id: root
4735-
4736- title: indicatorProperties && indicatorProperties.title ? indicatorProperties.title :
4737- indicatorProperties && indicatorProperties.accessibleName ? indicatorProperties.accessibleName
4738- : ""
4739 property variant indicatorProperties
4740
4741+ header: PageHeader {
4742+ title: indicatorProperties && indicatorProperties.title ? indicatorProperties.title :
4743+ indicatorProperties && indicatorProperties.accessibleName ? indicatorProperties.accessibleName
4744+ : identifier
4745+ }
4746+
4747 anchors.fill: parent
4748
4749- ListItem.Standard {
4750+ ListItem {
4751+ color: theme.palette.highlighted.background
4752 id: visualCheckItem
4753- text: "Enable Visual Representation"
4754- control: Switch {
4755- id: visualCheck
4756- checked: true
4757+
4758+ anchors {
4759+ top: header.bottom
4760+ left: parent.left
4761+ right: parent.right
4762+ }
4763+
4764+ height: selectorLayout.height
4765+ onClicked: visualCheck.checked = !visualCheck.checked
4766+
4767+ ListItemLayout {
4768+ id: selectorLayout
4769+ title.text: "Enable Visual Representation"
4770+
4771+ Switch {
4772+ id: visualCheck
4773+ checked: true
4774+ SlotsLayout.position: SlotsLayout.Trailing
4775+ }
4776 }
4777 }
4778
4779@@ -48,11 +65,6 @@
4780 clip:true
4781 asynchronous: true
4782
4783- Rectangle {
4784- anchors.fill: pageLoader
4785- color: "#221e1c" // FIXME not in palette yet
4786- }
4787-
4788 anchors {
4789 top: visualCheckItem.bottom
4790 left: parent.left
4791@@ -92,13 +104,5 @@
4792 margins: units.gu(1)
4793 }
4794 height: childrenRect.height
4795-
4796- Button {
4797- anchors {
4798- left: parent.left
4799- }
4800- text: "Back"
4801- onClicked: root.pageStack.reset()
4802- }
4803 }
4804 }
4805
4806=== modified file 'qml/Panel/Indicators/client/IndicatorsClient.qml'
4807--- qml/Panel/Indicators/client/IndicatorsClient.qml 2016-06-14 10:32:17 +0000
4808+++ qml/Panel/Indicators/client/IndicatorsClient.qml 2016-09-22 07:47:54 +0000
4809@@ -21,8 +21,8 @@
4810 import Ubuntu.Components 1.3
4811
4812 Rectangle {
4813+ id: root
4814 color: theme.palette.normal.background
4815- id: root
4816
4817 Component.onCompleted: {
4818 theme.name = "Ubuntu.Components.Themes.SuruDark"
4819
4820=== modified file 'qml/Panel/Indicators/client/IndicatorsList.qml'
4821--- qml/Panel/Indicators/client/IndicatorsList.qml 2016-06-14 10:32:17 +0000
4822+++ qml/Panel/Indicators/client/IndicatorsList.qml 2016-09-22 07:47:54 +0000
4823@@ -1,5 +1,5 @@
4824 /*
4825- * Copyright 2013 Canonical Ltd.
4826+ * Copyright 2013-2016 Canonical Ltd.
4827 *
4828 * This program is free software; you can redistribute it and/or modify
4829 * it under the terms of the GNU Lesser General Public License as published by
4830@@ -15,19 +15,22 @@
4831 *
4832 * Authors:
4833 * Renato Araujo Oliveira Filho <renato@canonical.com>
4834+ * Marco Trevisan <marco.trevisan@canonical.com>
4835 */
4836
4837 import QtQuick 2.4
4838 import Ubuntu.Components 1.3
4839-import Ubuntu.Components.ListItems 1.3 as ListItem
4840 import Unity.Indicators 0.1 as Indicators
4841 import "../.."
4842+import "../../../Components"
4843
4844 Page {
4845 id: page
4846 anchors.fill: parent
4847 property string profile: ""
4848- title: "Plugin list"
4849+ header: PageHeader {
4850+ title: "Indicators List"
4851+ }
4852
4853 Indicators.IndicatorsModel {
4854 id: indicatorsModel
4855@@ -41,32 +44,24 @@
4856 anchors.fill: parent
4857 model: indicatorsModel
4858
4859- delegate: Rectangle {
4860- color: "#221e1c"
4861-
4862- anchors.left: parent.left
4863- anchors.right: parent.right
4864- height: menuItem.height
4865-
4866- ListItem.Standard {
4867+ delegate: ListItem {
4868+ objectName: identifier
4869+ height: menuItem.height + (divider.visible ? divider.height : 0)
4870+
4871+ ListItemLayout {
4872 id: menuItem
4873- anchors.left: parent.left
4874- anchors.right: parent.right
4875- objectName: identifier
4876-
4877- text: identifier
4878-
4879- onClicked: {
4880- var new_page = Qt.createComponent("IndicatorRepresentation.qml");
4881- if (new_page.status !== Component.Ready) {
4882- if (new_page.status === Component.Error)
4883- console.error("Error: " + new_page.errorString());
4884-
4885- return;
4886- }
4887-
4888- page.pageStack.push(new_page.createObject(pages), {"indicatorProperties" : model.indicatorProperties });
4889+ title.text: identifier
4890+ }
4891+
4892+ onClicked: {
4893+ var new_page = Qt.createComponent("IndicatorRepresentation.qml");
4894+ if (new_page.status !== Component.Ready) {
4895+ if (new_page.status === Component.Error)
4896+ console.error("Error: " + new_page.errorString());
4897+
4898+ return;
4899 }
4900+ page.pageStack.push(new_page.createObject(pages), {"indicatorProperties" : model.indicatorProperties });
4901 }
4902 }
4903 }
4904
4905=== modified file 'qml/Panel/Indicators/client/IndicatorsTree.qml'
4906--- qml/Panel/Indicators/client/IndicatorsTree.qml 2015-07-15 15:07:19 +0000
4907+++ qml/Panel/Indicators/client/IndicatorsTree.qml 2016-09-22 07:47:54 +0000
4908@@ -21,6 +21,7 @@
4909 import Ubuntu.Components 1.3
4910 import Unity.Indicators 0.1 as Indicators
4911 import ".."
4912+import "../../../Components"
4913
4914 IndicatorBase {
4915 id: root
4916@@ -30,14 +31,10 @@
4917 model: root.menuModel
4918 }
4919
4920- Flickable {
4921+ TextArea {
4922 anchors.fill: parent
4923- contentHeight: all_data.height
4924- clip:true
4925- Text {
4926- id: all_data
4927- color: "white"
4928- text: printer.text
4929- }
4930+ anchors.margins: units.gu(0.5)
4931+ id: all_data
4932+ text: printer.text
4933 }
4934 }
4935
4936=== modified file 'qml/Panel/Panel.qml'
4937--- qml/Panel/Panel.qml 2016-06-20 10:31:44 +0000
4938+++ qml/Panel/Panel.qml 2016-09-22 07:47:54 +0000
4939@@ -1,5 +1,5 @@
4940 /*
4941- * Copyright (C) 2013-2015 Canonical, Ltd.
4942+ * Copyright (C) 2013-2016 Canonical, Ltd.
4943 *
4944 * This program is free software; you can redistribute it and/or modify
4945 * it under the terms of the GNU General Public License as published by
4946@@ -100,15 +100,12 @@
4947 }
4948 height: indicators.minimizedPanelHeight
4949 hoverEnabled: true
4950- onClicked: callHint.visible ? callHint.showLiveCall() : PanelState.focusMaximizedApp()
4951- onDoubleClicked: PanelState.restoreClicked()
4952+ onClicked: if (callHint.visible) { callHint.showLiveCall(); }
4953
4954- property bool mouseWasPressed: false
4955- onPressed: mouseWasPressed = containsPress
4956- onMouseYChanged: {
4957- if (mouseWasPressed && mouseY > panelHeight) {
4958- PanelState.restoreClicked(); // restore the window when "dragging" the panel down
4959- mouseWasPressed = false;
4960+ onPressed: {
4961+ if (!callHint.visible) {
4962+ // let it fall through to the window decoration of the maximized window behind, if any
4963+ mouse.accepted = false;
4964 }
4965 }
4966
4967@@ -120,11 +117,8 @@
4968 anchors {
4969 left: parent.left
4970 top: parent.top
4971- leftMargin: units.gu(1)
4972- topMargin: units.gu(0.5)
4973- bottomMargin: units.gu(0.5)
4974 }
4975- height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
4976+ height: indicators.minimizedPanelHeight
4977
4978 visible: ((PanelState.buttonsVisible && parent.containsMouse) || PanelState.buttonsAlwaysVisible)
4979 && !root.locked && !callHint.visible
4980@@ -183,13 +177,15 @@
4981 }
4982 color: "white"
4983 height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
4984- visible: !windowControlButtons.visible && !root.locked && !callHint.visible
4985+ opacity: !windowControlButtons.visible && !root.locked && !callHint.visible ? 1 : 0
4986+ visible: opacity != 0
4987 verticalAlignment: Text.AlignVCenter
4988 fontSize: "medium"
4989 font.weight: PanelState.buttonsVisible ? Font.Light : Font.Medium
4990 text: PanelState.title
4991 elide: Text.ElideRight
4992 maximumLineCount: 1
4993+ Behavior on opacity { UbuntuNumberAnimation {} }
4994 }
4995
4996 // TODO here would the Locally integrated menus come
4997
4998=== modified file 'qml/Shell.qml'
4999--- qml/Shell.qml 2016-08-19 09:16:28 +0000
5000+++ qml/Shell.qml 2016-09-22 07:47:54 +0000
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches