Merge lp:~phablet-team/ubuntu-system-settings/remove_dialer_settings into lp:ubuntu-system-settings

Proposed by Gustavo Pichorim Boiko
Status: Needs review
Proposed branch: lp:~phablet-team/ubuntu-system-settings/remove_dialer_settings
Merge into: lp:ubuntu-system-settings
Diff against target: 2121 lines (+0/-2004)
22 files modified
plugins/CMakeLists.txt (+0/-1)
plugins/phone/CMakeLists.txt (+0/-29)
plugins/phone/CallForwardItem.qml (+0/-240)
plugins/phone/CallForwarding.qml (+0/-397)
plugins/phone/CallWaiting.qml (+0/-103)
plugins/phone/KeyboardRectangle.qml (+0/-77)
plugins/phone/MultiSim.qml (+0/-120)
plugins/phone/NoSims.qml (+0/-46)
plugins/phone/Ofono.qml (+0/-69)
plugins/phone/PageComponent.qml (+0/-106)
plugins/phone/ServiceInfo.qml (+0/-124)
plugins/phone/Services.qml (+0/-76)
plugins/phone/SingleSim.qml (+0/-74)
plugins/phone/VCardParser.qml (+0/-55)
plugins/phone/callForwardingUtils.js (+0/-126)
plugins/phone/dateUtils.js (+0/-69)
plugins/phone/phone.settings (+0/-24)
plugins/phone/plugin/CMakeLists.txt (+0/-6)
plugins/phone/plugin/phone-plugin.cpp (+0/-83)
plugins/phone/plugin/phone-plugin.h (+0/-38)
plugins/phone/settings-phone.svg (+0/-82)
plugins/phone/sims.js (+0/-59)
To merge this branch: bzr merge lp:~phablet-team/ubuntu-system-settings/remove_dialer_settings
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Approve
Ubuntu Touch System Settings Pending
Review via email: mp+314641@code.launchpad.net

Commit message

Remove the phone settings. They were moved to dialer-app.

Description of the change

Remove the phone settings. They were moved to dialer-app.

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:1753
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/287/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2260
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/588
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2263
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2089
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2089
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2089
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2089
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2089
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2089
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2089
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2089
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2089/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2089
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2089/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/287/rebuild

review: Approve (continuous-integration)
1754. By Gustavo Pichorim Boiko

Merge trunk

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:1754
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/288/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/2269/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2272
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2098/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2098/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2098/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2098/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2098
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2098/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/288/rebuild

review: Needs Fixing (continuous-integration)
1755. By Tiago Salem Herrmann

merge parent

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:1755
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/3/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2307
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2306
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2129/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2129
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2129/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/3/rebuild

review: Approve (continuous-integration)

Unmerged revisions

1755. By Tiago Salem Herrmann

merge parent

1754. By Gustavo Pichorim Boiko

Merge trunk

1753. By Gustavo Pichorim Boiko

