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

Proposed by Gustavo Pichorim Boiko
Status: Superseded
Proposed branch: lp:~phablet-team/dialer-app/phone_settings
Merge into: lp:dialer-app
Prerequisite: lp:~phablet-team/dialer-app/expand-dialer
Diff against target: 3160 lines (+2439/-120)
28 files modified
debian/dialer-app.install (+1/-0)
po/dialer-app.pot (+253/-111)
src/qml/CMakeLists.txt (+1/-0)
src/qml/DialerPage/DialerPage.qml (+11/-2)
src/qml/LiveCallPage/LiveCall.qml (+11/-3)
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/SettingsPage/phone.settings (+24/-0)
src/qml/dialer-app.qml (+18/-4)
To merge this branch: bzr merge lp:~phablet-team/dialer-app/phone_settings
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) Needs Fixing
Review via email: mp+314634@code.launchpad.net

This proposal has been superseded by a proposal from 2017-03-22.

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.
561. By Gustavo Pichorim Boiko

Fix packaging errors.

562. By Gustavo Pichorim Boiko

Re-enable dialpad sounds

563. By Renato Araujo Oliveira Filho

Allow create online accounts from settings page.

564. By Gustavo Pichorim Boiko

merge parent

565. By Gustavo Pichorim Boiko

Add prefix settings for VOIP accounts.

566. By Gustavo Pichorim Boiko

Use correct title for settings page

567. By Gustavo Pichorim Boiko

Adapt the number rewrite UI to the new approach.

568. By Gustavo Pichorim Boiko

Fix reading the settings.

569. By Gustavo Pichorim Boiko

Disable area code

570. By Gustavo Pichorim Boiko

Display settings for all accounts, not just the online ones

571. By Gustavo Pichorim Boiko

Use the initial number when available to do contact matching.
This is necessary as VOIP calls may rewrite the phone number causing contact
match to fail.

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

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.

Unmerged revisions

574. By Gustavo Pichorim Boiko

Add a TODO file with the pending items.

573. By Gustavo Pichorim Boiko

Update to QtQuick 2.4

572. By Gustavo Pichorim Boiko

Remove unused file.

571. By Gustavo Pichorim Boiko

Use the initial number when available to do contact matching.
This is necessary as VOIP calls may rewrite the phone number causing contact
match to fail.

570. By Gustavo Pichorim Boiko

Display settings for all accounts, not just the online ones

569. By Gustavo Pichorim Boiko

Disable area code

568. By Gustavo Pichorim Boiko

Fix reading the settings.

567. By Gustavo Pichorim Boiko

Adapt the number rewrite UI to the new approach.

566. By Gustavo Pichorim Boiko

Use correct title for settings page

565. By Gustavo Pichorim Boiko

