2
* Copyright (C) 2013,2014 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/>.
18
import QMenuModel 0.1 as QMenuModel
19
import Qt.labs.folderlistmodel 2.1
20
import Ubuntu.Components 1.1
21
import Ubuntu.SystemSettings.Wizard.Utils 0.1
22
import "../Components" as LocalComponents
24
LocalComponents.Page {
25
title: i18n.tr("Location")
26
forwardButtonSourceComponent: forwardButton
28
property bool hereInstalled: System.hereLicensePath !== "" && termsModel.count > 0
32
folder: System.hereLicensePath
33
nameFilters: ["*.html"]
35
showOnlyReadable: true
38
QMenuModel.QDBusActionGroup {
39
id: locationActionGroup
40
busType: QMenuModel.DBus.SessionBus
41
busName: "com.canonical.indicator.location"
42
objectPath: "/com/canonical/indicator/location"
43
property variant enabled: action("location-detection-enabled")
44
Component.onCompleted: start()
53
anchors.left: parent.left
54
anchors.right: parent.right
55
visible: hereInstalled
57
// TRANSLATORS: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
58
text: i18n.tr("Ubuntu includes location services provided by HERE, enabling apps to pinpoint your location.")
61
LocalComponents.CheckableSetting {
64
text: i18n.tr("Allow apps to use your mobile and Wi-Fi networks to determine your location.")
65
checked: locationActionGroup.enabled.state
66
onTriggered: locationActionGroup.enabled.activate()
69
LocalComponents.CheckableSetting {
72
visible: hereInstalled
73
// TRANSLATORS: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
74
text: i18n.tr("Accept the HERE <a href='terms.qml'>terms and conditions</a> to enable these services.")
75
onLinkActivated: pageStack.load(Qt.resolvedUrl(link))
76
checked: System.hereEnabled
77
onTriggered: System.hereEnabled = checked
81
anchors.left: parent.left
82
anchors.right: parent.right
83
visible: hereInstalled
85
text: i18n.tr("This service can be disabled at any time from the <b>System Settings</b> menu.")
91
LocalComponents.StackButton {
92
text: i18n.tr("Continue")
93
onClicked: pageStack.next()