[-]
[+]
|
Changed |
_service:tar_git:glacier-settings.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -6,7 +6,7 @@
<service name="tar_git">
<param name="url">https://github.com/nemomobile-ux/glacier-settings.git</param>
<param name="branch">master</param>
- <param name="revision">adf96cbbd917481ac456e60047f497e89c6c5f25</param>
+ <param name="revision">953eccd1ce03642dd335e07e93af5afd97f66874</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.1.0.tar.bz2/glacier-settings.pro
^
|
@@ -121,6 +121,11 @@
mobileplugin.path = /usr/share/glacier-settings/qml/plugins/mobile
+powersaveplugin.files = qml/plugins/powersave/powersave.qml \
+ qml/plugins/powersave/powersave.svg
+
+powersaveplugin.path = /usr/share/glacier-settings/qml/plugins/powersave
+
languageconfigs.files = configs/supported-languages/*
languageconfigs.path = /usr/share/jolla-supported-languages/
@@ -137,7 +142,8 @@
qml/plugins/keyboard/keyboard.json \
qml/plugins/usb/usb.json \
qml/plugins/devicelock/devicelock.json \
- qml/plugins/mobile/mobile.json
+ qml/plugins/mobile/mobile.json \
+ qml/plugins/powersave/powersave.json
pluginconfigs.path = /usr/share/glacier-settings/plugins
@@ -165,7 +171,8 @@
devicelockplugin \
service \
mobileplugin \
- nfcplugin
+ nfcplugin \
+ powersaveplugin
DISTFILES += \
qml/plugins/bluez/bluez.json \
@@ -177,6 +184,9 @@
qml/plugins/display/display.qml \
qml/plugins/display/display.json \
qml/plugins/nfc.qml \
+ qml/plugins/powersave/powersave.json \
+ qml/plugins/powersave/powersave.qml \
+ qml/plugins/powersave/powersave.svg \
qml/plugins/wifi/wifi.qml \
qml/plugins/wifi/wifi.json \
qml/plugins/wifi/WifiSettings.qml \
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.1.0.tar.bz2/qml/components/QuickSettings.qml
^
|
@@ -220,7 +220,7 @@
QuickButton{
id: airplaneButton
-
+ activated: connMgr.instance.offlineMode
icon: "../img/plane.svg"
anchors{
@@ -231,14 +231,7 @@
}
onClicked: {
- if (airplaneButton.activated)
- {
- connMgr.instance.offlineMode = false;
- }
- else
- {
- connMgr.instance.offlineMode = true;
- }
+ connMgr.instance.offlineMode = !connMgr.instance.offlineMode;
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.1.0.tar.bz2/qml/plugins/bluez/BtDevisesList.qml
^
|
@@ -38,6 +38,12 @@
showNext: false
icon: formatIcon(model.Type)
+ onClicked: {
+ if(model.Paired) {
+ btInterface.call("connectDevice", [Address])
+ }
+ }
+
actions:[
ActionButton {
iconSource: model.Paired ? "image://theme/chain-broken" : "image://theme/link"
@@ -47,16 +53,17 @@
return
}
- if(model.paired) {
+ if(model.Paired) {
//disconect
- device.cancelPairing();
+ console.log("UNPAIR!!!")
+ btInterface.call("unPair", [Address])
} else {
//connect
- device.pair()
+ console.log("PAIR!!!")
+ btInterface.call("pair", [Address])
}
}
}
]
-
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.1.0.tar.bz2/qml/plugins/bluez/bluez.qml
^
|
@@ -26,6 +26,7 @@
import MeeGo.Connman 0.2
import org.kde.bluezqt 1.0 as BluezQt
import Nemo.Ssu 1.1 as Ssu
+import Nemo.DBus 2.0
import "../../components"
@@ -56,6 +57,13 @@
}
}
+ DBusInterface {
+ id: btInterface
+ service: "org.glacier.lipstick"
+ path: "/bluetooth"
+ iface: "org.glacier.lipstick"
+ }
+
BluezQt.DevicesModel {
id: bluetoothDevicesNearbyModel
filters: BluezQt.DevicesModelPrivate.UnpairedDevices
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.1.0.tar.bz2/qml/plugins/mobile/mobile.qml
^
|
@@ -25,6 +25,9 @@
import org.nemomobile.ofono 1.0
import MeeGo.QOfono 0.2
+import MeeGo.Connman 0.2
+
+import Nemo.Connectivity 1.0
import "../../components"
@@ -41,25 +44,54 @@
id: simModel
}
+ OfonoSimInfo{
+ id: simInfo
+
+ onSubscriberIdentityChanged: {
+ mobileData.defaultDataSim = subscriberIdentity
+ }
+ }
+
OfonoModemListModel{
id: modemModel
}
+ MobileDataConnection{
+ id: mobileData
+ useDefaultModem: true
+ }
+
ListView{
- id: languageList
+ id: simList
width: parent.width
- height: parent.height
+ height: Theme.itemHeightLarge*modemModel.count
- model: modemModel//simModel
+ model: modemModel
clip: true
delegate: ListViewItemWithActions{
id: mFromList
- label: path//serviceProviderName
- description: model.enabled ? "Enabled" : "Disabled"
+ label: model.simPresent ? qsTr("Unknow") : qsTr("No sim")
+ description: model.enabled ? qsTr("Enabled") : qsTr("Disabled")
iconVisible: false
- showNext: model.enabled
+ showNext: model.enabled && model.simPresent
+
+ OfonoNetworkRegistration{
+ id: cellularRegistration
+ modemPath: path
+
+ onCurrentOperatorPathChanged: {
+ operator.operatorPath = currentOperatorPath
+ }
+ }
+
+ OfonoNetworkOperator{
+ id: operator
+ onNameChanged: {
+ mFromList.label = name
+ }
+ }
actions:[
ActionButton {
@@ -71,9 +103,40 @@
model.enabled = true
}
}
+ },
+ ActionButton {
+ iconSource: "image://theme/globe"
+ onClicked: {
+ simInfo.modemPath = path
+ console.log(path)
+ }
}
]
}
}
+
+ CheckBox {
+ id: autoConnectCheckBox
+ width: parent.width
+ anchors.top: simList.bottom
+ checked: mobileData.autoConnect
+ text: qsTr("Connect to internet")
+
+ onClicked: {
+ mobileData.autoConnect = !mobileData.autoConnect
+ }
+ }
+
+ CheckBox {
+ id: roamingCheckBox
+ width: parent.width
+ anchors.top: autoConnectCheckBox.bottom
+ checked: mobileData.roamingAllowed
+ text: qsTr("Enable data roaming")
+
+ onClicked: {
+ mobileData.roamingAllowed = !mobileData.roamingAllowed
+ }
+ }
}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.1.0.tar.bz2/qml/plugins/powersave/powersave.json
^
|
@@ -0,0 +1,5 @@
+{
+ "path": "powersave",
+ "category": "Personalization",
+ "title": "Power save"
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.1.0.tar.bz2/qml/plugins/powersave/powersave.qml
^
|
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2020 Chupligin Sergey <neochapay@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+import QtQuick 2.6
+import QtQuick.Window 2.1
+
+import QtQuick.Controls 1.0
+import QtQuick.Controls.Nemo 1.0
+import QtQuick.Controls.Styles.Nemo 1.0
+
+import org.nemomobile.configuration 1.0
+import org.nemomobile.systemsettings 1.0
+
+import "../../components"
+
+
+Page {
+ id: wifiPage
+
+ headerTools: HeaderToolsLayout {
+ id: header
+ showBackButton: true;
+ title: qsTr("Power save")
+ }
+
+ ConfigurationValue{
+ id: powerSaveLevel
+ key: "/home/glacier/power/powerSaveLevel"
+ defaultValue: 5
+ }
+
+ DisplaySettings {
+ id: displaySettings
+
+ onPowerSaveModeThresholdChanged: {
+ console.log("powerSaveModeThreshold:"+displaySettings.powerSaveModeThreshold)
+ for (var i = 0; i < thresholdRollerModel.count; ++i) {
+ if(thresholdRollerModel.get(i).name == displaySettings.powerSaveModeThreshold) {
+ powerSaveModeThresholdRoller.currentIndex = i
+
+ console.log(powerSaveModeThresholdRoller.currentIndex+" "+thresholdRollerModel.get(i).name)
+ }
+ }
+ }
+ }
+
+ ListModel{
+ id: thresholdRollerModel
+ ListElement { name: "0"}
+ ListElement { name: "1"; }
+ ListElement { name: "5"; }
+ ListElement { name: "10"; }
+ ListElement { name: "20"; }
+ }
+
+ SettingsColumn{
+ id: forcePowerSaveColumn
+
+ Rectangle{
+ width: parent.width
+ height: childrenRect.height
+ color: "transparent"
+
+ Label{
+ id: nameLabel
+ text: qsTr("Force power save")
+ anchors{
+ left: parent.left
+ }
+ wrapMode: Text.Wrap
+ font.bold: true
+ }
+
+ CheckBox {
+ id: forcePowerSaveCheckBox
+ checked: displaySettings.powerSaveModeForced
+ anchors{
+ right: parent.right
+ verticalCenter: nameLabel.verticalCenter
+ }
+ onClicked:{
+ displaySettings.powerSaveModeForced = forcePowerSaveCheckBox.checked
+ if(forcePowerSaveCheckBox.checked) {
+ displaySettings.powerSaveModeEnabled = true
+ }
+ }
+ }
+ }
+
+ GlacierRoller {
+ id: powerSaveModeThresholdRoller
+ width: parent.width
+
+ clip: true
+ model: thresholdRollerModel
+ label: qsTr("Power save mode battery level threshold")
+ delegate: GlacierRollerItem{
+ Text{
+ height: powerSaveModeThresholdRoller.itemHeight
+ verticalAlignment: Text.AlignVCenter
+ text: name
+ color: Theme.textColor
+ font.pixelSize: Theme.fontSizeMedium
+ font.bold: (powerSaveModeThresholdRoller.activated && powerSaveModeThresholdRoller.currentIndex === index)
+ }
+ }
+ onCurrentIndexChanged: if(thresholdRollerModel.get(currentIndex).name != displaySettings.powerSaveModeThreshold) {
+ displaySettings.powerSaveModeThreshold = thresholdRollerModel.get(currentIndex).name
+ }
+
+ }
+
+ Component.onCompleted: {
+ for (var i = 0; i < thresholdRollerModel.count; ++i) {
+ if(thresholdRollerModel.get(i).name == displaySettings.powerSaveModeThreshold) {
+ powerSaveModeThresholdRoller.currentIndex = i
+
+ console.log(powerSaveModeThresholdRoller.currentIndex+" "+thresholdRollerModel.get(i).name)
+ }
+ }
+ }
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:glacier-settings-0.1.0.tar.bz2/qml/plugins/powersave/powersave.svg
^
|
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ id="svg865"
+ version="1.1"
+ viewBox="0 0 576 512">
+ <metadata
+ id="metadata871">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs869" />
+ <path
+ style="fill:#ffffff"
+ id="path863"
+ d="M546.2 9.7c-5.6-12.5-21.6-13-28.3-1.2C486.9 62.4 431.4 96 368 96h-80C182 96 96 182 96 288c0 7 .8 13.7 1.5 20.5C161.3 262.8 253.4 224 384 224c8.8 0 16 7.2 16 16s-7.2 16-16 16C132.6 256 26 410.1 2.4 468c-6.6 16.3 1.2 34.9 17.5 41.6 16.4 6.8 35-1.1 41.8-17.3 1.5-3.6 20.9-47.9 71.9-90.6 32.4 43.9 94 85.8 174.9 77.2C465.5 467.5 576 326.7 576 154.3c0-50.2-10.8-102.2-29.8-144.6z" />
+</svg>
|
[-]
[+]
|
Changed |
_service:tar_git:glacier-settings-0.1.0.tar.bz2/qml/plugins/usb/usb.qml
^
|
@@ -35,19 +35,43 @@
title: qsTr("USB")
}
+ ListModel{
+ id: modesModel
+ ListElement{
+ label: qsTr("Ask")
+ mode: "ask"
+ }
+ ListElement {
+ label: qsTr("Connection sharing")
+ mode: "connection_sharing"
+ }
+ ListElement {
+ label: qsTr("MTP")
+ mode: "mtp_mode"
+ }
+ ListElement{
+ label: qsTr("Charging only")
+ mode: "charging_only"
+ }
+ ListElement{
+ label: qsTr("Developer mode")
+ mode: "developer_mode"
+ }
+ }
+
USBSettings{
id: usbSettings
onSupportedModesChanged: {
- for(var i = 0; i <= usbSettings.supportedModes.length; i++) {
- if(usbSettings.supportedModes[i] === usbSettings.currentMode) {
+ for(var i = 0; i <= modesModel.count-1; i++) {
+ if(modesModel.get(i).mode === usbSettings.configMode) {
usbModeRoller.currentIndex = i;
}
}
}
onCurrentModeChanged: {
- currentModeLabel.text = qsTr("Current mode: ") + formatMode(usbSettings.currentMode)
+ currentModeLabel.text = qsTr("Usb mode: ") + formatMode(usbSettings.configMode)
}
}
@@ -69,7 +93,7 @@
Label{
id: currentModeLabel
- text: qsTr("Current mode: ") + formatMode(usbSettings.currentMode)
+ text: qsTr("Usb mode: ") + formatMode(usbSettings.configMode)
}
GlacierRoller {
@@ -77,14 +101,14 @@
width: parent.width
clip: true
- model: usbSettings.availableModes
+ model: modesModel
label: qsTr("Select USB mode")
delegate: GlacierRollerItem{
id: item
Text{
height: usbModeRoller.itemHeight
verticalAlignment: Text.AlignVCenter
- text: formatMode(modelData)
+ text: label
color: Theme.textColor
font.pixelSize: Theme.fontSizeMedium
font.bold: (usbModeRoller.activated && usbModeRoller.currentIndex === index)
@@ -92,28 +116,28 @@
}
onCurrentIndexChanged: {
- usbSettings.currentMode = usbSettings.supportedModes[currentIndex]
+ usbSettings.configMode = modesModel.get(currentIndex).mode
}
}
}
}
function formatMode(mode) {
- switch(mode) {
- case "ask":
- return qsTr("Always ask")
- case "mtp_mode":
- return qsTr("MTP")
- case "charging_only":
- return qsTr("Chagring only")
- case "connection_sharing":
- return qsTr("Connection sharing")
- case "developer_mode":
- return qsTr("Developer mode")
- case "busy":
- return qsTr("Busy")
- default:
- return mode
+ switch(mode) {
+ case "ask":
+ return qsTr("Always ask")
+ case "mtp_mode":
+ return qsTr("MTP")
+ case "charging_only":
+ return qsTr("Chagring only")
+ case "connection_sharing":
+ return qsTr("Connection sharing")
+ case "developer_mode":
+ return qsTr("Developer mode")
+ case "busy":
+ return qsTr("Busy")
+ default:
+ return mode
+ }
}
- }
}
|