Merge lp:~phablet-team/dialer-app/phone_settings into lp:dialer-app/staging

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Renato Araujo Oliveira Filho
Approved revision: 574
Merged at revision: 559
Proposed branch: lp:~phablet-team/dialer-app/phone_settings
Merge into: lp:dialer-app/staging
Prerequisite: lp:~phablet-team/dialer-app/expand-dialer
Diff against target: 3554 lines (+2449/-153)
58 files modified
TODO (+1/-0)
debian/dialer-app.install (+1/-0)
po/dialer-app.pot (+253/-111)
src/qml/AccountsModel.qml (+1/-1)
src/qml/CMakeLists.txt (+1/-0)
src/qml/ContactsPage/ContactsPage.qml (+1/-1)
src/qml/ContactsPage/KeyboardRectagle.qml (+1/-1)
src/qml/DialerPage/CallButton.qml (+1/-1)
src/qml/DialerPage/CustomButton.qml (+1/-1)
src/qml/DialerPage/DialerBottomEdge.qml (+1/-1)
src/qml/DialerPage/DialerPage.qml (+12/-3)
src/qml/DialerPage/KeypadButton.qml (+1/-1)
src/qml/DialerPage/KeypadEntry.qml (+1/-1)
src/qml/Dialogs/DisableFlightModeDialog.qml (+1/-1)
src/qml/Dialogs/FlightModeProgressDialog.qml (+1/-1)
src/qml/Dialogs/NoDefaultSIMCardDialog.qml (+1/-1)
src/qml/Dialogs/NotificationDialog.qml (+1/-1)
src/qml/Dialogs/SetDefaultSIMCardDialog.qml (+1/-1)
src/qml/Dialogs/SimLockedDialog.qml (+1/-1)
src/qml/Dialogs/UssdErrorDialog.qml (+1/-1)
src/qml/Dialogs/UssdProgressDialog.qml (+1/-1)
src/qml/Dialogs/UssdResponseDialog.qml (+1/-1)
src/qml/HistoryPage/ExpandableButton.qml (+1/-1)
src/qml/HistoryPage/HistoryDelegate.qml (+1/-1)
src/qml/HistoryPage/HistoryDetailsPage.qml (+1/-1)
src/qml/HistoryPage/HistoryPage.qml (+1/-1)
src/qml/HistoryPage/SwipeItemDemo.qml (+1/-1)
src/qml/InputInfo.qml (+1/-1)
src/qml/LiveCallPage/ConferenceCallDisplay.qml (+1/-1)
src/qml/LiveCallPage/HangupButton.qml (+1/-1)
src/qml/LiveCallPage/LiveCall.qml (+12/-4)
src/qml/LiveCallPage/LiveCallKeypadButton.qml (+1/-1)
src/qml/LiveCallPage/MultiCallDisplay.qml (+1/-1)
src/qml/LiveCallPage/StopWatch.qml (+1/-1)
src/qml/MMI/IMEI.qml (+1/-1)
src/qml/MMI/IMEIDialog.qml (+1/-1)
src/qml/SettingsPage/AccountSettings/CMakeLists.txt (+6/-0)
src/qml/SettingsPage/AccountSettings/SipNumberRewrite.qml (+177/-0)
src/qml/SettingsPage/AccountSettings/sip.qml (+30/-0)
src/qml/SettingsPage/CMakeLists.txt (+8/-0)
src/qml/SettingsPage/CallForwardItem.qml (+240/-0)
src/qml/SettingsPage/CallForwarding.qml (+393/-0)
src/qml/SettingsPage/CallWaiting.qml (+108/-0)
src/qml/SettingsPage/KeyboardRectangle.qml (+77/-0)
src/qml/SettingsPage/MultiSim.qml (+113/-0)
src/qml/SettingsPage/NoSims.qml (+46/-0)
src/qml/SettingsPage/Ofono.qml (+69/-0)
src/qml/SettingsPage/OnlineAccountsHelper.qml (+96/-0)
src/qml/SettingsPage/ServiceInfo.qml (+133/-0)
src/qml/SettingsPage/Services.qml (+74/-0)
src/qml/SettingsPage/SettingsItemTitle.qml (+44/-0)
src/qml/SettingsPage/SettingsPage.qml (+158/-0)
src/qml/SettingsPage/SettingsTextField.qml (+29/-0)
src/qml/SettingsPage/SingleSim.qml (+69/-0)
src/qml/SettingsPage/VCardParser.qml (+55/-0)
src/qml/SettingsPage/callForwardingUtils.js (+126/-0)
src/qml/SettingsPage/dateUtils.js (+69/-0)
src/qml/dialer-app.qml (+19/-5)
To merge this branch: bzr merge lp:~phablet-team/dialer-app/phone_settings
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) Approve
Review via email: mp+320669@code.launchpad.net

This proposal supersedes a proposal from 2017-01-12.

Commit message

Move the phone settings from ubuntu-system-settings to dialer-app.

Description of the change

Move the phone settings from ubuntu-system-settings to dialer-app.

To post a comment you must log in.
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote : Posted in a previous version of this proposal

Should we use the new ListItem to correct handle keyboard navigation and other theme related features?

Some small inline comments.

review: Needs Fixing
572. By Gustavo Pichorim Boiko

Remove unused file.

573. By Gustavo Pichorim Boiko

Update to QtQuick 2.4

574. By Gustavo Pichorim Boiko

