Merge lp:~tiagosh/dialer-app/fix-1225060 into lp:dialer-app

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Bill Filler
Approved revision: 52
Merged at revision: 56
Proposed branch: lp:~tiagosh/dialer-app/fix-1225060
Merge into: lp:dialer-app
Diff against target: 55 lines (+23/-1)
1 file modified
src/qml/LiveCallPage/LiveCall.qml (+23/-1)
To merge this branch: bzr merge lp:~tiagosh/dialer-app/fix-1225060
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+188444@code.launchpad.net

Commit message

Replace the current contact/phone number by the dtmf string on the live call view.

Description of the change

Replace the current contact/phone number by the dtmf string on the live call view.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

works well.
One issue is numbers go offscreen if you enter too many.
Consider limiting the numbers that are entered and start removing from the beginning of string so that new numbers don't go offscreen. guess the size limit would need to be somewhat dependent on the screen size/resolution.

review: Needs Fixing
lp:~tiagosh/dialer-app/fix-1225060 updated
52. By Tiago Salem Herrmann

drop the first character when the string can't fit the page header

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

works well

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
2--- src/qml/LiveCallPage/LiveCall.qml 2013-09-27 17:35:35 +0000
3+++ src/qml/LiveCallPage/LiveCall.qml 2013-10-01 19:06:02 +0000
4@@ -30,6 +30,7 @@
5 id: liveCall
6
7 property QtObject call: callManager.foregroundCall
8+ property string dtmfEntry: ""
9 property alias number: contactWatcher.phoneNumber
10 property bool onHold: call ? call.held : false
11 property bool isSpeaker: call ? call.speaker : false
12@@ -51,7 +52,7 @@
13 }
14
15 // TRANSLATORS: %1 is the duration of the call
16- title: contactWatcher.alias != "" ? contactWatcher.alias : contactWatcher.phoneNumber
17+ title: dtmfLabelHelper.text !== "" ? dtmfLabelHelper.text : contactWatcher.alias != "" ? contactWatcher.alias : contactWatcher.phoneNumber
18 tools: ToolbarItems {
19 opened: false
20 locked: true
21@@ -63,6 +64,26 @@
22 }
23 }
24
25+ // FIXME: this invisible label is only used for
26+ // calculating the size of the screen and resizing
27+ // the dtmf string accordingly so it can fit the page header
28+ Label {
29+ id: dtmfLabelHelper
30+ visible: false
31+ text: dtmfEntry
32+ anchors.left: parent.left
33+ anchors.leftMargin: units.gu(2)
34+ anchors.right: parent.right
35+ anchors.rightMargin: units.gu(4)
36+ fontSize: "x-large"
37+ onTextChanged: {
38+ if(paintedWidth > width) {
39+ // drop the first number
40+ dtmfEntry = dtmfEntry.substr(1)
41+ }
42+ }
43+ }
44+
45 Item {
46 id: helper
47 function updateSubTypeLabel() {
48@@ -191,6 +212,7 @@
49 onKeyPressed: {
50 //keypadEntry.value += label
51 if (call) {
52+ dtmfEntry += label
53 call.sendDTMF(label)
54 }
55 }

Subscribers

People subscribed via source and target branches