@@ -14,16 +14,18 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import QtQuick 2.0
18−import Ubuntu.Application 0.1
1917import AccountsService 0.1
2018import LightDM 0.1 as LightDM
19+import Powerd 0.1
20+import QtQuick 2.0
2121import SessionBroadcast 0.1
22+import Ubuntu.Application 0.1
23+import Unity.Launcher 0.1
24+import "Components"
25+import "Components/Math.js" as MathLocal
2226import "Greeter"
2327import "Launcher"
2428import "Panel"
25−import "Components"
26−import "Components/Math.js" as MathLocal
2729
2830BasicShell {
2931 id: shell
@@ -35,13 +37,6 @@ BasicShell {
3537
3638 backgroundSource: AccountsService.backgroundFile
3739
38− CrossFadeImage {
39− id: backgroundImage
40− anchors.fill: parent
41− fadeInFirst: false
42− source: shell.background
43− }
44−
4540 Lockscreen {
4641 id: lockscreen
4742 hides: [launcher, panel.indicators]
@@ -53,7 +48,6 @@ BasicShell {
5348 x: required ? 0 : - width
5449 width: parent.width
5550 height: parent.height - panel.panelHeight
56− background: shell.background
5751
5852 onUnlocked: lockscreen.hide()
5953 onCancel: greeter.show()
@@ -90,6 +84,7 @@ BasicShell {
9084 available: true
9185 hides: [launcher, panel.indicators]
9286 shown: true
87+ background: shell.background
9388
9489 y: panel.panelHeight
9590 width: parent.width
@@ -183,6 +178,21 @@ BasicShell {
183178 panel.indicators.hide()
184179 }
185180 }
181+ onDashItemSelected: greeter.show()
182+ }
183+ }
184+
185+ Connections {
186+ id: powerConnection
187+ target: Powerd
188+
189+ onDisplayPowerStateChange: {
190+ if (status == Powerd.Off) {
191+ greeter.show();
192+ edgeDemo.paused = true;
193+ } else if (status == Powerd.On) {
194+ edgeDemo.paused = false;
195+ }
186196 }
187197 }
188198