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

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

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

Commit message

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

Description of the change

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

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

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

Some small inline comments.

review: Needs Fixing
572. By Gustavo Pichorim Boiko

Remove unused file.

573. By Gustavo Pichorim Boiko

Update to QtQuick 2.4

574. By Gustavo Pichorim Boiko

Add a TODO file with the pending items.

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

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

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

looks good

review: Approve

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: