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
1=== renamed file 'src/qml/Dialogs/NoSIMCardSelectedDialog.qml' => 'src/qml/Dialogs/NotificationDialog.qml'
2--- src/qml/Dialogs/NoSIMCardSelectedDialog.qml 2014-08-11 21:58:24 +0000
3+++ src/qml/Dialogs/NotificationDialog.qml 2015-01-28 15:11:13 +0000
4@@ -20,19 +20,17 @@
5 import Ubuntu.Components 1.1
6 import Ubuntu.Components.Popups 0.1
7
8-Component {
9- Dialog {
10- id: dialogue
11- title: i18n.tr("No SIM card selected")
12- text: i18n.tr("You need to select a SIM card")
13- Button {
14- objectName: "closeNoSimCardSelectedDialog"
15- text: i18n.tr("Close")
16- color: UbuntuColors.orange
17- onClicked: {
18- PopupUtils.close(dialogue)
19- Qt.inputMethod.hide()
20- }
21+Dialog {
22+ id: dialogue
23+ title: ""
24+ text: ""
25+ Button {
26+ objectName: "closeDialog"
27+ text: i18n.tr("Close")
28+ color: UbuntuColors.orange
29+ onClicked: {
30+ PopupUtils.close(dialogue)
31+ Qt.inputMethod.hide()
32 }
33 }
34 }
35
36=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
37--- src/qml/LiveCallPage/LiveCall.qml 2015-01-17 02:33:50 +0000
38+++ src/qml/LiveCallPage/LiveCall.qml 2015-01-28 15:11:13 +0000
39@@ -91,6 +91,11 @@
40 id == "earpiece")
41 }
42
43+ function changeCallHoldingStatus(call, held) {
44+ callHoldingConnection.target = call;
45+ call.held = held;
46+ }
47+
48 Connections {
49 target: callManager
50 onHasCallsChanged: {
51@@ -102,6 +107,11 @@
52 liveCall.call = callManager.foregroundCall;
53 }
54 }
55+
56+ onConferenceRequestFailed: {
57+ mainView.showNotification(i18n.tr("Conference call failure"),
58+ i18n.tr("Failed to create a conference call."));
59+ }
60 }
61
62 Connections {
63@@ -114,6 +124,16 @@
64 }
65 }
66
67+ Connections {
68+ id: callHoldingConnection
69+ // the target will be set on the actions
70+ onCallHoldingFailed: {
71+ mainView.showNotification(i18n.tr("Call holding failure"),
72+ target.held ? i18n.tr("Failed to activate the call.")
73+ : i18n.tr("Failed to place the active call on hold."));
74+ }
75+ }
76+
77 Component {
78 id: audioOutputsPopover
79 Popover {
80@@ -489,7 +509,7 @@
81 color: mainView.backgroundColor
82 strokeColor: UbuntuColors.green
83 onClicked: {
84- callManager.foregroundCall.held = true
85+ changeCallHoldingStatus(callManager.foregroundCall, true)
86 }
87 }
88
89@@ -602,7 +622,7 @@
90 iconHeight: units.gu(3)
91 onClicked: {
92 if (call) {
93- call.held = !call.held
94+ changeCallHoldingStatus(call, !call.held)
95 }
96 }
97 }
98
99=== modified file 'src/qml/LiveCallPage/MultiCallDisplay.qml'
100--- src/qml/LiveCallPage/MultiCallDisplay.qml 2014-08-25 23:40:35 +0000
101+++ src/qml/LiveCallPage/MultiCallDisplay.qml 2015-01-28 15:11:13 +0000
102@@ -138,7 +138,7 @@
103
104 MouseArea {
105 anchors.fill: parent
106- onClicked: callEntry.held = false;
107+ onClicked: liveCall.changeCallHoldingStatus(callEntry, false);
108 enabled: callEntry.held
109 }
110
111
112=== modified file 'src/qml/dialer-app.qml'
113--- src/qml/dialer-app.qml 2015-01-20 15:08:23 +0000
114+++ src/qml/dialer-app.qml 2015-01-28 15:11:13 +0000
115@@ -285,7 +285,7 @@
116 // check if at least one account is selected
117 if (multipleAccounts && !mainView.account) {
118 Qt.inputMethod.hide()
119- PopupUtils.open(Qt.createComponent("Dialogs/NoSIMCardSelectedDialog.qml").createObject(mainView))
120+ showNotification(i18n.tr("No SIM card selected"), i18n.tr("You need to select a SIM card"));
121 return
122 }
123
124@@ -306,7 +306,9 @@
125
126 // avoid cleaning the keypadEntry in case there is no signal
127 if (!mainView.account.connected) {
128- PopupUtils.open(noNetworkDialog)
129+ showNotification(i18n.tr("No network"),
130+ telepathyHelper.accountIds.length >= 2 ? i18n.tr("There is currently no network on %1").arg(mainView.account.displayName)
131+ : i18n.tr("There is currently no network."))
132 return
133 }
134
135@@ -395,6 +397,10 @@
136 stack.push(Qt.resolvedUrl("LiveCallPage/LiveCall.qml"), properties)
137 }
138
139+ function showNotification(title, text) {
140+ PopupUtils.open(Qt.resolvedUrl("Dialogs/NotificationDialog.qml"), mainView, {title: title, text: text});
141+ }
142+
143 Component.onCompleted: {
144 i18n.domain = "dialer-app"
145 i18n.bindtextdomain("dialer-app", i18nDirectory)
146@@ -419,24 +425,6 @@
147 }
148
149 Component {
150- id: noNetworkDialog
151- Dialog {
152- id: dialogue
153- title: i18n.tr("No network")
154- text: telepathyHelper.accountIds.length >= 2 ? i18n.tr("There is currently no network on %1").arg(mainView.account.displayName)
155- : i18n.tr("There is currently no network.")
156- Button {
157- objectName: "closeNoNetworkDialog"
158- text: i18n.tr("Close")
159- color: UbuntuColors.orange
160- onClicked: {
161- PopupUtils.close(dialogue)
162- }
163- }
164- }
165- }
166-
167- Component {
168 id: flightModeProgressDialog
169 Dialog {
170 id: flightModeProgressIndicator

Subscribers

People subscribed via source and target branches