Merge lp:~boiko/dialer-app/rtm-notify_conf_and_holding_errors into lp:dialer-app/rtm-14.09

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 256
Merged at revision: 256
Proposed branch: lp:~boiko/dialer-app/rtm-notify_conf_and_holding_errors
Merge into: lp:dialer-app/rtm-14.09
Diff against target: 170 lines (+42/-36)
4 files modified
src/qml/Dialogs/NotificationDialog.qml (+11/-13)
src/qml/LiveCallPage/LiveCall.qml (+22/-2)
src/qml/LiveCallPage/MultiCallDisplay.qml (+1/-1)
src/qml/dialer-app.qml (+8/-20)
To merge this branch: bzr merge lp:~boiko/dialer-app/rtm-notify_conf_and_holding_errors
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+247851@code.launchpad.net

Commit message

Notify error when trying to create conference calls and when changing the call hold status.

Description of the change

Notify error when trying to create conference calls and when changing the call hold status.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== renamed file 'src/qml/Dialogs/NoSIMCardSelectedDialog.qml' => 'src/qml/Dialogs/NotificationDialog.qml'
--- src/qml/Dialogs/NoSIMCardSelectedDialog.qml 2014-08-11 21:58:24 +0000
+++ src/qml/Dialogs/NotificationDialog.qml 2015-01-28 15:11:13 +0000
@@ -20,19 +20,17 @@
20import Ubuntu.Components 1.120import Ubuntu.Components 1.1
21import Ubuntu.Components.Popups 0.121import Ubuntu.Components.Popups 0.1
2222
23Component {23Dialog {
24 Dialog {24 id: dialogue
25 id: dialogue25 title: ""
26 title: i18n.tr("No SIM card selected")26 text: ""
27 text: i18n.tr("You need to select a SIM card")27 Button {
28 Button {28 objectName: "closeDialog"
29 objectName: "closeNoSimCardSelectedDialog"29 text: i18n.tr("Close")
30 text: i18n.tr("Close")30 color: UbuntuColors.orange
31 color: UbuntuColors.orange31 onClicked: {
32 onClicked: {32 PopupUtils.close(dialogue)
33 PopupUtils.close(dialogue)33 Qt.inputMethod.hide()
34 Qt.inputMethod.hide()
35 }
36 }34 }
37 }35 }
38}36}
3937
=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
--- src/qml/LiveCallPage/LiveCall.qml 2015-01-17 02:33:50 +0000
+++ src/qml/LiveCallPage/LiveCall.qml 2015-01-28 15:11:13 +0000
@@ -91,6 +91,11 @@
91 id == "earpiece")91 id == "earpiece")
92 }92 }
9393
94 function changeCallHoldingStatus(call, held) {
95 callHoldingConnection.target = call;
96 call.held = held;
97 }
98
94 Connections {99 Connections {
95 target: callManager100 target: callManager
96 onHasCallsChanged: {101 onHasCallsChanged: {
@@ -102,6 +107,11 @@
102 liveCall.call = callManager.foregroundCall;107 liveCall.call = callManager.foregroundCall;
103 }108 }
104 }109 }
110
111 onConferenceRequestFailed: {
112 mainView.showNotification(i18n.tr("Conference call failure"),
113 i18n.tr("Failed to create a conference call."));
114 }
105 }115 }
106116
107 Connections {117 Connections {
@@ -114,6 +124,16 @@
114 }124 }
115 }125 }
116126
127 Connections {
128 id: callHoldingConnection
129 // the target will be set on the actions
130 onCallHoldingFailed: {
131 mainView.showNotification(i18n.tr("Call holding failure"),
132 target.held ? i18n.tr("Failed to activate the call.")
133 : i18n.tr("Failed to place the active call on hold."));
134 }
135 }
136
117 Component {137 Component {
118 id: audioOutputsPopover138 id: audioOutputsPopover
119 Popover {139 Popover {
@@ -489,7 +509,7 @@
489 color: mainView.backgroundColor509 color: mainView.backgroundColor
490 strokeColor: UbuntuColors.green510 strokeColor: UbuntuColors.green
491 onClicked: {511 onClicked: {
492 callManager.foregroundCall.held = true512 changeCallHoldingStatus(callManager.foregroundCall, true)
493 }513 }
494 }514 }
495515
@@ -602,7 +622,7 @@
602 iconHeight: units.gu(3)622 iconHeight: units.gu(3)
603 onClicked: {623 onClicked: {
604 if (call) {624 if (call) {
605 call.held = !call.held625 changeCallHoldingStatus(call, !call.held)
606 }626 }
607 }627 }
608 }628 }
609629
=== modified file 'src/qml/LiveCallPage/MultiCallDisplay.qml'
--- src/qml/LiveCallPage/MultiCallDisplay.qml 2014-08-25 23:40:35 +0000
+++ src/qml/LiveCallPage/MultiCallDisplay.qml 2015-01-28 15:11:13 +0000
@@ -138,7 +138,7 @@
138138
139 MouseArea {139 MouseArea {
140 anchors.fill: parent140 anchors.fill: parent
141 onClicked: callEntry.held = false;141 onClicked: liveCall.changeCallHoldingStatus(callEntry, false);
142 enabled: callEntry.held142 enabled: callEntry.held
143 }143 }
144144
145145
=== modified file 'src/qml/dialer-app.qml'
--- src/qml/dialer-app.qml 2015-01-20 15:08:23 +0000
+++ src/qml/dialer-app.qml 2015-01-28 15:11:13 +0000
@@ -285,7 +285,7 @@
285 // check if at least one account is selected285 // check if at least one account is selected
286 if (multipleAccounts && !mainView.account) {286 if (multipleAccounts && !mainView.account) {
287 Qt.inputMethod.hide()287 Qt.inputMethod.hide()
288 PopupUtils.open(Qt.createComponent("Dialogs/NoSIMCardSelectedDialog.qml").createObject(mainView))288 showNotification(i18n.tr("No SIM card selected"), i18n.tr("You need to select a SIM card"));
289 return289 return
290 }290 }
291291
@@ -306,7 +306,9 @@
306306
307 // avoid cleaning the keypadEntry in case there is no signal307 // avoid cleaning the keypadEntry in case there is no signal
308 if (!mainView.account.connected) {308 if (!mainView.account.connected) {
309 PopupUtils.open(noNetworkDialog)309 showNotification(i18n.tr("No network"),
310 telepathyHelper.accountIds.length >= 2 ? i18n.tr("There is currently no network on %1").arg(mainView.account.displayName)
311 : i18n.tr("There is currently no network."))
310 return312 return
311 }313 }
312314
@@ -395,6 +397,10 @@
395 stack.push(Qt.resolvedUrl("LiveCallPage/LiveCall.qml"), properties)397 stack.push(Qt.resolvedUrl("LiveCallPage/LiveCall.qml"), properties)
396 }398 }
397399
400 function showNotification(title, text) {
401 PopupUtils.open(Qt.resolvedUrl("Dialogs/NotificationDialog.qml"), mainView, {title: title, text: text});
402 }
403
398 Component.onCompleted: {404 Component.onCompleted: {
399 i18n.domain = "dialer-app"405 i18n.domain = "dialer-app"
400 i18n.bindtextdomain("dialer-app", i18nDirectory)406 i18n.bindtextdomain("dialer-app", i18nDirectory)
@@ -419,24 +425,6 @@
419 }425 }
420426
421 Component {427 Component {
422 id: noNetworkDialog
423 Dialog {
424 id: dialogue
425 title: i18n.tr("No network")
426 text: telepathyHelper.accountIds.length >= 2 ? i18n.tr("There is currently no network on %1").arg(mainView.account.displayName)
427 : i18n.tr("There is currently no network.")
428 Button {
429 objectName: "closeNoNetworkDialog"
430 text: i18n.tr("Close")
431 color: UbuntuColors.orange
432 onClicked: {
433 PopupUtils.close(dialogue)
434 }
435 }
436 }
437 }
438
439 Component {
440 id: flightModeProgressDialog428 id: flightModeProgressDialog
441 Dialog {429 Dialog {
442 id: flightModeProgressIndicator430 id: flightModeProgressIndicator

Subscribers

People subscribed via source and target branches