Add prefix settings for VOIP accounts.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/dialer-app.install'
2--- debian/dialer-app.install 2015-04-30 18:10:29 +0000
3+++ debian/dialer-app.install 2017-02-01 12:27:58 +0000
4@@ -8,6 +8,7 @@
5 usr/share/dialer-app/ContactsPage
6 usr/share/dialer-app/ContactViewPage
7 usr/share/dialer-app/ContactEditorPage
8+usr/share/dialer-app/SettingsPage
9 usr/share/dialer-app/Dialogs
10 usr/share/dialer-app/assets
11 usr/share/dialer-app/MMI
12
13=== modified file 'po/dialer-app.pot'
14--- po/dialer-app.pot 2015-07-15 13:54:05 +0000
15+++ po/dialer-app.pot 2017-02-01 12:27:58 +0000
16@@ -8,7 +8,7 @@
17 msgstr ""
18 "Project-Id-Version: PACKAGE VERSION\n"
19 "Report-Msgid-Bugs-To: \n"
20-"POT-Creation-Date: 2015-07-15 10:53-0300\n"
21+"POT-Creation-Date: 2017-01-12 16:58-0200\n"
22 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
23 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
24 "Language-Team: LANGUAGE <LL@li.org>\n"
25@@ -18,17 +18,25 @@
26 "Content-Transfer-Encoding: 8bit\n"
27 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
28
29-#: ../src/qml/DialerPage/Keypad.qml:174
30+#: ../src/qml/DialerPage/Keypad.qml:242
31 msgid "#"
32 msgstr ""
33
34 #. TRANSLATORS: %1 is the call duration here.
35-#: ../src/qml/LiveCallPage/LiveCall.qml:443
36+#: ../src/qml/LiveCallPage/LiveCall.qml:454
37 #, qt-format
38 msgid "%1 - on hold"
39 msgstr ""
40
41+#. TRANSLATORS: %1 is the name of the (network) carrier
42+#: ../src/qml/SettingsPage/Services.qml:34
43+#: ../src/qml/SettingsPage/SingleSim.qml:51
44+#, qt-format
45+msgid "%1 Services"
46+msgstr ""
47+
48 #: ../src/qml/HistoryPage/dateUtils.js:92
49+#: ../src/qml/SettingsPage/dateUtils.js:61
50 #, qt-format
51 msgid "%1 hour"
52 msgid_plural "%1 hours"
53@@ -36,6 +44,7 @@
54 msgstr[1] ""
55
56 #: ../src/qml/HistoryPage/dateUtils.js:94
57+#: ../src/qml/SettingsPage/dateUtils.js:63
58 #, qt-format
59 msgid "%1 min"
60 msgid_plural "%1 mins"
61@@ -43,6 +52,7 @@
62 msgstr[1] ""
63
64 #: ../src/qml/HistoryPage/dateUtils.js:96
65+#: ../src/qml/SettingsPage/dateUtils.js:65
66 #, qt-format
67 msgid "%1 sec"
68 msgid_plural "%1 secs"
69@@ -50,61 +60,62 @@
70 msgstr[1] ""
71
72 #. TRANSLATORS: this is the count of events grouped into this single item
73-#: ../src/qml/HistoryPage/HistoryDelegate.qml:201
74+#: ../src/qml/HistoryPage/HistoryDelegate.qml:206
75 #: ../src/qml/HistoryPage/SwipeItemDemo.qml:150
76 #, qt-format
77 msgid "(%1)"
78 msgstr ""
79
80-#: ../src/qml/DialerPage/Keypad.qml:150
81+#: ../src/qml/DialerPage/Keypad.qml:206
82 msgid "*"
83 msgstr ""
84
85-#: ../src/qml/DialerPage/Keypad.qml:161
86+#: ../src/qml/DialerPage/DialerBottomEdge.qml:26
87+#: ../src/qml/DialerPage/Keypad.qml:223
88 msgid "+"
89 msgstr ""
90
91-#: ../src/qml/DialerPage/Keypad.qml:160
92+#: ../src/qml/DialerPage/Keypad.qml:222
93 msgid "0"
94 msgstr ""
95
96-#: ../src/qml/DialerPage/Keypad.qml:49
97+#: ../src/qml/DialerPage/Keypad.qml:51
98 msgid "1"
99 msgstr ""
100
101-#: ../src/qml/DialerPage/Keypad.qml:60
102+#: ../src/qml/DialerPage/Keypad.qml:68
103 msgid "2"
104 msgstr ""
105
106-#: ../src/qml/DialerPage/Keypad.qml:71
107+#: ../src/qml/DialerPage/Keypad.qml:85
108 msgid "3"
109 msgstr ""
110
111-#: ../src/qml/DialerPage/Keypad.qml:82
112+#: ../src/qml/DialerPage/Keypad.qml:102
113 msgid "4"
114 msgstr ""
115
116-#: ../src/qml/DialerPage/Keypad.qml:93
117+#: ../src/qml/DialerPage/Keypad.qml:119
118 msgid "5"
119 msgstr ""
120
121-#: ../src/qml/DialerPage/Keypad.qml:104
122+#: ../src/qml/DialerPage/Keypad.qml:136
123 msgid "6"
124 msgstr ""
125
126-#: ../src/qml/DialerPage/Keypad.qml:115
127+#: ../src/qml/DialerPage/Keypad.qml:153
128 msgid "7"
129 msgstr ""
130
131-#: ../src/qml/DialerPage/Keypad.qml:126
132+#: ../src/qml/DialerPage/Keypad.qml:170
133 msgid "8"
134 msgstr ""
135
136-#: ../src/qml/DialerPage/Keypad.qml:137
137+#: ../src/qml/DialerPage/Keypad.qml:187
138 msgid "9"
139 msgstr ""
140
141-#: ../src/qml/DialerPage/Keypad.qml:61
142+#: ../src/qml/DialerPage/Keypad.qml:69
143 msgid "ABC"
144 msgstr ""
145
146@@ -112,61 +123,94 @@
147 msgid "Active"
148 msgstr ""
149
150-#: ../src/qml/HistoryPage/HistoryPage.qml:49
151+#: ../src/qml/HistoryPage/HistoryPage.qml:68
152 msgctxt "All Calls"
153 msgid "All"
154 msgstr ""
155
156-#: ../src/qml/ContactsPage/ContactsPage.qml:92
157+#: ../src/qml/ContactsPage/ContactsPage.qml:95
158 msgctxt "All Contacts"
159 msgid "All"
160 msgstr ""
161
162-#: ../src/qml/LiveCallPage/LiveCall.qml:326
163+#: ../src/qml/SettingsPage/CallForwarding.qml:378
164+msgid "All calls"
165+msgstr ""
166+
167+#: ../src/qml/LiveCallPage/LiveCall.qml:341
168 msgid "Bluetooth device"
169 msgstr ""
170
171-#: ../src/qml/dialer-app.qml:596
172+#: ../src/qml/SettingsPage/ServiceInfo.qml:125
173+msgid "Call"
174+msgstr ""
175+
176+#: ../src/qml/dialer-app.qml:570
177 msgid "Call Barring"
178 msgstr ""
179
180-#: ../src/qml/dialer-app.qml:607
181+#: ../src/qml/dialer-app.qml:581
182 msgid "Call Forwarding"
183 msgstr ""
184
185-#: ../src/qml/dialer-app.qml:618
186+#: ../src/qml/dialer-app.qml:592
187 msgid "Call Waiting"
188 msgstr ""
189
190-#: ../src/qml/LiveCallPage/LiveCall.qml:134
191+#: ../src/qml/LiveCallPage/LiveCall.qml:152
192 msgid "Call ended"
193 msgstr ""
194
195-#: ../src/qml/LiveCallPage/LiveCall.qml:283
196+#: ../src/qml/LiveCallPage/LiveCall.qml:297
197 msgid "Call failed"
198 msgstr ""
199
200-#: ../src/qml/LiveCallPage/LiveCall.qml:142
201+#: ../src/qml/SettingsPage/CallForwarding.qml:44
202+#: ../src/qml/SettingsPage/MultiSim.qml:51
203+#: ../src/qml/SettingsPage/NoSims.qml:28
204+#: ../src/qml/SettingsPage/SingleSim.qml:39
205+msgid "Call forwarding"
206+msgstr ""
207+
208+#: ../src/qml/SettingsPage/CallForwardItem.qml:218
209+msgid "Call forwarding can't be changed right now."
210+msgstr ""
211+
212+#: ../src/qml/SettingsPage/CallForwarding.qml:154
213+msgid "Call forwarding status can't be checked "
214+msgstr ""
215+
216+#: ../src/qml/LiveCallPage/LiveCall.qml:160
217 msgid "Call holding failure"
218 msgstr ""
219
220-#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:110
221-#: ../src/qml/LiveCallPage/LiveCall.qml:445
222+#: ../src/qml/SettingsPage/CallWaiting.qml:31
223+#: ../src/qml/SettingsPage/CallWaiting.qml:86
224+#: ../src/qml/SettingsPage/MultiSim.qml:41
225+#: ../src/qml/SettingsPage/NoSims.qml:34
226+#: ../src/qml/SettingsPage/SingleSim.qml:32
227+msgid "Call waiting"
228+msgstr ""
229+
230+#: ../src/qml/DialerPage/DialerPage.qml:509
231+#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:113
232+#: ../src/qml/LiveCallPage/LiveCall.qml:456
233 #: ../src/qml/LiveCallPage/MultiCallDisplay.qml:108
234 msgid "Calling"
235 msgstr ""
236
237-#: ../src/qml/dialer-app.qml:629
238+#: ../src/qml/dialer-app.qml:603
239 msgid "Calling Line Presentation"
240 msgstr ""
241
242-#: ../src/qml/dialer-app.qml:641
243+#: ../src/qml/dialer-app.qml:615
244 msgid "Calling Line Restriction"
245 msgstr ""
246
247 #: ../src/qml/ContactEditorPage/DialerContactEditorPage.qml:35
248-#: ../src/qml/ContactsPage/ContactsPage.qml:106
249+#: ../src/qml/ContactsPage/ContactsPage.qml:145
250 #: ../src/qml/Dialogs/DisableFlightModeDialog.qml:38
251+#: ../src/qml/SettingsPage/CallForwarding.qml:236
252 msgid "Cancel"
253 msgstr ""
254
255@@ -176,49 +220,61 @@
256 msgid "Change all Call associations to %1?"
257 msgstr ""
258
259-#: ../src/qml/DialerPage/DialerPage.qml:55
260+#: ../src/qml/DialerPage/DialerPage.qml:78
261 #: ../src/qml/Dialogs/NotificationDialog.qml:29
262 msgid "Close"
263 msgstr ""
264
265-#: ../src/qml/LiveCallPage/LiveCall.qml:48
266+#: ../src/qml/LiveCallPage/LiveCall.qml:52
267 #: ../src/qml/LiveCallPage/MultiCallDisplay.qml:89
268 msgid "Conference"
269 msgstr ""
270
271-#: ../src/qml/LiveCallPage/LiveCall.qml:113
272+#: ../src/qml/LiveCallPage/LiveCall.qml:131
273 msgid "Conference call failure"
274 msgstr ""
275
276-#: ../src/qml/dialer-app.qml:635
277+#: ../src/qml/dialer-app.qml:609
278 msgid "Connected Line Presentation"
279 msgstr ""
280
281-#: ../src/qml/dialer-app.qml:647
282+#: ../src/qml/dialer-app.qml:621
283 msgid "Connected Line Restriction"
284 msgstr ""
285
286-#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:54
287-#: ../src/qml/HistoryPage/HistoryPage.qml:343
288+#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:66
289+#: ../src/qml/HistoryPage/HistoryPage.qml:369
290 msgid "Contact Details"
291 msgstr ""
292
293-#: ../src/qml/ContactsPage/ContactsPage.qml:53
294-#: ../src/qml/DialerPage/DialerPage.qml:42
295+#: ../src/qml/SettingsPage/CallForwarding.qml:299
296+msgid "Contact not associated with any phone number."
297+msgstr ""
298+
299+#: ../src/qml/ContactsPage/ContactsPage.qml:77
300+#: ../src/qml/DialerPage/DialerPage.qml:59
301 msgid "Contacts"
302 msgstr ""
303
304-#: ../src/qml/DialerPage/Keypad.qml:72
305+#: ../src/qml/SettingsPage/CallForwarding.qml:223
306+msgid "Contacts..."
307+msgstr ""
308+
309+#: ../src/qml/SettingsPage/CallForwarding.qml:298
310+msgid "Could not forward to this contact"
311+msgstr ""
312+
313+#: ../src/qml/DialerPage/Keypad.qml:86
314 msgid "DEF"
315 msgstr ""
316
317-#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:74
318-#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:238
319-#: ../src/qml/HistoryPage/HistoryPage.qml:315
320+#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:86
321+#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:253
322+#: ../src/qml/HistoryPage/HistoryPage.qml:341
323 msgid "Delete"
324 msgstr ""
325
326-#: ../src/qml/HistoryPage/HistoryPage.qml:324
327+#: ../src/qml/HistoryPage/HistoryPage.qml:350
328 msgid "Details"
329 msgstr ""
330
331@@ -226,12 +282,13 @@
332 msgid "Disable"
333 msgstr ""
334
335-#: ../src/qml/dialer-app.qml:451
336+#: ../src/qml/Dialogs/FlightModeProgressDialog.qml:29
337 msgid "Disabling flight mode"
338 msgstr ""
339
340-#: ../src/qml/MMI/IMEI.qml:48 ../src/qml/dialer-app.qml:514
341-#: ../src/qml/dialer-app.qml:528
342+#: ../src/qml/Dialogs/UssdErrorDialog.qml:31
343+#: ../src/qml/Dialogs/UssdResponseDialog.qml:30
344+#: ../src/qml/MMI/IMEIDialog.qml:40
345 msgid "Dismiss"
346 msgstr ""
347
348@@ -239,47 +296,64 @@
349 msgid "Don't ask again"
350 msgstr ""
351
352-#: ../src/qml/ContactViewPage/DialerContactViewPage.qml:69
353+#: ../src/qml/ContactViewPage/DialerContactViewPage.qml:70
354 msgid "Edit"
355 msgstr ""
356
357-#: ../src/qml/DialerPage/DialerPage.qml:72
358+#: ../src/qml/DialerPage/DialerPage.qml:132
359+#: ../src/qml/DialerPage/DialerPage.qml:142
360 msgid "Emergency Calls"
361 msgstr ""
362
363-#: ../src/qml/DialerPage/DialerPage.qml:277
364+#: ../src/qml/DialerPage/DialerPage.qml:467
365+msgid "Emergency call"
366+msgstr ""
367+
368+#: ../src/qml/DialerPage/DialerPage.qml:303
369+#: ../src/qml/SettingsPage/CallForwardItem.qml:171
370 msgid "Enter a number"
371 msgstr ""
372
373-#: ../src/qml/dialer-app.qml:511
374+#: ../src/qml/Dialogs/UssdErrorDialog.qml:28
375 msgid "Error"
376 msgstr ""
377
378-#: ../src/qml/LiveCallPage/LiveCall.qml:143
379+#: ../src/qml/LiveCallPage/LiveCall.qml:161
380 msgid "Failed to activate the call."
381 msgstr ""
382
383-#: ../src/qml/LiveCallPage/LiveCall.qml:114
384+#: ../src/qml/LiveCallPage/LiveCall.qml:132
385 msgid "Failed to create a conference call."
386 msgstr ""
387
388-#: ../src/qml/LiveCallPage/LiveCall.qml:144
389+#: ../src/qml/LiveCallPage/LiveCall.qml:162
390 msgid "Failed to place the active call on hold."
391 msgstr ""
392
393-#: ../src/qml/ContactsPage/ContactsPage.qml:92
394+#: ../src/qml/ContactsPage/ContactsPage.qml:95
395 msgid "Favorites"
396 msgstr ""
397
398+#: ../src/qml/DialerPage/DialerPage.qml:137
399 #: ../src/qml/Dialogs/DisableFlightModeDialog.qml:27
400 msgid "Flight Mode"
401 msgstr ""
402
403-#: ../src/qml/DialerPage/DialerPage.qml:77
404-msgid "Flight mode"
405-msgstr ""
406-
407-#: ../src/qml/DialerPage/Keypad.qml:83
408+#: ../src/qml/SettingsPage/CallForwarding.qml:127
409+msgid "Forward every incoming call"
410+msgstr ""
411+
412+#: ../src/qml/SettingsPage/CallForwarding.qml:162
413+msgid "Forward incoming calls when:"
414+msgstr ""
415+
416+#. TRANSLATORS: This string will be truncated on smaller displays.
417+#: ../src/qml/SettingsPage/CallForwardItem.qml:157
418+#: ../src/qml/SettingsPage/CallForwardItem.qml:202
419+msgid "Forward to"
420+msgstr ""
421+
422+#: ../src/qml/DialerPage/Keypad.qml:103
423 msgid "GHI"
424 msgstr ""
425
426@@ -287,43 +361,62 @@
427 msgid "Got it"
428 msgstr ""
429
430-#: ../src/qml/MMI/IMEI.qml:36
431+#: ../src/qml/SettingsPage/CallForwarding.qml:182
432+msgid "I don't answer"
433+msgstr ""
434+
435+#: ../src/qml/SettingsPage/CallForwarding.qml:171
436+msgid "I'm on another call"
437+msgstr ""
438+
439+#: ../src/qml/MMI/IMEIDialog.qml:27
440 msgid "IMEI"
441 msgstr ""
442
443-#: ../src/qml/HistoryPage/HistoryDelegate.qml:64
444-#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:315
445+#: ../src/qml/HistoryPage/HistoryDelegate.qml:65
446+#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:330
447 #: ../src/qml/HistoryPage/SwipeItemDemo.qml:189
448 msgid "Incoming"
449 msgstr ""
450
451-#: ../src/qml/dialer-app.qml:512
452+#: ../src/qml/DialerPage/DialerPage.qml:129
453+msgid "Initializing..."
454+msgstr ""
455+
456+#: ../src/qml/Dialogs/UssdErrorDialog.qml:29
457 msgid "Invalid USSD code"
458 msgstr ""
459
460-#: ../src/qml/DialerPage/Keypad.qml:94
461+#: ../src/qml/DialerPage/Keypad.qml:120
462 msgid "JKL"
463 msgstr ""
464
465-#: ../src/qml/DialerPage/DialerPage.qml:85
466-msgid "Keypad"
467+#: ../src/qml/SettingsPage/ServiceInfo.qml:115
468+#, qt-format
469+msgid "Last called %1"
470 msgstr ""
471
472 #: ../src/qml/Dialogs/NoDefaultSIMCardDialog.qml:80
473 msgid "Later"
474 msgstr ""
475
476-#: ../src/qml/DialerPage/Keypad.qml:105
477+#: ../src/qml/SettingsPage/CallWaiting.qml:101
478+msgid ""
479+"Lets you answer or start a new call while on another call, and switch "
480+"between them"
481+msgstr ""
482+
483+#: ../src/qml/DialerPage/Keypad.qml:137
484 msgid "MNO"
485 msgstr ""
486
487-#: ../src/qml/LiveCallPage/LiveCall.qml:548
488+#: ../src/qml/LiveCallPage/LiveCall.qml:573
489 msgid "Merge calls"
490 msgstr ""
491
492-#: ../src/qml/HistoryPage/HistoryDelegate.qml:62
493-#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:313
494-#: ../src/qml/HistoryPage/HistoryPage.qml:49
495+#: ../src/qml/HistoryPage/HistoryDelegate.qml:63
496+#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:328
497+#: ../src/qml/HistoryPage/HistoryPage.qml:68
498 msgid "Missed"
499 msgstr ""
500
501@@ -331,29 +424,45 @@
502 msgid "Mobile"
503 msgstr ""
504
505+#: ../src/qml/SettingsPage/CallForwarding.qml:193
506+msgid "My phone is unreachable"
507+msgstr ""
508+
509 #: ../src/qml/Dialogs/NoDefaultSIMCardDialog.qml:70
510 #: ../src/qml/Dialogs/SetDefaultSIMCardDialog.qml:40
511 msgid "No"
512 msgstr ""
513
514-#: ../src/qml/dialer-app.qml:316
515+#: ../src/qml/dialer-app.qml:355
516 msgid "No SIM card selected"
517 msgstr ""
518
519-#: ../src/qml/LiveCallPage/LiveCall.qml:104
520+#: ../src/qml/LiveCallPage/LiveCall.qml:122
521 msgid "No calls"
522 msgstr ""
523
524-#: ../src/qml/DialerPage/DialerPage.qml:87 ../src/qml/dialer-app.qml:337
525-#: ../src/qml/dialer-app.qml:342
526+#: ../src/qml/DialerPage/DialerPage.qml:151 ../src/qml/dialer-app.qml:374
527+#: ../src/qml/dialer-app.qml:379
528 msgid "No network"
529 msgstr ""
530
531-#: ../src/qml/HistoryPage/HistoryPage.qml:219
532+#: ../src/qml/HistoryPage/HistoryPage.qml:245
533 msgid "No recent calls"
534 msgstr ""
535
536-#: ../src/qml/Dialogs/SimLockedDialog.qml:49
537+#: ../src/qml/SettingsPage/CallForwarding.qml:279
538+msgid "Numbers"
539+msgstr ""
540+
541+#: ../src/qml/SettingsPage/CallForwarding.qml:301
542+msgid "OK"
543+msgstr ""
544+
545+#: ../src/qml/SettingsPage/CallForwarding.qml:382
546+msgid "Off"
547+msgstr ""
548+
549+#: ../src/qml/Dialogs/SimLockedDialog.qml:50
550 msgid "Ok"
551 msgstr ""
552
553@@ -361,15 +470,17 @@
554 msgid "On hold"
555 msgstr ""
556
557-#: ../src/qml/HistoryPage/HistoryDelegate.qml:66
558-#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:317
559+#: ../src/qml/HistoryPage/HistoryDelegate.qml:67
560+#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:332
561 msgid "Outgoing"
562 msgstr ""
563
564-#: ../src/qml/DialerPage/Keypad.qml:116
565+#: ../src/qml/DialerPage/Keypad.qml:154
566 msgid "PQRS"
567 msgstr ""
568
569+#: ../src/qml/DialerPage/DialerPage.qml:149
570+#: ../src/qml/SettingsPage/SettingsPage.qml:29
571 #: ../src/dialer-app.desktop.in.in.h:1
572 msgid "Phone"
573 msgstr ""
574@@ -378,7 +489,7 @@
575 msgid "Phone App"
576 msgstr ""
577
578-#: ../src/qml/LiveCallPage/LiveCall.qml:330
579+#: ../src/qml/LiveCallPage/LiveCall.qml:345
580 msgid "Phone Speaker"
581 msgstr ""
582
583@@ -390,36 +501,48 @@
584 msgid "Phone;Dialer;Dial;Call;Keypad"
585 msgstr ""
586
587-#: ../src/qml/Dialogs/SimLockedDialog.qml:37
588+#: ../src/qml/SettingsPage/CallForwarding.qml:270
589+msgid "Please select a phone number"
590+msgstr ""
591+
592+#: ../src/qml/Dialogs/SimLockedDialog.qml:38
593 msgid ""
594 "Please unlock your SIM card to call or send a message. You can unlock your "
595 "SIM card from the Network Indicator at the top of the screen or by visiting "
596 "<a href=\"system_settings\">System Settings &gt; Security &amp; Privacy</a>."
597 msgstr ""
598
599-#: ../src/qml/dialer-app.qml:491
600+#: ../src/qml/Dialogs/UssdProgressDialog.qml:28
601 msgid "Please wait"
602 msgstr ""
603
604-#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:138
605+#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:141
606 msgid "Private"
607 msgstr ""
608
609-#: ../src/qml/HistoryPage/HistoryDelegate.qml:167
610-#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:42
611+#: ../src/qml/HistoryPage/HistoryDelegate.qml:168
612+#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:43
613 msgid "Private number"
614 msgstr ""
615
616-#: ../src/qml/DialerPage/DialerPage.qml:122
617-#: ../src/qml/HistoryPage/HistoryPage.qml:45
618+#: ../src/qml/DialerPage/DialerPage.qml:522
619+#: ../src/qml/HistoryPage/HistoryPage.qml:47
620 msgid "Recent"
621 msgstr ""
622
623-#: ../src/qml/Dialogs/SimLockedDialog.qml:26
624+#: ../src/qml/SettingsPage/CallForwarding.qml:142
625+msgid "Redirects all phone calls to another number."
626+msgstr ""
627+
628+#: ../src/qml/SettingsPage/SingleSim.qml:28
629+msgid "SIM"
630+msgstr ""
631+
632+#: ../src/qml/Dialogs/SimLockedDialog.qml:27
633 msgid "SIM Card is locked"
634 msgstr ""
635
636-#: ../src/qml/DialerPage/DialerPage.qml:79
637+#: ../src/qml/DialerPage/DialerPage.qml:140
638 msgid "SIM Locked"
639 msgstr ""
640
641@@ -427,15 +550,15 @@
642 msgid "Save"
643 msgstr ""
644
645-#: ../src/qml/ContactsPage/ContactsPage.qml:80
646+#: ../src/qml/ContactsPage/ContactsPage.qml:119
647 msgid "Search"
648 msgstr ""
649
650-#: ../src/qml/ContactsPage/ContactsPage.qml:68
651+#: ../src/qml/ContactsPage/ContactsPage.qml:67
652 msgid "Search..."
653 msgstr ""
654
655-#: ../src/qml/HistoryPage/HistoryPage.qml:45
656+#: ../src/qml/HistoryPage/HistoryPage.qml:47
657 msgid "Select"
658 msgstr ""
659
660@@ -445,19 +568,32 @@
661 "choice in <a href=\"system_settings\">System Settings</a>."
662 msgstr ""
663
664-#: ../src/qml/HistoryPage/HistoryPage.qml:334
665+#: ../src/qml/HistoryPage/HistoryPage.qml:360
666 msgid "Send message"
667 msgstr ""
668
669-#: ../src/qml/DialerPage/DialerPage.qml:47
670+#: ../src/qml/SettingsPage/MultiSim.qml:62
671+#: ../src/qml/SettingsPage/NoSims.qml:42
672+msgid "Services"
673+msgstr ""
674+
675+#: ../src/qml/SettingsPage/CallForwarding.qml:249
676+msgid "Set"
677+msgstr ""
678+
679+#: ../src/qml/DialerPage/DialerPage.qml:64
680 msgid "Settings"
681 msgstr ""
682
683-#: ../src/qml/ContactViewPage/DialerContactViewPage.qml:60
684-#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:66
685+#: ../src/qml/ContactViewPage/DialerContactViewPage.qml:61
686+#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:78
687 msgid "Share"
688 msgstr ""
689
690+#: ../src/qml/SettingsPage/CallForwarding.qml:380
691+msgid "Some calls"
692+msgstr ""
693+
694 #: ../src/qml/HistoryPage/SwipeItemDemo.qml:326
695 msgid "Swipe to delete"
696 msgstr ""
697@@ -466,11 +602,11 @@
698 msgid "Swipe to reveal actions"
699 msgstr ""
700
701-#: ../src/qml/LiveCallPage/LiveCall.qml:159
702+#: ../src/qml/LiveCallPage/LiveCall.qml:177
703 msgid "Switch audio source:"
704 msgstr ""
705
706-#: ../src/qml/LiveCallPage/LiveCall.qml:533
707+#: ../src/qml/LiveCallPage/LiveCall.qml:558
708 msgid "Switch calls"
709 msgstr ""
710
711@@ -478,42 +614,47 @@
712 msgid "Switch to default SIM:"
713 msgstr ""
714
715-#: ../src/qml/DialerPage/Keypad.qml:127
716+#: ../src/qml/DialerPage/Keypad.qml:171
717 msgid "TUV"
718 msgstr ""
719
720-#: ../src/qml/dialer-app.qml:343
721+#: ../src/qml/dialer-app.qml:380
722 #, qt-format
723 msgid "There is currently no network on %1"
724 msgstr ""
725
726-#: ../src/qml/dialer-app.qml:337 ../src/qml/dialer-app.qml:344
727+#: ../src/qml/dialer-app.qml:374 ../src/qml/dialer-app.qml:381
728 msgid "There is currently no network."
729 msgstr ""
730
731+#: ../src/qml/DialerPage/DialerPage.qml:467
732+msgid "This is not an emergency number."
733+msgstr ""
734+
735 #: ../src/qml/HistoryPage/dateUtils.js:45
736+#: ../src/qml/SettingsPage/dateUtils.js:41
737 msgid "Today"
738 msgstr ""
739
740-#: ../src/qml/LiveCallPage/LiveCall.qml:328
741+#: ../src/qml/LiveCallPage/LiveCall.qml:343
742 msgid "Ubuntu Phone"
743 msgstr ""
744
745-#: ../src/qml/LiveCallPage/LiveCall.qml:332
746+#: ../src/qml/LiveCallPage/LiveCall.qml:347
747 msgid "Unknown device"
748 msgstr ""
749
750-#: ../src/qml/HistoryPage/HistoryDelegate.qml:169
751-#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:44
752+#: ../src/qml/HistoryPage/HistoryDelegate.qml:170
753+#: ../src/qml/HistoryPage/HistoryDetailsPage.qml:45
754 msgid "Unknown number"
755 msgstr ""
756
757-#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:72
758+#: ../src/qml/LiveCallPage/ConferenceCallDisplay.qml:73
759 #: ../src/qml/LiveCallPage/MultiCallDisplay.qml:91
760 msgid "Voicemail"
761 msgstr ""
762
763-#: ../src/qml/DialerPage/Keypad.qml:138
764+#: ../src/qml/DialerPage/Keypad.qml:188
765 msgid "WXYZ"
766 msgstr ""
767
768@@ -522,6 +663,7 @@
769 msgstr ""
770
771 #: ../src/qml/HistoryPage/dateUtils.js:47
772+#: ../src/qml/SettingsPage/dateUtils.js:43
773 msgid "Yesterday"
774 msgstr ""
775
776@@ -529,7 +671,7 @@
777 msgid "You have to disable flight mode in order to make calls"
778 msgstr ""
779
780-#: ../src/qml/dialer-app.qml:316
781+#: ../src/qml/dialer-app.qml:355
782 msgid "You need to select a SIM card"
783 msgstr ""
784
785
786=== modified file 'src/qml/CMakeLists.txt'
787--- src/qml/CMakeLists.txt 2015-04-30 15:42:48 +0000
788+++ src/qml/CMakeLists.txt 2017-02-01 12:27:58 +0000
789@@ -19,3 +19,4 @@
790 add_subdirectory(ContactViewPage)
791 add_subdirectory(ContactEditorPage)
792 add_subdirectory(Dialogs)
793+add_subdirectory(SettingsPage)
794
795=== modified file 'src/qml/DialerPage/DialerPage.qml'
796--- src/qml/DialerPage/DialerPage.qml 2017-02-01 12:27:58 +0000
797+++ src/qml/DialerPage/DialerPage.qml 2017-02-01 12:27:58 +0000
798@@ -38,6 +38,16 @@
799 property var mmiPlugins: []
800 readonly property bool compactView: page.height <= units.gu(60)
801
802+ function selectAccount(accountId) {
803+ for (var i in accountsModel.activeAccounts) {
804+ var account = accountsModel.activeAccounts[i]
805+ if (account.accountId === accountId) {
806+ headerSections.selectedIndex = i
807+ return
808+ }
809+ }
810+ }
811+
812 header: PageHeader {
813 id: pageHeader
814
815@@ -52,7 +62,7 @@
816 Action {
817 iconName: "settings"
818 text: i18n.tr("Settings")
819- onTriggered: Qt.openUrlExternally("settings:///system/phone")
820+ onTriggered: pageStackNormalMode.push(Qt.resolvedUrl("../SettingsPage/SettingsPage.qml"))
821 }
822
823 ]
824@@ -120,7 +130,6 @@
825 }
826
827 objectName: "dialerPage"
828-
829 title: {
830 // avoid clearing the title when app is inactive
831 // under some states
832
833=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
834--- src/qml/LiveCallPage/LiveCall.qml 2017-02-01 12:27:58 +0000
835+++ src/qml/LiveCallPage/LiveCall.qml 2017-02-01 12:27:58 +0000
836@@ -52,8 +52,8 @@
837 return i18n.tr("Conference");
838 } else if (contactWatcher.alias !== "") {
839 return contactWatcher.alias;
840- } else if (contactWatcher.identifier !== "") {
841- return contactWatcher.identifier;
842+ } else if (call && call.phoneNumber !== "") {
843+ return call.phoneNumber;
844 } else if (!call && initialNumber != "") {
845 return initialNumber
846 } else {
847@@ -387,7 +387,15 @@
848 ContactWatcher {
849 id: contactWatcher
850 // FIXME: handle conf calls
851- identifier: call ? call.phoneNumber : ""
852+ identifier: {
853+ if (initialNumber != "") {
854+ return initialNumber
855+ } else if (call) {
856+ return call.phoneNumber
857+ }
858+ return ""
859+ }
860+
861 onDetailPropertiesChanged: helper.updateSubTypeLabel()
862 onIsUnknownChanged: helper.updateSubTypeLabel()
863 // FIXME: if we implement VOIP, get the addressable fields from the account itself
864
865=== added directory 'src/qml/SettingsPage'
866=== added directory 'src/qml/SettingsPage/AccountSettings'
867=== added file 'src/qml/SettingsPage/AccountSettings/CMakeLists.txt'
868--- src/qml/SettingsPage/AccountSettings/CMakeLists.txt 1970-01-01 00:00:00 +0000
869+++ src/qml/SettingsPage/AccountSettings/CMakeLists.txt 2017-02-01 12:27:58 +0000
870@@ -0,0 +1,6 @@
871+file(GLOB ACCOUNT_SETTINGS_QML_JS_FILES *.qml *.js)
872+
873+# make the files visible on qtcreator
874+add_custom_target(dialer__account_settings_QMlFiles ALL SOURCES ${ACCOUNT_SETTINGS_QML_JS_FILES})
875+
876+install(FILES ${ACCOUNT_SETTINGS_QML_JS_FILES} DESTINATION ${DIALER_APP_DIR}/SettingsPage/AccountSettings)
877
878=== added file 'src/qml/SettingsPage/AccountSettings/SipNumberRewrite.qml'
879--- src/qml/SettingsPage/AccountSettings/SipNumberRewrite.qml 1970-01-01 00:00:00 +0000
880+++ src/qml/SettingsPage/AccountSettings/SipNumberRewrite.qml 2017-02-01 12:27:58 +0000
881@@ -0,0 +1,177 @@
882+/*
883+ * This file is part of dialer-app
884+ *
885+ * Copyright (C) 2017 Canonical Ltd.
886+ *
887+ * Authors: Gustavo Pichorim Boiko <gustavo.boiko@canonical.com>
888+ *
889+ * This program is free software: you can redistribute it and/or modify it
890+ * under the terms of the GNU General Public License version 3, as published
891+ * by the Free Software Foundation.
892+ *
893+ * This program is distributed in the hope that it will be useful, but
894+ * WITHOUT ANY WARRANTY; without even the implied warranties of
895+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
896+ * PURPOSE. See the GNU General Public License for more details.
897+ *
898+ * You should have received a copy of the GNU General Public License along
899+ * with this program. If not, see <http://www.gnu.org/licenses/>.
900+ */
901+
902+import QtQuick 2.0
903+import Ubuntu.Components 1.3
904+import Ubuntu.Components.ListItems 1.3 as ListItems
905+import Ubuntu.Components.Themes.Ambiance 0.1
906+import "../"
907+
908+Page {
909+ id: page
910+ // TRANSLATORS: %1 is the displayname of the account
911+ title: i18n.tr("%1 Number Rewrite").arg(account.displayName)
912+ header: PageHeader {
913+ title: page.title
914+ flickable: contentFlickable
915+ }
916+
917+ property var account: null
918+ property bool updating: false
919+ onAccountChanged: {
920+ if (!account) {
921+ return
922+ }
923+
924+
925+ var props = account.accountProperties
926+ for (var i in props) {
927+ console.log(i + ": " + props[i])
928+ console.log(props.defaultAreaCode)
929+ }
930+
931+ updating = true
932+ numberRewriteSwitch.checked = props.numberRewrite
933+ countryCodeField.text = props.defaultCountryCode
934+ areaCodeField.text = props.defaultAreaCode
935+ removeInputField.text = props.removeCharacters
936+ prefixInputField.text = props.prefix
937+ updating = false
938+ }
939+
940+ function setAccountProperty(prop, value) {
941+ if (updating) {
942+ return
943+ }
944+
945+ var properties = account.accountProperties
946+ properties[prop] = value
947+ account.accountProperties = properties
948+ }
949+
950+ Flickable {
951+ id: contentFlickable
952+ anchors.fill: parent
953+ Column {
954+ height: childrenRect.height
955+ spacing: units.gu(1)
956+ anchors {
957+ left: parent.left
958+ right: parent.right
959+ }
960+
961+ ListItems.Standard {
962+ control: Switch {
963+ id: numberRewriteSwitch
964+ objectName: "numberRewriteSwitch"
965+ onCheckedChanged: {
966+ setAccountProperty("numberRewrite", checked)
967+ }
968+ }
969+ text: i18n.tr("Number rewrite")
970+ showDivider: !numberRewriteSwitch.checked
971+ }
972+
973+ ListItems.Standard {
974+ id: countryCodeItem
975+ height: visible ? units.gu(6) : 0
976+ visible: numberRewriteSwitch.checked
977+ text: i18n.tr("Default country code")
978+ control: SettingsTextField {
979+ id: countryCodeField
980+ objectName: "countryCodeField"
981+ placeholderText: i18n.tr("Enter a country code")
982+ onTextChanged: {
983+ setAccountProperty("defaultCountryCode", text)
984+ }
985+ }
986+ Behavior on height {
987+ NumberAnimation {
988+ duration: UbuntuAnimation.SnapDuration
989+ }
990+ }
991+ }
992+
993+ ListItems.Standard {
994+ id: areaCodeItem
995+ height: visible ? units.gu(6) : 0
996+ // FIXME: re-enable the area code when we get libphonenumber detection fixed
997+ //visible: numberRewriteSwitch.checked
998+ visible: false
999+ text: i18n.tr("Default area code")
1000+ control: SettingsTextField {
1001+ id: areaCodeField
1002+ objectName: "areaCodeField"
1003+ placeholderText: i18n.tr("Enter an area code")
1004+ onTextChanged: {
1005+ setAccountProperty("defaultAreaCode", text)
1006+ }
1007+ }
1008+ Behavior on height {
1009+ NumberAnimation {
1010+ duration: UbuntuAnimation.SnapDuration
1011+ }
1012+ }
1013+ }
1014+
1015+ ListItems.Standard {
1016+ id: removeInput
1017+ visible: numberRewriteSwitch.checked
1018+ height: visible ? units.gu(6) : 0
1019+ text: i18n.tr("Characters to remove")
1020+ control: SettingsTextField {
1021+ id: removeInputField
1022+ objectName: "removeInputField"
1023+ placeholderText: i18n.tr("Enter the characters to remove")
1024+ onTextChanged: {
1025+ setAccountProperty("removeCharacters", text)
1026+ }
1027+ }
1028+
1029+ Behavior on height {
1030+ NumberAnimation {
1031+ duration: UbuntuAnimation.SnapDuration
1032+ }
1033+ }
1034+ }
1035+
1036+ ListItems.Standard {
1037+ id: prefixInput
1038+ visible: numberRewriteSwitch.checked
1039+ height: visible ? units.gu(6) : 0
1040+ text: i18n.tr("Prefix")
1041+ control: SettingsTextField {
1042+ id: prefixInputField
1043+ objectName: "prefixInputField"
1044+ placeholderText: i18n.tr("Enter a prefix")
1045+ onTextChanged: {
1046+ setAccountProperty("prefix", text)
1047+ }
1048+ }
1049+
1050+ Behavior on height {
1051+ NumberAnimation {
1052+ duration: UbuntuAnimation.SnapDuration
1053+ }
1054+ }
1055+ }
1056+ }
1057+ }
1058+}
1059
1060=== added file 'src/qml/SettingsPage/AccountSettings/sip.qml'
1061--- src/qml/SettingsPage/AccountSettings/sip.qml 1970-01-01 00:00:00 +0000
1062+++ src/qml/SettingsPage/AccountSettings/sip.qml 2017-02-01 12:27:58 +0000
1063@@ -0,0 +1,30 @@
1064+/*
1065+ * This file is part of dialer-app
1066+ *
1067+ * Copyright (C) 2017 Canonical Ltd.
1068+ *
1069+ * Authors: Gustavo Pichorim Boiko <gustavo.boiko@canonical.com>
1070+ *
1071+ * This program is free software: you can redistribute it and/or modify it
1072+ * under the terms of the GNU General Public License version 3, as published
1073+ * by the Free Software Foundation.
1074+ *
1075+ * This program is distributed in the hope that it will be useful, but
1076+ * WITHOUT ANY WARRANTY; without even the implied warranties of
1077+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1078+ * PURPOSE. See the GNU General Public License for more details.
1079+ *
1080+ * You should have received a copy of the GNU General Public License along
1081+ * with this program. If not, see <http://www.gnu.org/licenses/>.
1082+ */
1083+
1084+import Ubuntu.Components 1.3
1085+import Ubuntu.Components.ListItems 1.3 as ListItems
1086+
1087+ListItems.SingleValue {
1088+ property var account: null
1089+ text: i18n.tr("%1 Number Rewrite").arg(account.displayName)
1090+ progression: true
1091+ value: account.accountProperties.numberRewrite ? i18n.tr("On") : i18n.tr("Off")
1092+ onClicked: pageStackNormalMode.push(Qt.resolvedUrl("SipNumberRewrite.qml"), { "account": account })
1093+}
1094
1095=== added file 'src/qml/SettingsPage/CMakeLists.txt'
1096--- src/qml/SettingsPage/CMakeLists.txt 1970-01-01 00:00:00 +0000
1097+++ src/qml/SettingsPage/CMakeLists.txt 2017-02-01 12:27:58 +0000
1098@@ -0,0 +1,8 @@
1099+file(GLOB SETTINGS_QML_JS_FILES *.qml *.js)
1100+
1101+# make the files visible on qtcreator
1102+add_custom_target(dialer_settings_QMlFiles ALL SOURCES ${SETTINGS_QML_JS_FILES})
1103+
1104+install(FILES ${SETTINGS_QML_JS_FILES} DESTINATION ${DIALER_APP_DIR}/SettingsPage)
1105+
1106+add_subdirectory(AccountSettings)
1107
1108=== added file 'src/qml/SettingsPage/CallForwardItem.qml'
1109--- src/qml/SettingsPage/CallForwardItem.qml 1970-01-01 00:00:00 +0000
1110+++ src/qml/SettingsPage/CallForwardItem.qml 2017-02-01 12:27:58 +0000
1111@@ -0,0 +1,240 @@
1112+/*
1113+ * This file is part of dialer-app
1114+ *
1115+ * Copyright (C) 2015-2017 Canonical Ltd.
1116+ *
1117+ * Contact: Jonas G. Drange <jonas.drange@canonical.com>
1118+ *
1119+ * This program is free software: you can redistribute it and/or modify it
1120+ * under the terms of the GNU General Public License version 3, as published
1121+ * by the Free Software Foundation.
1122+ *
1123+ * This program is distributed in the hope that it will be useful, but
1124+ * WITHOUT ANY WARRANTY; without even the implied warranties of
1125+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1126+ * PURPOSE. See the GNU General Public License for more details.
1127+ *
1128+ * You should have received a copy of the GNU General Public License along
1129+ * with this program. If not, see <http://www.gnu.org/licenses/>.
1130+ */
1131+
1132+import QtQuick 2.4
1133+import Ubuntu.Components 1.3
1134+import Ubuntu.Components.ListItems 1.3 as ListItem
1135+import Ubuntu.Components.Themes.Ambiance 0.1
1136+import MeeGo.QOfono 0.2
1137+import "callForwardingUtils.js" as Utils
1138+
1139+Column {
1140+ id: item
1141+
1142+ property OfonoCallForwarding callForwarding
1143+ property bool enabled: true
1144+ property string rule
1145+
1146+ property alias checked: check.checked
1147+ property alias busy: d._pending
1148+ property alias text: control.text
1149+ property alias value: current.value
1150+ property alias field: field
1151+
1152+ signal checked ()
1153+ signal failed ()
1154+ signal enteredEditMode ()
1155+ signal leftEditMode ()
1156+
1157+ /**
1158+ * Saves the rule.
1159+ */
1160+ function save () {
1161+ d._pending = true;
1162+ if (!Utils.requestRule(field.text)) {
1163+ d._pending = false;
1164+ d._editing = false;
1165+ checked: callForwarding[rule] !== "";
1166+ }
1167+ }
1168+
1169+ /**
1170+ * Cancels editing the rule.
1171+ */
1172+ function cancel () {
1173+ d._editing = false;
1174+ check.checked = callForwarding[rule] !== "";
1175+ }
1176+
1177+ /**
1178+ * Private object that keeps track of state of the UI.
1179+ */
1180+ QtObject {
1181+ id: d
1182+
1183+ /**
1184+ * Server is working.
1185+ */
1186+ property bool _pending: !callForwarding.ready
1187+
1188+ /**
1189+ * Server failed to change/fetch setting.
1190+ */
1191+ property bool _failed: false
1192+
1193+ /**
1194+ * We're editing.
1195+ */
1196+ property bool _editing: false
1197+ on_EditingChanged: Utils.editingChanged()
1198+
1199+ /**
1200+ * Whether or not the forwarding rule is active.
1201+ */
1202+ property bool _active: callForwarding[rule] !== ""
1203+ }
1204+
1205+ states: [
1206+ State {
1207+ name: "failed"
1208+ when: d._failed
1209+ PropertyChanges { target: control; enabled: false; control: check }
1210+ PropertyChanges { target: check; checked: false }
1211+ PropertyChanges { target: failed; visible: true }
1212+ PropertyChanges { target: activity; visible: false }
1213+ },
1214+ State {
1215+ name: "disabled"
1216+ when: !enabled
1217+ PropertyChanges { target: control; enabled: false }
1218+ PropertyChanges { target: check; enabled: false }
1219+ PropertyChanges { target: current; enabled: false }
1220+ },
1221+ State {
1222+ name: "requesting"
1223+ when: d._editing && d._pending
1224+ PropertyChanges { target: control; control: activity }
1225+ PropertyChanges { target: check; enabled: false; visible: false }
1226+ PropertyChanges { target: current; enabled: false; visible: true }
1227+ },
1228+ State {
1229+ name: "pending"
1230+ when: d._pending
1231+ PropertyChanges { target: control; control: activity }
1232+ PropertyChanges { target: check; enabled: false; visible: false }
1233+ PropertyChanges { target: current; enabled: false; visible: false }
1234+ },
1235+ State {
1236+ name: "editing"
1237+ when: d._editing
1238+ PropertyChanges { target: check; enabled: false }
1239+ PropertyChanges { target: current; visible: false }
1240+ PropertyChanges { target: input; visible: true }
1241+ },
1242+ State {
1243+ name: "active"
1244+ when: d._active
1245+ PropertyChanges { target: current; visible: true }
1246+ }
1247+ ]
1248+
1249+ ListItem.ThinDivider { anchors { left: parent.left; right: parent.right }}
1250+
1251+ ListItem.Standard {
1252+ id: control
1253+ onClicked: check.trigger(!check.checked)
1254+ control: CheckBox {
1255+ id: check
1256+ objectName: "check_" + rule
1257+ checked: callForwarding[rule] !== ""
1258+ onTriggered: Utils.checked(checked)
1259+ visible: !activity.running
1260+ }
1261+ }
1262+
1263+ ListItem.Standard {
1264+ id: input
1265+ visible: false
1266+ height: visible ? units.gu(6) : 0
1267+ /* TRANSLATORS: This string will be truncated on smaller displays. */
1268+ text: i18n.tr("Forward to")
1269+ control: TextField {
1270+ id: field
1271+ objectName: "field_" + rule
1272+ horizontalAlignment: TextInput.AlignRight
1273+ inputMethodHints: Qt.ImhDialableCharactersOnly
1274+ text: callForwarding[rule]
1275+ font.pixelSize: units.dp(18)
1276+ font.weight: Font.Light
1277+ font.family: "Ubuntu"
1278+ color: "#AAAAAA"
1279+ maximumLength: 20
1280+ focus: true
1281+ cursorVisible: text === "" || text !== callForwarding[rule]
1282+ placeholderText: i18n.tr("Enter a number")
1283+ style: TextFieldStyle {
1284+ overlaySpacing: units.gu(0.5)
1285+ frameSpacing: 0
1286+ background: Rectangle {
1287+ property bool error: (field.hasOwnProperty("errorHighlight") &&
1288+ field.errorHighlight &&
1289+ !field.acceptableInput)
1290+ onErrorChanged: error ? theme.palette.normal.negative : color
1291+ color: Theme.palette.normal.background
1292+ anchors.fill: parent
1293+ visible: field.activeFocus
1294+ }
1295+ }
1296+
1297+ onVisibleChanged:
1298+ if (visible === true) forceActiveFocus()
1299+ }
1300+
1301+ Behavior on height {
1302+ NumberAnimation {
1303+ duration: UbuntuAnimation.SnapDuration
1304+ }
1305+ }
1306+ }
1307+
1308+ ListItem.SingleValue {
1309+ id: current
1310+ objectName: "current_" + rule
1311+ visible: value
1312+ /* TRANSLATORS: This string will be truncated on smaller displays. */
1313+ text: i18n.tr("Forward to")
1314+ value: callForwarding[rule]
1315+ onClicked: d._editing = true
1316+ }
1317+
1318+ /* Error message shown when updating fails. */
1319+ Label {
1320+ id: failed
1321+ anchors {
1322+ left: parent.left; right: parent.right; margins: units.gu(2);
1323+ }
1324+ visible: false
1325+ height: contentHeight + units.gu(4)
1326+ horizontalAlignment: Text.AlignHCenter
1327+ verticalAlignment: Text.AlignVCenter
1328+ color: theme.palette.normal.negative
1329+ text: i18n.tr("Call forwarding can't be changed right now.")
1330+ }
1331+
1332+ ActivityIndicator {
1333+ id: activity
1334+ running: d._pending
1335+ visible: running
1336+ }
1337+
1338+ Connections {
1339+ target: item
1340+ Component.onCompleted: {
1341+ item.callForwarding[item.rule + 'Changed'].connect(Utils.ruleChanged);
1342+ item.callForwarding[item.rule + 'Complete'].connect(Utils.ruleComplete);
1343+ item.callForwarding.readyChanged.connect(Utils.ruleReadyChanged);
1344+ }
1345+ Component.onDestruction: {
1346+ item.callForwarding[item.rule + 'Changed'].disconnect(Utils.ruleChanged);
1347+ item.callForwarding[item.rule + 'Complete'].disconnect(Utils.ruleComplete);
1348+ item.callForwarding.readyChanged.disconnect(Utils.ruleReadyChanged);
1349+ }
1350+ }
1351+}
1352
1353=== added file 'src/qml/SettingsPage/CallForwarding.qml'
1354--- src/qml/SettingsPage/CallForwarding.qml 1970-01-01 00:00:00 +0000
1355+++ src/qml/SettingsPage/CallForwarding.qml 2017-02-01 12:27:58 +0000
1356@@ -0,0 +1,393 @@
1357+/*
1358+ * This file is part of dialer-app
1359+ *
1360+ * Copyright (C) 2013-2017 Canonical Ltd.
1361+ *
1362+ * Contact:
1363+ * Sebastien Bacher <sebastien.bacher@canonical.com>
1364+ * Jonas G. Drange <jonas.drange@canonical.com>
1365+ *
1366+ * This program is free software: you can redistribute it and/or modify it
1367+ * under the terms of the GNU General Public License version 3, as published
1368+ * by the Free Software Foundation.
1369+ *
1370+ * This program is distributed in the hope that it will be useful, but
1371+ * WITHOUT ANY WARRANTY; without even the implied warranties of
1372+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1373+ * PURPOSE. See the GNU General Public License for more details.
1374+ *
1375+ * You should have received a copy of the GNU General Public License along
1376+ * with this program. If not, see <http://www.gnu.org/licenses/>.
1377+ *
1378+ * TODO: Add centrally stored setting for each call forwarding that describes a
1379+ * contact. lp:1467816
1380+ *
1381+ * TODO: If a setting failed to be set, the error text should be followed by
1382+ * “Contact {carrier name} for more information.”.
1383+ */
1384+
1385+import QtQuick 2.4
1386+import QtContacts 5.0
1387+import MeeGo.QOfono 0.2
1388+import Ubuntu.Components 1.3
1389+import Ubuntu.Components.ListItems 1.3 as ListItem
1390+import Ubuntu.Components.Popups 1.3
1391+import Ubuntu.Components.Themes.Ambiance 0.1
1392+import Ubuntu.Content 1.3
1393+import "callForwardingUtils.js" as Utils
1394+
1395+Page {
1396+ id: page
1397+ objectName: "callForwardingPage"
1398+ title: headerTitle
1399+ property var sim
1400+ property string headerTitle: i18n.tr("Call forwarding")
1401+ property QtObject editing: null
1402+ property QtObject activeItem: null
1403+ property var activeTransfer
1404+
1405+ header: PageHeader {
1406+ id: pageHeader
1407+ title: page.title
1408+ flickable: flick
1409+ }
1410+
1411+ states: [
1412+ State {
1413+ name: "forwardBusy"
1414+ PropertyChanges { target: fwdSomeTitle; enabled: false }
1415+ PropertyChanges { target: fwdAll; enabled: false; }
1416+ PropertyChanges { target: fwdBusy; enabled: false; }
1417+ PropertyChanges { target: fwdLost; enabled: false; }
1418+ PropertyChanges { target: fwdUnreachable; enabled: false; }
1419+ when: fwdAll.busy || fwdBusy.busy || fwdLost.busy || fwdUnreachable.busy
1420+ },
1421+ State {
1422+ name: "forwardFailed"
1423+ PropertyChanges { target: fwdSomeTitle; enabled: false }
1424+ PropertyChanges { target: fwdFailedLabel; visible: true }
1425+ PropertyChanges { target: fwdAll; enabled: false; }
1426+ PropertyChanges { target: fwdBusy; enabled: false; }
1427+ PropertyChanges { target: fwdLost; enabled: false; }
1428+ PropertyChanges { target: fwdUnreachable; enabled: false; }
1429+ },
1430+ State {
1431+ name: "editing"
1432+ PropertyChanges { target: fwdAll; enabled: false; explicit: true }
1433+ PropertyChanges { target: fwdBusy; enabled: false; explicit: true }
1434+ PropertyChanges { target: fwdLost; enabled: false; explicit: true }
1435+ PropertyChanges { target: fwdUnreachable; enabled: false; explicit: true }
1436+ PropertyChanges { target: fwdSomeTitle; enabled: false }
1437+ StateChangeScript {
1438+ name: "editingEnabled"
1439+ script: {
1440+ editing.opacity = 1;
1441+ editing.enabled = true;
1442+ }
1443+ }
1444+ when: editing !== null
1445+ },
1446+ State {
1447+ name: "forwardAll"
1448+ PropertyChanges { target: fwdSomeTitle; }
1449+ PropertyChanges { target: fwdBusy; enabled: false; value: ""; checked: false }
1450+ PropertyChanges { target: fwdLost; enabled: false; value: ""; checked: false }
1451+ PropertyChanges { target: fwdUnreachable; enabled: false; value: ""; checked: false }
1452+ when: fwdAll.value !== ""
1453+ }
1454+ ]
1455+
1456+ Flickable {
1457+ id: flick
1458+
1459+ // this is necessary to avoid the page to appear below the header
1460+ clip: true
1461+ flickableDirection: Flickable.VerticalFlick
1462+ anchors {
1463+ fill: parent
1464+ bottomMargin: keyboardButtons.height + keyboard.height
1465+ }
1466+ contentHeight: contents.height + units.gu(2)
1467+ contentWidth: parent.width
1468+
1469+ // after add a new field we need to wait for the contentHeight to
1470+ // change to scroll to the correct position
1471+ onContentHeightChanged: Utils.show(page.activeItem)
1472+
1473+ Column {
1474+ id: contents
1475+ anchors { left: parent.left; right: parent.right }
1476+ spacing: units.gu(1)
1477+
1478+ CallForwardItem {
1479+ id: fwdAll
1480+ anchors { left: parent.left; right: parent.right }
1481+ rule: "voiceUnconditional"
1482+ callForwarding: callForwarding
1483+ text: i18n.tr("Forward every incoming call")
1484+ onEnteredEditMode: {page.editing = fwdAll; Utils.show(field)}
1485+ onLeftEditMode: page.editing = null
1486+ }
1487+
1488+ Label {
1489+ id: fwdAllCaption
1490+ anchors {
1491+ left: parent.left; right: parent.right; margins: units.gu(1)
1492+ }
1493+ width: parent.width
1494+ wrapMode: Text.WordWrap
1495+ fontSize: "small"
1496+ horizontalAlignment: Text.AlignHCenter
1497+ verticalAlignment: Text.AlignVCenter
1498+ text: i18n.tr("Redirects all phone calls to another number.")
1499+ opacity: 0.8
1500+ }
1501+
1502+ Label {
1503+ id: fwdFailedLabel
1504+ anchors {
1505+ left: parent.left; right: parent.right; margins: units.gu(2)
1506+ }
1507+ width: parent.width
1508+ wrapMode: Text.WordWrap
1509+ visible: false
1510+ text: i18n.tr("Call forwarding status can't be checked " +
1511+ "now. Try again later.")
1512+ color: theme.palette.normal.negative
1513+ horizontalAlignment: Text.AlignHCenter
1514+ }
1515+
1516+ SettingsItemTitle {
1517+ id: fwdSomeTitle
1518+ text: i18n.tr("Forward incoming calls when:")
1519+ }
1520+
1521+ CallForwardItem {
1522+ id: fwdBusy
1523+ objectName: "fwdBusy"
1524+ anchors { left: parent.left; right: parent.right }
1525+ callForwarding: callForwarding
1526+ rule: "voiceBusy"
1527+ text: i18n.tr("I'm on another call")
1528+ onEnteredEditMode: {page.editing = fwdBusy; Utils.show(field)}
1529+ onLeftEditMode: page.editing = null
1530+ }
1531+
1532+ CallForwardItem {
1533+ id: fwdLost
1534+ objectName: "fwdLost"
1535+ anchors { left: parent.left; right: parent.right }
1536+ callForwarding: callForwarding
1537+ rule: "voiceNoReply"
1538+ text: i18n.tr("I don't answer")
1539+ onEnteredEditMode: {page.editing = fwdLost; Utils.show(field)}
1540+ onLeftEditMode: page.editing = null
1541+ }
1542+
1543+ CallForwardItem {
1544+ id: fwdUnreachable
1545+ objectName: "fwdUnreachable"
1546+ anchors { left: parent.left; right: parent.right }
1547+ callForwarding: callForwarding
1548+ rule: "voiceNotReachable"
1549+ text: i18n.tr("My phone is unreachable")
1550+ onEnteredEditMode: {
1551+ page.editing = fwdUnreachable;
1552+ Utils.show(field);
1553+ }
1554+ onLeftEditMode: page.editing = null
1555+ }
1556+ }
1557+ } // Flickable
1558+
1559+ Rectangle {
1560+ id: keyboardButtons
1561+ anchors {
1562+ left: parent.left
1563+ right: parent.right
1564+ bottom: keyboard.top
1565+ }
1566+ color: Theme.palette.selected.background
1567+ visible: editing !== null
1568+ height: units.gu(6)
1569+ Button {
1570+ id: kbdContacts
1571+ objectName: "contactsButton"
1572+ anchors {
1573+ left: parent.left
1574+ leftMargin: units.gu(1)
1575+ verticalCenter: parent.verticalCenter
1576+ }
1577+ activeFocusOnPress: false
1578+ enabled: editing && !editing.busy
1579+ text: i18n.tr("Contacts...")
1580+ onClicked: page.activeTransfer = contactPicker.request()
1581+ }
1582+
1583+ Button {
1584+ id: kbdCancel
1585+ objectName: "cancelButton"
1586+ anchors {
1587+ right: kbdSet.left
1588+ rightMargin: units.gu(1)
1589+ verticalCenter: parent.verticalCenter
1590+ }
1591+ enabled: editing && !editing.busy
1592+ text: i18n.tr("Cancel")
1593+ onClicked: editing.cancel()
1594+ }
1595+
1596+ Button {
1597+ id: kbdSet
1598+ objectName: "setButton"
1599+ anchors {
1600+ right: parent.right
1601+ rightMargin: units.gu(1)
1602+ verticalCenter: parent.verticalCenter
1603+ }
1604+ enabled: editing && !editing.busy && editing.field.text
1605+ text: i18n.tr("Set")
1606+ activeFocusOnPress: false
1607+ onClicked: editing.save()
1608+ }
1609+ }
1610+
1611+ KeyboardRectangle {
1612+ id: keyboard
1613+ anchors.bottom: parent.bottom
1614+ onHeightChanged: {
1615+ if (page.activeItem) {
1616+ Utils.show(page.activeItem);
1617+ }
1618+ }
1619+ }
1620+
1621+ Component {
1622+ id: chooseNumberDialog
1623+ Dialog {
1624+ id: dialog
1625+ property var contact
1626+ title: i18n.tr("Please select a phone number")
1627+
1628+ ListItem.ItemSelector {
1629+ anchors {
1630+ left: parent.left
1631+ right: parent.right
1632+ }
1633+ activeFocusOnPress: false
1634+ expanded: true
1635+ text: i18n.tr("Numbers")
1636+ model: contact.phoneNumbers
1637+ selectedIndex: -1
1638+ delegate: OptionSelectorDelegate {
1639+ text: modelData.number
1640+ activeFocusOnPress: false
1641+ }
1642+ onDelegateClicked: {
1643+ editing.field.text = contact.phoneNumbers[index].number;
1644+ PopupUtils.close(dialog);
1645+ }
1646+ }
1647+ }
1648+ }
1649+
1650+ Component {
1651+ id: hadNoNumberDialog
1652+ Dialog {
1653+ id: dialog
1654+ title: i18n.tr("Could not forward to this contact")
1655+ text: i18n.tr("Contact not associated with any phone number.")
1656+ Button {
1657+ text: i18n.tr("OK")
1658+ activeFocusOnPress: false
1659+ onClicked: PopupUtils.close(dialog)
1660+ }
1661+ }
1662+ }
1663+
1664+ VCardParser {
1665+ id: contactParser
1666+
1667+ function parseContact(vcardContact) {
1668+ return vcardContact;
1669+ }
1670+
1671+ onVcardParsed: {
1672+ var contact;
1673+ if (contacts.length === 0) {
1674+ console.warn('no contacts parsed');
1675+ return;
1676+ } else {
1677+ contact = parseContact(contacts[0]);
1678+ if (contact.phoneNumbers.length < 1) {
1679+ PopupUtils.open(hadNoNumberDialog);
1680+ } else if (contact.phoneNumbers.length > 1) {
1681+ PopupUtils.open(chooseNumberDialog, page, {
1682+ 'contact': contact
1683+ });
1684+ } else {
1685+ editing.field.text = contact.phoneNumber.number;
1686+ }
1687+ }
1688+ }
1689+ }
1690+
1691+ ContentTransferHint {
1692+ id: importHint
1693+ anchors.fill: parent
1694+ activeTransfer: page.activeTransfer
1695+ }
1696+
1697+ ContentPeer {
1698+ id: contactPicker
1699+ contentType: ContentType.Contacts
1700+ handler: ContentHandler.Source
1701+ selectionType: ContentTransfer.Single
1702+ }
1703+
1704+ Connections {
1705+ target: page.activeTransfer ? page.activeTransfer : null
1706+ onStateChanged: {
1707+ if (page.activeTransfer.state === ContentTransfer.Charged) {
1708+ contactParser.vCardUrl = page.activeTransfer.items[0].url;
1709+ }
1710+ }
1711+ }
1712+
1713+ Connections {
1714+ target: callForwarding
1715+ onGetPropertiesFailed: page.state = "forwardFailed";
1716+ }
1717+
1718+ OfonoCallForwarding {
1719+ id: callForwarding
1720+ modemPath: sim.path
1721+ function updateSummary () {
1722+ var val;
1723+
1724+ // Clear the summary and exit if any of the values are unknown.
1725+ if (typeof voiceUnconditional === 'undefined' ||
1726+ typeof voiceBusy === 'undefined' ||
1727+ typeof voiceNoReply === 'undefined' ||
1728+ typeof voiceNotReachable === 'undefined') {
1729+ sim.setCallForwardingSummary('');
1730+ return;
1731+ }
1732+
1733+ if (voiceUnconditional) {
1734+ val = i18n.tr("All calls");
1735+ } else if (voiceBusy || voiceNoReply || voiceNotReachable) {
1736+ val = i18n.tr("Some calls")
1737+ } else {
1738+ val = i18n.tr("Off")
1739+ }
1740+ sim.setCallForwardingSummary(val);
1741+ }
1742+
1743+ Component.onCompleted: updateSummary()
1744+ onVoiceUnconditionalChanged: updateSummary()
1745+ onVoiceBusyChanged: updateSummary()
1746+ onVoiceNoReplyChanged: updateSummary()
1747+ onVoiceNotReachableChanged: updateSummary()
1748+ }
1749+}
1750
1751=== added file 'src/qml/SettingsPage/CallWaiting.qml'
1752--- src/qml/SettingsPage/CallWaiting.qml 1970-01-01 00:00:00 +0000
1753+++ src/qml/SettingsPage/CallWaiting.qml 2017-02-01 12:27:58 +0000
1754@@ -0,0 +1,108 @@
1755+/*
1756+ * This file is part of dialer-app
1757+ *
1758+ * Copyright (C) 2013-2017 Canonical Ltd.
1759+ *
1760+ * Contact: Iain Lane <iain.lane@canonical.com>
1761+ *
1762+ * This program is free software: you can redistribute it and/or modify it
1763+ * under the terms of the GNU General Public License version 3, as published
1764+ * by the Free Software Foundation.
1765+ *
1766+ * This program is distributed in the hope that it will be useful, but
1767+ * WITHOUT ANY WARRANTY; without even the implied warranties of
1768+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1769+ * PURPOSE. See the GNU General Public License for more details.
1770+ *
1771+ * You should have received a copy of the GNU General Public License along
1772+ * with this program. If not, see <http://www.gnu.org/licenses/>.
1773+ */
1774+
1775+import QtQuick 2.4
1776+import Ubuntu.Components 1.3
1777+import Ubuntu.Components.ListItems 1.3 as ListItem
1778+import MeeGo.QOfono 0.2
1779+
1780+Page {
1781+ id: page
1782+ objectName: "callWaitingPage"
1783+ title: headerTitle
1784+ property var sim
1785+ property string headerTitle: i18n.tr("Call waiting")
1786+ property bool attached: sim.netReg.status === "registered" || sim.netReg.status === "roaming"
1787+
1788+ header: PageHeader {
1789+ id: pageHeader
1790+ title: page.title
1791+ }
1792+
1793+ OfonoCallSettings {
1794+ id: callSettings
1795+ modemPath: sim.path
1796+ onVoiceCallWaitingChanged: {
1797+ callWaitingIndicator.running = false;
1798+ }
1799+ onGetPropertiesFailed: {
1800+ console.warn('callSettings, onGetPropertiesFailed');
1801+ callWaitingIndicator.running = false;
1802+ }
1803+ onVoiceCallWaitingComplete: {
1804+ //When the property change is complete, the value of checked should always be in sync with serverChecked
1805+ callWaitingSwitch.checked = callWaitingSwitch.serverChecked
1806+ /* Log some additional output to help debug when things don't work */
1807+ console.warn('callSettings, onVoiceCallWaitingComplete modem: ' + modemPath + ' success: ' + success + ' ' + voiceCallWaiting);
1808+ callWaitingIndicator.running = false;
1809+ }
1810+ }
1811+
1812+ ActivityIndicator {
1813+ id: callWaitingIndicator
1814+ running: true
1815+ visible: running && attached
1816+ }
1817+
1818+ Switch {
1819+ id: callWaitingSwitch
1820+ objectName: "callWaitingSwitch"
1821+ visible: !callWaitingIndicator.running
1822+ enabled: callSettings.ready && attached
1823+ property bool serverChecked: callSettings.voiceCallWaiting !== "disabled"
1824+ onServerCheckedChanged: checked = serverChecked
1825+ Component.onCompleted: checked = serverChecked
1826+ onTriggered: {
1827+ callWaitingIndicator.running = true;
1828+ if (checked)
1829+ callSettings.voiceCallWaiting = "enabled";
1830+ else
1831+ callSettings.voiceCallWaiting = "disabled";
1832+ }
1833+ }
1834+
1835+ Column {
1836+ anchors.fill: parent
1837+
1838+ ListItem.Standard {
1839+ id: callWaitingItem
1840+ text: i18n.tr("Call waiting")
1841+ control: callWaitingIndicator.running ?
1842+ callWaitingIndicator : callWaitingSwitch
1843+ }
1844+
1845+ ListItem.Base {
1846+ height: textItem.height + units.gu(2)
1847+ Label {
1848+ id: textItem
1849+ anchors {
1850+ left: parent.left
1851+ right: parent.right
1852+ verticalCenter: parent.verticalCenter
1853+ }
1854+
1855+ text: i18n.tr("Lets you answer or start a new call while on another call, and switch between them")
1856+ horizontalAlignment: Text.AlignHCenter
1857+ wrapMode: Text.WordWrap
1858+ }
1859+ showDivider: false
1860+ }
1861+ }
1862+}
1863
1864=== added file 'src/qml/SettingsPage/KeyboardRectangle.qml'
1865--- src/qml/SettingsPage/KeyboardRectangle.qml 1970-01-01 00:00:00 +0000
1866+++ src/qml/SettingsPage/KeyboardRectangle.qml 2017-02-01 12:27:58 +0000
1867@@ -0,0 +1,77 @@
1868+/*
1869+ * Copyright (C) 2015-2017 Canonical, Ltd.
1870+ *
1871+ * This program is free software; you can redistribute it and/or modify
1872+ * it under the terms of the GNU General Public License as published by
1873+ * the Free Software Foundation; version 3.
1874+ *
1875+ * This program is distributed in the hope that it will be useful,
1876+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1877+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1878+ * GNU General Public License for more details.
1879+ *
1880+ * You should have received a copy of the GNU General Public License
1881+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1882+ */
1883+
1884+import QtQuick 2.4
1885+
1886+Item {
1887+ id: keyboardRect
1888+ anchors.left: parent.left
1889+ anchors.right: parent.right
1890+ anchors.bottom: parent.bottom
1891+ height: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
1892+
1893+ Behavior on height {
1894+ NumberAnimation {
1895+ duration: 300
1896+ easing.type: Easing.InOutQuad
1897+ }
1898+ }
1899+
1900+ states: [
1901+ State {
1902+ name: "hidden"
1903+ when: keyboardRect.height == 0
1904+ },
1905+ State {
1906+ name: "shown"
1907+ when: keyboardRect.height == Qt.inputMethod.keyboardRectangle.height
1908+ }
1909+ ]
1910+
1911+ function recursiveFindFocusedItem(parent) {
1912+ if (parent.activeFocus) {
1913+ return parent;
1914+ }
1915+
1916+ for (var i in parent.children) {
1917+ var child = parent.children[i];
1918+ if (child.activeFocus) {
1919+ return child;
1920+ }
1921+
1922+ var item = recursiveFindFocusedItem(child);
1923+
1924+ if (item != null) {
1925+ return item;
1926+ }
1927+ }
1928+
1929+ return null;
1930+ }
1931+
1932+ Connections {
1933+ target: Qt.inputMethod
1934+
1935+ onVisibleChanged: {
1936+ if (!Qt.inputMethod.visible) {
1937+ var focusedItem = recursiveFindFocusedItem(keyboardRect.parent);
1938+ if (focusedItem != null) {
1939+ focusedItem.focus = false;
1940+ }
1941+ }
1942+ }
1943+ }
1944+}
1945
1946=== added file 'src/qml/SettingsPage/MultiSim.qml'
1947--- src/qml/SettingsPage/MultiSim.qml 1970-01-01 00:00:00 +0000
1948+++ src/qml/SettingsPage/MultiSim.qml 2017-02-01 12:27:58 +0000
1949@@ -0,0 +1,113 @@
1950+/*
1951+ * Copyright (C) 2014-2017 Canonical Ltd
1952+ *
1953+ * This program is free software: you can redistribute it and/or modify
1954+ * it under the terms of the GNU General Public License version 3 as
1955+ * published by the Free Software Foundation.
1956+ *
1957+ * This program is distributed in the hope that it will be useful,
1958+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1959+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1960+ * GNU General Public License for more details.
1961+ *
1962+ * You should have received a copy of the GNU General Public License
1963+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1964+ *
1965+ * Authors:
1966+ * Ken Vandine <ken.vandine@canonical.com>
1967+ * Jonas G. Drange <jonas.drange@canonical.com>
1968+ *
1969+*/
1970+import QtQuick 2.4
1971+import GSettings 1.0
1972+import Ubuntu.Components 1.3
1973+import Ubuntu.Components.ListItems 1.3 as ListItem
1974+
1975+Column {
1976+
1977+ property var sims
1978+
1979+ Repeater {
1980+ model: sims
1981+
1982+ Column {
1983+
1984+ anchors { left: parent.left; right: parent.right }
1985+
1986+ SettingsItemTitle { text: sims[index].title }
1987+
1988+ ListItem.Standard {
1989+ objectName: "callWaitSim" + index
1990+ text: i18n.tr("Call waiting")
1991+ progression: true
1992+ onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {
1993+ sim: sims[index],
1994+ headerTitle: sims[index].title
1995+ })
1996+ }
1997+
1998+ ListItem.SingleValue {
1999+ objectName: "callFwdSim" + index
2000+ text: i18n.tr("Call forwarding")
2001+ progression: true
2002+ value: sims[index].getCallForwardingSummary()
2003+ onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {
2004+ sim: sims[index],
2005+ headerTitle: sims[index].title
2006+ })
2007+ }
2008+
2009+ ListItem.Standard {
2010+ objectName: "simServicesSim" + index
2011+ text: i18n.tr("Services")
2012+ progression: true
2013+ enabled: {
2014+ var num;
2015+ var map = sims[index].simMng.serviceNumbers;
2016+ var nums = false;
2017+ for(num in map) {
2018+ if (map.hasOwnProperty(num)) {
2019+ nums = true;
2020+ break;
2021+ }
2022+ }
2023+ return sims[index].simMng.present && nums;
2024+ }
2025+ showDivider: false
2026+ onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"), {
2027+ carrierString: sims[index].netReg.name,
2028+ sim: sims[index],
2029+ headerTitle: sims[index].title
2030+ })
2031+ }
2032+
2033+ ListItem.Divider {
2034+ visible: index !== (sims.length - 1)
2035+ }
2036+
2037+ Binding {
2038+ target: sims[index]
2039+ property: "name"
2040+ value: phoneSettings.simNames[sims[index]]
2041+ }
2042+ }
2043+ }
2044+
2045+ GSettings {
2046+ id: phoneSettings
2047+ schema.id: "com.ubuntu.phone"
2048+ Component.onCompleted: {
2049+ // set default names
2050+ var simNames = phoneSettings.simNames;
2051+ var m0 = sims[0].path
2052+ var m1 = sims[1].path
2053+ if (!simNames[m0]) {
2054+ simNames[m0] = "SIM 1";
2055+ }
2056+ if (!simNames[m1]) {
2057+ simNames[m1] = "SIM 2";
2058+ }
2059+ phoneSettings.simNames = simNames;
2060+ }
2061+ }
2062+}
2063
2064=== added file 'src/qml/SettingsPage/NoSims.qml'
2065--- src/qml/SettingsPage/NoSims.qml 1970-01-01 00:00:00 +0000
2066+++ src/qml/SettingsPage/NoSims.qml 2017-02-01 12:27:58 +0000
2067@@ -0,0 +1,46 @@
2068+/*
2069+ * Copyright (C) 2014-2017 Canonical Ltd
2070+ *
2071+ * This program is free software: you can redistribute it and/or modify
2072+ * it under the terms of the GNU General Public License version 3 as
2073+ * published by the Free Software Foundation.
2074+ *
2075+ * This program is distributed in the hope that it will be useful,
2076+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2077+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2078+ * GNU General Public License for more details.
2079+ *
2080+ * You should have received a copy of the GNU General Public License
2081+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2082+ *
2083+ * Authors:
2084+ * Ken Vandine <ken.vandine@canonical.com>
2085+ * Jonas G. Drange <jonas.drange@canonical.com>
2086+ *
2087+*/
2088+import QtQuick 2.4
2089+import Ubuntu.Components 1.3
2090+import Ubuntu.Components.ListItems 1.3 as ListItem
2091+
2092+Column {
2093+
2094+ ListItem.Standard {
2095+ text: i18n.tr("Call forwarding")
2096+ progression: true
2097+ enabled: false
2098+ }
2099+
2100+ ListItem.Standard {
2101+ text: i18n.tr("Call waiting")
2102+ progression: true
2103+ enabled: false
2104+ }
2105+
2106+ ListItem.Divider {}
2107+
2108+ ListItem.Standard {
2109+ text: i18n.tr("Services")
2110+ progression: true
2111+ enabled: false
2112+ }
2113+}
2114
2115=== added file 'src/qml/SettingsPage/Ofono.qml'
2116--- src/qml/SettingsPage/Ofono.qml 1970-01-01 00:00:00 +0000
2117+++ src/qml/SettingsPage/Ofono.qml 2017-02-01 12:27:58 +0000
2118@@ -0,0 +1,69 @@
2119+/*
2120+ * Copyright (C) 2014-2017 Canonical Ltd
2121+ *
2122+ * This program is free software: you can redistribute it and/or modify
2123+ * it under the terms of the GNU General Public License version 3 as
2124+ * published by the Free Software Foundation.
2125+ *
2126+ * This program is distributed in the hope that it will be useful,
2127+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2128+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2129+ * GNU General Public License for more details.
2130+ *
2131+ * You should have received a copy of the GNU General Public License
2132+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2133+ *
2134+ * Authors:
2135+ * Jonas G. Drange <jonas.drange@canonical.com>
2136+ *
2137+*/
2138+import QtQuick 2.4
2139+import GSettings 1.0
2140+import MeeGo.QOfono 0.2
2141+
2142+Item {
2143+ property alias netReg: netReg
2144+ property alias simMng: simMng
2145+ property alias present: simMng.present
2146+
2147+ property string path
2148+ property string name
2149+ property string title: {
2150+ var number = simMng.subscriberNumbers[0] || simMng.subscriberIdentity;
2151+ return name + (number ? " (" + number + ")" : "");
2152+ }
2153+
2154+ OfonoNetworkRegistration {
2155+ id: netReg
2156+ modemPath: path
2157+ }
2158+
2159+ OfonoSimManager {
2160+ id: simMng
2161+ modemPath: path
2162+ }
2163+
2164+ function setCallForwardingSummary (val) {
2165+ var tmp = {};
2166+ var fwdSum = settings.callforwardingSummaries;
2167+ for (var k in fwdSum){
2168+ if (fwdSum.hasOwnProperty(k)) {
2169+ tmp[k] = fwdSum[k];
2170+ }
2171+ }
2172+ // Prefer IMSI to identify the SIM, use ICCID if IMSI is not available.
2173+ tmp[simMng.subscriberIdentity || simMng.CardIdentifier] = val;
2174+ settings.callforwardingSummaries = tmp;
2175+ }
2176+
2177+ function getCallForwardingSummary () {
2178+ // Use either IMSI or ICCID to identify the SIM.
2179+ var sid = simMng.subscriberIdentity || simMng.CardIdentifier;
2180+ return settings.callforwardingSummaries[sid] || '';
2181+ }
2182+
2183+ GSettings {
2184+ id: settings
2185+ schema.id: "com.ubuntu.touch.system-settings"
2186+ }
2187+}
2188
2189=== added file 'src/qml/SettingsPage/OnlineAccountsHelper.qml'
2190--- src/qml/SettingsPage/OnlineAccountsHelper.qml 1970-01-01 00:00:00 +0000
2191+++ src/qml/SettingsPage/OnlineAccountsHelper.qml 2017-02-01 12:27:58 +0000
2192@@ -0,0 +1,96 @@
2193+/*
2194+ * Copyright (C) 2014 Canonical, Ltd.
2195+ *
2196+ * This program is free software; you can redistribute it and/or modify
2197+ * it under the terms of the GNU General Public License as published by
2198+ * the Free Software Foundation; version 3.
2199+ *
2200+ * This program is distributed in the hope that it will be useful,
2201+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2202+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2203+ * GNU General Public License for more details.
2204+ *
2205+ * You should have received a copy of the GNU General Public License
2206+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2207+ */
2208+
2209+import QtQuick 2.4
2210+import Ubuntu.Components 1.3
2211+import Ubuntu.OnlineAccounts 0.1
2212+import Ubuntu.OnlineAccounts.Client 0.1
2213+import Ubuntu.Components.Popups 1.3
2214+
2215+Item {
2216+ id: root
2217+
2218+ property var dialogInstance: null
2219+ readonly property int count: accountsModel.count
2220+
2221+ function run(){
2222+ if (!root.dialogInstance) {
2223+ root.dialogInstance = PopupUtils.open(dialog)
2224+ }
2225+ }
2226+
2227+ ProviderModel {
2228+ id: accountsModel
2229+
2230+ applicationId: "dialer-app"
2231+ }
2232+
2233+ Component {
2234+ id: dialog
2235+ Dialog {
2236+ id: dialogue
2237+ title: "Online Accounts"
2238+ text: i18n.tr("Pick an account to create.")
2239+
2240+ ScrollView {
2241+ width: dialog.width
2242+ height: Math.min(listView.count, 3) * units.gu(7)
2243+
2244+ ListView {
2245+ id: listView
2246+
2247+ anchors.fill: parent
2248+ clip: true
2249+ model: accountsModel
2250+ delegate: ListItem {
2251+ ListItemLayout {
2252+ title.text: model.displayName
2253+
2254+ Image {
2255+ SlotsLayout.position: SlotsLayout.First
2256+ source: "image://theme/" + model.iconName
2257+ width: units.gu(5)
2258+ height: width
2259+ }
2260+ }
2261+ onClicked: {
2262+ listView.enabled = false
2263+ setup.providerId = model.providerId
2264+ setup.exec()
2265+ }
2266+ }
2267+ }
2268+ }
2269+ Button {
2270+ text: i18n.tr("Cancel")
2271+ onClicked: PopupUtils.close(dialogue)
2272+ }
2273+
2274+ Component.onDestruction: {
2275+ root.dialogInstance = null
2276+ }
2277+ }
2278+ }
2279+
2280+ Setup {
2281+ id: setup
2282+ applicationId: "dialer-app"
2283+ providerId: "telephony-sip"
2284+ onFinished: {
2285+ PopupUtils.close(root.dialogInstance)
2286+ }
2287+ }
2288+}
2289
2290=== added file 'src/qml/SettingsPage/ServiceInfo.qml'
2291--- src/qml/SettingsPage/ServiceInfo.qml 1970-01-01 00:00:00 +0000
2292+++ src/qml/SettingsPage/ServiceInfo.qml 2017-02-01 12:27:58 +0000
2293@@ -0,0 +1,133 @@
2294+/*
2295+ * This file is part of dialer-app
2296+ *
2297+ * Copyright (C) 2013-2017 Canonical Ltd.
2298+ *
2299+ * Contact: Sebastien Bacher <sebastien.bacher@canonical.com>
2300+ *
2301+ * This program is free software: you can redistribute it and/or modify it
2302+ * under the terms of the GNU General Public License version 3, as published
2303+ * by the Free Software Foundation.
2304+ *
2305+ * This program is distributed in the hope that it will be useful, but
2306+ * WITHOUT ANY WARRANTY; without even the implied warranties of
2307+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
2308+ * PURPOSE. See the GNU General Public License for more details.
2309+ *
2310+ * You should have received a copy of the GNU General Public License along
2311+ * with this program. If not, see <http://www.gnu.org/licenses/>.
2312+ */
2313+
2314+import QtQuick 2.4
2315+import Ubuntu.Components 1.3
2316+import Ubuntu.Components.ListItems 1.3 as ListItem
2317+import Ubuntu.History 0.1
2318+import "dateUtils.js" as DateUtils
2319+
2320+Page {
2321+ id: page
2322+ property var sim
2323+ property string serviceName
2324+ property string serviceNumber
2325+ property string lastTimestamp
2326+ title: serviceName
2327+
2328+ header: PageHeader {
2329+ id: pageHeader
2330+ title: page.title
2331+ }
2332+
2333+ HistoryEventModel {
2334+ id: historyEventModel
2335+ type: HistoryThreadModel.EventTypeVoice
2336+ sort: HistorySort {
2337+ sortField: "timestamp"
2338+ sortOrder: HistorySort.DescendingOrder
2339+ }
2340+
2341+ property string phoneNumber: serviceNumber
2342+ onCountChanged: lastTimestamp = historyEventModel.get(0).timestamp
2343+
2344+ filter: HistoryUnionFilter {
2345+ // FIXME: this is not the best API for this case, but will be changed later
2346+ HistoryIntersectionFilter {
2347+ HistoryFilter {
2348+ property string threadId: historyEventModel.threadIdForParticipants("ofono/ofono/account0",
2349+ HistoryThreadModel.EventTypeVoice,
2350+ [historyEventModel.phoneNumber],
2351+ HistoryThreadModel.MatchPhoneNumber);
2352+ filterProperty: "threadId"
2353+ filterValue: threadId != "" ? threadId : "something that won't match"
2354+ }
2355+ HistoryFilter {
2356+ filterProperty: "accountId"
2357+ filterValue: "ofono/ofono/account0"
2358+ }
2359+ }
2360+
2361+ HistoryIntersectionFilter {
2362+ HistoryFilter {
2363+ property string threadId: historyEventModel.threadIdForParticipants("ofono/ofono/account1",
2364+ HistoryThreadModel.EventTypeVoice,
2365+ [historyEventModel.phoneNumber],
2366+ HistoryThreadModel.MatchPhoneNumber);
2367+ filterProperty: "threadId"
2368+ filterValue: threadId != "" ? threadId : "something that won't match"
2369+ }
2370+ HistoryFilter {
2371+ filterProperty: "accountId"
2372+ filterValue: "ofono/ofono/account1"
2373+ }
2374+ }
2375+ }
2376+ }
2377+
2378+ Column {
2379+ anchors {
2380+ left: parent.left
2381+ right: parent.right
2382+ verticalCenter: parent.verticalCenter
2383+ }
2384+
2385+ ListItem.Base {
2386+ anchors.left: parent.left
2387+ anchors.right: parent.right
2388+ height: lastCalledCol.height + units.gu(6)
2389+ Column {
2390+ id: lastCalledCol
2391+ anchors.left: parent.left
2392+ anchors.right: parent.right
2393+ height: childrenRect.height
2394+ spacing: units.gu(2)
2395+
2396+ Icon {
2397+ anchors.horizontalCenter: parent.horizontalCenter
2398+ name: "contact"
2399+ width: 144
2400+ height: width
2401+ }
2402+
2403+ Label {
2404+ id: calledLabel
2405+ objectName: "calledLabel"
2406+ anchors.horizontalCenter: parent.horizontalCenter
2407+ visible: lastTimestamp
2408+ text: i18n.tr("Last called %1").arg(DateUtils.formatFriendlyDate(lastTimestamp))
2409+ }
2410+ }
2411+ }
2412+ }
2413+
2414+ ListItem.SingleControl {
2415+ anchors.bottom: parent.bottom
2416+ control: Button {
2417+ width: parent.width - units.gu(4)
2418+ text: i18n.tr("Call")
2419+ onClicked: {
2420+ var account = mainView.accountForModem(sim.path)
2421+ var accountId = account ? account.accountId : null
2422+ mainView.populateDialpad(serviceNumber, accountId)
2423+ }
2424+ }
2425+ }
2426+}
2427
2428=== added file 'src/qml/SettingsPage/Services.qml'
2429--- src/qml/SettingsPage/Services.qml 1970-01-01 00:00:00 +0000
2430+++ src/qml/SettingsPage/Services.qml 2017-02-01 12:27:58 +0000
2431@@ -0,0 +1,74 @@
2432+/*
2433+ * This file is part of dialer-app
2434+ *
2435+ * Copyright (C) 2013 Canonical Ltd.
2436+ *
2437+ * Contact: Sebastien Bacher <sebastien.bacher@canonical.com>
2438+ *
2439+ * This program is free software: you can redistribute it and/or modify it
2440+ * under the terms of the GNU General Public License version 3, as published
2441+ * by the Free Software Foundation.
2442+ *
2443+ * This program is distributed in the hope that it will be useful, but
2444+ * WITHOUT ANY WARRANTY; without even the implied warranties of
2445+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
2446+ * PURPOSE. See the GNU General Public License for more details.
2447+ *
2448+ * You should have received a copy of the GNU General Public License along
2449+ * with this program. If not, see <http://www.gnu.org/licenses/>.
2450+ */
2451+
2452+import QtQuick 2.4
2453+import Ubuntu.Components 1.3
2454+import Ubuntu.Components.ListItems 1.3 as ListItem
2455+
2456+Page {
2457+ id: root
2458+ objectName: "servicesPage"
2459+ title: headerTitle
2460+ property string carrierString
2461+ property variant sim
2462+ property var names: []
2463+
2464+ // TRANSLATORS: %1 is the name of the (network) carrier
2465+ property string headerTitle: i18n.tr("%1 Services").arg(carrierString)
2466+
2467+ header: PageHeader {
2468+ id: pageHeader
2469+ title: root.title
2470+ }
2471+
2472+ Component.onCompleted: {
2473+ var keys = [];
2474+ for (var x in sim.simMng.serviceNumbers) {
2475+ keys.push(x);
2476+ }
2477+ names = keys;
2478+ }
2479+
2480+ Flickable {
2481+ anchors.fill: parent
2482+ contentHeight: contentItem.childrenRect.height
2483+ boundsBehavior: (contentHeight > root.height) ?
2484+ Flickable.DragAndOvershootBounds :
2485+ Flickable.StopAtBounds
2486+ /* Set the direction to workaround
2487+ https://bugreports.qt-project.org/browse/QTBUG-31905 otherwise the UI
2488+ might end up in a situation where scrolling doesn't work */
2489+ flickableDirection: Flickable.VerticalFlick
2490+
2491+ Column {
2492+ anchors.left: parent.left
2493+ anchors.right: parent.right
2494+ Repeater {
2495+ model: names
2496+
2497+ ListItem.Standard {
2498+ progression: true
2499+ text: modelData
2500+ onClicked: pageStack.push(Qt.resolvedUrl("ServiceInfo.qml"), {serviceName: modelData, serviceNumber: sim.simMng.serviceNumbers[modelData], sim: sim})
2501+ }
2502+ }
2503+ }
2504+ }
2505+}
2506
2507=== added file 'src/qml/SettingsPage/SettingsItemTitle.qml'
2508--- src/qml/SettingsPage/SettingsItemTitle.qml 1970-01-01 00:00:00 +0000
2509+++ src/qml/SettingsPage/SettingsItemTitle.qml 2017-02-01 12:27:58 +0000
2510@@ -0,0 +1,44 @@
2511+/*
2512+ * This file is part of system-settings
2513+ *
2514+ * Copyright (C) 2013-2017 Canonical Ltd.
2515+ *
2516+ * This program is free software: you can redistribute it and/or modify it
2517+ * under the terms of the GNU General Public License version 3, as published
2518+ * by the Free Software Foundation.
2519+ *
2520+ * This program is distributed in the hope that it will be useful, but
2521+ * WITHOUT ANY WARRANTY; without even the implied warranties of
2522+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
2523+ * PURPOSE. See the GNU General Public License for more details.
2524+ *
2525+ * You should have received a copy of the GNU General Public License along
2526+ * with this program. If not, see <http://www.gnu.org/licenses/>.
2527+ */
2528+
2529+import QtQuick 2.4
2530+import Ubuntu.Components 1.3
2531+
2532+Item {
2533+ property alias text: label.text
2534+ anchors {
2535+ left: parent.left
2536+ right: parent.right
2537+ }
2538+ height: units.gu(6)
2539+
2540+ Label {
2541+ id: label
2542+ anchors {
2543+ top: parent.top
2544+ topMargin: units.gu(3)
2545+ right: parent.right
2546+ rightMargin: units.gu(2)
2547+ bottom: parent.bottom
2548+ left: parent.left
2549+ leftMargin: units.gu(2)
2550+ }
2551+ fontSize: "small"
2552+ opacity: 0.75
2553+ }
2554+}
2555
2556=== added file 'src/qml/SettingsPage/SettingsPage.qml'
2557--- src/qml/SettingsPage/SettingsPage.qml 1970-01-01 00:00:00 +0000
2558+++ src/qml/SettingsPage/SettingsPage.qml 2017-02-01 12:27:58 +0000
2559@@ -0,0 +1,158 @@
2560+/*
2561+ * This file is part of dialer-app
2562+ *
2563+ * Copyright (C) 2013-2017 Canonical Ltd.
2564+ *
2565+ * Contact: Iain Lane <iain.lane@canonical.com>
2566+ *
2567+ * This program is free software: you can redistribute it and/or modify it
2568+ * under the terms of the GNU General Public License version 3, as published
2569+ * by the Free Software Foundation.
2570+ *
2571+ * This program is distributed in the hope that it will be useful, but
2572+ * WITHOUT ANY WARRANTY; without even the implied warranties of
2573+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
2574+ * PURPOSE. See the GNU General Public License for more details.
2575+ *
2576+ * You should have received a copy of the GNU General Public License along
2577+ * with this program. If not, see <http://www.gnu.org/licenses/>.
2578+ */
2579+
2580+import QtQuick 2.4
2581+import Ubuntu.Components 1.3
2582+import Ubuntu.Components.ListItems 1.3 as ListItem
2583+import Ubuntu.Telephony 0.1
2584+
2585+Page {
2586+ id: settingsPage
2587+ objectName: "phonePage"
2588+ title: i18n.tr("Settings")
2589+ flickable: flick
2590+
2591+ property var modemAccounts: telepathyHelper.phoneAccounts.displayed
2592+ property var sims: []
2593+
2594+ function updateSims() {
2595+ var component = Qt.createComponent("Ofono.qml");
2596+
2597+ // remove previous objects
2598+ sims.forEach(function (sim) {
2599+ sim.destroy();
2600+ })
2601+
2602+ var result = []
2603+ for (var i in settingsPage.modemAccounts) {
2604+ var sim = component.createObject(settingsPage, {
2605+ path: settingsPage.modemAccounts[i].modemName
2606+ })
2607+ result.push(sim)
2608+ }
2609+ sims = result
2610+ }
2611+
2612+ header: PageHeader {
2613+ id: pageHeader
2614+ title: settingsPage.title
2615+ flickable: flick
2616+ }
2617+
2618+ states: [
2619+ State {
2620+ name: "noSim"
2621+ StateChangeScript {
2622+ script: loader.setSource("NoSims.qml")
2623+ }
2624+ when: sims.length === 0
2625+ },
2626+ State {
2627+ name: "singleSim"
2628+ StateChangeScript {
2629+ script: loader.setSource("SingleSim.qml", {
2630+ sim: sims[0]
2631+ })
2632+ }
2633+ when: sims.length === 1
2634+ },
2635+ State {
2636+ name: "multiSim"
2637+ StateChangeScript {
2638+ script: loader.setSource("MultiSim.qml", {
2639+ sims: sims
2640+ })
2641+ }
2642+ when: sims.length > 1
2643+ }
2644+ ]
2645+
2646+ onModemAccountsChanged: updateSims()
2647+
2648+ Flickable {
2649+ id: flick
2650+ anchors.fill: parent
2651+ contentWidth: parent.width
2652+ contentHeight: contentItem.childrenRect.height
2653+ boundsBehavior: (contentHeight > settingsPage.height) ?
2654+ Flickable.DragAndOvershootBounds : Flickable.StopAtBounds
2655+
2656+ Column {
2657+ anchors { left: parent.left; right: parent.right }
2658+
2659+ Loader {
2660+ id: loader
2661+ anchors { left: parent.left; right: parent.right }
2662+ }
2663+
2664+ ListItem.Standard {
2665+ control: Switch {
2666+ objectName: "dialpadSounds"
2667+ property bool serverChecked: telepathyHelper.dialpadSoundsEnabled
2668+ onServerCheckedChanged: checked = serverChecked
2669+ Component.onCompleted: checked = serverChecked
2670+ onTriggered: telepathyHelper.dialpadSoundsEnabled = checked
2671+ }
2672+ text: i18n.tr("Dialpad tones")
2673+ }
2674+
2675+ ListItem.Standard {
2676+ id: addAccount
2677+ anchors {
2678+ left: parent.left
2679+ right: parent.right
2680+ }
2681+ text: i18n.tr("Add an online account")
2682+ progression: true
2683+ onClicked: onlineAccountHelper.item.run()
2684+ enabled: (onlineAccountHelper.status === Loader.Ready) && (onlineAccountHelper.item.count > 0)
2685+ }
2686+
2687+ Repeater {
2688+ model: telepathyHelper.voiceAccounts.all
2689+
2690+ Loader {
2691+ id: accountPropertiesLoader
2692+ anchors {
2693+ left: parent.left
2694+ right: parent.right
2695+ margins: units.gu(1)
2696+ }
2697+ height: childrenRect.height
2698+ source: Qt.resolvedUrl("./AccountSettings/" + modelData.protocolInfo.name + ".qml")
2699+
2700+ onStatusChanged: {
2701+ if (status == Loader.Ready) {
2702+ item.account = modelData
2703+ }
2704+ }
2705+ }
2706+ }
2707+ }
2708+ }
2709+
2710+ Loader {
2711+ id: onlineAccountHelper
2712+
2713+ anchors.fill: parent
2714+ asynchronous: true
2715+ source: Qt.resolvedUrl("OnlineAccountsHelper.qml")
2716+ }
2717+}
2718
2719=== added file 'src/qml/SettingsPage/SettingsTextField.qml'
2720--- src/qml/SettingsPage/SettingsTextField.qml 1970-01-01 00:00:00 +0000
2721+++ src/qml/SettingsPage/SettingsTextField.qml 2017-02-01 12:27:58 +0000
2722@@ -0,0 +1,29 @@
2723+import QtQuick 2.0
2724+import Ubuntu.Components 1.3
2725+import Ubuntu.Components.Themes.Ambiance 0.1
2726+
2727+TextField {
2728+ id: textField
2729+ horizontalAlignment: TextInput.AlignRight
2730+ font {
2731+ pixelSize: units.dp(18)
2732+ weight: Font.Light
2733+ family: "Ubuntu"
2734+ }
2735+ color: "#AAAAAA"
2736+ maximumLength: 20
2737+ focus: true
2738+ style: TextFieldStyle {
2739+ overlaySpacing: units.gu(0.5)
2740+ frameSpacing: 0
2741+ background: Rectangle {
2742+ property bool error: (textField.hasOwnProperty("errorHighlight") &&
2743+ textField.errorHighlight &&
2744+ !textField.acceptableInput)
2745+ onErrorChanged: error ? theme.palette.normal.negative : color
2746+ color: Theme.palette.normal.background
2747+ anchors.fill: parent
2748+ visible: textField.activeFocus
2749+ }
2750+ }
2751+}
2752
2753=== added file 'src/qml/SettingsPage/SingleSim.qml'
2754--- src/qml/SettingsPage/SingleSim.qml 1970-01-01 00:00:00 +0000
2755+++ src/qml/SettingsPage/SingleSim.qml 2017-02-01 12:27:58 +0000
2756@@ -0,0 +1,69 @@
2757+/*
2758+ * Copyright (C) 2014-2017 Canonical Ltd
2759+ *
2760+ * This program is free software: you can redistribute it and/or modify
2761+ * it under the terms of the GNU General Public License version 3 as
2762+ * published by the Free Software Foundation.
2763+ *
2764+ * This program is distributed in the hope that it will be useful,
2765+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2766+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2767+ * GNU General Public License for more details.
2768+ *
2769+ * You should have received a copy of the GNU General Public License
2770+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2771+ *
2772+ * Authors:
2773+ * Ken Vandine <ken.vandine@canonical.com>
2774+ * Jonas G. Drange <jonas.drange@canonical.com>
2775+ *
2776+*/
2777+import QtQuick 2.4
2778+import Ubuntu.Components 1.3
2779+import Ubuntu.Components.ListItems 1.3 as ListItem
2780+
2781+Column {
2782+ property var sim
2783+ property string carrierName: sim ? sim.netReg.name : null
2784+ property string carrierString: carrierName ? carrierName : i18n.tr("SIM")
2785+
2786+ ListItem.Standard {
2787+ objectName: "callWait"
2788+ text: i18n.tr("Call waiting")
2789+ progression: true
2790+ onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {sim: sim})
2791+ }
2792+
2793+ ListItem.SingleValue {
2794+ objectName: "callFwd"
2795+ text: i18n.tr("Call forwarding")
2796+ showDivider: false
2797+ progression: true
2798+ value: sim.getCallForwardingSummary()
2799+ onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {sim: sim})
2800+ }
2801+
2802+ ListItem.Divider {}
2803+
2804+ ListItem.Standard {
2805+ objectName: "simServices"
2806+ // TRANSLATORS: %1 is the name of the (network) carrier
2807+ text: i18n.tr("%1 Services").arg(carrierString)
2808+ progression: true
2809+ showDivider: false
2810+ enabled: {
2811+ var num;
2812+ var map = sim.simMng.serviceNumbers;
2813+ var nums = false;
2814+ for(num in map) {
2815+ if (map.hasOwnProperty(num)) {
2816+ nums = true;
2817+ break;
2818+ }
2819+ }
2820+ return sim.simMng.present && nums;
2821+ }
2822+ onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"),
2823+ {carrierString: carrierString, sim: sim})
2824+ }
2825+}
2826
2827=== added file 'src/qml/SettingsPage/VCardParser.qml'
2828--- src/qml/SettingsPage/VCardParser.qml 1970-01-01 00:00:00 +0000
2829+++ src/qml/SettingsPage/VCardParser.qml 2017-02-01 12:27:58 +0000
2830@@ -0,0 +1,55 @@
2831+/*
2832+ * Copyright (C) 2015-2017 Canonical, Ltd.
2833+ *
2834+ * This program is free software; you can redistribute it and/or modify
2835+ * it under the terms of the GNU General Public License as published by
2836+ * the Free Software Foundation; version 3.
2837+ *
2838+ * This program is distributed in the hope that it will be useful,
2839+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2840+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2841+ * GNU General Public License for more details.
2842+ *
2843+ * You should have received a copy of the GNU General Public License
2844+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2845+ */
2846+
2847+import QtQuick 2.4
2848+import QtContacts 5.0
2849+
2850+QtObject {
2851+ id: root
2852+
2853+ property string vCardUrl
2854+ property alias contacts: contactsModel.contacts
2855+ property var _model
2856+
2857+ signal vcardParsed(int error)
2858+
2859+ function clearModel()
2860+ {
2861+ if (contactsModel.contacts.length === 0)
2862+ return;
2863+
2864+ var ids = []
2865+ for(var i=0, iMax=contactsModel.contacts.length; i < iMax; i++) {
2866+ ids.push(contactsModel.contacts[i].contactId)
2867+ }
2868+ contactsModel.removeContacts(ids)
2869+ }
2870+
2871+ _model: ContactModel {
2872+ id: contactsModel
2873+
2874+ manager: "memory"
2875+
2876+ onImportCompleted: vcardParsed(error)
2877+ }
2878+
2879+ onVCardUrlChanged: {
2880+ if (vCardUrl.length > 0) {
2881+ clearModel()
2882+ contactsModel.importContacts(vCardUrl)
2883+ }
2884+ }
2885+}
2886
2887=== added file 'src/qml/SettingsPage/callForwardingUtils.js'
2888--- src/qml/SettingsPage/callForwardingUtils.js 1970-01-01 00:00:00 +0000
2889+++ src/qml/SettingsPage/callForwardingUtils.js 2017-02-01 12:27:58 +0000
2890@@ -0,0 +1,126 @@
2891+
2892+/**
2893+ * Handle the user's intention when it checks the check mark
2894+ * associated with this forwarding item.
2895+ *
2896+ * @param {Boolean} Value of check
2897+*/
2898+function checked (value) {
2899+ if (value) {
2900+ if (item.cachedRuleValue) {
2901+ requestRule(item.cachedRuleValue);
2902+ } else {
2903+ d._editing = true;
2904+ }
2905+ } else {
2906+ if (d._editing) {
2907+ d._editing = false;
2908+ } else {
2909+ requestRule('');
2910+ }
2911+ }
2912+}
2913+
2914+/**
2915+ * Request that the rule be changed on the backend.
2916+ *
2917+ * @param {String} new rule value
2918+ * @return {Boolean} whether or not we requested a change
2919+ */
2920+function requestRule (value) {
2921+ value = normalizePhoneNumber(value);
2922+ if (value === item.callForwarding[item.rule]) {
2923+ console.warn('Value did not change.');
2924+ return false;
2925+ }
2926+
2927+ item.callForwarding[item.rule] = value;
2928+ d._pending = true;
2929+ return true;
2930+}
2931+
2932+/**
2933+ * Handler for when the component enter or leaves editing mode.
2934+ */
2935+function editingChanged () {
2936+ if (d._editing) {
2937+ item.enteredEditMode();
2938+ } else {
2939+ item.leftEditMode();
2940+ }
2941+}
2942+
2943+/**
2944+ * Handler for when the rule changes on the backend.
2945+ *
2946+ * @param {String} the new property
2947+ */
2948+function ruleChanged (property) {
2949+ check.checked = callForwarding[rule] !== "";
2950+}
2951+
2952+/**
2953+ * Handler for when the backend responds.
2954+ *
2955+ * @param {Boolean} whether or not the backend succeeded
2956+ */
2957+function ruleComplete (success) {
2958+ d._pending = false;
2959+ d._editing = false;
2960+ if (!success) {
2961+ d._failed = true;
2962+ }
2963+}
2964+
2965+/**
2966+ * Handler for when the rule ready changes.
2967+ */
2968+function ruleReadyChanged () {
2969+ d._pending = !callForwarding.ready;
2970+}
2971+
2972+/**
2973+ * Scroll something into view.
2974+ *
2975+ * @param {QtObject} item to scroll to.
2976+ */
2977+function show(item) {
2978+ if (!item) {
2979+ return;
2980+ }
2981+ page.activeItem = item;
2982+
2983+ var position = flick.contentItem.mapFromItem(item, 0, page.activeItem.y);
2984+
2985+ // check if the item is already visible
2986+ var bottomY = flick.contentY + flick.height;
2987+ var itemBottom = position.y + item.height + units.gu(2); // extra margin
2988+ if (position.y >= flick.contentY && itemBottom <= bottomY) {
2989+ return;
2990+ }
2991+
2992+ // if it is not, try to scroll and make it visible
2993+ var targetY = itemBottom - flick.height;
2994+ if (targetY >= 0 && position.y) {
2995+ flick.contentY = targetY;
2996+ } else if (position.y < flick.contentY) {
2997+ // if it is hidden at the top, also show it
2998+ flick.contentY = position.y;
2999+ }
3000+ flick.returnToBounds();
3001+}
3002+
3003+/**
3004+ * Normalizes a phone number.
3005+ *
3006+ * TODO(jgdx): Remove this and replace it with libphonenumber
3007+ *
3008+ * @param {String} number to normalize
3009+ * @return {String} normalized number
3010+ */
3011+function normalizePhoneNumber(identifier) {
3012+ var regexp = new RegExp('[()/-]', 'g');
3013+ var finalNumber = identifier.replace(/\s+/g, '');
3014+ finalNumber = finalNumber.replace(regexp, '');
3015+ return finalNumber;
3016+}
3017
3018=== added file 'src/qml/SettingsPage/dateUtils.js'
3019--- src/qml/SettingsPage/dateUtils.js 1970-01-01 00:00:00 +0000
3020+++ src/qml/SettingsPage/dateUtils.js 2017-02-01 12:27:58 +0000
3021@@ -0,0 +1,69 @@
3022+/*
3023+ * Copyright 2012-2013 Canonical Ltd.
3024+ *
3025+ * This file is part of dialer-app.
3026+ *
3027+ * dialer-app is free software; you can redistribute it and/or modify
3028+ * it under the terms of the GNU General Public License as published by
3029+ * the Free Software Foundation; version 3.
3030+ *
3031+ * dialer-app is distributed in the hope that it will be useful,
3032+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3033+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3034+ * GNU General Public License for more details.
3035+ *
3036+ * You should have received a copy of the GNU General Public License
3037+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3038+ */
3039+
3040+function areSameDay(date1, date2) {
3041+ return date1.getFullYear() == date2.getFullYear()
3042+ && date1.getMonth() == date2.getMonth()
3043+ && date1.getDate() == date2.getDate()
3044+}
3045+
3046+function formatLogDate(timestamp) {
3047+ var today = new Date()
3048+ var date = new Date(timestamp)
3049+ if (areSameDay(today, date)) {
3050+ return Qt.formatTime(timestamp, Qt.DefaultLocaleShortDate)
3051+ } else {
3052+ return Qt.formatDateTime(timestamp, Qt.DefaultLocaleShortDate)
3053+ }
3054+}
3055+
3056+function friendlyDay(timestamp) {
3057+ var date = new Date(timestamp);
3058+ var today = new Date();
3059+ var yesterday = new Date();
3060+ yesterday.setDate(today.getDate()-1);
3061+ if (areSameDay(today, date)) {
3062+ return i18n.tr("Today");
3063+ } else if (areSameDay(yesterday, date)) {
3064+ return i18n.tr("Yesterday");
3065+ } else {
3066+ return Qt.formatDate(date, Qt.DefaultLocaleShortDate);
3067+ }
3068+}
3069+
3070+function formatFriendlyDate(timestamp) {
3071+ return Qt.formatTime(timestamp, Qt.DefaultLocaleShortDate) + " - " + friendlyDay(timestamp);
3072+}
3073+
3074+function formatFriendlyCallDuration(duration) {
3075+ var text = "";
3076+
3077+ var hours = parseInt(Qt.formatTime(duration, "hh"));
3078+ var minutes = parseInt(Qt.formatTime(duration, "mm"));
3079+ var seconds = parseInt(Qt.formatTime(duration, "ss"));
3080+
3081+ if (hours > 0) {
3082+ text = i18n.tr("%1 hour", "%1 hours", hours).arg(hours)
3083+ } else if (minutes > 0) {
3084+ text = i18n.tr("%1 min", "%1 mins", minutes).arg(minutes)
3085+ } else {
3086+ text = i18n.tr("%1 sec", "%1 secs", seconds).arg(seconds)
3087+ }
3088+
3089+ return text;
3090+}
3091
3092=== added file 'src/qml/SettingsPage/phone.settings'
3093--- src/qml/SettingsPage/phone.settings 1970-01-01 00:00:00 +0000
3094+++ src/qml/SettingsPage/phone.settings 2017-02-01 12:27:58 +0000
3095@@ -0,0 +1,24 @@
3096+{
3097+ "plugin": "phone-plugin",
3098+ "icon": "preferences-system-phone-symbolic",
3099+ "name": "Phone",
3100+ "translations": "ubuntu-system-settings",
3101+ "category": "system",
3102+ "priority": 2,
3103+ "form-factors": [
3104+ "phone"
3105+ ],
3106+ "keywords": [
3107+ "phone",
3108+ "services",
3109+ "forwarding",
3110+ "waiting",
3111+ "call",
3112+ "dialpad",
3113+ "shortcuts",
3114+ "numbers"
3115+ ],
3116+ "page-component": "PageComponent.qml",
3117+ "has-dynamic-keywords": false,
3118+ "has-dynamic-visibility": true
3119+}
3120
3121=== modified file 'src/qml/dialer-app.qml'
3122--- src/qml/dialer-app.qml 2017-02-01 12:27:58 +0000
3123+++ src/qml/dialer-app.qml 2017-02-01 12:27:58 +0000
3124@@ -410,11 +410,15 @@
3125 pageStackNormalMode.pop();
3126 }
3127
3128- if (pageStackNormalMode.currentPage && typeof(pageStackNormalMode.currentPage.dialNumber) != 'undefined') {
3129- pageStackNormalMode.currentPage.dialNumber = number;
3130+ var dialerPage = pageStackNormalMode.currentPage
3131+ if (dialerPage && typeof(dialerPage.dialNumber) != 'undefined') {
3132+ dialerPage.dialNumber = number;
3133+ if (accountId) {
3134+ dialerPage.selectAccount(accountId)
3135+ }
3136
3137- if (pageStackNormalMode.currentPage.bottomEdgeItem) {
3138- pageStackNormalMode.currentPage.bottomEdgeItem.collapse()
3139+ if (dialerPage.bottomEdgeItem) {
3140+ dialerPage.bottomEdgeItem.collapse()
3141 }
3142 }
3143 }
3144@@ -481,6 +485,16 @@
3145 PopupUtils.open(Qt.createComponent("Dialogs/SimLockedDialog.qml").createObject(mainView), mainView, properties)
3146 }
3147
3148+ function accountForModem(modemName) {
3149+ var modemAccounts = telepathyHelper.phoneAccounts.displayed
3150+ for (var i in modemAccounts) {
3151+ if (modemAccounts[i].modemName == modemName) {
3152+ return modemAccounts[i]
3153+ }
3154+ }
3155+ return null
3156+ }
3157+
3158 Component.onCompleted: {
3159 i18n.domain = "dialer-app"
3160 i18n.bindtextdomain("dialer-app", i18nDirectory)

Subscribers

People subscribed via source and target branches