Add a TODO file with the pending items.

Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Regarding the ListItem usage, this code was imported from ubuntu-system-settings. There are more things to update in there, so this will be addressed in a separate MR. The other comments (that were placed in the diff of the previous version of this MR) were addressed.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'TODO'
--- TODO 1970-01-01 00:00:00 +0000
+++ TODO 2017-03-22 17:10:08 +0000
@@ -0,0 +1,1 @@
1- port the settings page to use the new SDK ListItem to fix keyboard navigation
02
=== modified file 'debian/dialer-app.install'
--- debian/dialer-app.install 2015-04-30 18:10:29 +0000
+++ debian/dialer-app.install 2017-03-22 17:10:08 +0000
@@ -8,6 +8,7 @@
8usr/share/dialer-app/ContactsPage8usr/share/dialer-app/ContactsPage
9usr/share/dialer-app/ContactViewPage9usr/share/dialer-app/ContactViewPage
10usr/share/dialer-app/ContactEditorPage10usr/share/dialer-app/ContactEditorPage
11usr/share/dialer-app/SettingsPage
11usr/share/dialer-app/Dialogs12usr/share/dialer-app/Dialogs
12usr/share/dialer-app/assets13usr/share/dialer-app/assets
13usr/share/dialer-app/MMI14usr/share/dialer-app/MMI
1415
=== modified file 'po/dialer-app.pot'
--- po/dialer-app.pot 2015-07-15 13:54:05 +0000
+++ po/dialer-app.pot 2017-03-22 17:10:08 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-07-15 10:53-0300\n"11"POT-Creation-Date: 2017-01-12 16:58-0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,17 +18,25 @@
18"Content-Transfer-Encoding: 8bit\n"18"Content-Transfer-Encoding: 8bit\n"
19"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"19"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
2020
21#: ../src/qml/DialerPage/Keypad.qml:17421#: ../src/qml/DialerPage/Keypad.qml:242
22msgid "#"22msgid "#"
23msgstr ""23msgstr ""
2424
25#. TRANSLATORS: %1 is the call duration here.25#. TRANSLATORS: %1 is the call duration here.
26#: ../src/qml/LiveCallPage/LiveCall.qml:44326#: ../src/qml/LiveCallPage/LiveCall.qml:454
27#, qt-format27#, qt-format
28msgid "%1 - on hold"28msgid "%1 - on hold"
29msgstr ""29msgstr ""
3030
31#. TRANSLATORS: %1 is the name of the (network) carrier
32#: ../src/qml/SettingsPage/Services.qml:34
33#: ../src/qml/SettingsPage/SingleSim.qml:51
34#, qt-format
35msgid "%1 Services"
36msgstr ""
37
31#: ../src/qml/HistoryPage/dateUtils.js:9238#: ../src/qml/HistoryPage/dateUtils.js:92
39#: ../src/qml/SettingsPage/dateUtils.js:61
32#, qt-format40#, qt-format
33msgid "%1 hour"41msgid "%1 hour"
34msgid_plural "%1 hours"42msgid_plural "%1 hours"
@@ -36,6 +44,7 @@
36msgstr[1] ""44msgstr[1] ""
3745
38#: ../src/qml/HistoryPage/dateUtils.js:9446#: ../src/qml/HistoryPage/dateUtils.js:94
47#: ../src/qml/SettingsPage/dateUtils.js:63
39#, qt-format48#, qt-format
40msgid "%1 min"49msgid "%1 min"
41msgid_plural "%1 mins"50msgid_plural "%1 mins"
@@ -43,6 +52,7 @@
43msgstr[1] ""52msgstr[1] ""
4453
45#: ../src/qml/HistoryPage/dateUtils.js:9654#: ../src/qml/HistoryPage/dateUtils.js:96
55#: ../src/qml/SettingsPage/dateUtils.js:65
46#, qt-format56#, qt-format
47msgid "%1 sec"57msgid "%1 sec"
48msgid_plural "%1 secs"58msgid_plural "%1 secs"
@@ -50,61 +60,62 @@
50msgstr[1] ""60msgstr[1] ""
5161
52#. TRANSLATORS: this is the count of events grouped into this single item62#. TRANSLATORS: this is the count of events grouped into this single item
53#: ../src/qml/HistoryPage/HistoryDelegate.qml:20163#: ../src/qml/HistoryPage/HistoryDelegate.qml:206
54#: ../src/qml/HistoryPage/SwipeItemDemo.qml:15064#: ../src/qml/HistoryPage/SwipeItemDemo.qml:150
55#, qt-format65#, qt-format
56msgid "(%1)"66msgid "(%1)"
57msgstr ""67msgstr ""
5868
59#: ../src/qml/DialerPage/Keypad.qml:15069#: ../src/qml/DialerPage/Keypad.qml:206
60msgid "*"70msgid "*"
61msgstr ""71msgstr ""
6272
63#: ../src/qml/DialerPage/Keypad.qml:16173#: ../src/qml/DialerPage/DialerBottomEdge.qml:26
74#: ../src/qml/DialerPage/Keypad.qml:223
64msgid "+"75msgid "+"
65msgstr ""76msgstr ""
6677
67#: ../src/qml/DialerPage/Keypad.qml:16078#: ../src/qml/DialerPage/Keypad.qml:222
68msgid "0"79msgid "0"
69msgstr ""80msgstr ""
7081
71#: ../src/qml/DialerPage/Keypad.qml:4982#: ../src/qml/DialerPage/Keypad.qml:51
72msgid "1"83msgid "1"
73msgstr ""84msgstr ""
7485
75#: ../src/qml/DialerPage/Keypad.qml:6086#: ../src/qml/DialerPage/Keypad.qml:68
76msgid "2"87msgid "2"
77msgstr ""88msgstr ""
7889
79#: ../src/qml/DialerPage/Keypad.qml:7190#: ../src/qml/DialerPage/Keypad.qml:85
80msgid "3"91msgid "3"
81msgstr ""92msgstr ""
8293
83#: ../src/qml/DialerPage/Keypad.qml:8294#: ../src/qml/DialerPage/Keypad.qml:102
84msgid "4"95msgid "4"
85msgstr ""96msgstr ""
8697
87#: ../src/qml/DialerPage/Keypad.qml:9398#: ../src/qml/DialerPage/Keypad.qml:119
88msgid "5"99msgid "5"
89msgstr ""100msgstr ""
90101
91#: ../src/qml/DialerPage/Keypad.qml:104102#: ../src/qml/DialerPage/Keypad.qml:136
92msgid "6"103msgid "6"
93msgstr ""104msgstr ""
94105
95#: ../src/qml/DialerPage/Keypad.qml:115106#: ../src/qml/DialerPage/Keypad.qml:153
96msgid "7"107msgid "7"
97msgstr ""108msgstr ""
98109
99#: ../src/qml/DialerPage/Keypad.qml:126110#: ../src/qml/DialerPage/Keypad.qml:170
100msgid "8"111msgid "8"
101msgstr ""112msgstr ""
102113
103#: ../src/qml/DialerPage/Keypad.qml:137114#: ../src/qml/DialerPage/Keypad.qml:187
104msgid "9"115msgid "9"
105msgstr ""116msgstr ""
106117
107#: ../src/qml/DialerPage/Keypad.qml:61118#: ../src/qml/DialerPage/Keypad.qml:69
108msgid "ABC"119msgid "ABC"
109msgstr ""120msgstr ""
110121
@@ -112,61 +123,94 @@
112msgid "Active"123msgid "Active"
113msgstr ""124msgstr ""
114125
115#: ../src/qml/HistoryPage/HistoryPage.qml:49126#: ../src/qml/HistoryPage/HistoryPage.qml:68
116msgctxt "All Calls"127msgctxt "All Calls"
117msgid "All"128msgid "All"
118msgstr ""129msgstr ""
119130
120#: ../src/qml/ContactsPage/ContactsPage.qml:92131#: ../src/qml/ContactsPage/ContactsPage.qml:95
121msgctxt "All Contacts"132msgctxt "All Contacts"
122msgid "All"133msgid "All"
123msgstr ""134msgstr ""
124135
125#: ../src/qml/LiveCallPage/LiveCall.qml:326136#: ../src/qml/SettingsPage/CallForwarding.qml:378
137msgid "All calls"
138msgstr ""
139
140#: ../src/qml/LiveCallPage/LiveCall.qml:341
126msgid "Bluetooth device"141msgid "Bluetooth device"
127msgstr ""142msgstr ""
128143
129#: ../src/qml/dialer-app.qml:596144#: ../src/qml/SettingsPage/ServiceInfo.qml:125
145msgid "Call"
146msgstr ""
147
148#: ../src/qml/dialer-app.qml:570
130msgid "Call Barring"149msgid "Call Barring"
131msgstr ""150msgstr ""
132151
133#: ../src/qml/dialer-app.qml:607152#: ../src/qml/dialer-app.qml:581
134msgid "Call Forwarding"153msgid "Call Forwarding"
135msgstr ""154msgstr ""
136155
137#: ../src/qml/dialer-app.qml:618156#: ../src/qml/dialer-app.qml:592
138msgid "Call Waiting"157msgid "Call Waiting"
139msgstr ""158msgstr ""
140159
141#: ../src/qml/LiveCallPage/LiveCall.qml:134160#: ../src/qml/LiveCallPage/LiveCall.qml:152
142msgid "Call ended"161msgid "Call ended"
143msgstr ""162msgstr ""
144163
145#: ../src/qml/LiveCallPage/LiveCall.qml:283164#: ../src/qml/LiveCallPage/LiveCall.qml:297
146msgid "Call failed"165msgid "Call failed"
147msgstr ""166msgstr ""
148167
149#: ../src/qml/LiveCallPage/LiveCall.qml:142168#: ../src/qml/SettingsPage/CallForwarding.qml:44
169#: ../src/qml/SettingsPage/MultiSim.qml:51
170#: ../src/qml/SettingsPage/NoSims.qml:28
171#: ../src/qml/SettingsPage/SingleSim.qml:39
172msgid "Call forwarding"
173msgstr ""
174
175#: ../src/qml/SettingsPage/CallForwardItem.qml:218
176msgid "Call forwarding can't be changed right now."
177msgstr ""
178
179#: ../src/qml/SettingsPage/CallForwarding.qml:154
180msgid "Call forwarding status can't be checked "
181msgstr ""
182
183#: ../src/qml/LiveCallPage/LiveCall.qml:160
150msgid "Call holding failure"184msgid "Call holding failure"
151msgstr ""185msgstr ""
152186
153#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:110187#: ../src/qml/SettingsPage/CallWaiting.qml:31
154#: ../src/qml/LiveCallPage/LiveCall.qml:445188#: ../src/qml/SettingsPage/CallWaiting.qml:86
189#: ../src/qml/SettingsPage/MultiSim.qml:41
190#: ../src/qml/SettingsPage/NoSims.qml:34
191#: ../src/qml/SettingsPage/SingleSim.qml:32
192msgid "Call waiting"
193msgstr ""
194
195#: ../src/qml/DialerPage/DialerPage.qml:509
196#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:113
197#: ../src/qml/LiveCallPage/LiveCall.qml:456
155#: ../src/qml/LiveCallPage/MultiCallDisplay.qml:108198#: ../src/qml/LiveCallPage/MultiCallDisplay.qml:108
156msgid "Calling"199msgid "Calling"
157msgstr ""200msgstr ""
158201
159#: ../src/qml/dialer-app.qml:629202#: ../src/qml/dialer-app.qml:603
160msgid "Calling Line Presentation"203msgid "Calling Line Presentation"
161msgstr ""204msgstr ""
162205
163#: ../src/qml/dialer-app.qml:641206#: ../src/qml/dialer-app.qml:615
164msgid "Calling Line Restriction"207msgid "Calling Line Restriction"
165msgstr ""208msgstr ""
166209
167#: ../src/qml/ContactEditorPage/DialerContactEditorPage.qml:35210#: ../src/qml/ContactEditorPage/DialerContactEditorPage.qml:35
168#: ../src/qml/ContactsPage/ContactsPage.qml:106211#: ../src/qml/ContactsPage/ContactsPage.qml:145
169#: ../src/qml/Dialogs/DisableFlightModeDialog.qml:38212#: ../src/qml/Dialogs/DisableFlightModeDialog.qml:38
213#: ../src/qml/SettingsPage/CallForwarding.qml:236
170msgid "Cancel"214msgid "Cancel"
171msgstr ""215msgstr ""
172216
@@ -176,49 +220,61 @@
176msgid "Change all Call associations to %1?"220msgid "Change all Call associations to %1?"
177msgstr ""221msgstr ""
178222
179#: ../src/qml/DialerPage/DialerPage.qml:55223#: ../src/qml/DialerPage/DialerPage.qml:78
180#: ../src/qml/Dialogs/NotificationDialog.qml:29224#: ../src/qml/Dialogs/NotificationDialog.qml:29
181msgid "Close"225msgid "Close"
182msgstr ""226msgstr ""
183227
184#: ../src/qml/LiveCallPage/LiveCall.qml:48228#: ../src/qml/LiveCallPage/LiveCall.qml:52
185#: ../src/qml/LiveCallPage/MultiCallDisplay.qml:89229#: ../src/qml/LiveCallPage/MultiCallDisplay.qml:89
186msgid "Conference"230msgid "Conference"
187msgstr ""231msgstr ""
188232
189#: ../src/qml/LiveCallPage/LiveCall.qml:113233#: ../src/qml/LiveCallPage/LiveCall.qml:131
190msgid "Conference call failure"234msgid "Conference call failure"
191msgstr ""235msgstr ""
192236
193#: ../src/qml/dialer-app.qml:635237#: ../src/qml/dialer-app.qml:609
194msgid "Connected Line Presentation"238msgid "Connected Line Presentation"
195msgstr ""239msgstr ""
196240
197#: ../src/qml/dialer-app.qml:647241#: ../src/qml/dialer-app.qml:621
198msgid "Connected Line Restriction"242msgid "Connected Line Restriction"
199msgstr ""243msgstr ""
200244
201#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:54245#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:66
202#: ../src/qml/HistoryPage/HistoryPage.qml:343246#: ../src/qml/HistoryPage/HistoryPage.qml:369
203msgid "Contact Details"247msgid "Contact Details"
204msgstr ""248msgstr ""
205249
206#: ../src/qml/ContactsPage/ContactsPage.qml:53250#: ../src/qml/SettingsPage/CallForwarding.qml:299
207#: ../src/qml/DialerPage/DialerPage.qml:42251msgid "Contact not associated with any phone number."
252msgstr ""
253
254#: ../src/qml/ContactsPage/ContactsPage.qml:77
255#: ../src/qml/DialerPage/DialerPage.qml:59
208msgid "Contacts"256msgid "Contacts"
209msgstr ""257msgstr ""
210258
211#: ../src/qml/DialerPage/Keypad.qml:72259#: ../src/qml/SettingsPage/CallForwarding.qml:223
260msgid "Contacts..."
261msgstr ""
262
263#: ../src/qml/SettingsPage/CallForwarding.qml:298
264msgid "Could not forward to this contact"
265msgstr ""
266
267#: ../src/qml/DialerPage/Keypad.qml:86
212msgid "DEF"268msgid "DEF"
213msgstr ""269msgstr ""
214270
215#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:74271#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:86
216#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:238272#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:253
217#: ../src/qml/HistoryPage/HistoryPage.qml:315273#: ../src/qml/HistoryPage/HistoryPage.qml:341
218msgid "Delete"274msgid "Delete"
219msgstr ""275msgstr ""
220276
221#: ../src/qml/HistoryPage/HistoryPage.qml:324277#: ../src/qml/HistoryPage/HistoryPage.qml:350
222msgid "Details"278msgid "Details"
223msgstr ""279msgstr ""
224280
@@ -226,12 +282,13 @@
226msgid "Disable"282msgid "Disable"
227msgstr ""283msgstr ""
228284
229#: ../src/qml/dialer-app.qml:451285#: ../src/qml/Dialogs/FlightModeProgressDialog.qml:29
230msgid "Disabling flight mode"286msgid "Disabling flight mode"
231msgstr ""287msgstr ""
232288
233#: ../src/qml/MMI/IMEI.qml:48 ../src/qml/dialer-app.qml:514289#: ../src/qml/Dialogs/UssdErrorDialog.qml:31
234#: ../src/qml/dialer-app.qml:528290#: ../src/qml/Dialogs/UssdResponseDialog.qml:30
291#: ../src/qml/MMI/IMEIDialog.qml:40
235msgid "Dismiss"292msgid "Dismiss"
236msgstr ""293msgstr ""
237294
@@ -239,47 +296,64 @@
239msgid "Don't ask again"296msgid "Don't ask again"
240msgstr ""297msgstr ""
241298
242#: ../src/qml/ContactViewPage/DialerContactViewPage.qml:69299#: ../src/qml/ContactViewPage/DialerContactViewPage.qml:70
243msgid "Edit"300msgid "Edit"
244msgstr ""301msgstr ""
245302
246#: ../src/qml/DialerPage/DialerPage.qml:72303#: ../src/qml/DialerPage/DialerPage.qml:132
304#: ../src/qml/DialerPage/DialerPage.qml:142
247msgid "Emergency Calls"305msgid "Emergency Calls"
248msgstr ""306msgstr ""
249307
250#: ../src/qml/DialerPage/DialerPage.qml:277308#: ../src/qml/DialerPage/DialerPage.qml:467
309msgid "Emergency call"
310msgstr ""
311
312#: ../src/qml/DialerPage/DialerPage.qml:303
313#: ../src/qml/SettingsPage/CallForwardItem.qml:171
251msgid "Enter a number"314msgid "Enter a number"
252msgstr ""315msgstr ""
253316
254#: ../src/qml/dialer-app.qml:511317#: ../src/qml/Dialogs/UssdErrorDialog.qml:28
255msgid "Error"318msgid "Error"
256msgstr ""319msgstr ""
257320
258#: ../src/qml/LiveCallPage/LiveCall.qml:143321#: ../src/qml/LiveCallPage/LiveCall.qml:161
259msgid "Failed to activate the call."322msgid "Failed to activate the call."
260msgstr ""323msgstr ""
261324
262#: ../src/qml/LiveCallPage/LiveCall.qml:114325#: ../src/qml/LiveCallPage/LiveCall.qml:132
263msgid "Failed to create a conference call."326msgid "Failed to create a conference call."
264msgstr ""327msgstr ""
265328
266#: ../src/qml/LiveCallPage/LiveCall.qml:144329#: ../src/qml/LiveCallPage/LiveCall.qml:162
267msgid "Failed to place the active call on hold."330msgid "Failed to place the active call on hold."
268msgstr ""331msgstr ""
269332
270#: ../src/qml/ContactsPage/ContactsPage.qml:92333#: ../src/qml/ContactsPage/ContactsPage.qml:95
271msgid "Favorites"334msgid "Favorites"
272msgstr ""335msgstr ""
273336
337#: ../src/qml/DialerPage/DialerPage.qml:137
274#: ../src/qml/Dialogs/DisableFlightModeDialog.qml:27338#: ../src/qml/Dialogs/DisableFlightModeDialog.qml:27
275msgid "Flight Mode"339msgid "Flight Mode"
276msgstr ""340msgstr ""
277341
278#: ../src/qml/DialerPage/DialerPage.qml:77342#: ../src/qml/SettingsPage/CallForwarding.qml:127
279msgid "Flight mode"343msgid "Forward every incoming call"
280msgstr ""344msgstr ""
281345
282#: ../src/qml/DialerPage/Keypad.qml:83346#: ../src/qml/SettingsPage/CallForwarding.qml:162
347msgid "Forward incoming calls when:"
348msgstr ""
349
350#. TRANSLATORS: This string will be truncated on smaller displays.
351#: ../src/qml/SettingsPage/CallForwardItem.qml:157
352#: ../src/qml/SettingsPage/CallForwardItem.qml:202
353msgid "Forward to"
354msgstr ""
355
356#: ../src/qml/DialerPage/Keypad.qml:103
283msgid "GHI"357msgid "GHI"
284msgstr ""358msgstr ""
285359
@@ -287,43 +361,62 @@
287msgid "Got it"361msgid "Got it"
288msgstr ""362msgstr ""
289363
290#: ../src/qml/MMI/IMEI.qml:36364#: ../src/qml/SettingsPage/CallForwarding.qml:182
365msgid "I don't answer"
366msgstr ""
367
368#: ../src/qml/SettingsPage/CallForwarding.qml:171
369msgid "I'm on another call"
370msgstr ""
371
372#: ../src/qml/MMI/IMEIDialog.qml:27
291msgid "IMEI"373msgid "IMEI"
292msgstr ""374msgstr ""
293375
294#: ../src/qml/HistoryPage/HistoryDelegate.qml:64376#: ../src/qml/HistoryPage/HistoryDelegate.qml:65
295#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:315377#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:330
296#: ../src/qml/HistoryPage/SwipeItemDemo.qml:189378#: ../src/qml/HistoryPage/SwipeItemDemo.qml:189
297msgid "Incoming"379msgid "Incoming"
298msgstr ""380msgstr ""
299381
300#: ../src/qml/dialer-app.qml:512382#: ../src/qml/DialerPage/DialerPage.qml:129
383msgid "Initializing..."
384msgstr ""
385
386#: ../src/qml/Dialogs/UssdErrorDialog.qml:29
301msgid "Invalid USSD code"387msgid "Invalid USSD code"
302msgstr ""388msgstr ""
303389
304#: ../src/qml/DialerPage/Keypad.qml:94390#: ../src/qml/DialerPage/Keypad.qml:120
305msgid "JKL"391msgid "JKL"
306msgstr ""392msgstr ""
307393
308#: ../src/qml/DialerPage/DialerPage.qml:85394#: ../src/qml/SettingsPage/ServiceInfo.qml:115
309msgid "Keypad"395#, qt-format
396msgid "Last called %1"
310msgstr ""397msgstr ""
311398
312#: ../src/qml/Dialogs/NoDefaultSIMCardDialog.qml:80399#: ../src/qml/Dialogs/NoDefaultSIMCardDialog.qml:80
313msgid "Later"400msgid "Later"
314msgstr ""401msgstr ""
315402
316#: ../src/qml/DialerPage/Keypad.qml:105403#: ../src/qml/SettingsPage/CallWaiting.qml:101
404msgid ""
405"Lets you answer or start a new call while on another call, and switch "
406"between them"
407msgstr ""
408
409#: ../src/qml/DialerPage/Keypad.qml:137
317msgid "MNO"410msgid "MNO"
318msgstr ""411msgstr ""
319412
320#: ../src/qml/LiveCallPage/LiveCall.qml:548413#: ../src/qml/LiveCallPage/LiveCall.qml:573
321msgid "Merge calls"414msgid "Merge calls"
322msgstr ""415msgstr ""
323416
324#: ../src/qml/HistoryPage/HistoryDelegate.qml:62417#: ../src/qml/HistoryPage/HistoryDelegate.qml:63
325#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:313418#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:328
326#: ../src/qml/HistoryPage/HistoryPage.qml:49419#: ../src/qml/HistoryPage/HistoryPage.qml:68
327msgid "Missed"420msgid "Missed"
328msgstr ""421msgstr ""
329422
@@ -331,29 +424,45 @@
331msgid "Mobile"424msgid "Mobile"
332msgstr ""425msgstr ""
333426
427#: ../src/qml/SettingsPage/CallForwarding.qml:193
428msgid "My phone is unreachable"
429msgstr ""
430
334#: ../src/qml/Dialogs/NoDefaultSIMCardDialog.qml:70431#: ../src/qml/Dialogs/NoDefaultSIMCardDialog.qml:70
335#: ../src/qml/Dialogs/SetDefaultSIMCardDialog.qml:40432#: ../src/qml/Dialogs/SetDefaultSIMCardDialog.qml:40
336msgid "No"433msgid "No"
337msgstr ""434msgstr ""
338435
339#: ../src/qml/dialer-app.qml:316436#: ../src/qml/dialer-app.qml:355
340msgid "No SIM card selected"437msgid "No SIM card selected"
341msgstr ""438msgstr ""
342439
343#: ../src/qml/LiveCallPage/LiveCall.qml:104440#: ../src/qml/LiveCallPage/LiveCall.qml:122
344msgid "No calls"441msgid "No calls"
345msgstr ""442msgstr ""
346443
347#: ../src/qml/DialerPage/DialerPage.qml:87 ../src/qml/dialer-app.qml:337444#: ../src/qml/DialerPage/DialerPage.qml:151 ../src/qml/dialer-app.qml:374
348#: ../src/qml/dialer-app.qml:342445#: ../src/qml/dialer-app.qml:379
349msgid "No network"446msgid "No network"
350msgstr ""447msgstr ""
351448
352#: ../src/qml/HistoryPage/HistoryPage.qml:219449#: ../src/qml/HistoryPage/HistoryPage.qml:245
353msgid "No recent calls"450msgid "No recent calls"
354msgstr ""451msgstr ""
355452
356#: ../src/qml/Dialogs/SimLockedDialog.qml:49453#: ../src/qml/SettingsPage/CallForwarding.qml:279
454msgid "Numbers"
455msgstr ""
456
457#: ../src/qml/SettingsPage/CallForwarding.qml:301
458msgid "OK"
459msgstr ""
460
461#: ../src/qml/SettingsPage/CallForwarding.qml:382
462msgid "Off"
463msgstr ""
464
465#: ../src/qml/Dialogs/SimLockedDialog.qml:50
357msgid "Ok"466msgid "Ok"
358msgstr ""467msgstr ""
359468
@@ -361,15 +470,17 @@
361msgid "On hold"470msgid "On hold"
362msgstr ""471msgstr ""
363472
364#: ../src/qml/HistoryPage/HistoryDelegate.qml:66473#: ../src/qml/HistoryPage/HistoryDelegate.qml:67
365#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:317474#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:332
366msgid "Outgoing"475msgid "Outgoing"
367msgstr ""476msgstr ""
368477
369#: ../src/qml/DialerPage/Keypad.qml:116478#: ../src/qml/DialerPage/Keypad.qml:154
370msgid "PQRS"479msgid "PQRS"
371msgstr ""480msgstr ""
372481
482#: ../src/qml/DialerPage/DialerPage.qml:149
483#: ../src/qml/SettingsPage/SettingsPage.qml:29
373#: ../src/dialer-app.desktop.in.in.h:1484#: ../src/dialer-app.desktop.in.in.h:1
374msgid "Phone"485msgid "Phone"
375msgstr ""486msgstr ""
@@ -378,7 +489,7 @@
378msgid "Phone App"489msgid "Phone App"
379msgstr ""490msgstr ""
380491
381#: ../src/qml/LiveCallPage/LiveCall.qml:330492#: ../src/qml/LiveCallPage/LiveCall.qml:345
382msgid "Phone Speaker"493msgid "Phone Speaker"
383msgstr ""494msgstr ""
384495
@@ -390,36 +501,48 @@
390msgid "Phone;Dialer;Dial;Call;Keypad"501msgid "Phone;Dialer;Dial;Call;Keypad"
391msgstr ""502msgstr ""
392503
393#: ../src/qml/Dialogs/SimLockedDialog.qml:37504#: ../src/qml/SettingsPage/CallForwarding.qml:270
505msgid "Please select a phone number"
506msgstr ""
507
508#: ../src/qml/Dialogs/SimLockedDialog.qml:38
394msgid ""509msgid ""
395"Please unlock your SIM card to call or send a message. You can unlock your "510"Please unlock your SIM card to call or send a message. You can unlock your "
396"SIM card from the Network Indicator at the top of the screen or by visiting "511"SIM card from the Network Indicator at the top of the screen or by visiting "
397"<a href=\"system_settings\">System Settings &gt; Security &amp; Privacy</a>."512"<a href=\"system_settings\">System Settings &gt; Security &amp; Privacy</a>."
398msgstr ""513msgstr ""
399514
400#: ../src/qml/dialer-app.qml:491515#: ../src/qml/Dialogs/UssdProgressDialog.qml:28
401msgid "Please wait"516msgid "Please wait"
402msgstr ""517msgstr ""
403518
404#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:138519#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:141
405msgid "Private"520msgid "Private"
406msgstr ""521msgstr ""
407522
408#: ../src/qml/HistoryPage/HistoryDelegate.qml:167523#: ../src/qml/HistoryPage/HistoryDelegate.qml:168
409#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:42524#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:43
410msgid "Private number"525msgid "Private number"
411msgstr ""526msgstr ""
412527
413#: ../src/qml/DialerPage/DialerPage.qml:122528#: ../src/qml/DialerPage/DialerPage.qml:522
414#: ../src/qml/HistoryPage/HistoryPage.qml:45529#: ../src/qml/HistoryPage/HistoryPage.qml:47
415msgid "Recent"530msgid "Recent"
416msgstr ""531msgstr ""
417532
418#: ../src/qml/Dialogs/SimLockedDialog.qml:26533#: ../src/qml/SettingsPage/CallForwarding.qml:142
534msgid "Redirects all phone calls to another number."
535msgstr ""
536
537#: ../src/qml/SettingsPage/SingleSim.qml:28
538msgid "SIM"
539msgstr ""
540
541#: ../src/qml/Dialogs/SimLockedDialog.qml:27
419msgid "SIM Card is locked"542msgid "SIM Card is locked"
420msgstr ""543msgstr ""
421544
422#: ../src/qml/DialerPage/DialerPage.qml:79545#: ../src/qml/DialerPage/DialerPage.qml:140
423msgid "SIM Locked"546msgid "SIM Locked"
424msgstr ""547msgstr ""
425548
@@ -427,15 +550,15 @@
427msgid "Save"550msgid "Save"
428msgstr ""551msgstr ""
429552
430#: ../src/qml/ContactsPage/ContactsPage.qml:80553#: ../src/qml/ContactsPage/ContactsPage.qml:119
431msgid "Search"554msgid "Search"
432msgstr ""555msgstr ""
433556
434#: ../src/qml/ContactsPage/ContactsPage.qml:68557#: ../src/qml/ContactsPage/ContactsPage.qml:67
435msgid "Search..."558msgid "Search..."
436msgstr ""559msgstr ""
437560
438#: ../src/qml/HistoryPage/HistoryPage.qml:45561#: ../src/qml/HistoryPage/HistoryPage.qml:47
439msgid "Select"562msgid "Select"
440msgstr ""563msgstr ""
441564
@@ -445,19 +568,32 @@
445"choice in <a href=\"system_settings\">System Settings</a>."568"choice in <a href=\"system_settings\">System Settings</a>."
446msgstr ""569msgstr ""
447570
448#: ../src/qml/HistoryPage/HistoryPage.qml:334571#: ../src/qml/HistoryPage/HistoryPage.qml:360
449msgid "Send message"572msgid "Send message"
450msgstr ""573msgstr ""
451574
452#: ../src/qml/DialerPage/DialerPage.qml:47575#: ../src/qml/SettingsPage/MultiSim.qml:62
576#: ../src/qml/SettingsPage/NoSims.qml:42
577msgid "Services"
578msgstr ""
579
580#: ../src/qml/SettingsPage/CallForwarding.qml:249
581msgid "Set"
582msgstr ""
583
584#: ../src/qml/DialerPage/DialerPage.qml:64
453msgid "Settings"585msgid "Settings"
454msgstr ""586msgstr ""
455587
456#: ../src/qml/ContactViewPage/DialerContactViewPage.qml:60588#: ../src/qml/ContactViewPage/DialerContactViewPage.qml:61
457#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:66589#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:78
458msgid "Share"590msgid "Share"
459msgstr ""591msgstr ""
460592
593#: ../src/qml/SettingsPage/CallForwarding.qml:380
594msgid "Some calls"
595msgstr ""
596
461#: ../src/qml/HistoryPage/SwipeItemDemo.qml:326597#: ../src/qml/HistoryPage/SwipeItemDemo.qml:326
462msgid "Swipe to delete"598msgid "Swipe to delete"
463msgstr ""599msgstr ""
@@ -466,11 +602,11 @@
466msgid "Swipe to reveal actions"602msgid "Swipe to reveal actions"
467msgstr ""603msgstr ""
468604
469#: ../src/qml/LiveCallPage/LiveCall.qml:159605#: ../src/qml/LiveCallPage/LiveCall.qml:177
470msgid "Switch audio source:"606msgid "Switch audio source:"
471msgstr ""607msgstr ""
472608
473#: ../src/qml/LiveCallPage/LiveCall.qml:533609#: ../src/qml/LiveCallPage/LiveCall.qml:558
474msgid "Switch calls"610msgid "Switch calls"
475msgstr ""611msgstr ""
476612
@@ -478,42 +614,47 @@
478msgid "Switch to default SIM:"614msgid "Switch to default SIM:"
479msgstr ""615msgstr ""
480616
481#: ../src/qml/DialerPage/Keypad.qml:127617#: ../src/qml/DialerPage/Keypad.qml:171
482msgid "TUV"618msgid "TUV"
483msgstr ""619msgstr ""
484620
485#: ../src/qml/dialer-app.qml:343621#: ../src/qml/dialer-app.qml:380
486#, qt-format622#, qt-format
487msgid "There is currently no network on %1"623msgid "There is currently no network on %1"
488msgstr ""624msgstr ""
489625
490#: ../src/qml/dialer-app.qml:337 ../src/qml/dialer-app.qml:344626#: ../src/qml/dialer-app.qml:374 ../src/qml/dialer-app.qml:381
491msgid "There is currently no network."627msgid "There is currently no network."
492msgstr ""628msgstr ""
493629
630#: ../src/qml/DialerPage/DialerPage.qml:467
631msgid "This is not an emergency number."
632msgstr ""
633
494#: ../src/qml/HistoryPage/dateUtils.js:45634#: ../src/qml/HistoryPage/dateUtils.js:45
635#: ../src/qml/SettingsPage/dateUtils.js:41
495msgid "Today"636msgid "Today"
496msgstr ""637msgstr ""
497638
498#: ../src/qml/LiveCallPage/LiveCall.qml:328639#: ../src/qml/LiveCallPage/LiveCall.qml:343
499msgid "Ubuntu Phone"640msgid "Ubuntu Phone"
500msgstr ""641msgstr ""
501642
502#: ../src/qml/LiveCallPage/LiveCall.qml:332643#: ../src/qml/LiveCallPage/LiveCall.qml:347
503msgid "Unknown device"644msgid "Unknown device"
504msgstr ""645msgstr ""
505646
506#: ../src/qml/HistoryPage/HistoryDelegate.qml:169647#: ../src/qml/HistoryPage/HistoryDelegate.qml:170
507#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:44648#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:45
508msgid "Unknown number"649msgid "Unknown number"
509msgstr ""650msgstr ""
510651
511#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:72652#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:73
512#: ../src/qml/LiveCallPage/MultiCallDisplay.qml:91653#: ../src/qml/LiveCallPage/MultiCallDisplay.qml:91
513msgid "Voicemail"654msgid "Voicemail"
514msgstr ""655msgstr ""
515656
516#: ../src/qml/DialerPage/Keypad.qml:138657#: ../src/qml/DialerPage/Keypad.qml:188
517msgid "WXYZ"658msgid "WXYZ"
518msgstr ""659msgstr ""
519660
@@ -522,6 +663,7 @@
522msgstr ""663msgstr ""
523664
524#: ../src/qml/HistoryPage/dateUtils.js:47665#: ../src/qml/HistoryPage/dateUtils.js:47
666#: ../src/qml/SettingsPage/dateUtils.js:43
525msgid "Yesterday"667msgid "Yesterday"
526msgstr ""668msgstr ""
527669
@@ -529,7 +671,7 @@
529msgid "You have to disable flight mode in order to make calls"671msgid "You have to disable flight mode in order to make calls"
530msgstr ""672msgstr ""
531673
532#: ../src/qml/dialer-app.qml:316674#: ../src/qml/dialer-app.qml:355
533msgid "You need to select a SIM card"675msgid "You need to select a SIM card"
534msgstr ""676msgstr ""
535677
536678
=== modified file 'src/qml/AccountsModel.qml'
--- src/qml/AccountsModel.qml 2016-10-19 11:45:45 +0000
+++ src/qml/AccountsModel.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Telephony 0.120import Ubuntu.Telephony 0.1
2121
22Item {22Item {
2323
=== modified file 'src/qml/CMakeLists.txt'
--- src/qml/CMakeLists.txt 2015-04-30 15:42:48 +0000
+++ src/qml/CMakeLists.txt 2017-03-22 17:10:08 +0000
@@ -19,3 +19,4 @@
19add_subdirectory(ContactViewPage)19add_subdirectory(ContactViewPage)
20add_subdirectory(ContactEditorPage)20add_subdirectory(ContactEditorPage)
21add_subdirectory(Dialogs)21add_subdirectory(Dialogs)
22add_subdirectory(SettingsPage)
2223
=== modified file 'src/qml/ContactsPage/ContactsPage.qml'
--- src/qml/ContactsPage/ContactsPage.qml 2016-07-27 23:51:39 +0000
+++ src/qml/ContactsPage/ContactsPage.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.ListItems 1.3 as ListItem21import Ubuntu.Components.ListItems 1.3 as ListItem
22import Ubuntu.Components.Popups 1.322import Ubuntu.Components.Popups 1.3
2323
=== modified file 'src/qml/ContactsPage/KeyboardRectagle.qml'
--- src/qml/ContactsPage/KeyboardRectagle.qml 2014-07-08 00:34:36 +0000
+++ src/qml/ContactsPage/KeyboardRectagle.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
2020
21Item {21Item {
22 id: keyboardRect22 id: keyboardRect
2323
=== modified file 'src/qml/DialerPage/CallButton.qml'
--- src/qml/DialerPage/CallButton.qml 2016-08-24 17:50:38 +0000
+++ src/qml/DialerPage/CallButton.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
2121
22AbstractButton {22AbstractButton {
2323
=== modified file 'src/qml/DialerPage/CustomButton.qml'
--- src/qml/DialerPage/CustomButton.qml 2016-08-24 17:50:38 +0000
+++ src/qml/DialerPage/CustomButton.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
2121
22Button {22Button {
2323
=== modified file 'src/qml/DialerPage/DialerBottomEdge.qml'
--- src/qml/DialerPage/DialerBottomEdge.qml 2016-08-24 17:53:12 +0000
+++ src/qml/DialerPage/DialerBottomEdge.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
2121
22BottomEdge {22BottomEdge {
2323
=== modified file 'src/qml/DialerPage/DialerPage.qml'
--- src/qml/DialerPage/DialerPage.qml 2017-03-22 17:10:08 +0000
+++ src/qml/DialerPage/DialerPage.qml 2017-03-22 17:10:08 +0000
@@ -17,7 +17,7 @@
17 */17 */
1818
19import QtContacts 5.019import QtContacts 5.0
20import QtQuick 2.020import QtQuick 2.4
21import Ubuntu.Components 1.321import Ubuntu.Components 1.3
22import Ubuntu.Components.Popups 1.322import Ubuntu.Components.Popups 1.3
23import Ubuntu.Telephony 0.123import Ubuntu.Telephony 0.1
@@ -38,6 +38,16 @@
38 property var mmiPlugins: []38 property var mmiPlugins: []
39 readonly property bool compactView: page.height <= units.gu(60)39 readonly property bool compactView: page.height <= units.gu(60)
4040
41 function selectAccount(accountId) {
42 for (var i in accountsModel.activeAccounts) {
43 var account = accountsModel.activeAccounts[i]
44 if (account.accountId === accountId) {
45 headerSections.selectedIndex = i
46 return
47 }
48 }
49 }
50
41 header: PageHeader {51 header: PageHeader {
42 id: pageHeader52 id: pageHeader
4353
@@ -52,7 +62,7 @@
52 Action {62 Action {
53 iconName: "settings"63 iconName: "settings"
54 text: i18n.tr("Settings")64 text: i18n.tr("Settings")
55 onTriggered: Qt.openUrlExternally("settings:///system/phone")65 onTriggered: pageStackNormalMode.push(Qt.resolvedUrl("../SettingsPage/SettingsPage.qml"))
56 }66 }
5767
58 ]68 ]
@@ -120,7 +130,6 @@
120 }130 }
121131
122 objectName: "dialerPage"132 objectName: "dialerPage"
123
124 title: {133 title: {
125 // avoid clearing the title when app is inactive134 // avoid clearing the title when app is inactive
126 // under some states135 // under some states
127136
=== modified file 'src/qml/DialerPage/KeypadButton.qml'
--- src/qml/DialerPage/KeypadButton.qml 2017-03-22 17:10:08 +0000
+++ src/qml/DialerPage/KeypadButton.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
2121
22MouseArea {22MouseArea {
2323
=== modified file 'src/qml/DialerPage/KeypadEntry.qml'
--- src/qml/DialerPage/KeypadEntry.qml 2017-03-22 17:10:08 +0000
+++ src/qml/DialerPage/KeypadEntry.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.ListItems 1.3 as ListItems21import Ubuntu.Components.ListItems 1.3 as ListItems
22import Ubuntu.Components.Themes.Ambiance 1.322import Ubuntu.Components.Themes.Ambiance 1.3
2323
=== modified file 'src/qml/Dialogs/DisableFlightModeDialog.qml'
--- src/qml/Dialogs/DisableFlightModeDialog.qml 2016-08-25 16:01:46 +0000
+++ src/qml/Dialogs/DisableFlightModeDialog.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.Popups 1.321import Ubuntu.Components.Popups 1.3
22import Ubuntu.Telephony 0.122import Ubuntu.Telephony 0.1
2323
=== modified file 'src/qml/Dialogs/FlightModeProgressDialog.qml'
--- src/qml/Dialogs/FlightModeProgressDialog.qml 2016-08-24 17:52:19 +0000
+++ src/qml/Dialogs/FlightModeProgressDialog.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
2020
21import Ubuntu.Components 1.321import Ubuntu.Components 1.3
22import Ubuntu.Components.Popups 1.322import Ubuntu.Components.Popups 1.3
2323
=== modified file 'src/qml/Dialogs/NoDefaultSIMCardDialog.qml'
--- src/qml/Dialogs/NoDefaultSIMCardDialog.qml 2016-10-19 11:45:45 +0000
+++ src/qml/Dialogs/NoDefaultSIMCardDialog.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.Popups 1.321import Ubuntu.Components.Popups 1.3
22import Ubuntu.Telephony 0.122import Ubuntu.Telephony 0.1
2323
=== modified file 'src/qml/Dialogs/NotificationDialog.qml'
--- src/qml/Dialogs/NotificationDialog.qml 2015-09-07 15:40:45 +0000
+++ src/qml/Dialogs/NotificationDialog.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.Popups 1.321import Ubuntu.Components.Popups 1.3
2222
2323
=== modified file 'src/qml/Dialogs/SetDefaultSIMCardDialog.qml'
--- src/qml/Dialogs/SetDefaultSIMCardDialog.qml 2016-10-01 00:29:13 +0000
+++ src/qml/Dialogs/SetDefaultSIMCardDialog.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.Popups 1.321import Ubuntu.Components.Popups 1.3
22import Ubuntu.Telephony 0.122import Ubuntu.Telephony 0.1
2323
=== modified file 'src/qml/Dialogs/SimLockedDialog.qml'
--- src/qml/Dialogs/SimLockedDialog.qml 2016-04-29 21:29:29 +0000
+++ src/qml/Dialogs/SimLockedDialog.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.Popups 1.321import Ubuntu.Components.Popups 1.3
2222
2323
=== modified file 'src/qml/Dialogs/UssdErrorDialog.qml'
--- src/qml/Dialogs/UssdErrorDialog.qml 2016-08-24 17:52:19 +0000
+++ src/qml/Dialogs/UssdErrorDialog.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
2020
21import Ubuntu.Components 1.321import Ubuntu.Components 1.3
22import Ubuntu.Components.Popups 1.322import Ubuntu.Components.Popups 1.3
2323
=== modified file 'src/qml/Dialogs/UssdProgressDialog.qml'
--- src/qml/Dialogs/UssdProgressDialog.qml 2016-08-24 17:52:19 +0000
+++ src/qml/Dialogs/UssdProgressDialog.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
2020
21import Ubuntu.Components 1.321import Ubuntu.Components 1.3
22import Ubuntu.Components.Popups 1.322import Ubuntu.Components.Popups 1.3
2323
=== modified file 'src/qml/Dialogs/UssdResponseDialog.qml'
--- src/qml/Dialogs/UssdResponseDialog.qml 2016-08-24 17:52:19 +0000
+++ src/qml/Dialogs/UssdResponseDialog.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
2020
21import Ubuntu.Components 1.321import Ubuntu.Components 1.3
22import Ubuntu.Components.Popups 1.322import Ubuntu.Components.Popups 1.3
2323
=== modified file 'src/qml/HistoryPage/ExpandableButton.qml'
--- src/qml/HistoryPage/ExpandableButton.qml 2016-08-24 17:50:38 +0000
+++ src/qml/HistoryPage/ExpandableButton.qml 2017-03-22 17:10:08 +0000
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.4
18import Ubuntu.Components 1.318import Ubuntu.Components 1.3
19import Ubuntu.Components.ListItems 1.3 as ListItem19import Ubuntu.Components.ListItems 1.3 as ListItem
2020
2121
=== modified file 'src/qml/HistoryPage/HistoryDelegate.qml'
--- src/qml/HistoryPage/HistoryDelegate.qml 2016-07-27 16:18:56 +0000
+++ src/qml/HistoryPage/HistoryDelegate.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.ListItems 1.3 as ListItem21import Ubuntu.Components.ListItems 1.3 as ListItem
22import Ubuntu.Components.Popups 1.322import Ubuntu.Components.Popups 1.3
2323
=== modified file 'src/qml/HistoryPage/HistoryDetailsPage.qml'
--- src/qml/HistoryPage/HistoryDetailsPage.qml 2016-10-19 11:45:45 +0000
+++ src/qml/HistoryPage/HistoryDetailsPage.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.ListItems 1.3 as ListItem21import Ubuntu.Components.ListItems 1.3 as ListItem
22import Ubuntu.Telephony 0.122import Ubuntu.Telephony 0.1
2323
=== modified file 'src/qml/HistoryPage/HistoryPage.qml'
--- src/qml/HistoryPage/HistoryPage.qml 2016-07-27 16:18:56 +0000
+++ src/qml/HistoryPage/HistoryPage.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.ListItems 1.3 as ListItem21import Ubuntu.Components.ListItems 1.3 as ListItem
22import Ubuntu.History 0.122import Ubuntu.History 0.1
2323
=== modified file 'src/qml/HistoryPage/SwipeItemDemo.qml'
--- src/qml/HistoryPage/SwipeItemDemo.qml 2016-02-11 17:58:29 +0000
+++ src/qml/HistoryPage/SwipeItemDemo.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import QtQuick.Layouts 1.120import QtQuick.Layouts 1.1
21import Qt.labs.settings 1.021import Qt.labs.settings 1.0
2222
2323
=== modified file 'src/qml/InputInfo.qml'
--- src/qml/InputInfo.qml 2016-03-08 02:27:36 +0000
+++ src/qml/InputInfo.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import QtSystemInfo 5.520import QtSystemInfo 5.5
2121
22Item {22Item {
2323
=== modified file 'src/qml/LiveCallPage/ConferenceCallDisplay.qml'
--- src/qml/LiveCallPage/ConferenceCallDisplay.qml 2016-08-24 17:50:38 +0000
+++ src/qml/LiveCallPage/ConferenceCallDisplay.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.ListItems 1.3 as ListItem21import Ubuntu.Components.ListItems 1.3 as ListItem
22import Ubuntu.Telephony 0.122import Ubuntu.Telephony 0.1
2323
=== modified file 'src/qml/LiveCallPage/HangupButton.qml'
--- src/qml/LiveCallPage/HangupButton.qml 2016-08-24 17:50:38 +0000
+++ src/qml/LiveCallPage/HangupButton.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
2121
22AbstractButton {22AbstractButton {
2323
=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
--- src/qml/LiveCallPage/LiveCall.qml 2017-03-22 17:10:08 +0000
+++ src/qml/LiveCallPage/LiveCall.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.ListItems 1.3 as ListItems21import Ubuntu.Components.ListItems 1.3 as ListItems
22import Ubuntu.Components.Popups 1.322import Ubuntu.Components.Popups 1.3
@@ -52,8 +52,8 @@
52 return i18n.tr("Conference");52 return i18n.tr("Conference");
53 } else if (contactWatcher.alias !== "") {53 } else if (contactWatcher.alias !== "") {
54 return contactWatcher.alias;54 return contactWatcher.alias;
55 } else if (contactWatcher.identifier !== "") {55 } else if (call && call.phoneNumber !== "") {
56 return contactWatcher.identifier;56 return call.phoneNumber;
57 } else if (!call && initialNumber != "") {57 } else if (!call && initialNumber != "") {
58 return initialNumber58 return initialNumber
59 } else {59 } else {
@@ -387,7 +387,15 @@
387 ContactWatcher {387 ContactWatcher {
388 id: contactWatcher388 id: contactWatcher
389 // FIXME: handle conf calls389 // FIXME: handle conf calls
390 identifier: call ? call.phoneNumber : ""390 identifier: {
391 if (initialNumber != "") {
392 return initialNumber
393 } else if (call) {
394 return call.phoneNumber
395 }
396 return ""
397 }
398
391 onDetailPropertiesChanged: helper.updateSubTypeLabel()399 onDetailPropertiesChanged: helper.updateSubTypeLabel()
392 onIsUnknownChanged: helper.updateSubTypeLabel()400 onIsUnknownChanged: helper.updateSubTypeLabel()
393 // FIXME: if we implement VOIP, get the addressable fields from the account itself401 // FIXME: if we implement VOIP, get the addressable fields from the account itself
394402
=== modified file 'src/qml/LiveCallPage/LiveCallKeypadButton.qml'
--- src/qml/LiveCallPage/LiveCallKeypadButton.qml 2016-08-24 17:50:38 +0000
+++ src/qml/LiveCallPage/LiveCallKeypadButton.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
2121
22AbstractButton {22AbstractButton {
2323
=== modified file 'src/qml/LiveCallPage/MultiCallDisplay.qml'
--- src/qml/LiveCallPage/MultiCallDisplay.qml 2015-09-07 15:40:45 +0000
+++ src/qml/LiveCallPage/MultiCallDisplay.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.ListItems 1.3 as ListItems21import Ubuntu.Components.ListItems 1.3 as ListItems
22import Ubuntu.Contacts 0.122import Ubuntu.Contacts 0.1
2323
=== modified file 'src/qml/LiveCallPage/StopWatch.qml'
--- src/qml/LiveCallPage/StopWatch.qml 2015-09-07 15:40:45 +0000
+++ src/qml/LiveCallPage/StopWatch.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
2121
22Item {22Item {
2323
=== modified file 'src/qml/MMI/IMEI.qml'
--- src/qml/MMI/IMEI.qml 2016-08-24 17:52:19 +0000
+++ src/qml/MMI/IMEI.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.Popups 1.321import Ubuntu.Components.Popups 1.3
2222
2323
=== modified file 'src/qml/MMI/IMEIDialog.qml'
--- src/qml/MMI/IMEIDialog.qml 2016-10-18 09:28:54 +0000
+++ src/qml/MMI/IMEIDialog.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Ubuntu.Telephony 0.120import Ubuntu.Telephony 0.1
21import Ubuntu.Components 1.321import Ubuntu.Components 1.3
22import Ubuntu.Components.Popups 1.322import Ubuntu.Components.Popups 1.3
2323
=== added directory 'src/qml/SettingsPage'
=== added directory 'src/qml/SettingsPage/AccountSettings'
=== added file 'src/qml/SettingsPage/AccountSettings/CMakeLists.txt'
--- src/qml/SettingsPage/AccountSettings/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/AccountSettings/CMakeLists.txt 2017-03-22 17:10:08 +0000
@@ -0,0 +1,6 @@
1file(GLOB ACCOUNT_SETTINGS_QML_JS_FILES *.qml *.js)
2
3# make the files visible on qtcreator
4add_custom_target(dialer__account_settings_QMlFiles ALL SOURCES ${ACCOUNT_SETTINGS_QML_JS_FILES})
5
6install(FILES ${ACCOUNT_SETTINGS_QML_JS_FILES} DESTINATION ${DIALER_APP_DIR}/SettingsPage/AccountSettings)
07
=== added file 'src/qml/SettingsPage/AccountSettings/SipNumberRewrite.qml'
--- src/qml/SettingsPage/AccountSettings/SipNumberRewrite.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/AccountSettings/SipNumberRewrite.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,177 @@
1/*
2 * This file is part of dialer-app
3 *
4 * Copyright (C) 2017 Canonical Ltd.
5 *
6 * Authors: Gustavo Pichorim Boiko <gustavo.boiko@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21import QtQuick 2.4
22import Ubuntu.Components 1.3
23import Ubuntu.Components.ListItems 1.3 as ListItems
24import Ubuntu.Components.Themes.Ambiance 0.1
25import "../"
26
27Page {
28 id: page
29 // TRANSLATORS: %1 is the displayname of the account
30 title: i18n.tr("%1 Number Rewrite").arg(account.displayName)
31 header: PageHeader {
32 title: page.title
33 flickable: contentFlickable
34 }
35
36 property var account: null
37 property bool updating: false
38 onAccountChanged: {
39 if (!account) {
40 return
41 }
42
43
44 var props = account.accountProperties
45 for (var i in props) {
46 console.log(i + ": " + props[i])
47 console.log(props.defaultAreaCode)
48 }
49
50 updating = true
51 numberRewriteSwitch.checked = props.numberRewrite
52 countryCodeField.text = props.defaultCountryCode
53 areaCodeField.text = props.defaultAreaCode
54 removeInputField.text = props.removeCharacters
55 prefixInputField.text = props.prefix
56 updating = false
57 }
58
59 function setAccountProperty(prop, value) {
60 if (updating) {
61 return
62 }
63
64 var properties = account.accountProperties
65 properties[prop] = value
66 account.accountProperties = properties
67 }
68
69 Flickable {
70 id: contentFlickable
71 anchors.fill: parent
72 Column {
73 height: childrenRect.height
74 spacing: units.gu(1)
75 anchors {
76 left: parent.left
77 right: parent.right
78 }
79
80 ListItems.Standard {
81 control: Switch {
82 id: numberRewriteSwitch
83 objectName: "numberRewriteSwitch"
84 onCheckedChanged: {
85 setAccountProperty("numberRewrite", checked)
86 }
87 }
88 text: i18n.tr("Number rewrite")
89 showDivider: !numberRewriteSwitch.checked
90 }
91
92 ListItems.Standard {
93 id: countryCodeItem
94 height: visible ? units.gu(6) : 0
95 visible: numberRewriteSwitch.checked
96 text: i18n.tr("Default country code")
97 control: SettingsTextField {
98 id: countryCodeField
99 objectName: "countryCodeField"
100 placeholderText: i18n.tr("Enter a country code")
101 onTextChanged: {
102 setAccountProperty("defaultCountryCode", text)
103 }
104 }
105 Behavior on height {
106 NumberAnimation {
107 duration: UbuntuAnimation.SnapDuration
108 }
109 }
110 }
111
112 ListItems.Standard {
113 id: areaCodeItem
114 height: visible ? units.gu(6) : 0
115 // FIXME: re-enable the area code when we get libphonenumber detection fixed
116 //visible: numberRewriteSwitch.checked
117 visible: false
118 text: i18n.tr("Default area code")
119 control: SettingsTextField {
120 id: areaCodeField
121 objectName: "areaCodeField"
122 placeholderText: i18n.tr("Enter an area code")
123 onTextChanged: {
124 setAccountProperty("defaultAreaCode", text)
125 }
126 }
127 Behavior on height {
128 NumberAnimation {
129 duration: UbuntuAnimation.SnapDuration
130 }
131 }
132 }
133
134 ListItems.Standard {
135 id: removeInput
136 visible: numberRewriteSwitch.checked
137 height: visible ? units.gu(6) : 0
138 text: i18n.tr("Characters to remove")
139 control: SettingsTextField {
140 id: removeInputField
141 objectName: "removeInputField"
142 placeholderText: i18n.tr("Enter the characters to remove")
143 onTextChanged: {
144 setAccountProperty("removeCharacters", text)
145 }
146 }
147
148 Behavior on height {
149 NumberAnimation {
150 duration: UbuntuAnimation.SnapDuration
151 }
152 }
153 }
154
155 ListItems.Standard {
156 id: prefixInput
157 visible: numberRewriteSwitch.checked
158 height: visible ? units.gu(6) : 0
159 text: i18n.tr("Prefix")
160 control: SettingsTextField {
161 id: prefixInputField
162 objectName: "prefixInputField"
163 placeholderText: i18n.tr("Enter a prefix")
164 onTextChanged: {
165 setAccountProperty("prefix", text)
166 }
167 }
168
169 Behavior on height {
170 NumberAnimation {
171 duration: UbuntuAnimation.SnapDuration
172 }
173 }
174 }
175 }
176 }
177}
0178
=== added file 'src/qml/SettingsPage/AccountSettings/sip.qml'
--- src/qml/SettingsPage/AccountSettings/sip.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/AccountSettings/sip.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,30 @@
1/*
2 * This file is part of dialer-app
3 *
4 * Copyright (C) 2017 Canonical Ltd.
5 *
6 * Authors: Gustavo Pichorim Boiko <gustavo.boiko@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21import Ubuntu.Components 1.3
22import Ubuntu.Components.ListItems 1.3 as ListItems
23
24ListItems.SingleValue {
25 property var account: null
26 text: i18n.tr("%1 Number Rewrite").arg(account.displayName)
27 progression: true
28 value: account.accountProperties.numberRewrite ? i18n.tr("On") : i18n.tr("Off")
29 onClicked: pageStackNormalMode.push(Qt.resolvedUrl("SipNumberRewrite.qml"), { "account": account })
30}
031
=== added file 'src/qml/SettingsPage/CMakeLists.txt'
--- src/qml/SettingsPage/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/CMakeLists.txt 2017-03-22 17:10:08 +0000
@@ -0,0 +1,8 @@
1file(GLOB SETTINGS_QML_JS_FILES *.qml *.js)
2
3# make the files visible on qtcreator
4add_custom_target(dialer_settings_QMlFiles ALL SOURCES ${SETTINGS_QML_JS_FILES})
5
6install(FILES ${SETTINGS_QML_JS_FILES} DESTINATION ${DIALER_APP_DIR}/SettingsPage)
7
8add_subdirectory(AccountSettings)
09
=== added file 'src/qml/SettingsPage/CallForwardItem.qml'
--- src/qml/SettingsPage/CallForwardItem.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/CallForwardItem.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,240 @@
1/*
2 * This file is part of dialer-app
3 *
4 * Copyright (C) 2015-2017 Canonical Ltd.
5 *
6 * Contact: Jonas G. Drange <jonas.drange@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21import QtQuick 2.4
22import Ubuntu.Components 1.3
23import Ubuntu.Components.ListItems 1.3 as ListItem
24import Ubuntu.Components.Themes.Ambiance 0.1
25import MeeGo.QOfono 0.2
26import "callForwardingUtils.js" as Utils
27
28Column {
29 id: item
30
31 property OfonoCallForwarding callForwarding
32 property bool enabled: true
33 property string rule
34
35 property alias checked: check.checked
36 property alias busy: d._pending
37 property alias text: control.text
38 property alias value: current.value
39 property alias field: field
40
41 signal checked ()
42 signal failed ()
43 signal enteredEditMode ()
44 signal leftEditMode ()
45
46 /**
47 * Saves the rule.
48 */
49 function save () {
50 d._pending = true;
51 if (!Utils.requestRule(field.text)) {
52 d._pending = false;
53 d._editing = false;
54 checked: callForwarding[rule] !== "";
55 }
56 }
57
58 /**
59 * Cancels editing the rule.
60 */
61 function cancel () {
62 d._editing = false;
63 check.checked = callForwarding[rule] !== "";
64 }
65
66 /**
67 * Private object that keeps track of state of the UI.
68 */
69 QtObject {
70 id: d
71
72 /**
73 * Server is working.
74 */
75 property bool _pending: !callForwarding.ready
76
77 /**
78 * Server failed to change/fetch setting.
79 */
80 property bool _failed: false
81
82 /**
83 * We're editing.
84 */
85 property bool _editing: false
86 on_EditingChanged: Utils.editingChanged()
87
88 /**
89 * Whether or not the forwarding rule is active.
90 */
91 property bool _active: callForwarding[rule] !== ""
92 }
93
94 states: [
95 State {
96 name: "failed"
97 when: d._failed
98 PropertyChanges { target: control; enabled: false; control: check }
99 PropertyChanges { target: check; checked: false }
100 PropertyChanges { target: failed; visible: true }
101 PropertyChanges { target: activity; visible: false }
102 },
103 State {
104 name: "disabled"
105 when: !enabled
106 PropertyChanges { target: control; enabled: false }
107 PropertyChanges { target: check; enabled: false }
108 PropertyChanges { target: current; enabled: false }
109 },
110 State {
111 name: "requesting"
112 when: d._editing && d._pending
113 PropertyChanges { target: control; control: activity }
114 PropertyChanges { target: check; enabled: false; visible: false }
115 PropertyChanges { target: current; enabled: false; visible: true }
116 },
117 State {
118 name: "pending"
119 when: d._pending
120 PropertyChanges { target: control; control: activity }
121 PropertyChanges { target: check; enabled: false; visible: false }
122 PropertyChanges { target: current; enabled: false; visible: false }
123 },
124 State {
125 name: "editing"
126 when: d._editing
127 PropertyChanges { target: check; enabled: false }
128 PropertyChanges { target: current; visible: false }
129 PropertyChanges { target: input; visible: true }
130 },
131 State {
132 name: "active"
133 when: d._active
134 PropertyChanges { target: current; visible: true }
135 }
136 ]
137
138 ListItem.ThinDivider { anchors { left: parent.left; right: parent.right }}
139
140 ListItem.Standard {
141 id: control
142 onClicked: check.trigger(!check.checked)
143 control: CheckBox {
144 id: check
145 objectName: "check_" + rule
146 checked: callForwarding[rule] !== ""
147 onTriggered: Utils.checked(checked)
148 visible: !activity.running
149 }
150 }
151
152 ListItem.Standard {
153 id: input
154 visible: false
155 height: visible ? units.gu(6) : 0
156 /* TRANSLATORS: This string will be truncated on smaller displays. */
157 text: i18n.tr("Forward to")
158 control: TextField {
159 id: field
160 objectName: "field_" + rule
161 horizontalAlignment: TextInput.AlignRight
162 inputMethodHints: Qt.ImhDialableCharactersOnly
163 text: callForwarding[rule]
164 font.pixelSize: units.dp(18)
165 font.weight: Font.Light
166 font.family: "Ubuntu"
167 color: "#AAAAAA"
168 maximumLength: 20
169 focus: true
170 cursorVisible: text === "" || text !== callForwarding[rule]
171 placeholderText: i18n.tr("Enter a number")
172 style: TextFieldStyle {
173 overlaySpacing: units.gu(0.5)
174 frameSpacing: 0
175 background: Rectangle {
176 property bool error: (field.hasOwnProperty("errorHighlight") &&
177 field.errorHighlight &&
178 !field.acceptableInput)
179 onErrorChanged: error ? theme.palette.normal.negative : color
180 color: Theme.palette.normal.background
181 anchors.fill: parent
182 visible: field.activeFocus
183 }
184 }
185
186 onVisibleChanged:
187 if (visible === true) forceActiveFocus()
188 }
189
190 Behavior on height {
191 NumberAnimation {
192 duration: UbuntuAnimation.SnapDuration
193 }
194 }
195 }
196
197 ListItem.SingleValue {
198 id: current
199 objectName: "current_" + rule
200 visible: value
201 /* TRANSLATORS: This string will be truncated on smaller displays. */
202 text: i18n.tr("Forward to")
203 value: callForwarding[rule]
204 onClicked: d._editing = true
205 }
206
207 /* Error message shown when updating fails. */
208 Label {
209 id: failed
210 anchors {
211 left: parent.left; right: parent.right; margins: units.gu(2);
212 }
213 visible: false
214 height: contentHeight + units.gu(4)
215 horizontalAlignment: Text.AlignHCenter
216 verticalAlignment: Text.AlignVCenter
217 color: theme.palette.normal.negative
218 text: i18n.tr("Call forwarding can't be changed right now.")
219 }
220
221 ActivityIndicator {
222 id: activity
223 running: d._pending
224 visible: running
225 }
226
227 Connections {
228 target: item
229 Component.onCompleted: {
230 item.callForwarding[item.rule + 'Changed'].connect(Utils.ruleChanged);
231 item.callForwarding[item.rule + 'Complete'].connect(Utils.ruleComplete);
232 item.callForwarding.readyChanged.connect(Utils.ruleReadyChanged);
233 }
234 Component.onDestruction: {
235 item.callForwarding[item.rule + 'Changed'].disconnect(Utils.ruleChanged);
236 item.callForwarding[item.rule + 'Complete'].disconnect(Utils.ruleComplete);
237 item.callForwarding.readyChanged.disconnect(Utils.ruleReadyChanged);
238 }
239 }
240}
0241
=== added file 'src/qml/SettingsPage/CallForwarding.qml'
--- src/qml/SettingsPage/CallForwarding.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/CallForwarding.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,393 @@
1/*
2 * This file is part of dialer-app
3 *
4 * Copyright (C) 2013-2017 Canonical Ltd.
5 *
6 * Contact:
7 * Sebastien Bacher <sebastien.bacher@canonical.com>
8 * Jonas G. Drange <jonas.drange@canonical.com>
9 *
10 * This program is free software: you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License version 3, as published
12 * by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranties of
16 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
17 * PURPOSE. See the GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program. If not, see <http://www.gnu.org/licenses/>.
21 *
22 * TODO: Add centrally stored setting for each call forwarding that describes a
23 * contact. lp:1467816
24 *
25 * TODO: If a setting failed to be set, the error text should be followed by
26 * “Contact {carrier name} for more information.”.
27 */
28
29import QtQuick 2.4
30import QtContacts 5.0
31import MeeGo.QOfono 0.2
32import Ubuntu.Components 1.3
33import Ubuntu.Components.ListItems 1.3 as ListItem
34import Ubuntu.Components.Popups 1.3
35import Ubuntu.Components.Themes.Ambiance 0.1
36import Ubuntu.Content 1.3
37import "callForwardingUtils.js" as Utils
38
39Page {
40 id: page
41 objectName: "callForwardingPage"
42 title: headerTitle
43 property var sim
44 property string headerTitle: i18n.tr("Call forwarding")
45 property QtObject editing: null
46 property QtObject activeItem: null
47 property var activeTransfer
48
49 header: PageHeader {
50 id: pageHeader
51 title: page.title
52 flickable: flick
53 }
54
55 states: [
56 State {
57 name: "forwardBusy"
58 PropertyChanges { target: fwdSomeTitle; enabled: false }
59 PropertyChanges { target: fwdAll; enabled: false; }
60 PropertyChanges { target: fwdBusy; enabled: false; }
61 PropertyChanges { target: fwdLost; enabled: false; }
62 PropertyChanges { target: fwdUnreachable; enabled: false; }
63 when: fwdAll.busy || fwdBusy.busy || fwdLost.busy || fwdUnreachable.busy
64 },
65 State {
66 name: "forwardFailed"
67 PropertyChanges { target: fwdSomeTitle; enabled: false }
68 PropertyChanges { target: fwdFailedLabel; visible: true }
69 PropertyChanges { target: fwdAll; enabled: false; }
70 PropertyChanges { target: fwdBusy; enabled: false; }
71 PropertyChanges { target: fwdLost; enabled: false; }
72 PropertyChanges { target: fwdUnreachable; enabled: false; }
73 },
74 State {
75 name: "editing"
76 PropertyChanges { target: fwdAll; enabled: false; explicit: true }
77 PropertyChanges { target: fwdBusy; enabled: false; explicit: true }
78 PropertyChanges { target: fwdLost; enabled: false; explicit: true }
79 PropertyChanges { target: fwdUnreachable; enabled: false; explicit: true }
80 PropertyChanges { target: fwdSomeTitle; enabled: false }
81 StateChangeScript {
82 name: "editingEnabled"
83 script: {
84 editing.opacity = 1;
85 editing.enabled = true;
86 }
87 }
88 when: editing !== null
89 },
90 State {
91 name: "forwardAll"
92 PropertyChanges { target: fwdSomeTitle; }
93 PropertyChanges { target: fwdBusy; enabled: false; value: ""; checked: false }
94 PropertyChanges { target: fwdLost; enabled: false; value: ""; checked: false }
95 PropertyChanges { target: fwdUnreachable; enabled: false; value: ""; checked: false }
96 when: fwdAll.value !== ""
97 }
98 ]
99
100 Flickable {
101 id: flick
102
103 // this is necessary to avoid the page to appear below the header
104 clip: true
105 flickableDirection: Flickable.VerticalFlick
106 anchors {
107 fill: parent
108 bottomMargin: keyboardButtons.height + keyboard.height
109 }
110 contentHeight: contents.height + units.gu(2)
111 contentWidth: parent.width
112
113 // after add a new field we need to wait for the contentHeight to
114 // change to scroll to the correct position
115 onContentHeightChanged: Utils.show(page.activeItem)
116
117 Column {
118 id: contents
119 anchors { left: parent.left; right: parent.right }
120 spacing: units.gu(1)
121
122 CallForwardItem {
123 id: fwdAll
124 anchors { left: parent.left; right: parent.right }
125 rule: "voiceUnconditional"
126 callForwarding: callForwarding
127 text: i18n.tr("Forward every incoming call")
128 onEnteredEditMode: {page.editing = fwdAll; Utils.show(field)}
129 onLeftEditMode: page.editing = null
130 }
131
132 Label {
133 id: fwdAllCaption
134 anchors {
135 left: parent.left; right: parent.right; margins: units.gu(1)
136 }
137 width: parent.width
138 wrapMode: Text.WordWrap
139 fontSize: "small"
140 horizontalAlignment: Text.AlignHCenter
141 verticalAlignment: Text.AlignVCenter
142 text: i18n.tr("Redirects all phone calls to another number.")
143 opacity: 0.8
144 }
145
146 Label {
147 id: fwdFailedLabel
148 anchors {
149 left: parent.left; right: parent.right; margins: units.gu(2)
150 }
151 width: parent.width
152 wrapMode: Text.WordWrap
153 visible: false
154 text: i18n.tr("Call forwarding status can't be checked " +
155 "now. Try again later.")
156 color: theme.palette.normal.negative
157 horizontalAlignment: Text.AlignHCenter
158 }
159
160 SettingsItemTitle {
161 id: fwdSomeTitle
162 text: i18n.tr("Forward incoming calls when:")
163 }
164
165 CallForwardItem {
166 id: fwdBusy
167 objectName: "fwdBusy"
168 anchors { left: parent.left; right: parent.right }
169 callForwarding: callForwarding
170 rule: "voiceBusy"
171 text: i18n.tr("I'm on another call")
172 onEnteredEditMode: {page.editing = fwdBusy; Utils.show(field)}
173 onLeftEditMode: page.editing = null
174 }
175
176 CallForwardItem {
177 id: fwdLost
178 objectName: "fwdLost"
179 anchors { left: parent.left; right: parent.right }
180 callForwarding: callForwarding
181 rule: "voiceNoReply"
182 text: i18n.tr("I don't answer")
183 onEnteredEditMode: {page.editing = fwdLost; Utils.show(field)}
184 onLeftEditMode: page.editing = null
185 }
186
187 CallForwardItem {
188 id: fwdUnreachable
189 objectName: "fwdUnreachable"
190 anchors { left: parent.left; right: parent.right }
191 callForwarding: callForwarding
192 rule: "voiceNotReachable"
193 text: i18n.tr("My phone is unreachable")
194 onEnteredEditMode: {
195 page.editing = fwdUnreachable;
196 Utils.show(field);
197 }
198 onLeftEditMode: page.editing = null
199 }
200 }
201 } // Flickable
202
203 Rectangle {
204 id: keyboardButtons
205 anchors {
206 left: parent.left
207 right: parent.right
208 bottom: keyboard.top
209 }
210 color: Theme.palette.selected.background
211 visible: editing !== null
212 height: units.gu(6)
213 Button {
214 id: kbdContacts
215 objectName: "contactsButton"
216 anchors {
217 left: parent.left
218 leftMargin: units.gu(1)
219 verticalCenter: parent.verticalCenter
220 }
221 activeFocusOnPress: false
222 enabled: editing && !editing.busy
223 text: i18n.tr("Contacts...")
224 onClicked: page.activeTransfer = contactPicker.request()
225 }
226
227 Button {
228 id: kbdCancel
229 objectName: "cancelButton"
230 anchors {
231 right: kbdSet.left
232 rightMargin: units.gu(1)
233 verticalCenter: parent.verticalCenter
234 }
235 enabled: editing && !editing.busy
236 text: i18n.tr("Cancel")
237 onClicked: editing.cancel()
238 }
239
240 Button {
241 id: kbdSet
242 objectName: "setButton"
243 anchors {
244 right: parent.right
245 rightMargin: units.gu(1)
246 verticalCenter: parent.verticalCenter
247 }
248 enabled: editing && !editing.busy && editing.field.text
249 text: i18n.tr("Set")
250 activeFocusOnPress: false
251 onClicked: editing.save()
252 }
253 }
254
255 KeyboardRectangle {
256 id: keyboard
257 anchors.bottom: parent.bottom
258 onHeightChanged: {
259 if (page.activeItem) {
260 Utils.show(page.activeItem);
261 }
262 }
263 }
264
265 Component {
266 id: chooseNumberDialog
267 Dialog {
268 id: dialog
269 property var contact
270 title: i18n.tr("Please select a phone number")
271
272 ListItem.ItemSelector {
273 anchors {
274 left: parent.left
275 right: parent.right
276 }
277 activeFocusOnPress: false
278 expanded: true
279 text: i18n.tr("Numbers")
280 model: contact.phoneNumbers
281 selectedIndex: -1
282 delegate: OptionSelectorDelegate {
283 text: modelData.number
284 activeFocusOnPress: false
285 }
286 onDelegateClicked: {
287 editing.field.text = contact.phoneNumbers[index].number;
288 PopupUtils.close(dialog);
289 }
290 }
291 }
292 }
293
294 Component {
295 id: hadNoNumberDialog
296 Dialog {
297 id: dialog
298 title: i18n.tr("Could not forward to this contact")
299 text: i18n.tr("Contact not associated with any phone number.")
300 Button {
301 text: i18n.tr("OK")
302 activeFocusOnPress: false
303 onClicked: PopupUtils.close(dialog)
304 }
305 }
306 }
307
308 VCardParser {
309 id: contactParser
310
311 function parseContact(vcardContact) {
312 return vcardContact;
313 }
314
315 onVcardParsed: {
316 var contact;
317 if (contacts.length === 0) {
318 console.warn('no contacts parsed');
319 return;
320 } else {
321 contact = parseContact(contacts[0]);
322 if (contact.phoneNumbers.length < 1) {
323 PopupUtils.open(hadNoNumberDialog);
324 } else if (contact.phoneNumbers.length > 1) {
325 PopupUtils.open(chooseNumberDialog, page, {
326 'contact': contact
327 });
328 } else {
329 editing.field.text = contact.phoneNumber.number;
330 }
331 }
332 }
333 }
334
335 ContentTransferHint {
336 id: importHint
337 anchors.fill: parent
338 activeTransfer: page.activeTransfer
339 }
340
341 ContentPeer {
342 id: contactPicker
343 contentType: ContentType.Contacts
344 handler: ContentHandler.Source
345 selectionType: ContentTransfer.Single
346 }
347
348 Connections {
349 target: page.activeTransfer ? page.activeTransfer : null
350 onStateChanged: {
351 if (page.activeTransfer.state === ContentTransfer.Charged) {
352 contactParser.vCardUrl = page.activeTransfer.items[0].url;
353 }
354 }
355 }
356
357 Connections {
358 target: callForwarding
359 onGetPropertiesFailed: page.state = "forwardFailed";
360 }
361
362 OfonoCallForwarding {
363 id: callForwarding
364 modemPath: sim.path
365 function updateSummary () {
366 var val;
367
368 // Clear the summary and exit if any of the values are unknown.
369 if (typeof voiceUnconditional === 'undefined' ||
370 typeof voiceBusy === 'undefined' ||
371 typeof voiceNoReply === 'undefined' ||
372 typeof voiceNotReachable === 'undefined') {
373 sim.setCallForwardingSummary('');
374 return;
375 }
376
377 if (voiceUnconditional) {
378 val = i18n.tr("All calls");
379 } else if (voiceBusy || voiceNoReply || voiceNotReachable) {
380 val = i18n.tr("Some calls")
381 } else {
382 val = i18n.tr("Off")
383 }
384 sim.setCallForwardingSummary(val);
385 }
386
387 Component.onCompleted: updateSummary()
388 onVoiceUnconditionalChanged: updateSummary()
389 onVoiceBusyChanged: updateSummary()
390 onVoiceNoReplyChanged: updateSummary()
391 onVoiceNotReachableChanged: updateSummary()
392 }
393}
0394
=== added file 'src/qml/SettingsPage/CallWaiting.qml'
--- src/qml/SettingsPage/CallWaiting.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/CallWaiting.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,108 @@
1/*
2 * This file is part of dialer-app
3 *
4 * Copyright (C) 2013-2017 Canonical Ltd.
5 *
6 * Contact: Iain Lane <iain.lane@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21import QtQuick 2.4
22import Ubuntu.Components 1.3
23import Ubuntu.Components.ListItems 1.3 as ListItem
24import MeeGo.QOfono 0.2
25
26Page {
27 id: page
28 objectName: "callWaitingPage"
29 title: headerTitle
30 property var sim
31 property string headerTitle: i18n.tr("Call waiting")
32 property bool attached: sim.netReg.status === "registered" || sim.netReg.status === "roaming"
33
34 header: PageHeader {
35 id: pageHeader
36 title: page.title
37 }
38
39 OfonoCallSettings {
40 id: callSettings
41 modemPath: sim.path
42 onVoiceCallWaitingChanged: {
43 callWaitingIndicator.running = false;
44 }
45 onGetPropertiesFailed: {
46 console.warn('callSettings, onGetPropertiesFailed');
47 callWaitingIndicator.running = false;
48 }
49 onVoiceCallWaitingComplete: {
50 //When the property change is complete, the value of checked should always be in sync with serverChecked
51 callWaitingSwitch.checked = callWaitingSwitch.serverChecked
52 /* Log some additional output to help debug when things don't work */
53 console.warn('callSettings, onVoiceCallWaitingComplete modem: ' + modemPath + ' success: ' + success + ' ' + voiceCallWaiting);
54 callWaitingIndicator.running = false;
55 }
56 }
57
58 ActivityIndicator {
59 id: callWaitingIndicator
60 running: true
61 visible: running && attached
62 }
63
64 Switch {
65 id: callWaitingSwitch
66 objectName: "callWaitingSwitch"
67 visible: !callWaitingIndicator.running
68 enabled: callSettings.ready && attached
69 property bool serverChecked: callSettings.voiceCallWaiting !== "disabled"
70 onServerCheckedChanged: checked = serverChecked
71 Component.onCompleted: checked = serverChecked
72 onTriggered: {
73 callWaitingIndicator.running = true;
74 if (checked)
75 callSettings.voiceCallWaiting = "enabled";
76 else
77 callSettings.voiceCallWaiting = "disabled";
78 }
79 }
80
81 Column {
82 anchors.fill: parent
83
84 ListItem.Standard {
85 id: callWaitingItem
86 text: i18n.tr("Call waiting")
87 control: callWaitingIndicator.running ?
88 callWaitingIndicator : callWaitingSwitch
89 }
90
91 ListItem.Base {
92 height: textItem.height + units.gu(2)
93 Label {
94 id: textItem
95 anchors {
96 left: parent.left
97 right: parent.right
98 verticalCenter: parent.verticalCenter
99 }
100
101 text: i18n.tr("Lets you answer or start a new call while on another call, and switch between them")
102 horizontalAlignment: Text.AlignHCenter
103 wrapMode: Text.WordWrap
104 }
105 showDivider: false
106 }
107 }
108}
0109
=== added file 'src/qml/SettingsPage/KeyboardRectangle.qml'
--- src/qml/SettingsPage/KeyboardRectangle.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/KeyboardRectangle.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,77 @@
1/*
2 * Copyright (C) 2015-2017 Canonical, Ltd.
3 *
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.
7 *
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.
12 *
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/>.
15 */
16
17import QtQuick 2.4
18
19Item {
20 id: keyboardRect
21 anchors.left: parent.left
22 anchors.right: parent.right
23 anchors.bottom: parent.bottom
24 height: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
25
26 Behavior on height {
27 NumberAnimation {
28 duration: 300
29 easing.type: Easing.InOutQuad
30 }
31 }
32
33 states: [
34 State {
35 name: "hidden"
36 when: keyboardRect.height == 0
37 },
38 State {
39 name: "shown"
40 when: keyboardRect.height == Qt.inputMethod.keyboardRectangle.height
41 }
42 ]
43
44 function recursiveFindFocusedItem(parent) {
45 if (parent.activeFocus) {
46 return parent;
47 }
48
49 for (var i in parent.children) {
50 var child = parent.children[i];
51 if (child.activeFocus) {
52 return child;
53 }
54
55 var item = recursiveFindFocusedItem(child);
56
57 if (item != null) {
58 return item;
59 }
60 }
61
62 return null;
63 }
64
65 Connections {
66 target: Qt.inputMethod
67
68 onVisibleChanged: {
69 if (!Qt.inputMethod.visible) {
70 var focusedItem = recursiveFindFocusedItem(keyboardRect.parent);
71 if (focusedItem != null) {
72 focusedItem.focus = false;
73 }
74 }
75 }
76 }
77}
078
=== added file 'src/qml/SettingsPage/MultiSim.qml'
--- src/qml/SettingsPage/MultiSim.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/MultiSim.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,113 @@
1/*
2 * Copyright (C) 2014-2017 Canonical Ltd
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
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.
12 *
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/>.
15 *
16 * Authors:
17 * Ken Vandine <ken.vandine@canonical.com>
18 * Jonas G. Drange <jonas.drange@canonical.com>
19 *
20*/
21import QtQuick 2.4
22import GSettings 1.0
23import Ubuntu.Components 1.3
24import Ubuntu.Components.ListItems 1.3 as ListItem
25
26Column {
27
28 property var sims
29
30 Repeater {
31 model: sims
32
33 Column {
34
35 anchors { left: parent.left; right: parent.right }
36
37 SettingsItemTitle { text: sims[index].title }
38
39 ListItem.Standard {
40 objectName: "callWaitSim" + index
41 text: i18n.tr("Call waiting")
42 progression: true
43 onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {
44 sim: sims[index],
45 headerTitle: sims[index].title
46 })
47 }
48
49 ListItem.SingleValue {
50 objectName: "callFwdSim" + index
51 text: i18n.tr("Call forwarding")
52 progression: true
53 value: sims[index].getCallForwardingSummary()
54 onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {
55 sim: sims[index],
56 headerTitle: sims[index].title
57 })
58 }
59
60 ListItem.Standard {
61 objectName: "simServicesSim" + index
62 text: i18n.tr("Services")
63 progression: true
64 enabled: {
65 var num;
66 var map = sims[index].simMng.serviceNumbers;
67 var nums = false;
68 for(num in map) {
69 if (map.hasOwnProperty(num)) {
70 nums = true;
71 break;
72 }
73 }
74 return sims[index].simMng.present && nums;
75 }
76 showDivider: false
77 onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"), {
78 carrierString: sims[index].netReg.name,
79 sim: sims[index],
80 headerTitle: sims[index].title
81 })
82 }
83
84 ListItem.Divider {
85 visible: index !== (sims.length - 1)
86 }
87
88 Binding {
89 target: sims[index]
90 property: "name"
91 value: phoneSettings.simNames[sims[index]]
92 }
93 }
94 }
95
96 GSettings {
97 id: phoneSettings
98 schema.id: "com.ubuntu.phone"
99 Component.onCompleted: {
100 // set default names
101 var simNames = phoneSettings.simNames;
102 var m0 = sims[0].path
103 var m1 = sims[1].path
104 if (!simNames[m0]) {
105 simNames[m0] = "SIM 1";
106 }
107 if (!simNames[m1]) {
108 simNames[m1] = "SIM 2";
109 }
110 phoneSettings.simNames = simNames;
111 }
112 }
113}
0114
=== added file 'src/qml/SettingsPage/NoSims.qml'
--- src/qml/SettingsPage/NoSims.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/NoSims.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,46 @@
1/*
2 * Copyright (C) 2014-2017 Canonical Ltd
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
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.
12 *
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/>.
15 *
16 * Authors:
17 * Ken Vandine <ken.vandine@canonical.com>
18 * Jonas G. Drange <jonas.drange@canonical.com>
19 *
20*/
21import QtQuick 2.4
22import Ubuntu.Components 1.3
23import Ubuntu.Components.ListItems 1.3 as ListItem
24
25Column {
26
27 ListItem.Standard {
28 text: i18n.tr("Call forwarding")
29 progression: true
30 enabled: false
31 }
32
33 ListItem.Standard {
34 text: i18n.tr("Call waiting")
35 progression: true
36 enabled: false
37 }
38
39 ListItem.Divider {}
40
41 ListItem.Standard {
42 text: i18n.tr("Services")
43 progression: true
44 enabled: false
45 }
46}
047
=== added file 'src/qml/SettingsPage/Ofono.qml'
--- src/qml/SettingsPage/Ofono.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/Ofono.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,69 @@
1/*
2 * Copyright (C) 2014-2017 Canonical Ltd
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
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.
12 *
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/>.
15 *
16 * Authors:
17 * Jonas G. Drange <jonas.drange@canonical.com>
18 *
19*/
20import QtQuick 2.4
21import GSettings 1.0
22import MeeGo.QOfono 0.2
23
24Item {
25 property alias netReg: netReg
26 property alias simMng: simMng
27 property alias present: simMng.present
28
29 property string path
30 property string name
31 property string title: {
32 var number = simMng.subscriberNumbers[0] || simMng.subscriberIdentity;
33 return name + (number ? " (" + number + ")" : "");
34 }
35
36 OfonoNetworkRegistration {
37 id: netReg
38 modemPath: path
39 }
40
41 OfonoSimManager {
42 id: simMng
43 modemPath: path
44 }
45
46 function setCallForwardingSummary (val) {
47 var tmp = {};
48 var fwdSum = settings.callforwardingSummaries;
49 for (var k in fwdSum){
50 if (fwdSum.hasOwnProperty(k)) {
51 tmp[k] = fwdSum[k];
52 }
53 }
54 // Prefer IMSI to identify the SIM, use ICCID if IMSI is not available.
55 tmp[simMng.subscriberIdentity || simMng.CardIdentifier] = val;
56 settings.callforwardingSummaries = tmp;
57 }
58
59 function getCallForwardingSummary () {
60 // Use either IMSI or ICCID to identify the SIM.
61 var sid = simMng.subscriberIdentity || simMng.CardIdentifier;
62 return settings.callforwardingSummaries[sid] || '';
63 }
64
65 GSettings {
66 id: settings
67 schema.id: "com.ubuntu.touch.system-settings"
68 }
69}
070
=== added file 'src/qml/SettingsPage/OnlineAccountsHelper.qml'
--- src/qml/SettingsPage/OnlineAccountsHelper.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/OnlineAccountsHelper.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,96 @@
1/*
2 * Copyright (C) 2014 Canonical, Ltd.
3 *
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.
7 *
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.
12 *
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/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import Ubuntu.OnlineAccounts 0.1
20import Ubuntu.OnlineAccounts.Client 0.1
21import Ubuntu.Components.Popups 1.3
22
23Item {
24 id: root
25
26 property var dialogInstance: null
27 readonly property int count: accountsModel.count
28
29 function run(){
30 if (!root.dialogInstance) {
31 root.dialogInstance = PopupUtils.open(dialog)
32 }
33 }
34
35 ProviderModel {
36 id: accountsModel
37
38 applicationId: "dialer-app"
39 }
40
41 Component {
42 id: dialog
43 Dialog {
44 id: dialogue
45 title: "Online Accounts"
46 text: i18n.tr("Pick an account to create.")
47
48 ScrollView {
49 width: dialog.width
50 height: Math.min(listView.count, 3) * units.gu(7)
51
52 ListView {
53 id: listView
54
55 anchors.fill: parent
56 clip: true
57 model: accountsModel
58 delegate: ListItem {
59 ListItemLayout {
60 title.text: model.displayName
61
62 Image {
63 SlotsLayout.position: SlotsLayout.First
64 source: "image://theme/" + model.iconName
65 width: units.gu(5)
66 height: width
67 }
68 }
69 onClicked: {
70 listView.enabled = false
71 setup.providerId = model.providerId
72 setup.exec()
73 }
74 }
75 }
76 }
77 Button {
78 text: i18n.tr("Cancel")
79 onClicked: PopupUtils.close(dialogue)
80 }
81
82 Component.onDestruction: {
83 root.dialogInstance = null
84 }
85 }
86 }
87
88 Setup {
89 id: setup
90 applicationId: "dialer-app"
91 providerId: "telephony-sip"
92 onFinished: {
93 PopupUtils.close(root.dialogInstance)
94 }
95 }
96}
097
=== added file 'src/qml/SettingsPage/ServiceInfo.qml'
--- src/qml/SettingsPage/ServiceInfo.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/ServiceInfo.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,133 @@
1/*
2 * This file is part of dialer-app
3 *
4 * Copyright (C) 2013-2017 Canonical Ltd.
5 *
6 * Contact: Sebastien Bacher <sebastien.bacher@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21import QtQuick 2.4
22import Ubuntu.Components 1.3
23import Ubuntu.Components.ListItems 1.3 as ListItem
24import Ubuntu.History 0.1
25import "dateUtils.js" as DateUtils
26
27Page {
28 id: page
29 property var sim
30 property string serviceName
31 property string serviceNumber
32 property string lastTimestamp
33 title: serviceName
34
35 header: PageHeader {
36 id: pageHeader
37 title: page.title
38 }
39
40 HistoryEventModel {
41 id: historyEventModel
42 type: HistoryThreadModel.EventTypeVoice
43 sort: HistorySort {
44 sortField: "timestamp"
45 sortOrder: HistorySort.DescendingOrder
46 }
47
48 property string phoneNumber: serviceNumber
49 onCountChanged: lastTimestamp = historyEventModel.get(0).timestamp
50
51 filter: HistoryUnionFilter {
52 // FIXME: this is not the best API for this case, but will be changed later
53 HistoryIntersectionFilter {
54 HistoryFilter {
55 property string threadId: historyEventModel.threadIdForParticipants("ofono/ofono/account0",
56 HistoryThreadModel.EventTypeVoice,
57 [historyEventModel.phoneNumber],
58 HistoryThreadModel.MatchPhoneNumber);
59 filterProperty: "threadId"
60 filterValue: threadId != "" ? threadId : "something that won't match"
61 }
62 HistoryFilter {
63 filterProperty: "accountId"
64 filterValue: "ofono/ofono/account0"
65 }
66 }
67
68 HistoryIntersectionFilter {
69 HistoryFilter {
70 property string threadId: historyEventModel.threadIdForParticipants("ofono/ofono/account1",
71 HistoryThreadModel.EventTypeVoice,
72 [historyEventModel.phoneNumber],
73 HistoryThreadModel.MatchPhoneNumber);
74 filterProperty: "threadId"
75 filterValue: threadId != "" ? threadId : "something that won't match"
76 }
77 HistoryFilter {
78 filterProperty: "accountId"
79 filterValue: "ofono/ofono/account1"
80 }
81 }
82 }
83 }
84
85 Column {
86 anchors {
87 left: parent.left
88 right: parent.right
89 verticalCenter: parent.verticalCenter
90 }
91
92 ListItem.Base {
93 anchors.left: parent.left
94 anchors.right: parent.right
95 height: lastCalledCol.height + units.gu(6)
96 Column {
97 id: lastCalledCol
98 anchors.left: parent.left
99 anchors.right: parent.right
100 height: childrenRect.height
101 spacing: units.gu(2)
102
103 Icon {
104 anchors.horizontalCenter: parent.horizontalCenter
105 name: "contact"
106 width: 144
107 height: width
108 }
109
110 Label {
111 id: calledLabel
112 objectName: "calledLabel"
113 anchors.horizontalCenter: parent.horizontalCenter
114 visible: lastTimestamp
115 text: i18n.tr("Last called %1").arg(DateUtils.formatFriendlyDate(lastTimestamp))
116 }
117 }
118 }
119 }
120
121 ListItem.SingleControl {
122 anchors.bottom: parent.bottom
123 control: Button {
124 width: parent.width - units.gu(4)
125 text: i18n.tr("Call")
126 onClicked: {
127 var account = mainView.accountForModem(sim.path)
128 var accountId = account ? account.accountId : null
129 mainView.populateDialpad(serviceNumber, accountId)
130 }
131 }
132 }
133}
0134
=== added file 'src/qml/SettingsPage/Services.qml'
--- src/qml/SettingsPage/Services.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/Services.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,74 @@
1/*
2 * This file is part of dialer-app
3 *
4 * Copyright (C) 2013 Canonical Ltd.
5 *
6 * Contact: Sebastien Bacher <sebastien.bacher@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21import QtQuick 2.4
22import Ubuntu.Components 1.3
23import Ubuntu.Components.ListItems 1.3 as ListItem
24
25Page {
26 id: root
27 objectName: "servicesPage"
28 title: headerTitle
29 property string carrierString
30 property variant sim
31 property var names: []
32
33 // TRANSLATORS: %1 is the name of the (network) carrier
34 property string headerTitle: i18n.tr("%1 Services").arg(carrierString)
35
36 header: PageHeader {
37 id: pageHeader
38 title: root.title
39 }
40
41 Component.onCompleted: {
42 var keys = [];
43 for (var x in sim.simMng.serviceNumbers) {
44 keys.push(x);
45 }
46 names = keys;
47 }
48
49 Flickable {
50 anchors.fill: parent
51 contentHeight: contentItem.childrenRect.height
52 boundsBehavior: (contentHeight > root.height) ?
53 Flickable.DragAndOvershootBounds :
54 Flickable.StopAtBounds
55 /* Set the direction to workaround
56 https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
57 might end up in a situation where scrolling doesn't work */
58 flickableDirection: Flickable.VerticalFlick
59
60 Column {
61 anchors.left: parent.left
62 anchors.right: parent.right
63 Repeater {
64 model: names
65
66 ListItem.Standard {
67 progression: true
68 text: modelData
69 onClicked: pageStack.push(Qt.resolvedUrl("ServiceInfo.qml"), {serviceName: modelData, serviceNumber: sim.simMng.serviceNumbers[modelData], sim: sim})
70 }
71 }
72 }
73 }
74}
075
=== added file 'src/qml/SettingsPage/SettingsItemTitle.qml'
--- src/qml/SettingsPage/SettingsItemTitle.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/SettingsItemTitle.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,44 @@
1/*
2 * This file is part of system-settings
3 *
4 * Copyright (C) 2013-2017 Canonical Ltd.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 3, as published
8 * by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranties of
12 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13 * PURPOSE. See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.4
20import Ubuntu.Components 1.3
21
22Item {
23 property alias text: label.text
24 anchors {
25 left: parent.left
26 right: parent.right
27 }
28 height: units.gu(6)
29
30 Label {
31 id: label
32 anchors {
33 top: parent.top
34 topMargin: units.gu(3)
35 right: parent.right
36 rightMargin: units.gu(2)
37 bottom: parent.bottom
38 left: parent.left
39 leftMargin: units.gu(2)
40 }
41 fontSize: "small"
42 opacity: 0.75
43 }
44}
045
=== added file 'src/qml/SettingsPage/SettingsPage.qml'
--- src/qml/SettingsPage/SettingsPage.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/SettingsPage.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,158 @@
1/*
2 * This file is part of dialer-app
3 *
4 * Copyright (C) 2013-2017 Canonical Ltd.
5 *
6 * Contact: Iain Lane <iain.lane@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21import QtQuick 2.4
22import Ubuntu.Components 1.3
23import Ubuntu.Components.ListItems 1.3 as ListItem
24import Ubuntu.Telephony 0.1
25
26Page {
27 id: settingsPage
28 objectName: "phonePage"
29 title: i18n.tr("Settings")
30 flickable: flick
31
32 property var modemAccounts: telepathyHelper.phoneAccounts.displayed
33 property var sims: []
34
35 function updateSims() {
36 var component = Qt.createComponent("Ofono.qml");
37
38 // remove previous objects
39 sims.forEach(function (sim) {
40 sim.destroy();
41 })
42
43 var result = []
44 for (var i in settingsPage.modemAccounts) {
45 var sim = component.createObject(settingsPage, {
46 path: settingsPage.modemAccounts[i].modemName
47 })
48 result.push(sim)
49 }
50 sims = result
51 }
52
53 header: PageHeader {
54 id: pageHeader
55 title: settingsPage.title
56 flickable: flick
57 }
58
59 states: [
60 State {
61 name: "noSim"
62 StateChangeScript {
63 script: loader.setSource("NoSims.qml")
64 }
65 when: sims.length === 0
66 },
67 State {
68 name: "singleSim"
69 StateChangeScript {
70 script: loader.setSource("SingleSim.qml", {
71 sim: sims[0]
72 })
73 }
74 when: sims.length === 1
75 },
76 State {
77 name: "multiSim"
78 StateChangeScript {
79 script: loader.setSource("MultiSim.qml", {
80 sims: sims
81 })
82 }
83 when: sims.length > 1
84 }
85 ]
86
87 onModemAccountsChanged: updateSims()
88
89 Flickable {
90 id: flick
91 anchors.fill: parent
92 contentWidth: parent.width
93 contentHeight: contentItem.childrenRect.height
94 boundsBehavior: (contentHeight > settingsPage.height) ?
95 Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
96
97 Column {
98 anchors { left: parent.left; right: parent.right }
99
100 Loader {
101 id: loader
102 anchors { left: parent.left; right: parent.right }
103 }
104
105 ListItem.Standard {
106 control: Switch {
107 objectName: "dialpadSounds"
108 property bool serverChecked: telepathyHelper.dialpadSoundsEnabled
109 onServerCheckedChanged: checked = serverChecked
110 Component.onCompleted: checked = serverChecked
111 onTriggered: telepathyHelper.dialpadSoundsEnabled = checked
112 }
113 text: i18n.tr("Dialpad tones")
114 }
115
116 ListItem.Standard {
117 id: addAccount
118 anchors {
119 left: parent.left
120 right: parent.right
121 }
122 text: i18n.tr("Add an online account")
123 progression: true
124 onClicked: onlineAccountHelper.item.run()
125 enabled: (onlineAccountHelper.status === Loader.Ready) && (onlineAccountHelper.item.count > 0)
126 }
127
128 Repeater {
129 model: telepathyHelper.voiceAccounts.all
130
131 Loader {
132 id: accountPropertiesLoader
133 anchors {
134 left: parent.left
135 right: parent.right
136 margins: units.gu(1)
137 }
138 height: childrenRect.height
139 source: Qt.resolvedUrl("./AccountSettings/" + modelData.protocolInfo.name + ".qml")
140
141 onStatusChanged: {
142 if (status == Loader.Ready) {
143 item.account = modelData
144 }
145 }
146 }
147 }
148 }
149 }
150
151 Loader {
152 id: onlineAccountHelper
153
154 anchors.fill: parent
155 asynchronous: true
156 source: Qt.resolvedUrl("OnlineAccountsHelper.qml")
157 }
158}
0159
=== added file 'src/qml/SettingsPage/SettingsTextField.qml'
--- src/qml/SettingsPage/SettingsTextField.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/SettingsTextField.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,29 @@
1import QtQuick 2.4
2import Ubuntu.Components 1.3
3import Ubuntu.Components.Themes.Ambiance 0.1
4
5TextField {
6 id: textField
7 horizontalAlignment: TextInput.AlignRight
8 font {
9 pixelSize: units.dp(18)
10 weight: Font.Light
11 family: "Ubuntu"
12 }
13 color: "#AAAAAA"
14 maximumLength: 20
15 focus: true
16 style: TextFieldStyle {
17 overlaySpacing: units.gu(0.5)
18 frameSpacing: 0
19 background: Rectangle {
20 property bool error: (textField.hasOwnProperty("errorHighlight") &&
21 textField.errorHighlight &&
22 !textField.acceptableInput)
23 onErrorChanged: error ? theme.palette.normal.negative : color
24 color: Theme.palette.normal.background
25 anchors.fill: parent
26 visible: textField.activeFocus
27 }
28 }
29}
030
=== added file 'src/qml/SettingsPage/SingleSim.qml'
--- src/qml/SettingsPage/SingleSim.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/SingleSim.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,69 @@
1/*
2 * Copyright (C) 2014-2017 Canonical Ltd
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
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.
12 *
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/>.
15 *
16 * Authors:
17 * Ken Vandine <ken.vandine@canonical.com>
18 * Jonas G. Drange <jonas.drange@canonical.com>
19 *
20*/
21import QtQuick 2.4
22import Ubuntu.Components 1.3
23import Ubuntu.Components.ListItems 1.3 as ListItem
24
25Column {
26 property var sim
27 property string carrierName: sim ? sim.netReg.name : null
28 property string carrierString: carrierName ? carrierName : i18n.tr("SIM")
29
30 ListItem.Standard {
31 objectName: "callWait"
32 text: i18n.tr("Call waiting")
33 progression: true
34 onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {sim: sim})
35 }
36
37 ListItem.SingleValue {
38 objectName: "callFwd"
39 text: i18n.tr("Call forwarding")
40 showDivider: false
41 progression: true
42 value: sim.getCallForwardingSummary()
43 onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {sim: sim})
44 }
45
46 ListItem.Divider {}
47
48 ListItem.Standard {
49 objectName: "simServices"
50 // TRANSLATORS: %1 is the name of the (network) carrier
51 text: i18n.tr("%1 Services").arg(carrierString)
52 progression: true
53 showDivider: false
54 enabled: {
55 var num;
56 var map = sim.simMng.serviceNumbers;
57 var nums = false;
58 for(num in map) {
59 if (map.hasOwnProperty(num)) {
60 nums = true;
61 break;
62 }
63 }
64 return sim.simMng.present && nums;
65 }
66 onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"),
67 {carrierString: carrierString, sim: sim})
68 }
69}
070
=== added file 'src/qml/SettingsPage/VCardParser.qml'
--- src/qml/SettingsPage/VCardParser.qml 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/VCardParser.qml 2017-03-22 17:10:08 +0000
@@ -0,0 +1,55 @@
1/*
2 * Copyright (C) 2015-2017 Canonical, Ltd.
3 *
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.
7 *
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.
12 *
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/>.
15 */
16
17import QtQuick 2.4
18import QtContacts 5.0
19
20QtObject {
21 id: root
22
23 property string vCardUrl
24 property alias contacts: contactsModel.contacts
25 property var _model
26
27 signal vcardParsed(int error)
28
29 function clearModel()
30 {
31 if (contactsModel.contacts.length === 0)
32 return;
33
34 var ids = []
35 for(var i=0, iMax=contactsModel.contacts.length; i < iMax; i++) {
36 ids.push(contactsModel.contacts[i].contactId)
37 }
38 contactsModel.removeContacts(ids)
39 }
40
41 _model: ContactModel {
42 id: contactsModel
43
44 manager: "memory"
45
46 onImportCompleted: vcardParsed(error)
47 }
48
49 onVCardUrlChanged: {
50 if (vCardUrl.length > 0) {
51 clearModel()
52 contactsModel.importContacts(vCardUrl)
53 }
54 }
55}
056
=== added file 'src/qml/SettingsPage/callForwardingUtils.js'
--- src/qml/SettingsPage/callForwardingUtils.js 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/callForwardingUtils.js 2017-03-22 17:10:08 +0000
@@ -0,0 +1,126 @@
1
2/**
3 * Handle the user's intention when it checks the check mark
4 * associated with this forwarding item.
5 *
6 * @param {Boolean} Value of check
7*/
8function checked (value) {
9 if (value) {
10 if (item.cachedRuleValue) {
11 requestRule(item.cachedRuleValue);
12 } else {
13 d._editing = true;
14 }
15 } else {
16 if (d._editing) {
17 d._editing = false;
18 } else {
19 requestRule('');
20 }
21 }
22}
23
24/**
25 * Request that the rule be changed on the backend.
26 *
27 * @param {String} new rule value
28 * @return {Boolean} whether or not we requested a change
29 */
30function requestRule (value) {
31 value = normalizePhoneNumber(value);
32 if (value === item.callForwarding[item.rule]) {
33 console.warn('Value did not change.');
34 return false;
35 }
36
37 item.callForwarding[item.rule] = value;
38 d._pending = true;
39 return true;
40}
41
42/**
43 * Handler for when the component enter or leaves editing mode.
44 */
45function editingChanged () {
46 if (d._editing) {
47 item.enteredEditMode();
48 } else {
49 item.leftEditMode();
50 }
51}
52
53/**
54 * Handler for when the rule changes on the backend.
55 *
56 * @param {String} the new property
57 */
58function ruleChanged (property) {
59 check.checked = callForwarding[rule] !== "";
60}
61
62/**
63 * Handler for when the backend responds.
64 *
65 * @param {Boolean} whether or not the backend succeeded
66 */
67function ruleComplete (success) {
68 d._pending = false;
69 d._editing = false;
70 if (!success) {
71 d._failed = true;
72 }
73}
74
75/**
76 * Handler for when the rule ready changes.
77 */
78function ruleReadyChanged () {
79 d._pending = !callForwarding.ready;
80}
81
82/**
83 * Scroll something into view.
84 *
85 * @param {QtObject} item to scroll to.
86 */
87function show(item) {
88 if (!item) {
89 return;
90 }
91 page.activeItem = item;
92
93 var position = flick.contentItem.mapFromItem(item, 0, page.activeItem.y);
94
95 // check if the item is already visible
96 var bottomY = flick.contentY + flick.height;
97 var itemBottom = position.y + item.height + units.gu(2); // extra margin
98 if (position.y >= flick.contentY && itemBottom <= bottomY) {
99 return;
100 }
101
102 // if it is not, try to scroll and make it visible
103 var targetY = itemBottom - flick.height;
104 if (targetY >= 0 && position.y) {
105 flick.contentY = targetY;
106 } else if (position.y < flick.contentY) {
107 // if it is hidden at the top, also show it
108 flick.contentY = position.y;
109 }
110 flick.returnToBounds();
111}
112
113/**
114 * Normalizes a phone number.
115 *
116 * TODO(jgdx): Remove this and replace it with libphonenumber
117 *
118 * @param {String} number to normalize
119 * @return {String} normalized number
120 */
121function normalizePhoneNumber(identifier) {
122 var regexp = new RegExp('[()/-]', 'g');
123 var finalNumber = identifier.replace(/\s+/g, '');
124 finalNumber = finalNumber.replace(regexp, '');
125 return finalNumber;
126}
0127
=== added file 'src/qml/SettingsPage/dateUtils.js'
--- src/qml/SettingsPage/dateUtils.js 1970-01-01 00:00:00 +0000
+++ src/qml/SettingsPage/dateUtils.js 2017-03-22 17:10:08 +0000
@@ -0,0 +1,69 @@
1/*
2 * Copyright 2012-2013 Canonical Ltd.
3 *
4 * This file is part of dialer-app.
5 *
6 * dialer-app is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 3.
9 *
10 * dialer-app is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19function areSameDay(date1, date2) {
20 return date1.getFullYear() == date2.getFullYear()
21 && date1.getMonth() == date2.getMonth()
22 && date1.getDate() == date2.getDate()
23}
24
25function formatLogDate(timestamp) {
26 var today = new Date()
27 var date = new Date(timestamp)
28 if (areSameDay(today, date)) {
29 return Qt.formatTime(timestamp, Qt.DefaultLocaleShortDate)
30 } else {
31 return Qt.formatDateTime(timestamp, Qt.DefaultLocaleShortDate)
32 }
33}
34
35function friendlyDay(timestamp) {
36 var date = new Date(timestamp);
37 var today = new Date();
38 var yesterday = new Date();
39 yesterday.setDate(today.getDate()-1);
40 if (areSameDay(today, date)) {
41 return i18n.tr("Today");
42 } else if (areSameDay(yesterday, date)) {
43 return i18n.tr("Yesterday");
44 } else {
45 return Qt.formatDate(date, Qt.DefaultLocaleShortDate);
46 }
47}
48
49function formatFriendlyDate(timestamp) {
50 return Qt.formatTime(timestamp, Qt.DefaultLocaleShortDate) + " - " + friendlyDay(timestamp);
51}
52
53function formatFriendlyCallDuration(duration) {
54 var text = "";
55
56 var hours = parseInt(Qt.formatTime(duration, "hh"));
57 var minutes = parseInt(Qt.formatTime(duration, "mm"));
58 var seconds = parseInt(Qt.formatTime(duration, "ss"));
59
60 if (hours > 0) {
61 text = i18n.tr("%1 hour", "%1 hours", hours).arg(hours)
62 } else if (minutes > 0) {
63 text = i18n.tr("%1 min", "%1 mins", minutes).arg(minutes)
64 } else {
65 text = i18n.tr("%1 sec", "%1 secs", seconds).arg(seconds)
66 }
67
68 return text;
69}
070
=== modified file 'src/qml/dialer-app.qml'
--- src/qml/dialer-app.qml 2017-03-22 17:10:08 +0000
+++ src/qml/dialer-app.qml 2017-03-22 17:10:08 +0000
@@ -16,7 +16,7 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.4
20import Qt.labs.settings 1.020import Qt.labs.settings 1.0
2121
22import Ubuntu.Components 1.322import Ubuntu.Components 1.3
@@ -410,11 +410,15 @@
410 pageStackNormalMode.pop();410 pageStackNormalMode.pop();
411 }411 }
412412
413 if (pageStackNormalMode.currentPage && typeof(pageStackNormalMode.currentPage.dialNumber) != 'undefined') {413 var dialerPage = pageStackNormalMode.currentPage
414 pageStackNormalMode.currentPage.dialNumber = number;414 if (dialerPage && typeof(dialerPage.dialNumber) != 'undefined') {
415 dialerPage.dialNumber = number;
416 if (accountId) {
417 dialerPage.selectAccount(accountId)
418 }
415419
416 if (pageStackNormalMode.currentPage.bottomEdgeItem) {420 if (dialerPage.bottomEdgeItem) {
417 pageStackNormalMode.currentPage.bottomEdgeItem.collapse()421 dialerPage.bottomEdgeItem.collapse()
418 }422 }
419 }423 }
420 }424 }
@@ -481,6 +485,16 @@
481 PopupUtils.open(Qt.createComponent("Dialogs/SimLockedDialog.qml").createObject(mainView), mainView, properties)485 PopupUtils.open(Qt.createComponent("Dialogs/SimLockedDialog.qml").createObject(mainView), mainView, properties)
482 }486 }
483487
488 function accountForModem(modemName) {
489 var modemAccounts = telepathyHelper.phoneAccounts.displayed
490 for (var i in modemAccounts) {
491 if (modemAccounts[i].modemName == modemName) {
492 return modemAccounts[i]
493 }
494 }
495 return null
496 }
497
484 Component.onCompleted: {498 Component.onCompleted: {
485 i18n.domain = "dialer-app"499 i18n.domain = "dialer-app"
486 i18n.bindtextdomain("dialer-app", i18nDirectory)500 i18n.bindtextdomain("dialer-app", i18nDirectory)

Subscribers

People subscribed via source and target branches

to all changes: