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
=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
--- src/qml/LiveCallPage/LiveCall.qml 2013-09-27 17:35:35 +0000
+++ src/qml/LiveCallPage/LiveCall.qml 2013-10-01 19:06:02 +0000
@@ -30,6 +30,7 @@
30 id: liveCall30 id: liveCall
3131
32 property QtObject call: callManager.foregroundCall32 property QtObject call: callManager.foregroundCall
33 property string dtmfEntry: ""
33 property alias number: contactWatcher.phoneNumber34 property alias number: contactWatcher.phoneNumber
34 property bool onHold: call ? call.held : false35 property bool onHold: call ? call.held : false
35 property bool isSpeaker: call ? call.speaker : false36 property bool isSpeaker: call ? call.speaker : false
@@ -51,7 +52,7 @@
51 }52 }
5253
53 // TRANSLATORS: %1 is the duration of the call54 // TRANSLATORS: %1 is the duration of the call
54 title: contactWatcher.alias != "" ? contactWatcher.alias : contactWatcher.phoneNumber55 title: dtmfLabelHelper.text !== "" ? dtmfLabelHelper.text : contactWatcher.alias != "" ? contactWatcher.alias : contactWatcher.phoneNumber
55 tools: ToolbarItems {56 tools: ToolbarItems {
56 opened: false57 opened: false
57 locked: true58 locked: true
@@ -63,6 +64,26 @@
63 }64 }
64 }65 }
6566
67 // FIXME: this invisible label is only used for
68 // calculating the size of the screen and resizing
69 // the dtmf string accordingly so it can fit the page header
70 Label {
71 id: dtmfLabelHelper
72 visible: false
73 text: dtmfEntry
74 anchors.left: parent.left
75 anchors.leftMargin: units.gu(2)
76 anchors.right: parent.right
77 anchors.rightMargin: units.gu(4)
78 fontSize: "x-large"
79 onTextChanged: {
80 if(paintedWidth > width) {
81 // drop the first number
82 dtmfEntry = dtmfEntry.substr(1)
83 }
84 }
85 }
86
66 Item {87 Item {
67 id: helper88 id: helper
68 function updateSubTypeLabel() {89 function updateSubTypeLabel() {
@@ -191,6 +212,7 @@
191 onKeyPressed: {212 onKeyPressed: {
192 //keypadEntry.value += label213 //keypadEntry.value += label
193 if (call) {214 if (call) {
215 dtmfEntry += label
194 call.sendDTMF(label)216 call.sendDTMF(label)
195 }217 }
196 }218 }

Subscribers

People subscribed via source and target branches