@@ -29,7 +29,10 @@ Item {
29 readonly property bool launcherEnabled: !running || tutorialLeft.shown
29 readonly property bool launcherEnabled: !running || tutorialLeft.shown
30 readonly property bool spreadEnabled: !running || tutorialRight.shown
30 readonly property bool spreadEnabled: !running || tutorialRight.shown
31 readonly property bool panelEnabled: !running || tutorialTop.shown
31 readonly property bool panelEnabled: !running || tutorialTop.shown
32− readonly property alias running: d.running
32+ readonly property alias running: tutorialLeft.shown
34+ || tutorialRight.shown
35+ || tutorialBottom.shown
34 signal finished()
37 signal finished()
@@ -39,12 +42,6 @@ Item {
45− property bool running: tutorialLeft.shown || tutorialTop.shown || tutorialRight.shown || tutorialBottom.shown
48 TutorialLeft {
45 TutorialLeft {
49 id: tutorialLeft
46 id: tutorialLeft
50 objectName: "tutorialLeft"
47 objectName: "tutorialLeft"
@@ -52,13 +49,11 @@ Item {
52 launcher: root.launcher
49 launcher: root.launcher
53 hides: [launcher, panel.indicators]
50 hides: [launcher, panel.indicators]
55− function showIfReady() {
52+ function isReady() {
56− if (AccountsService.demoEdgesCompleted.indexOf("left") == -1) {
53+ return AccountsService.demoEdgesCompleted.indexOf("left") == -1;
61− Component.onCompleted: showIfReady()
56+ Component.onCompleted: if (parent.isReady()) show()
62 onFinished: AccountsService.markDemoEdgeCompleted("left")
57 onFinished: AccountsService.markDemoEdgeCompleted("left")
@@ -77,15 +72,15 @@ Item {
78 id: tutorialTopTimer
73 id: tutorialTopTimer
79 interval: 60000
74 interval: 60000
80− onTriggered: if (isReady()) tutorialTop.show()
75+ onTriggered: if (parent.isReady()) tutorialTop.show()
83 Connections {
78 Connections {
84 target: AccountsService
79 target: AccountsService
85− onDemoEdgesCompletedChanged: if (isReady()) tutorialTopTimer.start()
80+ onDemoEdgesCompletedChanged: if (parent.isReady()) tutorialTopTimer.start()
88− Component.onCompleted: if (isReady()) tutorialTopTimer.start()
83+ Component.onCompleted: if (parent.isReady()) tutorialTopTimer.start()
89 onFinished: AccountsService.markDemoEdgeCompleted("top")
84 onFinished: AccountsService.markDemoEdgeCompleted("top")
91 Connections {
86 Connections {
@@ -115,17 +110,17 @@ Item {
116 id: tutorialRightTimer
111 id: tutorialRightTimer
117 interval: 3000
112 interval: 3000
118− onTriggered: if (isReady()) tutorialRight.show()
113+ onTriggered: if (parent.isReady()) tutorialRight.show()
121 Connections {
116 Connections {
122 target: AccountsService
117 target: AccountsService
123− onDemoEdgesCompletedChanged: if (isReady()) tutorialRightTimer.start()
118+ onDemoEdgesCompletedChanged: if (parent.isReady()) tutorialRightTimer.start()
126 Connections {
121 Connections {
127 target: ApplicationManager
122 target: ApplicationManager
128− onApplicationAdded: if (isReady()) tutorialRight.show()
123+ onApplicationAdded: if (parent.isReady()) tutorialRight.show()
131 onFinished: AccountsService.markDemoEdgeCompleted("right")
126 onFinished: AccountsService.markDemoEdgeCompleted("right")
@@ -162,17 +157,17 @@ Item {
163 id: tutorialBottomTimer
158 id: tutorialBottomTimer
164 interval: 3000
159 interval: 3000
165− onTriggered: if (isReady()) tutorialBottom.show()
160+ onTriggered: if (parent.isReady()) tutorialBottom.show()
168 Connections {
163 Connections {
169 target: AccountsService
164 target: AccountsService
170− onDemoEdgesCompletedChanged: if (isReady()) tutorialBottomTimer.start()
165+ onDemoEdgesCompletedChanged: if (parent.isReady()) tutorialBottomTimer.start()
173 Connections {
168 Connections {
174 target: ApplicationManager
169 target: ApplicationManager
175− onFocusedApplicationIdChanged: if (isReady()) tutorialBottom.show()
170+ onFocusedApplicationIdChanged: if (parent.isReady()) tutorialBottom.show()
178 onFinished: {
173 onFinished: {