2 * Copyright (C) 2013,2014,2015 Canonical, Ltd.
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.
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.
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/>.
18import Ubuntu.Components 1.2
19import Ubuntu.SystemSettings.SecurityPrivacy 1.0
25 objectName: "wizardPages"
30 // These should be set by a security page and we apply the settings when
31 // the user exits the wizard.
32 property int passwordMethod: UbuntuSecurityPrivacyPanel.Passphrase
33 property string password: ""
34 property string countryCode: "US" // default country (for the timezone page)
35 property bool seenSIMPage: false // we want to see the SIM page at most once
37 UbuntuSecurityPrivacyPanel {
39 objectName: "securityPrivacy"
42 function quitWizard() {
43 pageStack.currentPage.enabled = false;
45 var errorMsg = securityPrivacy.setSecurity("", password, passwordMethod)
46 if (errorMsg !== "") {
47 // Ignore (but log) any errors, since we're past where the user set
48 // the method. Worst case, we just leave the user with a swipe
49 // security method and they fix it in the system settings.
50 console.log("Error setting security method:", errorMsg)
56 MouseArea { // eat anything that gets past widgets
72 objectName: "pageStack"
76 // If we've opened any extra (non-main) pages, pop them before
77 // continuing so back button returns to the previous main page.
78 while (pageList.index < pageStack.depth - 1)
84 if (pageList.index >= pageStack.depth - 1)
85 pageList.prev() // update pageList.index, but not for extra pages
87 if (!currentPage || currentPage.opacity === 0) { // undo skipped pages
90 currentPage.enabled = true
96 currentPage.enabled = false
99 // First load it invisible, check that we should actually use
100 // this page, and either skip it or continue.
101 push(path, {"opacity": 0, "enabled": false})
105 // Check for immediate skip or not. We may have to wait for
106 // skipValid to be assigned (see Connections object below)
110 function checkSkip() {
111 if (!currentPage) { // may have had a parse error
113 } else if (currentPage.skipValid) {
114 if (currentPage.skip) {
117 currentPage.opacity = 1
118 currentPage.enabled = true
126 objectName: "timeout"
127 interval: 2000 // wizard pages shouldn't take long
129 print("PAGE SKIPPED BY TIMEOUT!!!");
130 pageStack.currentPage.skip = true;
131 pageStack.currentPage.skipValid = true;
136 target: pageStack.currentPage
137 onSkipValidChanged: pageStack.checkSkip()
140 Component.onCompleted: next()
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list