on xenial help sign in
General improvements
791e045Dalton Durst
qml/Wizard/Pages.qml+36−3
@@ -105,6 +105,39 @@ StyledItem {
105 id: pageList
105 id: pageList
106 }
106 }
107
107
108+ ActivityIndicator {
109+ id: pagesSpinner
110+ anchors.centerIn: parent
111+ z: 100
112+ running: false
113+ visible: running
114+
115+ NumberAnimation on opacity {
116+ id: fadeInAnimation
117+ from: 0
118+ to: 1
119+ duration: 200
120+ }
121+
122+ onVisibleChanged: {
123+ if (visible) {
124+ opacity = 0;
125+ fadeInAnimation.start();
126+ } else {
127+ // impatientLoadingLabel.text = ""
128+ }
129+ }
130+ }
131+
132+ Timer {
133+ id: impatientLoadingTimer
134+ interval: 1700
135+ onTriggered: {
136+ console.warn("Impatient timer going off. Fix the wizard, it's too slow at skipping pages.")
137+ pagesSpinner.running = true;
138+ }
139+ }
140+
108 PageStack {
141 PageStack {
109 id: pageStack
142 id: pageStack
110 objectName: "pageStack"
143 objectName: "pageStack"
@@ -147,6 +180,7 @@ StyledItem {
147 push(path, {"opacity": 0, "enabled": false});
180 push(path, {"opacity": 0, "enabled": false});
148
181
149 timeout.restart();
182 timeout.restart();
183+ impatientLoadingTimer.start();
150
184
151 console.info("Loading page " + currentPage.objectName);
185 console.info("Loading page " + currentPage.objectName);
152
186
@@ -176,14 +210,13 @@ StyledItem {
176 } else if (currentPage.skipValid) {
210 } else if (currentPage.skipValid) {
177 if (currentPage.skip) {
211 if (currentPage.skip) {
178 next();
212 next();
179− console.warn("Wizard page " + currentPage.objectName + " skipped on request");
180 } else if ( !(itemInArray(wizard.runningWizardVersion, currentPage.showOnVersions)) &&
213 } else if ( !(itemInArray(wizard.runningWizardVersion, currentPage.showOnVersions)) &&
181 (currentPage.showOnVersions.length > 0) ) {
214 (currentPage.showOnVersions.length > 0) ) {
182 // The page is not supposed to run on this version of the wizard
215 // The page is not supposed to run on this version of the wizard
183 next();
216 next();
184− console.warn("Wizard page " + currentPage.objectName + " skipped, it is not marked to run on this version.");
185 } else {
217 } else {
186− console.warn("Starting wizard page " + currentPage.objectName);
218+ impatientLoadingTimer.stop()
219+ pagesSpinner.running = false;
187 currentPage.opacity = 1;
220 currentPage.opacity = 1;
188 currentPage.enabled = true;
221 currentPage.enabled = true;
189 timeout.stop();
222 timeout.stop();
qml/Wizard/Pages/11-changelog.qmlnew file+46
@@ -0,0 +1,46 @@
1+/*
2+ * Copyright (C) 2015-2016 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.4
18+import Ubuntu.Components 1.3
19+import AccountsService 0.1
20+import ".." as LocalComponents
21+
22+LocalComponents.Page {
23+ objectName: "changelogPage"
24+ title: i18n.tr("What's new")
25+
26+ forwardButtonSourceComponent: forwardButton
27+
28+ showOnVersions: []
29+
30+ Label {
31+ text: "This is where cool stuff would go"
32+ }
33+
34+ Component {
35+ id: forwardButton
36+ LocalComponents.StackButton {
37+ text: i18n.tr("Next")
38+ onClicked: {
39+ if (d.validName) {
40+ AccountsService.realName = d.validName;
41+ }
42+ pageStack.next();
43+ }
44+ }
45+ }
46+}
qml/Wizard/Pages/30-wifi.qml+2
@@ -31,6 +31,8 @@ LocalComponents.Page {
31 title: i18n.tr("Connect to Wi‑Fi")
31 title: i18n.tr("Connect to Wi‑Fi")
32 forwardButtonSourceComponent: forwardButton
32 forwardButtonSourceComponent: forwardButton
33
33
34+ showOnVersions: []
35+
34 readonly property bool connected: Connectivity.online
36 readonly property bool connected: Connectivity.online
35
37
36 function getExtendedProperty(object, propertyName, defaultValue) {
38 function getExtendedProperty(object, propertyName, defaultValue) {
qml/Wizard/Pages/78-app-update.qml+5−26
@@ -84,7 +84,7 @@ LocalComponents.Page {
84 }
84 }
85
85
86 GlobalUpdateControls {
86 GlobalUpdateControls {
87− id: glob
87+ id: g
88 objectName: "global"
88 objectName: "global"
89 anchors { left: parent.left; right: parent.right }
89 anchors { left: parent.left; right: parent.right }
90
90
@@ -96,27 +96,6 @@ LocalComponents.Page {
96 online: appUpdatePage.online
96 online: appUpdatePage.online
97 onStop: UpdateManager.cancel()
97 onStop: UpdateManager.cancel()
98
98
99− onRequestInstall: {
100− install();
101− }
102− onInstall: {
103− appUpdatePage.batchMode = true
104− postClickBatchHandler.target = appUpdatePage;
105− }
106− }
107−
108− AppUpdateList {
109− id: appUpdateList
110− objectName: "appUpdateList"
111−
112− height: hidden ? 0 : units.gu(8)
113− clip: true
114− status: UpdateManager.status
115− batchMode: appUpdatePage.batchMode
116− updatesCount: appUpdatePage.updatesCount
117− online: appUpdatePage.online
118− onStop: UpdateManager.cancel()
119−
120 onRequestInstall: {
99 onRequestInstall: {
121 install();
100 install();
122 }
101 }
@@ -211,7 +190,7 @@ LocalComponents.Page {
211 }
190 }
212
191
213 Connections {
192 Connections {
214− target: appUpdateList
193+ target: g
215 onInstall: install()
194 onInstall: install()
216 }
195 }
217
196
@@ -233,8 +212,8 @@ LocalComponents.Page {
233 }
212 }
234 }
213 }
235 }
214 }
236− } // Column inside flickable inside column.
215+ } // Column inside flickable
237− } // Flickable inside Column
216+ } // Flickable
238
217
239 Connections {
218 Connections {
240 id: postClickBatchHandler
219 id: postClickBatchHandler
@@ -264,7 +243,7 @@ LocalComponents.Page {
264 Component {
243 Component {
265 id: forwardButton
244 id: forwardButton
266 LocalComponents.StackButton {
245 LocalComponents.StackButton {
267− text: i18n.tr("Skip")
246+ text: (UpdateManager.status === UpdateManager.StatusIdle && updatesCount === 0) ? i18n.tr("Next") : i18n.tr("Skip")
268 onClicked: pageStack.next()
247 onClicked: pageStack.next()
269 }
248 }
270 }
249 }
qml/Wizard/Pages/80-finished.qml+2−2
@@ -87,7 +87,7 @@ LocalComponents.Page {
87 fontSize: "x-large"
87 fontSize: "x-large"
88 font.weight: Font.Light
88 font.weight: Font.Light
89 lineHeight: 1.2
89 lineHeight: 1.2
90− text: i18n.tr("Welcome to Ubuntu")
90+ text: (wizard.runningWizardVersion === 0) ? i18n.tr("Welcome to Ubuntu") : i18n.tr("Welcome Back")
91 color: whiteColor
91 color: whiteColor
92 }
92 }
93
93
@@ -122,7 +122,7 @@ LocalComponents.Page {
122 Label {
122 Label {
123 id: buttonLabel
123 id: buttonLabel
124 color: whiteColor
124 color: whiteColor
125− text: i18n.tr("Get Started")
125+ text: (wizard.runningWizardVersion === 0) ? i18n.tr("Get Started") : i18n.tr("Continue")
126 fontSize: "medium"
126 fontSize: "medium"
127 anchors.centerIn: parent
127 anchors.centerIn: parent
128 }
128 }
qml/Wizard/Pages/AppUpdateList.qmldeleted−144
@@ -1,144 +0,0 @@
1−/*
2− *
3− * Copyright (C) 2016 Canonical Ltd.
4− *
5− * This program is free software: you can redistribute it and/or modify it
6− * under the terms of the GNU General Public License version 3, as published
7− * by the Free Software Foundation.
8− *
9− * This program is distributed in the hope that it will be useful, but
10− * WITHOUT ANY WARRANTY; without even the implied warranties of
11− * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12− * PURPOSE. See the GNU General Public License for more details.
13− *
14− * You should have received a copy of the GNU General Public License along
15− * with this program. If not, see <http://www.gnu.org/licenses/>.
16− */
17−
18−import QtQuick 2.4
19−import QtQuick.Layouts 1.1
20−import Ubuntu.Components 1.3
21−import Ubuntu.Components.ListItems 1.3 as ListItems
22−import Ubuntu.SystemSettings.Update 1.0
23−
24−Item {
25− id: g
26−
27− property bool batchMode
28− property int status // A UpdateManager::Status
29− property bool requireRestart: false
30− property int updatesCount: 0
31− property bool online: false
32−
33− property bool hidden: {
34− switch (status) {
35− case UpdateManager.StatusNetworkError:
36− case UpdateManager.StatusServerError:
37− return true;
38− }
39− return !online ||
40− (updatesCount <= 1 && status === UpdateManager.StatusIdle) ||
41− batchMode
42− }
43−
44− signal stop()
45− signal requestInstall()
46− signal install()
47−
48− Behavior on height {
49− UbuntuNumberAnimation {}
50− }
51−
52− RowLayout {
53− id: checking
54− spacing: units.gu(2)
55− anchors {
56− fill: parent
57− margins: units.gu(2)
58− }
59−
60− Behavior on opacity {
61− UbuntuNumberAnimation {}
62− }
63−
64− opacity: visible ? 1 : 0
65− visible: {
66− switch (g.status) {
67− case UpdateManager.StatusCheckingClickUpdates:
68− case UpdateManager.StatusCheckingImageUpdates:
69− case UpdateManager.StatusCheckingAllUpdates:
70− return true;
71− }
72− return false;
73− }
74−
75− ActivityIndicator {
76− running: parent.visible
77− }
78−
79− Label {
80− objectName: "checkLabel"
81− Layout.fillWidth: true
82− elide: Text.ElideRight
83− text: i18n.tr("Checking for updates…")
84− }
85−
86− Button {
87− objectName: "updatesGlobalStopButton"
88− text: i18n.tr("Stop")
89− onClicked: g.stop()
90− Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
91− }
92− }
93−
94− RowLayout {
95− id: install
96− anchors {
97− fill: parent
98− margins: units.gu(2)
99− }
100− spacing: units.gu(2)
101−
102− Behavior on opacity {
103− UbuntuNumberAnimation {}
104− }
105−
106− opacity: visible ? 1 : 0
107− visible: {
108− var canInstall = g.status === UpdateManager.StatusIdle;
109− return canInstall && updatesCount > 1;
110− }
111−
112− Label {
113− objectName: "updatesGlobalInfoLabel"
114− // // TRANSLATORS: %1 is number of software updates available.
115− text: i18n.tr("%1 update available",
116− "%1 updates available",
117− updatesCount).arg(updatesCount)
118− Layout.fillWidth: true
119− }
120−
121− Button {
122− objectName: "updatesGlobalInstallButton"
123− text: {
124− if (g.requireRestart === true) {
125− return i18n.tr("Update all…");
126− } else {
127− return i18n.tr("Update all");
128− }
129− }
130− onClicked: g.requestInstall()
131− color: theme.palette.normal.positive
132− strokeColor: "transparent"
133− }
134− }
135−
136− ListItems.ThinDivider {
137− visible: !g.hidden
138− anchors {
139− left: parent.left
140− right: parent.right
141− bottom: parent.bottom
142− }
143− }
144−}