~filip-sohajek-deactivatedaccount/ubuntu/utopic/dialer-app/fix-for-1361609

« back to all changes in this revision

Viewing changes to src/qml/dialer-app.qml

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Tiago Salem Herrmann
  • Date: 2014-07-17 21:39:50 UTC
  • mfrom: (1.1.45)
  • Revision ID: package-import@ubuntu.com-20140717213950-xyjioslcn5596lwb
Tags: 0.1+14.10.20140717.2-0ubuntu1
[ Tiago Salem Herrmann ]
Add dual sim support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    property bool applicationActive: Qt.application.active
30
30
    property string ussdResponseTitle: ""
31
31
    property string ussdResponseText: ""
 
32
    // FIXME this info must come from system settings or telephony-service
 
33
    property var accounts: {"ofono/ofono/account0": "SIM 1", "ofono/ofono/account1": "SIM 2"}
 
34
    property string accountId: telepathyHelper.accountIds[0]
 
35
 
32
36
    automaticOrientation: false
33
37
    width: units.gu(40)
34
38
    height: units.gu(71)
130
134
            return;
131
135
        }
132
136
 
 
137
        if (!telepathyHelper.isAccountConnected(mainView.accountId)) {
 
138
            PopupUtils.open(noNetworkDialog)
 
139
            return
 
140
        }
 
141
 
133
142
        if (checkUSSD(number)) {
134
143
            PopupUtils.open(ussdProgressDialog)
135
144
            ussdManager.initiate(number, accountId)
206
215
    }
207
216
 
208
217
    Component {
 
218
        id: noNetworkDialog
 
219
        Dialog {
 
220
            id: dialogue
 
221
            title: i18n.tr("No network")
 
222
            text: telepathyHelper.accountIds.length >= 2 ? i18n.tr("There is currently no network on %1").arg(mainView.accounts[mainView.accountId]) : i18n.tr("There is currently no network.")
 
223
            Button {
 
224
                objectName: "closeNoNetworkDialog"
 
225
                text: i18n.tr("Close")
 
226
                color: UbuntuColors.orange
 
227
                onClicked: {
 
228
                    PopupUtils.close(dialogue)
 
229
                }
 
230
            }
 
231
        }
 
232
    }
 
233
 
 
234
    Component {
209
235
        id: ussdProgressDialog
210
236
        Dialog {
211
237
            id: ussdProgressIndicator