Remove the phone settings. They were moved to dialer-app.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/CMakeLists.txt'
2--- plugins/CMakeLists.txt 2016-11-11 15:20:42 +0000
3+++ plugins/CMakeLists.txt 2017-03-09 13:43:47 +0000
4@@ -15,7 +15,6 @@
5 add_subdirectory(mouse)
6 add_subdirectory(notifications)
7 add_subdirectory(orientation-lock)
8-add_subdirectory(phone)
9 add_subdirectory(reset)
10 add_subdirectory(security-privacy)
11 add_subdirectory(sound)
12
13=== removed directory 'plugins/phone'
14=== removed file 'plugins/phone/CMakeLists.txt'
15--- plugins/phone/CMakeLists.txt 2015-08-28 13:59:49 +0000
16+++ plugins/phone/CMakeLists.txt 1970-01-01 00:00:00 +0000
17@@ -1,29 +0,0 @@
18-add_subdirectory(plugin)
19-
20-set(QML_SOURCES
21- CallForwarding.qml
22- CallForwardItem.qml
23- CallWaiting.qml
24- KeyboardRectangle.qml
25- MultiSim.qml
26- NoSims.qml
27- Ofono.qml
28- PageComponent.qml
29- ServiceInfo.qml
30- Services.qml
31- SingleSim.qml
32- VCardParser.qml
33- callForwardingUtils.js
34- dateUtils.js
35- sims.js
36-)
37-
38-# We need a dummy target so the QML files show up in Qt Creator
39-# If this plugin gets some C++ sources, remove this.
40-add_custom_target(phone-holder
41-COMMAND echo This is just a dummy.
42-SOURCES ${QML_SOURCES})
43-
44-install(FILES ${QML_SOURCES} DESTINATION ${PLUGIN_QML_DIR}/phone)
45-install(FILES settings-phone.svg DESTINATION ${PLUGIN_MANIFEST_DIR}/icons)
46-install(FILES phone.settings DESTINATION ${PLUGIN_MANIFEST_DIR})
47
48=== removed file 'plugins/phone/CallForwardItem.qml'
49--- plugins/phone/CallForwardItem.qml 2016-07-12 16:41:13 +0000
50+++ plugins/phone/CallForwardItem.qml 1970-01-01 00:00:00 +0000
51@@ -1,240 +0,0 @@
52-/*
53- * This file is part of system-settings
54- *
55- * Copyright (C) 2015 Canonical Ltd.
56- *
57- * Contact: Jonas G. Drange <jonas.drange@canonical.com>
58- *
59- * This program is free software: you can redistribute it and/or modify it
60- * under the terms of the GNU General Public License version 3, as published
61- * by the Free Software Foundation.
62- *
63- * This program is distributed in the hope that it will be useful, but
64- * WITHOUT ANY WARRANTY; without even the implied warranties of
65- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
66- * PURPOSE. See the GNU General Public License for more details.
67- *
68- * You should have received a copy of the GNU General Public License along
69- * with this program. If not, see <http://www.gnu.org/licenses/>.
70- */
71-
72-import QtQuick 2.4
73-import Ubuntu.Components 1.3
74-import Ubuntu.Components.ListItems 1.3 as ListItem
75-import Ubuntu.Components.Themes.Ambiance 0.1
76-import MeeGo.QOfono 0.2
77-import "callForwardingUtils.js" as Utils
78-
79-Column {
80- id: item
81-
82- property OfonoCallForwarding callForwarding
83- property bool enabled: true
84- property string rule
85-
86- property alias checked: check.checked
87- property alias busy: d._pending
88- property alias text: control.text
89- property alias value: current.value
90- property alias field: field
91-
92- signal checked ()
93- signal failed ()
94- signal enteredEditMode ()
95- signal leftEditMode ()
96-
97- /**
98- * Saves the rule.
99- */
100- function save () {
101- d._pending = true;
102- if (!Utils.requestRule(field.text)) {
103- d._pending = false;
104- d._editing = false;
105- checked: callForwarding[rule] !== "";
106- }
107- }
108-
109- /**
110- * Cancels editing the rule.
111- */
112- function cancel () {
113- d._editing = false;
114- check.checked = callForwarding[rule] !== "";
115- }
116-
117- /**
118- * Private object that keeps track of state of the UI.
119- */
120- QtObject {
121- id: d
122-
123- /**
124- * Server is working.
125- */
126- property bool _pending: !callForwarding.ready
127-
128- /**
129- * Server failed to change/fetch setting.
130- */
131- property bool _failed: false
132-
133- /**
134- * We're editing.
135- */
136- property bool _editing: false
137- on_EditingChanged: Utils.editingChanged()
138-
139- /**
140- * Whether or not the forwarding rule is active.
141- */
142- property bool _active: callForwarding[rule] !== ""
143- }
144-
145- states: [
146- State {
147- name: "failed"
148- when: d._failed
149- PropertyChanges { target: control; enabled: false; control: check }
150- PropertyChanges { target: check; checked: false }
151- PropertyChanges { target: failed; visible: true }
152- PropertyChanges { target: activity; visible: false }
153- },
154- State {
155- name: "disabled"
156- when: !enabled
157- PropertyChanges { target: control; enabled: false }
158- PropertyChanges { target: check; enabled: false }
159- PropertyChanges { target: current; enabled: false }
160- },
161- State {
162- name: "requesting"
163- when: d._editing && d._pending
164- PropertyChanges { target: control; control: activity }
165- PropertyChanges { target: check; enabled: false; visible: false }
166- PropertyChanges { target: current; enabled: false; visible: true }
167- },
168- State {
169- name: "pending"
170- when: d._pending
171- PropertyChanges { target: control; control: activity }
172- PropertyChanges { target: check; enabled: false; visible: false }
173- PropertyChanges { target: current; enabled: false; visible: false }
174- },
175- State {
176- name: "editing"
177- when: d._editing
178- PropertyChanges { target: check; enabled: false }
179- PropertyChanges { target: current; visible: false }
180- PropertyChanges { target: input; visible: true }
181- },
182- State {
183- name: "active"
184- when: d._active
185- PropertyChanges { target: current; visible: true }
186- }
187- ]
188-
189- ListItem.ThinDivider { anchors { left: parent.left; right: parent.right }}
190-
191- ListItem.Standard {
192- id: control
193- onClicked: check.trigger(!check.checked)
194- control: CheckBox {
195- id: check
196- objectName: "check_" + rule
197- checked: callForwarding[rule] !== ""
198- onTriggered: Utils.checked(checked)
199- visible: !activity.running
200- }
201- }
202-
203- ListItem.Standard {
204- id: input
205- visible: false
206- height: visible ? units.gu(6) : 0
207- /* TRANSLATORS: This string will be truncated on smaller displays. */
208- text: i18n.tr("Forward to")
209- control: TextField {
210- id: field
211- objectName: "field_" + rule
212- horizontalAlignment: TextInput.AlignRight
213- inputMethodHints: Qt.ImhDialableCharactersOnly
214- text: callForwarding[rule]
215- font.pixelSize: units.dp(18)
216- font.weight: Font.Light
217- font.family: "Ubuntu"
218- color: "#AAAAAA"
219- maximumLength: 20
220- focus: true
221- cursorVisible: text === "" || text !== callForwarding[rule]
222- placeholderText: i18n.tr("Enter a number")
223- style: TextFieldStyle {
224- overlaySpacing: units.gu(0.5)
225- frameSpacing: 0
226- background: Rectangle {
227- property bool error: (field.hasOwnProperty("errorHighlight") &&
228- field.errorHighlight &&
229- !field.acceptableInput)
230- onErrorChanged: error ? theme.palette.normal.negative : color
231- color: Theme.palette.normal.background
232- anchors.fill: parent
233- visible: field.activeFocus
234- }
235- }
236-
237- onVisibleChanged:
238- if (visible === true) forceActiveFocus()
239- }
240-
241- Behavior on height {
242- NumberAnimation {
243- duration: UbuntuAnimation.SnapDuration
244- }
245- }
246- }
247-
248- ListItem.SingleValue {
249- id: current
250- objectName: "current_" + rule
251- visible: value
252- /* TRANSLATORS: This string will be truncated on smaller displays. */
253- text: i18n.tr("Forward to")
254- value: callForwarding[rule]
255- onClicked: d._editing = true
256- }
257-
258- /* Error message shown when updating fails. */
259- Label {
260- id: failed
261- anchors {
262- left: parent.left; right: parent.right; margins: units.gu(2);
263- }
264- visible: false
265- height: contentHeight + units.gu(4)
266- horizontalAlignment: Text.AlignHCenter
267- verticalAlignment: Text.AlignVCenter
268- color: theme.palette.normal.negative
269- text: i18n.tr("Call forwarding can’t be changed right now.")
270- }
271-
272- ActivityIndicator {
273- id: activity
274- running: d._pending
275- visible: running
276- }
277-
278- Connections {
279- target: item
280- Component.onCompleted: {
281- item.callForwarding[item.rule + 'Changed'].connect(Utils.ruleChanged);
282- item.callForwarding[item.rule + 'Complete'].connect(Utils.ruleComplete);
283- item.callForwarding.readyChanged.connect(Utils.ruleReadyChanged);
284- }
285- Component.onDestruction: {
286- item.callForwarding[item.rule + 'Changed'].disconnect(Utils.ruleChanged);
287- item.callForwarding[item.rule + 'Complete'].disconnect(Utils.ruleComplete);
288- item.callForwarding.readyChanged.disconnect(Utils.ruleReadyChanged);
289- }
290- }
291-}
292
293=== removed file 'plugins/phone/CallForwarding.qml'
294--- plugins/phone/CallForwarding.qml 2016-12-02 15:32:35 +0000
295+++ plugins/phone/CallForwarding.qml 1970-01-01 00:00:00 +0000
296@@ -1,397 +0,0 @@
297-/*
298- * This file is part of system-settings
299- *
300- * Copyright (C) 2013-2016 Canonical Ltd.
301- *
302- * Contact:
303- * Sebastien Bacher <sebastien.bacher@canonical.com>
304- * Jonas G. Drange <jonas.drange@canonical.com>
305- *
306- * This program is free software: you can redistribute it and/or modify it
307- * under the terms of the GNU General Public License version 3, as published
308- * by the Free Software Foundation.
309- *
310- * This program is distributed in the hope that it will be useful, but
311- * WITHOUT ANY WARRANTY; without even the implied warranties of
312- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
313- * PURPOSE. See the GNU General Public License for more details.
314- *
315- * You should have received a copy of the GNU General Public License along
316- * with this program. If not, see <http://www.gnu.org/licenses/>.
317- *
318- * TODO: Add centrally stored setting for each call forwarding that describes a
319- * contact. lp:1467816
320- *
321- * TODO: If a setting failed to be set, the error text should be followed by
322- * “Contact {carrier name} for more information.”.
323- */
324-
325-import QtQuick 2.4
326-import QtContacts 5.0
327-import MeeGo.QOfono 0.2
328-import SystemSettings 1.0
329-import Ubuntu.Components 1.3
330-import Ubuntu.Components.ListItems 1.3 as ListItem
331-import Ubuntu.Components.Popups 1.3
332-import Ubuntu.Components.Themes.Ambiance 0.1
333-import Ubuntu.Content 1.3
334-import "callForwardingUtils.js" as Utils
335-
336-ItemPage {
337- id: page
338- objectName: "callForwardingPage"
339- title: headerTitle
340- property var sim
341- property string headerTitle: i18n.tr("Call forwarding")
342- property QtObject editing: null
343- property QtObject activeItem: null
344- property var activeTransfer
345-
346- states: [
347- State {
348- name: "forwardBusy"
349- PropertyChanges { target: fwdSomeTitle; enabled: false }
350- PropertyChanges { target: fwdAll; enabled: false; }
351- PropertyChanges { target: fwdBusy; enabled: false; }
352- PropertyChanges { target: fwdLost; enabled: false; }
353- PropertyChanges { target: fwdUnreachable; enabled: false; }
354- when: fwdAll.busy || fwdBusy.busy || fwdLost.busy || fwdUnreachable.busy
355- },
356- State {
357- name: "forwardFailed"
358- PropertyChanges { target: fwdSomeTitle; enabled: false }
359- PropertyChanges { target: fwdFailedLabel; visible: true }
360- PropertyChanges { target: fwdAll; enabled: false; }
361- PropertyChanges { target: fwdBusy; enabled: false; }
362- PropertyChanges { target: fwdLost; enabled: false; }
363- PropertyChanges { target: fwdUnreachable; enabled: false; }
364- },
365- State {
366- name: "editing"
367- PropertyChanges { target: fwdAll; enabled: false; explicit: true }
368- PropertyChanges { target: fwdBusy; enabled: false; explicit: true }
369- PropertyChanges { target: fwdLost; enabled: false; explicit: true }
370- PropertyChanges { target: fwdUnreachable; enabled: false; explicit: true }
371- PropertyChanges { target: fwdSomeTitle; enabled: false }
372- StateChangeScript {
373- name: "editingEnabled"
374- script: {
375- editing.opacity = 1;
376- editing.enabled = true;
377- }
378- }
379- when: editing !== null
380- },
381- State {
382- name: "forwardAll"
383- PropertyChanges { target: fwdSomeTitle; }
384- PropertyChanges { target: fwdBusy; enabled: false; value: ""; checked: false }
385- PropertyChanges { target: fwdLost; enabled: false; value: ""; checked: false }
386- PropertyChanges { target: fwdUnreachable; enabled: false; value: ""; checked: false }
387- when: fwdAll.value !== ""
388- }
389- ]
390-
391- // We need to disable keyboard anchoring because we implement the
392- // KeyboardRectangle pattern
393- Binding {
394- target: main
395- property: "anchorToKeyboard"
396- value: false
397- }
398-
399- flickable: flick
400- Flickable {
401- id: flick
402-
403- // this is necessary to avoid the page to appear below the header
404- clip: true
405- flickableDirection: Flickable.VerticalFlick
406- anchors {
407- fill: parent
408- bottomMargin: keyboardButtons.height + keyboard.height
409- }
410- contentHeight: contents.height + units.gu(2)
411- contentWidth: parent.width
412-
413- // after add a new field we need to wait for the contentHeight to
414- // change to scroll to the correct position
415- onContentHeightChanged: Utils.show(page.activeItem)
416-
417- Column {
418- id: contents
419- anchors { left: parent.left; right: parent.right }
420- spacing: units.gu(1)
421-
422- CallForwardItem {
423- id: fwdAll
424- anchors { left: parent.left; right: parent.right }
425- rule: "voiceUnconditional"
426- callForwarding: callForwarding
427- text: i18n.tr("Forward every incoming call")
428- onEnteredEditMode: {page.editing = fwdAll; Utils.show(field)}
429- onLeftEditMode: page.editing = null
430- }
431-
432- Label {
433- id: fwdAllCaption
434- anchors {
435- left: parent.left; right: parent.right; margins: units.gu(1)
436- }
437- width: parent.width
438- wrapMode: Text.WordWrap
439- fontSize: "small"
440- horizontalAlignment: Text.AlignHCenter
441- verticalAlignment: Text.AlignVCenter
442- text: i18n.tr("Redirects all phone calls to another number.")
443- opacity: 0.8
444- }
445-
446- Label {
447- id: fwdFailedLabel
448- anchors {
449- left: parent.left; right: parent.right; margins: units.gu(2)
450- }
451- width: parent.width
452- wrapMode: Text.WordWrap
453- visible: false
454- text: i18n.tr("Call forwarding status can’t be checked " +
455- "now. Try again later.")
456- color: theme.palette.normal.negative
457- horizontalAlignment: Text.AlignHCenter
458- }
459-
460- SettingsItemTitle {
461- id: fwdSomeTitle
462- text: i18n.tr("Forward incoming calls when:")
463- }
464-
465- CallForwardItem {
466- id: fwdBusy
467- objectName: "fwdBusy"
468- anchors { left: parent.left; right: parent.right }
469- callForwarding: callForwarding
470- rule: "voiceBusy"
471- text: i18n.tr("I’m on another call")
472- onEnteredEditMode: {page.editing = fwdBusy; Utils.show(field)}
473- onLeftEditMode: page.editing = null
474- }
475-
476- CallForwardItem {
477- id: fwdLost
478- objectName: "fwdLost"
479- anchors { left: parent.left; right: parent.right }
480- callForwarding: callForwarding
481- rule: "voiceNoReply"
482- text: i18n.tr("I don’t answer")
483- onEnteredEditMode: {page.editing = fwdLost; Utils.show(field)}
484- onLeftEditMode: page.editing = null
485- }
486-
487- CallForwardItem {
488- id: fwdUnreachable
489- objectName: "fwdUnreachable"
490- anchors { left: parent.left; right: parent.right }
491- callForwarding: callForwarding
492- rule: "voiceNotReachable"
493- text: i18n.tr("My phone is unreachable")
494- onEnteredEditMode: {
495- page.editing = fwdUnreachable;
496- Utils.show(field);
497- }
498- onLeftEditMode: page.editing = null
499- }
500- }
501- } // Flickable
502-
503- Rectangle {
504- id: keyboardButtons
505- anchors {
506- left: parent.left
507- right: parent.right
508- bottom: keyboard.top
509- }
510- color: Theme.palette.selected.background
511- visible: editing !== null
512- height: units.gu(6)
513- Button {
514- id: kbdContacts
515- objectName: "contactsButton"
516- anchors {
517- left: parent.left
518- leftMargin: units.gu(1)
519- verticalCenter: parent.verticalCenter
520- }
521- activeFocusOnPress: false
522- enabled: editing && !editing.busy
523- text: i18n.tr("Contacts…")
524- onClicked: page.activeTransfer = contactPicker.request()
525- }
526-
527- Button {
528- id: kbdCancel
529- objectName: "cancelButton"
530- anchors {
531- right: kbdSet.left
532- rightMargin: units.gu(1)
533- verticalCenter: parent.verticalCenter
534- }
535- enabled: editing && !editing.busy
536- text: i18n.tr("Cancel")
537- onClicked: editing.cancel()
538- }
539-
540- Button {
541- id: kbdSet
542- objectName: "setButton"
543- anchors {
544- right: parent.right
545- rightMargin: units.gu(1)
546- verticalCenter: parent.verticalCenter
547- }
548- enabled: editing && !editing.busy && editing.field.text
549- text: i18n.tr("Set")
550- activeFocusOnPress: false
551- onClicked: editing.save()
552- }
553- }
554-
555- KeyboardRectangle {
556- id: keyboard
557- anchors.bottom: parent.bottom
558- onHeightChanged: {
559- if (page.activeItem) {
560- Utils.show(page.activeItem);
561- }
562- }
563- }
564-
565- Component {
566- id: chooseNumberDialog
567- Dialog {
568- id: dialog
569- property var contact
570- title: i18n.tr("Please select a phone number")
571-
572- ListItem.ItemSelector {
573- anchors {
574- left: parent.left
575- right: parent.right
576- }
577- activeFocusOnPress: false
578- expanded: true
579- text: i18n.tr("Numbers")
580- model: contact.phoneNumbers
581- selectedIndex: -1
582- delegate: OptionSelectorDelegate {
583- text: modelData.number
584- activeFocusOnPress: false
585- }
586- onDelegateClicked: {
587- editing.field.text = contact.phoneNumbers[index].number;
588- PopupUtils.close(dialog);
589- }
590- }
591- }
592- }
593-
594- Component {
595- id: hadNoNumberDialog
596- Dialog {
597- id: dialog
598- title: i18n.tr("Could not forward to this contact")
599- text: i18n.tr("Contact not associated with any phone number.")
600- Button {
601- text: i18n.tr("OK")
602- activeFocusOnPress: false
603- onClicked: PopupUtils.close(dialog)
604- }
605- }
606- }
607-
608- VCardParser {
609- id: contactParser
610-
611- function parseContact(vcardContact) {
612- return vcardContact;
613- }
614-
615- onVcardParsed: {
616- var contact;
617- if (contacts.length === 0) {
618- console.warn('no contacts parsed');
619- return;
620- } else {
621- contact = parseContact(contacts[0]);
622- if (contact.phoneNumbers.length < 1) {
623- PopupUtils.open(hadNoNumberDialog);
624- } else if (contact.phoneNumbers.length > 1) {
625- PopupUtils.open(chooseNumberDialog, page, {
626- 'contact': contact
627- });
628- } else {
629- editing.field.text = contact.phoneNumber.number;
630- }
631- }
632- }
633- }
634-
635- ContentTransferHint {
636- id: importHint
637- anchors.fill: parent
638- activeTransfer: page.activeTransfer
639- }
640-
641- ContentPeer {
642- id: contactPicker
643- contentType: ContentType.Contacts
644- handler: ContentHandler.Source
645- selectionType: ContentTransfer.Single
646- }
647-
648- Connections {
649- target: page.activeTransfer ? page.activeTransfer : null
650- onStateChanged: {
651- if (page.activeTransfer.state === ContentTransfer.Charged) {
652- contactParser.vCardUrl = page.activeTransfer.items[0].url;
653- }
654- }
655- }
656-
657- Connections {
658- target: callForwarding
659- onGetPropertiesFailed: page.state = "forwardFailed";
660- }
661-
662- OfonoCallForwarding {
663- id: callForwarding
664- modemPath: sim.path
665- function updateSummary () {
666- var val;
667-
668- // Clear the summary and exit if any of the values are unknown.
669- if (typeof voiceUnconditional === 'undefined' ||
670- typeof voiceBusy === 'undefined' ||
671- typeof voiceNoReply === 'undefined' ||
672- typeof voiceNotReachable === 'undefined') {
673- sim.setCallForwardingSummary('');
674- return;
675- }
676-
677- if (voiceUnconditional) {
678- val = i18n.tr("All calls");
679- } else if (voiceBusy || voiceNoReply || voiceNotReachable) {
680- val = i18n.tr("Some calls")
681- } else {
682- val = i18n.tr("Off")
683- }
684- sim.setCallForwardingSummary(val);
685- }
686-
687- Component.onCompleted: updateSummary()
688- onVoiceUnconditionalChanged: updateSummary()
689- onVoiceBusyChanged: updateSummary()
690- onVoiceNoReplyChanged: updateSummary()
691- onVoiceNotReachableChanged: updateSummary()
692- }
693-}
694
695=== removed file 'plugins/phone/CallWaiting.qml'
696--- plugins/phone/CallWaiting.qml 2016-07-12 16:41:13 +0000
697+++ plugins/phone/CallWaiting.qml 1970-01-01 00:00:00 +0000
698@@ -1,103 +0,0 @@
699-/*
700- * This file is part of system-settings
701- *
702- * Copyright (C) 2013 Canonical Ltd.
703- *
704- * Contact: Iain Lane <iain.lane@canonical.com>
705- *
706- * This program is free software: you can redistribute it and/or modify it
707- * under the terms of the GNU General Public License version 3, as published
708- * by the Free Software Foundation.
709- *
710- * This program is distributed in the hope that it will be useful, but
711- * WITHOUT ANY WARRANTY; without even the implied warranties of
712- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
713- * PURPOSE. See the GNU General Public License for more details.
714- *
715- * You should have received a copy of the GNU General Public License along
716- * with this program. If not, see <http://www.gnu.org/licenses/>.
717- */
718-
719-import QtQuick 2.4
720-import SystemSettings 1.0
721-import Ubuntu.Components 1.3
722-import Ubuntu.Components.ListItems 1.3 as ListItem
723-import MeeGo.QOfono 0.2
724-
725-ItemPage {
726- objectName: "callWaitingPage"
727- title: headerTitle
728- property var sim
729- property string headerTitle: i18n.tr("Call waiting")
730- property bool attached: sim.netReg.status === "registered" || sim.netReg.status === "roaming"
731-
732- OfonoCallSettings {
733- id: callSettings
734- modemPath: sim.path
735- onVoiceCallWaitingChanged: {
736- callWaitingIndicator.running = false;
737- }
738- onGetPropertiesFailed: {
739- console.warn('callSettings, onGetPropertiesFailed');
740- callWaitingIndicator.running = false;
741- }
742- onVoiceCallWaitingComplete: {
743- //When the property change is complete, the value of checked should always be in sync with serverChecked
744- callWaitingSwitch.checked = callWaitingSwitch.serverChecked
745- /* Log some additional output to help debug when things don't work */
746- console.warn('callSettings, onVoiceCallWaitingComplete modem: ' + modemPath + ' success: ' + success + ' ' + voiceCallWaiting);
747- callWaitingIndicator.running = false;
748- }
749- }
750-
751- ActivityIndicator {
752- id: callWaitingIndicator
753- running: true
754- visible: running && attached
755- }
756-
757- Switch {
758- id: callWaitingSwitch
759- objectName: "callWaitingSwitch"
760- visible: !callWaitingIndicator.running
761- enabled: callSettings.ready && attached
762- property bool serverChecked: callSettings.voiceCallWaiting !== "disabled"
763- onServerCheckedChanged: checked = serverChecked
764- Component.onCompleted: checked = serverChecked
765- onTriggered: {
766- callWaitingIndicator.running = true;
767- if (checked)
768- callSettings.voiceCallWaiting = "enabled";
769- else
770- callSettings.voiceCallWaiting = "disabled";
771- }
772- }
773-
774- Column {
775- anchors.fill: parent
776-
777- ListItem.Standard {
778- id: callWaitingItem
779- text: i18n.tr("Call waiting")
780- control: callWaitingIndicator.running ?
781- callWaitingIndicator : callWaitingSwitch
782- }
783-
784- ListItem.Base {
785- height: textItem.height + units.gu(2)
786- Label {
787- id: textItem
788- anchors {
789- left: parent.left
790- right: parent.right
791- verticalCenter: parent.verticalCenter
792- }
793-
794- text: i18n.tr("Lets you answer or start a new call while on another call, and switch between them")
795- horizontalAlignment: Text.AlignHCenter
796- wrapMode: Text.WordWrap
797- }
798- showDivider: false
799- }
800- }
801-}
802
803=== removed file 'plugins/phone/KeyboardRectangle.qml'
804--- plugins/phone/KeyboardRectangle.qml 2015-08-10 13:31:45 +0000
805+++ plugins/phone/KeyboardRectangle.qml 1970-01-01 00:00:00 +0000
806@@ -1,77 +0,0 @@
807-/*
808- * Copyright (C) 2015 Canonical, Ltd.
809- *
810- * This program is free software; you can redistribute it and/or modify
811- * it under the terms of the GNU General Public License as published by
812- * the Free Software Foundation; version 3.
813- *
814- * This program is distributed in the hope that it will be useful,
815- * but WITHOUT ANY WARRANTY; without even the implied warranty of
816- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
817- * GNU General Public License for more details.
818- *
819- * You should have received a copy of the GNU General Public License
820- * along with this program. If not, see <http://www.gnu.org/licenses/>.
821- */
822-
823-import QtQuick 2.4
824-
825-Item {
826- id: keyboardRect
827- anchors.left: parent.left
828- anchors.right: parent.right
829- anchors.bottom: parent.bottom
830- height: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
831-
832- Behavior on height {
833- NumberAnimation {
834- duration: 300
835- easing.type: Easing.InOutQuad
836- }
837- }
838-
839- states: [
840- State {
841- name: "hidden"
842- when: keyboardRect.height == 0
843- },
844- State {
845- name: "shown"
846- when: keyboardRect.height == Qt.inputMethod.keyboardRectangle.height
847- }
848- ]
849-
850- function recursiveFindFocusedItem(parent) {
851- if (parent.activeFocus) {
852- return parent;
853- }
854-
855- for (var i in parent.children) {
856- var child = parent.children[i];
857- if (child.activeFocus) {
858- return child;
859- }
860-
861- var item = recursiveFindFocusedItem(child);
862-
863- if (item != null) {
864- return item;
865- }
866- }
867-
868- return null;
869- }
870-
871- Connections {
872- target: Qt.inputMethod
873-
874- onVisibleChanged: {
875- if (!Qt.inputMethod.visible) {
876- var focusedItem = recursiveFindFocusedItem(keyboardRect.parent);
877- if (focusedItem != null) {
878- focusedItem.focus = false;
879- }
880- }
881- }
882- }
883-}
884
885=== removed file 'plugins/phone/MultiSim.qml'
886--- plugins/phone/MultiSim.qml 2016-12-08 14:05:28 +0000
887+++ plugins/phone/MultiSim.qml 1970-01-01 00:00:00 +0000
888@@ -1,120 +0,0 @@
889-/*
890- * Copyright (C) 2014 Canonical Ltd
891- *
892- * This program is free software: you can redistribute it and/or modify
893- * it under the terms of the GNU General Public License version 3 as
894- * published by the Free Software Foundation.
895- *
896- * This program is distributed in the hope that it will be useful,
897- * but WITHOUT ANY WARRANTY; without even the implied warranty of
898- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
899- * GNU General Public License for more details.
900- *
901- * You should have received a copy of the GNU General Public License
902- * along with this program. If not, see <http://www.gnu.org/licenses/>.
903- *
904- * Authors:
905- * Ken Vandine <ken.vandine@canonical.com>
906- * Jonas G. Drange <jonas.drange@canonical.com>
907- *
908-*/
909-import QtQuick 2.4
910-import GSettings 1.0
911-import SystemSettings 1.0
912-import Ubuntu.Components 1.3
913-import Ubuntu.Components.ListItems 1.3 as ListItem
914-
915-Column {
916-
917- property var sims
918-
919- Repeater {
920- model: sims
921-
922- Column {
923-
924- anchors { left: parent.left; right: parent.right }
925-
926- SettingsItemTitle { text: sims[index].title }
927-
928- ListItem.Standard {
929- objectName: "callWaitSim" + index
930- text: i18n.tr("Call waiting")
931- progression: true
932- onClicked: pageStack.addPageToNextColumn(root,
933- Qt.resolvedUrl("CallWaiting.qml"), {
934- sim: sims[index],
935- headerTitle: sims[index].title
936- }
937- )
938- }
939-
940- ListItem.SingleValue {
941- objectName: "callFwdSim" + index
942- text: i18n.tr("Call forwarding")
943- progression: true
944- value: sims[index].getCallForwardingSummary()
945- onClicked: pageStack.addPageToNextColumn(root,
946- Qt.resolvedUrl("CallForwarding.qml"), {
947- sim: sims[index],
948- headerTitle: sims[index].title
949- }
950- )
951- }
952-
953- ListItem.Standard {
954- objectName: "simServicesSim" + index
955- text: i18n.tr("Services")
956- progression: true
957- enabled: {
958- var num;
959- var map = sims[index].simMng.serviceNumbers;
960- var nums = false;
961- for(num in map) {
962- if (map.hasOwnProperty(num)) {
963- nums = true;
964- break;
965- }
966- }
967- return sims[index].simMng.present && nums;
968- }
969- showDivider: false
970- onClicked: pageStack.addPageToNextColumn(root,
971- Qt.resolvedUrl("Services.qml"), {
972- carrierString: sims[index].netReg.name,
973- sim: sims[index].simMng,
974- headerTitle: sims[index].title
975- }
976- )
977- }
978-
979- ListItem.Divider {
980- visible: index !== (sims.length - 1)
981- }
982-
983- Binding {
984- target: sims[index]
985- property: "name"
986- value: phoneSettings.simNames[modemsSorted[index]]
987- }
988- }
989- }
990-
991- GSettings {
992- id: phoneSettings
993- schema.id: "com.ubuntu.phone"
994- Component.onCompleted: {
995- // set default names
996- var simNames = phoneSettings.simNames;
997- var m0 = sims[0].path
998- var m1 = sims[1].path
999- if (!simNames[m0]) {
1000- simNames[m0] = "SIM 1";
1001- }
1002- if (!simNames[m1]) {
1003- simNames[m1] = "SIM 2";
1004- }
1005- phoneSettings.simNames = simNames;
1006- }
1007- }
1008-}
1009
1010=== removed file 'plugins/phone/NoSims.qml'
1011--- plugins/phone/NoSims.qml 2016-07-12 16:41:13 +0000
1012+++ plugins/phone/NoSims.qml 1970-01-01 00:00:00 +0000
1013@@ -1,46 +0,0 @@
1014-/*
1015- * Copyright (C) 2014 Canonical Ltd
1016- *
1017- * This program is free software: you can redistribute it and/or modify
1018- * it under the terms of the GNU General Public License version 3 as
1019- * published by the Free Software Foundation.
1020- *
1021- * This program is distributed in the hope that it will be useful,
1022- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1023- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1024- * GNU General Public License for more details.
1025- *
1026- * You should have received a copy of the GNU General Public License
1027- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1028- *
1029- * Authors:
1030- * Ken Vandine <ken.vandine@canonical.com>
1031- * Jonas G. Drange <jonas.drange@canonical.com>
1032- *
1033-*/
1034-import QtQuick 2.4
1035-import Ubuntu.Components 1.3
1036-import Ubuntu.Components.ListItems 1.3 as ListItem
1037-
1038-Column {
1039-
1040- ListItem.Standard {
1041- text: i18n.tr("Call forwarding")
1042- progression: true
1043- enabled: false
1044- }
1045-
1046- ListItem.Standard {
1047- text: i18n.tr("Call waiting")
1048- progression: true
1049- enabled: false
1050- }
1051-
1052- ListItem.Divider {}
1053-
1054- ListItem.Standard {
1055- text: i18n.tr("Services")
1056- progression: true
1057- enabled: false
1058- }
1059-}
1060
1061=== removed file 'plugins/phone/Ofono.qml'
1062--- plugins/phone/Ofono.qml 2015-11-09 12:37:42 +0000
1063+++ plugins/phone/Ofono.qml 1970-01-01 00:00:00 +0000
1064@@ -1,69 +0,0 @@
1065-/*
1066- * Copyright (C) 2014 Canonical Ltd
1067- *
1068- * This program is free software: you can redistribute it and/or modify
1069- * it under the terms of the GNU General Public License version 3 as
1070- * published by the Free Software Foundation.
1071- *
1072- * This program is distributed in the hope that it will be useful,
1073- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1074- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1075- * GNU General Public License for more details.
1076- *
1077- * You should have received a copy of the GNU General Public License
1078- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1079- *
1080- * Authors:
1081- * Jonas G. Drange <jonas.drange@canonical.com>
1082- *
1083-*/
1084-import QtQuick 2.4
1085-import GSettings 1.0
1086-import MeeGo.QOfono 0.2
1087-
1088-Item {
1089- property alias netReg: netReg
1090- property alias simMng: simMng
1091- property alias present: simMng.present
1092-
1093- property string path
1094- property string name
1095- property string title: {
1096- var number = simMng.subscriberNumbers[0] || simMng.subscriberIdentity;
1097- return name + (number ? " (" + number + ")" : "");
1098- }
1099-
1100- OfonoNetworkRegistration {
1101- id: netReg
1102- modemPath: path
1103- }
1104-
1105- OfonoSimManager {
1106- id: simMng
1107- modemPath: path
1108- }
1109-
1110- function setCallForwardingSummary (val) {
1111- var tmp = {};
1112- var fwdSum = settings.callforwardingSummaries;
1113- for (var k in fwdSum){
1114- if (fwdSum.hasOwnProperty(k)) {
1115- tmp[k] = fwdSum[k];
1116- }
1117- }
1118- // Prefer IMSI to identify the SIM, use ICCID if IMSI is not available.
1119- tmp[simMng.subscriberIdentity || simMng.CardIdentifier] = val;
1120- settings.callforwardingSummaries = tmp;
1121- }
1122-
1123- function getCallForwardingSummary () {
1124- // Use either IMSI or ICCID to identify the SIM.
1125- var sid = simMng.subscriberIdentity || simMng.CardIdentifier;
1126- return settings.callforwardingSummaries[sid] || '';
1127- }
1128-
1129- GSettings {
1130- id: settings
1131- schema.id: "com.ubuntu.touch.system-settings"
1132- }
1133-}
1134
1135=== removed file 'plugins/phone/PageComponent.qml'
1136--- plugins/phone/PageComponent.qml 2016-07-12 16:41:13 +0000
1137+++ plugins/phone/PageComponent.qml 1970-01-01 00:00:00 +0000
1138@@ -1,106 +0,0 @@
1139-/*
1140- * This file is part of system-settings
1141- *
1142- * Copyright (C) 2013 Canonical Ltd.
1143- *
1144- * Contact: Iain Lane <iain.lane@canonical.com>
1145- *
1146- * This program is free software: you can redistribute it and/or modify it
1147- * under the terms of the GNU General Public License version 3, as published
1148- * by the Free Software Foundation.
1149- *
1150- * This program is distributed in the hope that it will be useful, but
1151- * WITHOUT ANY WARRANTY; without even the implied warranties of
1152- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1153- * PURPOSE. See the GNU General Public License for more details.
1154- *
1155- * You should have received a copy of the GNU General Public License along
1156- * with this program. If not, see <http://www.gnu.org/licenses/>.
1157- */
1158-
1159-import QtQuick 2.4
1160-import SystemSettings 1.0
1161-import Ubuntu.Components 1.3
1162-import Ubuntu.Components.ListItems 1.3 as ListItem
1163-import Ubuntu.SystemSettings.Sound 1.0
1164-import MeeGo.QOfono 0.2
1165-import "sims.js" as Sims
1166-
1167-ItemPage {
1168- id: root
1169- objectName: "phonePage"
1170- title: i18n.tr("Phone")
1171- flickable: flick
1172-
1173- property var modemsSorted: []
1174- property var simsLoaded: 0
1175-
1176- states: [
1177- State {
1178- name: "noSim"
1179- StateChangeScript {
1180- script: loader.setSource("NoSims.qml")
1181- }
1182- when: (simsLoaded === 0) || (Sims.getPresentCount() === 0)
1183- },
1184- State {
1185- name: "singleSim"
1186- StateChangeScript {
1187- script: loader.setSource("SingleSim.qml", {
1188- sim: Sims.getFirstPresent()
1189- })
1190- }
1191- when: simsLoaded && (Sims.getPresentCount() === 1)
1192- },
1193- State {
1194- name: "multiSim"
1195- StateChangeScript {
1196- script: loader.setSource("MultiSim.qml", {
1197- sims: Sims.getAll()
1198- })
1199- }
1200- when: simsLoaded && (Sims.getPresentCount() > 1)
1201- }
1202- ]
1203-
1204- OfonoManager {
1205- id: manager
1206- onModemsChanged: {
1207- root.modemsSorted = modems.slice(0).sort();
1208- Sims.createQML();
1209- }
1210- }
1211-
1212- UbuntuSoundPanel { id: soundPlugin }
1213-
1214- Flickable {
1215- id: flick
1216- anchors.fill: parent
1217- contentWidth: parent.width
1218- contentHeight: contentItem.childrenRect.height
1219- boundsBehavior: (contentHeight > root.height) ?
1220- Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
1221-
1222- Column {
1223- anchors { left: parent.left; right: parent.right }
1224-
1225- Loader {
1226- id: loader
1227- anchors { left: parent.left; right: parent.right }
1228- }
1229-
1230- ListItem.Divider {}
1231-
1232- ListItem.Standard {
1233- control: Switch {
1234- objectName: "dialpadSounds"
1235- property bool serverChecked: soundPlugin.dialpadSoundsEnabled
1236- onServerCheckedChanged: checked = serverChecked
1237- Component.onCompleted: checked = serverChecked
1238- onTriggered: soundPlugin.dialpadSoundsEnabled = checked
1239- }
1240- text: i18n.tr("Dialpad tones")
1241- }
1242- }
1243- }
1244-}
1245
1246=== removed file 'plugins/phone/ServiceInfo.qml'
1247--- plugins/phone/ServiceInfo.qml 2016-07-12 16:41:13 +0000
1248+++ plugins/phone/ServiceInfo.qml 1970-01-01 00:00:00 +0000
1249@@ -1,124 +0,0 @@
1250-/*
1251- * This file is part of system-settings
1252- *
1253- * Copyright (C) 2013 Canonical Ltd.
1254- *
1255- * Contact: Sebastien Bacher <sebastien.bacher@canonical.com>
1256- *
1257- * This program is free software: you can redistribute it and/or modify it
1258- * under the terms of the GNU General Public License version 3, as published
1259- * by the Free Software Foundation.
1260- *
1261- * This program is distributed in the hope that it will be useful, but
1262- * WITHOUT ANY WARRANTY; without even the implied warranties of
1263- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1264- * PURPOSE. See the GNU General Public License for more details.
1265- *
1266- * You should have received a copy of the GNU General Public License along
1267- * with this program. If not, see <http://www.gnu.org/licenses/>.
1268- */
1269-
1270-import QtQuick 2.4
1271-import SystemSettings 1.0
1272-import Ubuntu.Components 1.3
1273-import Ubuntu.Components.ListItems 1.3 as ListItem
1274-import Ubuntu.History 0.1
1275-import "dateUtils.js" as DateUtils
1276-
1277-ItemPage {
1278- property string serviceName
1279- property string serviceNumber
1280- property string lastTimestamp
1281- title: serviceName
1282-
1283- HistoryEventModel {
1284- id: historyEventModel
1285- type: HistoryThreadModel.EventTypeVoice
1286- sort: HistorySort {
1287- sortField: "timestamp"
1288- sortOrder: HistorySort.DescendingOrder
1289- }
1290-
1291- property string phoneNumber: serviceNumber
1292- onCountChanged: lastTimestamp = historyEventModel.get(0).timestamp
1293-
1294- filter: HistoryUnionFilter {
1295- // FIXME: this is not the best API for this case, but will be changed later
1296- HistoryIntersectionFilter {
1297- HistoryFilter {
1298- property string threadId: historyEventModel.threadIdForParticipants("ofono/ofono/account0",
1299- HistoryThreadModel.EventTypeVoice,
1300- [historyEventModel.phoneNumber],
1301- HistoryThreadModel.MatchPhoneNumber);
1302- filterProperty: "threadId"
1303- filterValue: threadId != "" ? threadId : "something that won't match"
1304- }
1305- HistoryFilter {
1306- filterProperty: "accountId"
1307- filterValue: "ofono/ofono/account0"
1308- }
1309- }
1310-
1311- HistoryIntersectionFilter {
1312- HistoryFilter {
1313- property string threadId: historyEventModel.threadIdForParticipants("ofono/ofono/account1",
1314- HistoryThreadModel.EventTypeVoice,
1315- [historyEventModel.phoneNumber],
1316- HistoryThreadModel.MatchPhoneNumber);
1317- filterProperty: "threadId"
1318- filterValue: threadId != "" ? threadId : "something that won't match"
1319- }
1320- HistoryFilter {
1321- filterProperty: "accountId"
1322- filterValue: "ofono/ofono/account1"
1323- }
1324- }
1325- }
1326- }
1327-
1328- Column {
1329- anchors {
1330- left: parent.left
1331- right: parent.right
1332- verticalCenter: parent.verticalCenter
1333- }
1334-
1335- ListItem.Base {
1336- anchors.left: parent.left
1337- anchors.right: parent.right
1338- height: lastCalledCol.height + units.gu(6)
1339- Column {
1340- id: lastCalledCol
1341- anchors.left: parent.left
1342- anchors.right: parent.right
1343- height: childrenRect.height
1344- spacing: units.gu(2)
1345-
1346- Icon {
1347- anchors.horizontalCenter: parent.horizontalCenter
1348- name: "contact"
1349- width: 144
1350- height: width
1351- }
1352-
1353- Label {
1354- id: calledLabel
1355- objectName: "calledLabel"
1356- anchors.horizontalCenter: parent.horizontalCenter
1357- visible: lastTimestamp
1358- text: i18n.tr("Last called %1").arg(DateUtils.formatFriendlyDate(lastTimestamp))
1359- }
1360- }
1361- }
1362- }
1363-
1364- ListItem.SingleControl {
1365- anchors.bottom: parent.bottom
1366- control: Button {
1367- width: parent.width - units.gu(4)
1368- text: i18n.tr("Call")
1369- onClicked: Qt.openUrlExternally("tel:///" + encodeURIComponent(
1370- serviceNumber))
1371- }
1372- }
1373-}
1374
1375=== removed file 'plugins/phone/Services.qml'
1376--- plugins/phone/Services.qml 2016-12-06 15:38:02 +0000
1377+++ plugins/phone/Services.qml 1970-01-01 00:00:00 +0000
1378@@ -1,76 +0,0 @@
1379-/*
1380- * This file is part of system-settings
1381- *
1382- * Copyright (C) 2013 Canonical Ltd.
1383- *
1384- * Contact: Sebastien Bacher <sebastien.bacher@canonical.com>
1385- *
1386- * This program is free software: you can redistribute it and/or modify it
1387- * under the terms of the GNU General Public License version 3, as published
1388- * by the Free Software Foundation.
1389- *
1390- * This program is distributed in the hope that it will be useful, but
1391- * WITHOUT ANY WARRANTY; without even the implied warranties of
1392- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1393- * PURPOSE. See the GNU General Public License for more details.
1394- *
1395- * You should have received a copy of the GNU General Public License along
1396- * with this program. If not, see <http://www.gnu.org/licenses/>.
1397- */
1398-
1399-import QtQuick 2.4
1400-import SystemSettings 1.0
1401-import Ubuntu.Components 1.3
1402-import Ubuntu.Components.ListItems 1.3 as ListItem
1403-
1404-ItemPage {
1405- id: root
1406- objectName: "servicesPage"
1407- title: headerTitle
1408- flickable: scrollWidget
1409- property string carrierString
1410- property variant sim
1411- property var names: []
1412-
1413- // TRANSLATORS: %1 is the name of the (network) carrier
1414- property string headerTitle: i18n.tr("%1 Services").arg(carrierString)
1415-
1416-
1417- Component.onCompleted: {
1418- var keys = [];
1419- for (var x in sim.serviceNumbers) {
1420- keys.push(x);
1421- }
1422- names = keys;
1423- }
1424-
1425- Flickable {
1426- id: scrollWidget
1427- anchors.fill: parent
1428- contentHeight: contentItem.childrenRect.height
1429- boundsBehavior: (contentHeight > root.height) ?
1430- Flickable.DragAndOvershootBounds :
1431- Flickable.StopAtBounds
1432- /* Set the direction to workaround
1433- https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
1434- might end up in a situation where scrolling doesn't work */
1435- flickableDirection: Flickable.VerticalFlick
1436-
1437- Column {
1438- anchors.left: parent.left
1439- anchors.right: parent.right
1440- Repeater {
1441- model: names
1442-
1443- ListItem.Standard {
1444- progression: true
1445- text: modelData
1446- onClicked: pageStack.addPageToNextColumn(root,
1447- Qt.resolvedUrl("ServiceInfo.qml"), {
1448- serviceName: modelData,
1449- serviceNumber: sim.serviceNumbers[modelData]})
1450- }
1451- }
1452- }
1453- }
1454-}
1455
1456=== removed file 'plugins/phone/SingleSim.qml'
1457--- plugins/phone/SingleSim.qml 2016-12-08 14:05:28 +0000
1458+++ plugins/phone/SingleSim.qml 1970-01-01 00:00:00 +0000
1459@@ -1,74 +0,0 @@
1460-/*
1461- * Copyright (C) 2014 Canonical Ltd
1462- *
1463- * This program is free software: you can redistribute it and/or modify
1464- * it under the terms of the GNU General Public License version 3 as
1465- * published by the Free Software Foundation.
1466- *
1467- * This program is distributed in the hope that it will be useful,
1468- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1469- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1470- * GNU General Public License for more details.
1471- *
1472- * You should have received a copy of the GNU General Public License
1473- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1474- *
1475- * Authors:
1476- * Ken Vandine <ken.vandine@canonical.com>
1477- * Jonas G. Drange <jonas.drange@canonical.com>
1478- *
1479-*/
1480-import QtQuick 2.4
1481-import Ubuntu.Components 1.3
1482-import Ubuntu.Components.ListItems 1.3 as ListItem
1483-
1484-Column {
1485-
1486- property var sim
1487- property string carrierName: sim.netReg.name
1488- property string carrierString: carrierName ? carrierName : i18n.tr("SIM")
1489-
1490-
1491- ListItem.Standard {
1492- objectName: "callWait"
1493- text: i18n.tr("Call waiting")
1494- progression: true
1495- onClicked: pageStack.addPageToNextColumn(root,
1496- Qt.resolvedUrl("CallWaiting.qml"), {sim: sim})
1497- }
1498-
1499- ListItem.SingleValue {
1500- objectName: "callFwd"
1501- text: i18n.tr("Call forwarding")
1502- showDivider: false
1503- progression: true
1504- value: sim.getCallForwardingSummary()
1505- onClicked: pageStack.addPageToNextColumn(root,
1506- Qt.resolvedUrl("CallForwarding.qml"), {sim: sim})
1507- }
1508-
1509- ListItem.Divider {}
1510-
1511- ListItem.Standard {
1512- objectName: "simServices"
1513- // TRANSLATORS: %1 is the name of the (network) carrier
1514- text: i18n.tr("%1 Services").arg(carrierString)
1515- progression: true
1516- showDivider: false
1517- enabled: {
1518- var num;
1519- var map = sim.simMng.serviceNumbers;
1520- var nums = false;
1521- for(num in map) {
1522- if (map.hasOwnProperty(num)) {
1523- nums = true;
1524- break;
1525- }
1526- }
1527- return sim.simMng.present && nums;
1528- }
1529- onClicked: pageStack.addPageToNextColumn(root,
1530- Qt.resolvedUrl("Services.qml"),
1531- {carrierString: carrierString, sim: sim.simMng})
1532- }
1533-}
1534
1535=== removed file 'plugins/phone/VCardParser.qml'
1536--- plugins/phone/VCardParser.qml 2015-08-10 13:31:45 +0000
1537+++ plugins/phone/VCardParser.qml 1970-01-01 00:00:00 +0000
1538@@ -1,55 +0,0 @@
1539-/*
1540- * Copyright (C) 2015 Canonical, Ltd.
1541- *
1542- * This program is free software; you can redistribute it and/or modify
1543- * it under the terms of the GNU General Public License as published by
1544- * the Free Software Foundation; version 3.
1545- *
1546- * This program is distributed in the hope that it will be useful,
1547- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1548- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1549- * GNU General Public License for more details.
1550- *
1551- * You should have received a copy of the GNU General Public License
1552- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1553- */
1554-
1555-import QtQuick 2.4
1556-import QtContacts 5.0
1557-
1558-QtObject {
1559- id: root
1560-
1561- property string vCardUrl
1562- property alias contacts: contactsModel.contacts
1563- property var _model
1564-
1565- signal vcardParsed(int error)
1566-
1567- function clearModel()
1568- {
1569- if (contactsModel.contacts.length === 0)
1570- return;
1571-
1572- var ids = []
1573- for(var i=0, iMax=contactsModel.contacts.length; i < iMax; i++) {
1574- ids.push(contactsModel.contacts[i].contactId)
1575- }
1576- contactsModel.removeContacts(ids)
1577- }
1578-
1579- _model: ContactModel {
1580- id: contactsModel
1581-
1582- manager: "memory"
1583-
1584- onImportCompleted: vcardParsed(error)
1585- }
1586-
1587- onVCardUrlChanged: {
1588- if (vCardUrl.length > 0) {
1589- clearModel()
1590- contactsModel.importContacts(vCardUrl)
1591- }
1592- }
1593-}
1594
1595=== removed file 'plugins/phone/callForwardingUtils.js'
1596--- plugins/phone/callForwardingUtils.js 2015-11-06 12:22:09 +0000
1597+++ plugins/phone/callForwardingUtils.js 1970-01-01 00:00:00 +0000
1598@@ -1,126 +0,0 @@
1599-
1600-/**
1601- * Handle the user's intention when it checks the check mark
1602- * associated with this forwarding item.
1603- *
1604- * @param {Boolean} Value of check
1605-*/
1606-function checked (value) {
1607- if (value) {
1608- if (item.cachedRuleValue) {
1609- requestRule(item.cachedRuleValue);
1610- } else {
1611- d._editing = true;
1612- }
1613- } else {
1614- if (d._editing) {
1615- d._editing = false;
1616- } else {
1617- requestRule('');
1618- }
1619- }
1620-}
1621-
1622-/**
1623- * Request that the rule be changed on the backend.
1624- *
1625- * @param {String} new rule value
1626- * @return {Boolean} whether or not we requested a change
1627- */
1628-function requestRule (value) {
1629- value = normalizePhoneNumber(value);
1630- if (value === item.callForwarding[item.rule]) {
1631- console.warn('Value did not change.');
1632- return false;
1633- }
1634-
1635- item.callForwarding[item.rule] = value;
1636- d._pending = true;
1637- return true;
1638-}
1639-
1640-/**
1641- * Handler for when the component enter or leaves editing mode.
1642- */
1643-function editingChanged () {
1644- if (d._editing) {
1645- item.enteredEditMode();
1646- } else {
1647- item.leftEditMode();
1648- }
1649-}
1650-
1651-/**
1652- * Handler for when the rule changes on the backend.
1653- *
1654- * @param {String} the new property
1655- */
1656-function ruleChanged (property) {
1657- check.checked = callForwarding[rule] !== "";
1658-}
1659-
1660-/**
1661- * Handler for when the backend responds.
1662- *
1663- * @param {Boolean} whether or not the backend succeeded
1664- */
1665-function ruleComplete (success) {
1666- d._pending = false;
1667- d._editing = false;
1668- if (!success) {
1669- d._failed = true;
1670- }
1671-}
1672-
1673-/**
1674- * Handler for when the rule ready changes.
1675- */
1676-function ruleReadyChanged () {
1677- d._pending = !callForwarding.ready;
1678-}
1679-
1680-/**
1681- * Scroll something into view.
1682- *
1683- * @param {QtObject} item to scroll to.
1684- */
1685-function show(item) {
1686- if (!item) {
1687- return;
1688- }
1689- page.activeItem = item;
1690-
1691- var position = flick.contentItem.mapFromItem(item, 0, page.activeItem.y);
1692-
1693- // check if the item is already visible
1694- var bottomY = flick.contentY + flick.height;
1695- var itemBottom = position.y + item.height + units.gu(2); // extra margin
1696- if (position.y >= flick.contentY && itemBottom <= bottomY) {
1697- return;
1698- }
1699-
1700- // if it is not, try to scroll and make it visible
1701- var targetY = itemBottom - flick.height;
1702- if (targetY >= 0 && position.y) {
1703- flick.contentY = targetY;
1704- } else if (position.y < flick.contentY) {
1705- // if it is hidden at the top, also show it
1706- flick.contentY = position.y;
1707- }
1708- flick.returnToBounds();
1709-}
1710-
1711-/**
1712- * Normalizes a phone number.
1713- *
1714- * TODO(jgdx): Remove this and replace it with libphonenumber
1715- *
1716- * @param {String} number to normalize
1717- * @return {String} normalized number
1718- */
1719-function normalizePhoneNumber(identifier) {
1720- var regexp = new RegExp('[()/-]', 'g');
1721- var finalNumber = identifier.replace(/\s+/g, '');
1722- finalNumber = finalNumber.replace(regexp, '');
1723- return finalNumber;
1724-}
1725
1726=== removed file 'plugins/phone/dateUtils.js'
1727--- plugins/phone/dateUtils.js 2014-06-17 05:48:07 +0000
1728+++ plugins/phone/dateUtils.js 1970-01-01 00:00:00 +0000
1729@@ -1,69 +0,0 @@
1730-/*
1731- * Copyright 2012-2013 Canonical Ltd.
1732- *
1733- * This file is part of dialer-app.
1734- *
1735- * dialer-app is free software; you can redistribute it and/or modify
1736- * it under the terms of the GNU General Public License as published by
1737- * the Free Software Foundation; version 3.
1738- *
1739- * dialer-app is distributed in the hope that it will be useful,
1740- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1741- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1742- * GNU General Public License for more details.
1743- *
1744- * You should have received a copy of the GNU General Public License
1745- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1746- */
1747-
1748-function areSameDay(date1, date2) {
1749- return date1.getFullYear() == date2.getFullYear()
1750- && date1.getMonth() == date2.getMonth()
1751- && date1.getDate() == date2.getDate()
1752-}
1753-
1754-function formatLogDate(timestamp) {
1755- var today = new Date()
1756- var date = new Date(timestamp)
1757- if (areSameDay(today, date)) {
1758- return Qt.formatTime(timestamp, Qt.DefaultLocaleShortDate)
1759- } else {
1760- return Qt.formatDateTime(timestamp, Qt.DefaultLocaleShortDate)
1761- }
1762-}
1763-
1764-function friendlyDay(timestamp) {
1765- var date = new Date(timestamp);
1766- var today = new Date();
1767- var yesterday = new Date();
1768- yesterday.setDate(today.getDate()-1);
1769- if (areSameDay(today, date)) {
1770- return i18n.tr("Today");
1771- } else if (areSameDay(yesterday, date)) {
1772- return i18n.tr("Yesterday");
1773- } else {
1774- return Qt.formatDate(date, Qt.DefaultLocaleShortDate);
1775- }
1776-}
1777-
1778-function formatFriendlyDate(timestamp) {
1779- return Qt.formatTime(timestamp, Qt.DefaultLocaleShortDate) + " - " + friendlyDay(timestamp);
1780-}
1781-
1782-function formatFriendlyCallDuration(duration) {
1783- var text = "";
1784-
1785- var hours = parseInt(Qt.formatTime(duration, "hh"));
1786- var minutes = parseInt(Qt.formatTime(duration, "mm"));
1787- var seconds = parseInt(Qt.formatTime(duration, "ss"));
1788-
1789- if (hours > 0) {
1790- text = i18n.tr("%1 hour", "%1 hours", hours).arg(hours)
1791- } else if (minutes > 0) {
1792- text = i18n.tr("%1 min", "%1 mins", minutes).arg(minutes)
1793- } else {
1794- text = i18n.tr("%1 sec", "%1 secs", seconds).arg(seconds)
1795- }
1796-
1797- return text;
1798-}
1799
1800=== removed file 'plugins/phone/phone.settings'
1801--- plugins/phone/phone.settings 2015-08-28 13:59:49 +0000
1802+++ plugins/phone/phone.settings 1970-01-01 00:00:00 +0000
1803@@ -1,24 +0,0 @@
1804-{
1805- "plugin": "phone-plugin",
1806- "icon": "preferences-system-phone-symbolic",
1807- "name": "Phone",
1808- "translations": "ubuntu-system-settings",
1809- "category": "system",
1810- "priority": 2,
1811- "form-factors": [
1812- "phone"
1813- ],
1814- "keywords": [
1815- "phone",
1816- "services",
1817- "forwarding",
1818- "waiting",
1819- "call",
1820- "dialpad",
1821- "shortcuts",
1822- "numbers"
1823- ],
1824- "page-component": "PageComponent.qml",
1825- "has-dynamic-keywords": false,
1826- "has-dynamic-visibility": true
1827-}
1828
1829=== removed directory 'plugins/phone/plugin'
1830=== removed file 'plugins/phone/plugin/CMakeLists.txt'
1831--- plugins/phone/plugin/CMakeLists.txt 2015-11-05 21:25:13 +0000
1832+++ plugins/phone/plugin/CMakeLists.txt 1970-01-01 00:00:00 +0000
1833@@ -1,6 +0,0 @@
1834-include_directories(${CMAKE_CURRENT_BINARY_DIR})
1835-
1836-add_library(phone-plugin SHARED phone-plugin.h phone-plugin.cpp)
1837-qt5_use_modules(phone-plugin Core Qml DBus)
1838-target_link_libraries(phone-plugin SystemSettings)
1839-install(TARGETS phone-plugin DESTINATION ${PLUGIN_MODULE_DIR})
1840
1841=== removed file 'plugins/phone/plugin/phone-plugin.cpp'
1842--- plugins/phone/plugin/phone-plugin.cpp 2016-09-01 14:07:14 +0000
1843+++ plugins/phone/plugin/phone-plugin.cpp 1970-01-01 00:00:00 +0000
1844@@ -1,83 +0,0 @@
1845-/*
1846- * This file is part of system-settings
1847- *
1848- * Copyright (C) 2015 Canonical Ltd.
1849- *
1850- * Contact: Ken VanDine <ken.vandine@canonical.com>
1851- *
1852- * This program is free software: you can redistribute it and/or modify it
1853- * under the terms of the GNU General Public License version 3, as published
1854- * by the Free Software Foundation.
1855- *
1856- * This program is distributed in the hope that it will be useful, but
1857- * WITHOUT ANY WARRANTY; without even the implied warranties of
1858- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1859- * PURPOSE. See the GNU General Public License for more details.
1860- *
1861- * You should have received a copy of the GNU General Public License along
1862- * with this program. If not, see <http://www.gnu.org/licenses/>.
1863- */
1864-
1865-#include "phone-plugin.h"
1866-
1867-#include <QDebug>
1868-#include <QDBusInterface>
1869-#include <QDBusPendingReply>
1870-#include <QProcessEnvironment>
1871-#include <QtDBus>
1872-#include <SystemSettings/ItemBase>
1873-
1874-using namespace SystemSettings;
1875-
1876-class PhoneItem: public ItemBase
1877-{
1878- Q_OBJECT
1879-
1880-public:
1881- explicit PhoneItem(const QVariantMap &staticData, QObject *parent = 0);
1882- void setVisibility(bool visible);
1883-};
1884-
1885-
1886-PhoneItem::PhoneItem(const QVariantMap &staticData, QObject *parent):
1887- ItemBase(staticData, parent)
1888-{
1889- QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
1890- if (env.contains(QLatin1String("USS_SHOW_ALL_UI"))) {
1891- QString showAllS = env.value("USS_SHOW_ALL_UI", QString());
1892-
1893- if(!showAllS.isEmpty()) {
1894- setVisibility(true);
1895- return;
1896- }
1897- }
1898-
1899- bool supportedDevice(false);
1900-
1901- QDBusInterface m_NetStatusPropertiesIface(
1902- "com.ubuntu.connectivity1",
1903- "/com/ubuntu/connectivity1/NetworkingStatus",
1904- "org.freedesktop.DBus.Properties",
1905- QDBusConnection::sessionBus());
1906- QDBusPendingReply<QVariant> modemReply = m_NetStatusPropertiesIface.call(
1907- "Get", "com.ubuntu.connectivity1.NetworkingStatus", "ModemAvailable");
1908- modemReply.waitForFinished();
1909- if (modemReply.isValid()) {
1910- supportedDevice = modemReply.argumentAt<0>().toBool();
1911- }
1912-
1913- setVisibility(supportedDevice);
1914-}
1915-
1916-void PhoneItem::setVisibility(bool visible)
1917-{
1918- setVisible(visible);
1919-}
1920-
1921-ItemBase *PhonePlugin::createItem(const QVariantMap &staticData,
1922- QObject *parent)
1923-{
1924- return new PhoneItem(staticData, parent);
1925-}
1926-
1927-#include "phone-plugin.moc"
1928
1929=== removed file 'plugins/phone/plugin/phone-plugin.h'
1930--- plugins/phone/plugin/phone-plugin.h 2015-08-28 13:59:49 +0000
1931+++ plugins/phone/plugin/phone-plugin.h 1970-01-01 00:00:00 +0000
1932@@ -1,38 +0,0 @@
1933-/*
1934- * This file is part of system-settings
1935- *
1936- * Copyright (C) 2015 Canonical Ltd.
1937- *
1938- * Contact: Ken VanDine <ken.vandine@canonical.com>
1939- *
1940- * This program is free software: you can redistribute it and/or modify it
1941- * under the terms of the GNU General Public License version 3, as published
1942- * by the Free Software Foundation.
1943- *
1944- * This program is distributed in the hope that it will be useful, but
1945- * WITHOUT ANY WARRANTY; without even the implied warranties of
1946- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1947- * PURPOSE. See the GNU General Public License for more details.
1948- *
1949- * You should have received a copy of the GNU General Public License along
1950- * with this program. If not, see <http://www.gnu.org/licenses/>.
1951- */
1952-
1953-#ifndef SYSTEM_SETTINGS_PHONE_PLUGIN_H
1954-#define SYSTEM_SETTINGS_PHONE_PLUGIN_H
1955-
1956-#include <QObject>
1957-#include <SystemSettings/PluginInterface>
1958-
1959-class PhonePlugin: public QObject, public SystemSettings::PluginInterface2
1960-{
1961- Q_OBJECT
1962- Q_PLUGIN_METADATA(IID "com.ubuntu.SystemSettings.PluginInterface/2.0")
1963- Q_INTERFACES(SystemSettings::PluginInterface2)
1964-
1965-public:
1966- SystemSettings::ItemBase *createItem(const QVariantMap &staticData,
1967- QObject *parent = 0);
1968-};
1969-
1970-#endif // SYSTEM_SETTINGS_PHONE_PLUGIN_H
1971
1972=== removed file 'plugins/phone/settings-phone.svg'
1973--- plugins/phone/settings-phone.svg 2013-06-28 15:09:38 +0000
1974+++ plugins/phone/settings-phone.svg 1970-01-01 00:00:00 +0000
1975@@ -1,82 +0,0 @@
1976-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1977-<!-- Created with Inkscape (http://www.inkscape.org/) -->
1978-
1979-<svg
1980- xmlns:dc="http://purl.org/dc/elements/1.1/"
1981- xmlns:cc="http://creativecommons.org/ns#"
1982- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1983- xmlns:svg="http://www.w3.org/2000/svg"
1984- xmlns="http://www.w3.org/2000/svg"
1985- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
1986- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
1987- width="90"
1988- height="90"
1989- id="svg4230"
1990- version="1.1"
1991- inkscape:version="0.48+devel r12322"
1992- sodipodi:docname="setting-phone.svg">
1993- <defs
1994- id="defs4232" />
1995- <sodipodi:namedview
1996- id="base"
1997- pagecolor="#ffffff"
1998- bordercolor="#666666"
1999- borderopacity="1.0"
2000- inkscape:pageopacity="0.0"
2001- inkscape:pageshadow="2"
2002- inkscape:zoom="5.0931703"
2003- inkscape:cx="-22.186575"
2004- inkscape:cy="6.4792647"
2005- inkscape:document-units="px"
2006- inkscape:current-layer="layer1-57"
2007- showgrid="false"
2008- fit-margin-top="0"
2009- fit-margin-left="0"
2010- fit-margin-right="0"
2011- fit-margin-bottom="0" />
2012- <metadata
2013- id="metadata4235">
2014- <rdf:RDF>
2015- <cc:Work
2016- rdf:about="">
2017- <dc:format>image/svg+xml</dc:format>
2018- <dc:type
2019- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
2020- <dc:title></dc:title>
2021- </cc:Work>
2022- </rdf:RDF>
2023- </metadata>
2024- <g
2025- inkscape:label="Layer 1"
2026- inkscape:groupmode="layer"
2027- id="layer1"
2028- transform="translate(-0.7143,-261.64789)">
2029- <g
2030- transform="translate(0.7143,-700.42863)"
2031- id="g4081"
2032- inkscape:label="Layer 1">
2033- <g
2034- transform="translate(0,-1.1427923)"
2035- id="layer1-57"
2036- inkscape:label="Layer 1">
2037- <g
2038- id="g3517"
2039- transform="matrix(-1,0,0,1,1752,1059.4285)">
2040- <rect
2041- style="opacity:0.4;fill:none;stroke:none"
2042- id="rect4257"
2043- width="90"
2044- height="90"
2045- x="1662"
2046- y="-96.209198" />
2047- <path
2048- style="fill:#808080;fill-opacity:1;stroke:none"
2049- d="m 1726.7893,-21.209209 c -22.1319,0 -49.7893,-29.267633 -49.7893,-49.722301 0,-1.603945 6.1465,-13.109163 9.6367,-9.623673 4.8183,4.811829 9.6366,14.435502 8.0304,17.6434 -1.3543,2.705122 -6.4243,1.709946 -6.4243,4.811821 0,3.101899 6.9597,6.950443 11.2427,11.227626 4.2829,4.27719 11.4203,14.435501 14.4549,14.435501 3.2059,0 2.5001,-5.079151 4.8184,-6.415766 3.1273,-1.803138 12.8488,3.207883 17.6671,8.019719 C 1739.6381,-27.624998 1728.3954,-21.209209 1726.7893,-21.209209 Z"
2050- id="path4259"
2051- inkscape:connector-curvature="0"
2052- sodipodi:nodetypes="ccsszzsssc" />
2053- </g>
2054- </g>
2055- </g>
2056- </g>
2057-</svg>
2058
2059=== removed file 'plugins/phone/sims.js'
2060--- plugins/phone/sims.js 2015-01-14 00:00:41 +0000
2061+++ plugins/phone/sims.js 1970-01-01 00:00:00 +0000
2062@@ -1,59 +0,0 @@
2063-var sims = [];
2064-
2065-function add (sim) {
2066- sims.push(sim);
2067- root.simsLoaded++;
2068-}
2069-
2070-function getAll () {
2071- return sims;
2072-}
2073-
2074-function get (n) {
2075- return getAll()[n];
2076-}
2077-
2078-function getFirstPresent () {
2079- return getPresent()[0];
2080-}
2081-
2082-function getCount () {
2083- return getAll().length;
2084-}
2085-
2086-function getPresent () {
2087- var present = [];
2088- getAll().forEach(function (sim) {
2089- if (sim.present) {
2090- present.push(sim);
2091- } else {
2092- return;
2093- }
2094- });
2095- return present;
2096-}
2097-
2098-function getPresentCount () {
2099- return getPresent().length;
2100-}
2101-
2102-function createQML () {
2103- var component = Qt.createComponent("Ofono.qml");
2104-
2105- sims.forEach(function (sim) {
2106- sim.destroy();
2107- });
2108- sims = [];
2109-
2110- root.modemsSorted.forEach(function (path) {
2111- var sim = component.createObject(root, {
2112- path: path
2113- });
2114- if (sim === null) {
2115- console.warn('Failed to create Sim qml:',
2116- component.errorString());
2117- } else {
2118- Sims.add(sim);
2119- }
2120- });
2121-}

Subscribers

People subscribed via source and target branches