~aacid/unity8/fix_testDash

« back to all changes in this revision

Viewing changes to qml/Wizard/Pages/50-location.qml

  • Committer: CI Train Bot
  • Author(s): Michael Terry
  • Date: 2014-12-04 20:54:46 UTC
  • mfrom: (1432.3.19 wizard-plugin)
  • Revision ID: ci-train-bot@canonical.com-20141204205446-pbuftf6d5yt854oj
Convert the welcome wizard from a separate executable into a qml plugin (with a small C++ plugin for support).

- This changes the path for adding customized wizard pages (drops system-settings namespacing).  I checked with cwayne, that support isn't being used yet.  So that's safe to adjust while we're here.

- I did not change the path for the 'has the wizard run yet' marker, since that is being used in the wild.  But I added a comment as to why we're using the phrase "ubuntu-system-settings" in that filename.

- I fleshed out unity8's support for changing the language on the fly, since that's now done in-process.  I believe I caught all cases (anything that used a qml binding to i18n worked automatically, just had to catch the cases that were pulling from outside sources like infographics).

- If an incoming call happens during the wizard, we just bail out of it and the edge demo. I'm not sure what the ideal behavior is, but this is at least reasonable. There's nothing in the wizard that *needs* to be done.

- Making the wizard a plugin lets us drop the gap between the end of the wizard and the start of the shell.  Yay! 
Approved by: Andrea Cimitan

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 */
16
16
 
17
17
import QtQuick 2.3
 
18
import AccountsService 0.1
18
19
import QMenuModel 0.1 as QMenuModel
19
20
import Qt.labs.folderlistmodel 2.1
20
21
import Ubuntu.Components 1.1
21
 
import Ubuntu.SystemSettings.Wizard.Utils 0.1
22
 
import "../Components" as LocalComponents
 
22
import ".." as LocalComponents
23
23
 
24
24
LocalComponents.Page {
25
25
    title: i18n.tr("Location")
26
26
    forwardButtonSourceComponent: forwardButton
27
27
 
28
 
    property bool pathSet: System.hereLicensePath !== " " // single space means it's unassigned
 
28
    property bool pathSet: AccountsService.hereLicensePathValid
29
29
    property bool countSet: false
30
 
    skipValid: pathSet && (System.hereLicensePath === "" || countSet)
31
 
    skip: skipValid && (System.hereLicensePath === "" || termsModel.count === 0)
 
30
    skipValid: pathSet && (AccountsService.hereLicensePath === "" || countSet)
 
31
    skip: skipValid && (AccountsService.hereLicensePath === "" || termsModel.count === 0)
32
32
 
33
33
    Connections {
34
34
        target: termsModel
37
37
 
38
38
    FolderListModel {
39
39
        id: termsModel
40
 
        folder: System.hereLicensePath
 
40
        folder: AccountsService.hereLicensePath
41
41
        nameFilters: ["*.html"]
42
42
        showDirs: false
43
43
        showOnlyReadable: true
141
141
                if (locationActionGroup.gps.state != gpsOn) {
142
142
                    locationActionGroup.gps.activate();
143
143
                }
144
 
                System.hereEnabled = hereOn;
 
144
                AccountsService.hereEnabled = hereOn;
145
145
                pageStack.next()
146
146
            }
147
147
        }