~ubuntu-branches/ubuntu/wily/dialer-app/wily-proposed

« back to all changes in this revision

Viewing changes to src/qml/LiveCallPage/LiveCall.qml

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Gustavo Pichorim Boiko
  • Date: 2015-01-24 01:59:59 UTC
  • mfrom: (1.1.72)
  • Revision ID: package-import@ubuntu.com-20150124015959-bf1tp2atrhm9km3z
Tags: 0.1+15.04.20150124-0ubuntu1
[ Gustavo Pichorim Boiko ]
Notify error when trying to create conference calls and when
changing the call hold status. (LP: #1410365)

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
                id == "earpiece")
94
94
    }
95
95
 
 
96
    function changeCallHoldingStatus(call, held) {
 
97
        callHoldingConnection.target = call;
 
98
        call.held = held;
 
99
    }
 
100
 
96
101
    Connections {
97
102
        target: callManager
98
103
        onHasCallsChanged: {
104
109
                liveCall.call = callManager.foregroundCall;
105
110
            }
106
111
        }
 
112
 
 
113
        onConferenceRequestFailed: {
 
114
            mainView.showNotification(i18n.tr("Conference call failure"),
 
115
                                      i18n.tr("Failed to create a conference call."));
 
116
        }
107
117
    }
108
118
 
109
119
    Connections {
126
136
        }
127
137
    }
128
138
 
 
139
    Connections {
 
140
        id: callHoldingConnection
 
141
        // the target will be set on the actions
 
142
        onCallHoldingFailed: {
 
143
            mainView.showNotification(i18n.tr("Call holding failure"),
 
144
                                      target.held ? i18n.tr("Failed to activate the call.")
 
145
                                                  : i18n.tr("Failed to place the active call on hold."));
 
146
        }
 
147
    }
 
148
 
129
149
    Component {
130
150
        id: audioOutputsPopover
131
151
        Popover {
513
533
            color: mainView.backgroundColor
514
534
            strokeColor: UbuntuColors.green
515
535
            onClicked: {
516
 
                callManager.foregroundCall.held = true
 
536
                changeCallHoldingStatus(callManager.foregroundCall, true)
517
537
            }
518
538
        }
519
539
 
626
646
            iconHeight: units.gu(3)
627
647
            onClicked: {
628
648
                if (call) {
629
 
                    call.held = !call.held
 
649
                    changeCallHoldingStatus(call, !call.held)
630
650
                }
631
651
            }
632
652
        }