~ralsina/ubuntu-system-settings/notification-plugin

« back to all changes in this revision

Viewing changes to plugins/security-privacy/LockSecurity.qml

  • Committer: Roberto Alsina
  • Date: 2014-07-31 18:32:54 UTC
  • mfrom: (779.1.70 ubuntu-system-settings)
  • Revision ID: roberto.alsina@canonical.com-20140731183254-0dgi0dfspshtolbb
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
import GSettings 1.0
22
22
import QtQuick 2.0
 
23
import QtQuick.Layouts 1.1
23
24
import Ubuntu.Components 0.1
24
25
import Ubuntu.Components.ListItems 0.1 as ListItem
25
26
import Ubuntu.Components.Popups 0.1
27
28
import SystemSettings 1.0
28
29
 
29
30
ItemPage {
 
31
    id: page
30
32
    title: i18n.tr("Lock security")
31
33
 
32
34
    UbuntuSecurityPrivacyPanel {
55
57
        }
56
58
    }
57
59
 
58
 
    Dialog {
59
 
        id: changeSecurityDialog
60
 
 
61
 
        property int oldMethod: securityPrivacy.securityType
62
 
        property int newMethod: indexToMethod(unlockMethod.selectedIndex)
63
 
 
64
 
        function clearInputs() {
65
 
            currentInput.text = ""
66
 
            newInput.text = ""
67
 
            confirmInput.text = ""
68
 
            incorrect.visible = false
69
 
            notMatching.visible = false
70
 
            confirmButton.enabled = false
71
 
        }
72
 
 
73
 
        title: {
74
 
            if (changeSecurityDialog.newMethod ==
75
 
                    changeSecurityDialog.oldMethod) { // Changing existing
76
 
                switch (changeSecurityDialog.newMethod) {
77
 
                case UbuntuSecurityPrivacyPanel.Passcode:
78
 
                    return i18n.tr("Change passcode")
79
 
                case UbuntuSecurityPrivacyPanel.Passphrase:
80
 
                    return i18n.tr("Change passphrase")
81
 
                default: // To stop the runtime complaining
82
 
                    return ""
83
 
                }
84
 
            } else {
85
 
                switch (changeSecurityDialog.newMethod) {
86
 
                case UbuntuSecurityPrivacyPanel.Swipe:
87
 
                    return i18n.tr("Switch to swipe")
88
 
                case UbuntuSecurityPrivacyPanel.Passcode:
89
 
                    return i18n.tr("Switch to passcode")
90
 
                case UbuntuSecurityPrivacyPanel.Passphrase:
91
 
                    return i18n.tr("Switch to passphrase")
92
 
                }
93
 
            }
94
 
        }
95
 
 
96
 
        Label {
97
 
            text: {
98
 
                switch (changeSecurityDialog.oldMethod) {
99
 
                case UbuntuSecurityPrivacyPanel.Passcode:
100
 
                    return i18n.tr("Existing passcode")
101
 
                case UbuntuSecurityPrivacyPanel.Passphrase:
102
 
                    return i18n.tr("Existing passphrase")
103
 
                // Shouldn't be reached when visible but still evaluated
104
 
                default:
105
 
                    return ""
106
 
                }
107
 
            }
108
 
 
109
 
            visible: currentInput.visible
110
 
        }
111
 
 
112
 
        TextField {
113
 
            id: currentInput
114
 
            echoMode: TextInput.Password
115
 
            inputMethodHints: {
116
 
                if (changeSecurityDialog.oldMethod ===
117
 
                        UbuntuSecurityPrivacyPanel.Passphrase)
118
 
                    return Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData
119
 
                else if (changeSecurityDialog.oldMethod ===
120
 
                         UbuntuSecurityPrivacyPanel.Passcode)
121
 
                    return Qt.ImhNoAutoUppercase |
122
 
                           Qt.ImhSensitiveData |
123
 
                           Qt.ImhDigitsOnly
124
 
                else
125
 
                    return Qt.ImhNone
126
 
            }
127
 
            inputMask: {
128
 
                if (changeSecurityDialog.oldMethod ===
129
 
                        UbuntuSecurityPrivacyPanel.Passcode)
130
 
                    return "9999"
131
 
                else
132
 
                    return ""
133
 
            }
134
 
            visible: changeSecurityDialog.oldMethod ===
135
 
                        UbuntuSecurityPrivacyPanel.Passphrase ||
136
 
                     changeSecurityDialog.oldMethod ===
137
 
                         UbuntuSecurityPrivacyPanel.Passcode
138
 
            onTextChanged: {
139
 
                if (changeSecurityDialog.newMethod ===
140
 
                        UbuntuSecurityPrivacyPanel.Swipe)
141
 
                    confirmButton.enabled = text.length > 0
142
 
            }
143
 
        }
144
 
 
145
 
        Label {
146
 
            id: incorrect
147
 
            text: {
148
 
                if (changeSecurityDialog.oldMethod ===
149
 
                        UbuntuSecurityPrivacyPanel.Passcode)
150
 
                    return i18n.tr("Incorrect passcode. Try again.")
151
 
                if (changeSecurityDialog.oldMethod ===
152
 
                        UbuntuSecurityPrivacyPanel.Passphrase)
153
 
                    return i18n.tr("Incorrect passphrase. Try again.")
154
 
 
155
 
                //Fallback to prevent warnings. Not displayed.
156
 
                return ""
157
 
            }
158
 
            visible: false
159
 
            color: "darkred"
160
 
        }
161
 
 
162
 
        Label {
163
 
            text: {
164
 
                switch (changeSecurityDialog.newMethod) {
165
 
                case UbuntuSecurityPrivacyPanel.Passcode:
166
 
                    return i18n.tr("Choose passcode")
167
 
                case UbuntuSecurityPrivacyPanel.Passphrase:
168
 
                    return i18n.tr("Choose passphrase")
169
 
                // Shouldn't be reached when visible but still evaluated
170
 
                default:
171
 
                    return ""
172
 
                }
173
 
            }
174
 
            visible: newInput.visible
175
 
        }
176
 
 
177
 
        TextField {
178
 
            id: newInput
179
 
            echoMode: TextInput.Password
180
 
            inputMethodHints: {
181
 
                if (changeSecurityDialog.newMethod ===
182
 
                        UbuntuSecurityPrivacyPanel.Passphrase)
183
 
                    return Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData
184
 
                else if (changeSecurityDialog.newMethod ===
185
 
                         UbuntuSecurityPrivacyPanel.Passcode)
186
 
                    return Qt.ImhNoAutoUppercase |
187
 
                           Qt.ImhSensitiveData |
188
 
                           Qt.ImhDigitsOnly
189
 
                else
190
 
                    return Qt.ImhNone
191
 
            }
192
 
            inputMask: {
193
 
                if (changeSecurityDialog.newMethod ===
194
 
                        UbuntuSecurityPrivacyPanel.Passcode)
195
 
                    return "9999"
196
 
                else
197
 
                    return ""
198
 
            }
199
 
            visible: changeSecurityDialog.newMethod ===
200
 
                        UbuntuSecurityPrivacyPanel.Passcode ||
201
 
                     changeSecurityDialog.newMethod ===
202
 
                        UbuntuSecurityPrivacyPanel.Passphrase
203
 
            // Doesn't get updated if you set this in enabled of confirmButton
204
 
            onTextChanged: confirmButton.enabled =
205
 
                           (acceptableInput && (!visible || text.length > 0))
206
 
        }
207
 
 
208
 
        Label {
209
 
            text: {
210
 
                switch (changeSecurityDialog.newMethod) {
211
 
                case UbuntuSecurityPrivacyPanel.Passcode:
212
 
                    return i18n.tr("Confirm passcode")
213
 
                case UbuntuSecurityPrivacyPanel.Passphrase:
214
 
                    return i18n.tr("Confirm passphrase")
215
 
                // Shouldn't be reached when visible but still evaluated
216
 
                default:
217
 
                    return ""
218
 
                }
219
 
            }
220
 
            visible: confirmInput.visible
221
 
        }
222
 
 
223
 
        TextField {
224
 
            id: confirmInput
225
 
            echoMode: TextInput.Password
226
 
            inputMethodHints: {
227
 
                if (changeSecurityDialog.newMethod ===
228
 
                        UbuntuSecurityPrivacyPanel.Passphrase)
229
 
                    return Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData
230
 
                else if (changeSecurityDialog.newMethod ===
231
 
                         UbuntuSecurityPrivacyPanel.Passcode)
232
 
                    return Qt.ImhNoAutoUppercase |
233
 
                           Qt.ImhSensitiveData |
234
 
                           Qt.ImhDigitsOnly
235
 
                else
236
 
                    return Qt.ImhNone
237
 
            }
238
 
            inputMask: {
239
 
                if (changeSecurityDialog.newMethod ===
240
 
                        UbuntuSecurityPrivacyPanel.Passcode)
241
 
                    return "9999"
242
 
                else
243
 
                    return ""
244
 
            }
245
 
            visible: changeSecurityDialog.newMethod ===
246
 
                        UbuntuSecurityPrivacyPanel.Passcode ||
247
 
                     changeSecurityDialog.newMethod ===
248
 
                        UbuntuSecurityPrivacyPanel.Passphrase
249
 
        }
250
 
 
251
 
        Label {
252
 
            id: notMatching
253
 
            text: {
254
 
                if (changeSecurityDialog.newMethod ===
255
 
                        UbuntuSecurityPrivacyPanel.Passcode)
256
 
                    return i18n.tr("Those passcodes don't match. Try again.")
257
 
                if (changeSecurityDialog.newMethod ===
258
 
                        UbuntuSecurityPrivacyPanel.Passphrase)
259
 
                    return i18n.tr("Those passphrases don't match. Try again.")
260
 
 
261
 
                //Fallback to prevent warnings. Not displayed.
262
 
                return ""
263
 
            }
264
 
            visible: false
265
 
            color: "darkred"
266
 
        }
267
 
 
268
 
        Button {
269
 
            id: confirmButton
270
 
 
271
 
            text: changeSecurityDialog.newMethod ===
272
 
                    UbuntuSecurityPrivacyPanel.Swipe ?
273
 
                      i18n.tr("Unset") :
274
 
                      i18n.tr("Continue")
275
 
            enabled: false
276
 
            onClicked: {
277
 
                var correct = !currentInput.visible ||
278
 
                        (currentInput.text == securityPrivacy.securityValue)
279
 
                var match = (newInput.text == confirmInput.text)
280
 
 
281
 
                incorrect.visible = !correct
282
 
 
283
 
                if (correct) // one problem at a time
284
 
                    notMatching.visible = !match
285
 
 
286
 
                if (correct && match) {
287
 
                    PopupUtils.close(changeSecurityDialog)
288
 
                    securityPrivacy.securityType =
289
 
                            indexToMethod(unlockMethod.selectedIndex)
290
 
                    securityPrivacy.securityValue = newInput.text
291
 
                    changeSecurityDialog.clearInputs()
292
 
                }
293
 
 
294
 
                if (!correct) {
295
 
                    currentInput.forceActiveFocus()
296
 
                    currentInput.selectAll()
297
 
                    return
298
 
                }
299
 
 
300
 
 
301
 
                if (!match) {
302
 
                    newInput.forceActiveFocus()
303
 
                    newInput.selectAll()
304
 
                }
305
 
            }
306
 
 
307
 
        }
308
 
 
309
 
        Button {
310
 
            text: i18n.tr("Cancel")
311
 
            onClicked: {
312
 
                PopupUtils.close(changeSecurityDialog)
313
 
                unlockMethod.skip = true
314
 
                unlockMethod.selectedIndex =
315
 
                        methodToIndex(securityPrivacy.securityType)
316
 
                changeSecurityDialog.clearInputs()
 
60
    function openDialog() {
 
61
        var dlg = PopupUtils.open(dialogComponent)
 
62
        // Set manually rather than have these be dynamically bound, since
 
63
        // the security type can change out from under us, but we don't
 
64
        // want dialog to change in that case.
 
65
        dlg.oldMethod = securityPrivacy.securityType
 
66
        dlg.newMethod = indexToMethod(unlockMethod.selectedIndex)
 
67
    }
 
68
 
 
69
    Component {
 
70
        id: dialogComponent
 
71
 
 
72
        Dialog {
 
73
            id: changeSecurityDialog
 
74
 
 
75
            // This is a bit hacky, but the contents of this dialog get so tall
 
76
            // that on a mako device, they don't fit with the OSK also visible.
 
77
            // So we scrunch up spacing.
 
78
            Binding {
 
79
                target: __foreground
 
80
                property: "itemSpacing"
 
81
                value: units.gu(1)
 
82
            }
 
83
 
 
84
            property int oldMethod
 
85
            property int newMethod
 
86
 
 
87
            title: {
 
88
                if (changeSecurityDialog.newMethod ==
 
89
                        changeSecurityDialog.oldMethod) { // Changing existing
 
90
                    switch (changeSecurityDialog.newMethod) {
 
91
                    case UbuntuSecurityPrivacyPanel.Passcode:
 
92
                        return i18n.tr("Change passcode")
 
93
                    case UbuntuSecurityPrivacyPanel.Passphrase:
 
94
                        return i18n.tr("Change passphrase")
 
95
                    default: // To stop the runtime complaining
 
96
                        return ""
 
97
                    }
 
98
                } else {
 
99
                    switch (changeSecurityDialog.newMethod) {
 
100
                    case UbuntuSecurityPrivacyPanel.Swipe:
 
101
                        return i18n.tr("Switch to swipe")
 
102
                    case UbuntuSecurityPrivacyPanel.Passcode:
 
103
                        return i18n.tr("Switch to passcode")
 
104
                    case UbuntuSecurityPrivacyPanel.Passphrase:
 
105
                        return i18n.tr("Switch to passphrase")
 
106
                    }
 
107
                }
 
108
            }
 
109
 
 
110
            Label {
 
111
                text: {
 
112
                    switch (changeSecurityDialog.oldMethod) {
 
113
                    case UbuntuSecurityPrivacyPanel.Passcode:
 
114
                        return i18n.tr("Existing passcode")
 
115
                    case UbuntuSecurityPrivacyPanel.Passphrase:
 
116
                        return i18n.tr("Existing passphrase")
 
117
                    // Shouldn't be reached when visible but still evaluated
 
118
                    default:
 
119
                        return ""
 
120
                    }
 
121
                }
 
122
 
 
123
                visible: currentInput.visible
 
124
            }
 
125
 
 
126
            TextField {
 
127
                id: currentInput
 
128
                echoMode: TextInput.Password
 
129
                inputMethodHints: {
 
130
                    if (changeSecurityDialog.oldMethod ===
 
131
                            UbuntuSecurityPrivacyPanel.Passphrase)
 
132
                        return Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData
 
133
                    else if (changeSecurityDialog.oldMethod ===
 
134
                             UbuntuSecurityPrivacyPanel.Passcode)
 
135
                        return Qt.ImhNoAutoUppercase |
 
136
                               Qt.ImhSensitiveData |
 
137
                               Qt.ImhDigitsOnly
 
138
                    else
 
139
                        return Qt.ImhNone
 
140
                }
 
141
                inputMask: {
 
142
                    if (changeSecurityDialog.oldMethod ===
 
143
                            UbuntuSecurityPrivacyPanel.Passcode)
 
144
                        return "9999"
 
145
                    else
 
146
                        return ""
 
147
                }
 
148
                visible: changeSecurityDialog.oldMethod ===
 
149
                            UbuntuSecurityPrivacyPanel.Passphrase ||
 
150
                         changeSecurityDialog.oldMethod ===
 
151
                             UbuntuSecurityPrivacyPanel.Passcode
 
152
                onTextChanged: {
 
153
                    if (changeSecurityDialog.newMethod ===
 
154
                            UbuntuSecurityPrivacyPanel.Swipe)
 
155
                        confirmButton.enabled = text.length > 0
 
156
                }
 
157
            }
 
158
 
 
159
            Label {
 
160
                id: incorrect
 
161
                text: ""
 
162
                visible: text !== ""
 
163
                color: "darkred"
 
164
            }
 
165
 
 
166
            Label {
 
167
                text: {
 
168
                    switch (changeSecurityDialog.newMethod) {
 
169
                    case UbuntuSecurityPrivacyPanel.Passcode:
 
170
                        return i18n.tr("Choose passcode")
 
171
                    case UbuntuSecurityPrivacyPanel.Passphrase:
 
172
                        return i18n.tr("Choose passphrase")
 
173
                    // Shouldn't be reached when visible but still evaluated
 
174
                    default:
 
175
                        return ""
 
176
                    }
 
177
                }
 
178
                visible: newInput.visible
 
179
            }
 
180
 
 
181
            TextField {
 
182
                id: newInput
 
183
                echoMode: TextInput.Password
 
184
                inputMethodHints: {
 
185
                    if (changeSecurityDialog.newMethod ===
 
186
                            UbuntuSecurityPrivacyPanel.Passphrase)
 
187
                        return Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData
 
188
                    else if (changeSecurityDialog.newMethod ===
 
189
                             UbuntuSecurityPrivacyPanel.Passcode)
 
190
                        return Qt.ImhNoAutoUppercase |
 
191
                               Qt.ImhSensitiveData |
 
192
                               Qt.ImhDigitsOnly
 
193
                    else
 
194
                        return Qt.ImhNone
 
195
                }
 
196
                inputMask: {
 
197
                    if (changeSecurityDialog.newMethod ===
 
198
                            UbuntuSecurityPrivacyPanel.Passcode)
 
199
                        return "9999"
 
200
                    else
 
201
                        return ""
 
202
                }
 
203
                visible: changeSecurityDialog.newMethod ===
 
204
                            UbuntuSecurityPrivacyPanel.Passcode ||
 
205
                         changeSecurityDialog.newMethod ===
 
206
                            UbuntuSecurityPrivacyPanel.Passphrase
 
207
                // Doesn't get updated if you set this in enabled of confirmButton
 
208
                onTextChanged: confirmButton.enabled =
 
209
                               (acceptableInput && (!visible || text.length > 0))
 
210
            }
 
211
 
 
212
            Label {
 
213
                text: {
 
214
                    switch (changeSecurityDialog.newMethod) {
 
215
                    case UbuntuSecurityPrivacyPanel.Passcode:
 
216
                        return i18n.tr("Confirm passcode")
 
217
                    case UbuntuSecurityPrivacyPanel.Passphrase:
 
218
                        return i18n.tr("Confirm passphrase")
 
219
                    // Shouldn't be reached when visible but still evaluated
 
220
                    default:
 
221
                        return ""
 
222
                    }
 
223
                }
 
224
                visible: confirmInput.visible
 
225
            }
 
226
 
 
227
            TextField {
 
228
                id: confirmInput
 
229
                echoMode: TextInput.Password
 
230
                inputMethodHints: {
 
231
                    if (changeSecurityDialog.newMethod ===
 
232
                            UbuntuSecurityPrivacyPanel.Passphrase)
 
233
                        return Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData
 
234
                    else if (changeSecurityDialog.newMethod ===
 
235
                             UbuntuSecurityPrivacyPanel.Passcode)
 
236
                        return Qt.ImhNoAutoUppercase |
 
237
                               Qt.ImhSensitiveData |
 
238
                               Qt.ImhDigitsOnly
 
239
                    else
 
240
                        return Qt.ImhNone
 
241
                }
 
242
                inputMask: {
 
243
                    if (changeSecurityDialog.newMethod ===
 
244
                            UbuntuSecurityPrivacyPanel.Passcode)
 
245
                        return "9999"
 
246
                    else
 
247
                        return ""
 
248
                }
 
249
                visible: changeSecurityDialog.newMethod ===
 
250
                            UbuntuSecurityPrivacyPanel.Passcode ||
 
251
                         changeSecurityDialog.newMethod ===
 
252
                            UbuntuSecurityPrivacyPanel.Passphrase
 
253
            }
 
254
 
 
255
            Label {
 
256
                id: notMatching
 
257
                text: {
 
258
                    if (changeSecurityDialog.newMethod ===
 
259
                            UbuntuSecurityPrivacyPanel.Passcode)
 
260
                        return i18n.tr("Those passcodes don't match. Try again.")
 
261
                    if (changeSecurityDialog.newMethod ===
 
262
                            UbuntuSecurityPrivacyPanel.Passphrase)
 
263
                        return i18n.tr("Those passphrases don't match. Try again.")
 
264
 
 
265
                    //Fallback to prevent warnings. Not displayed.
 
266
                    return ""
 
267
                }
 
268
                visible: false
 
269
                color: "darkred"
 
270
            }
 
271
 
 
272
            RowLayout {
 
273
                spacing: units.gu(1)
 
274
 
 
275
                Button {
 
276
                    Layout.fillWidth: true
 
277
                    text: i18n.tr("Cancel")
 
278
                    onClicked: {
 
279
                        PopupUtils.close(changeSecurityDialog)
 
280
                        unlockMethod.selectedIndex =
 
281
                                methodToIndex(securityPrivacy.securityType)
 
282
                    }
 
283
                }
 
284
 
 
285
                Button {
 
286
                    id: confirmButton
 
287
                    Layout.fillWidth: true
 
288
 
 
289
                    text: {
 
290
                        if (changeSecurityDialog.newMethod ===
 
291
                                UbuntuSecurityPrivacyPanel.Swipe)
 
292
                            return i18n.tr("Unset")
 
293
                        else if (changeSecurityDialog.oldMethod ===
 
294
                                changeSecurityDialog.newMethod)
 
295
                            return i18n.tr("Change")
 
296
                        else
 
297
                            return i18n.tr("Set")
 
298
                    }
 
299
                    enabled: false
 
300
                    onClicked: {
 
301
                        changeSecurityDialog.enabled = false
 
302
 
 
303
                        var match = (newInput.text == confirmInput.text)
 
304
                        notMatching.visible = !match
 
305
                        if (!match) {
 
306
                            changeSecurityDialog.enabled = true
 
307
                            newInput.forceActiveFocus()
 
308
                            newInput.selectAll()
 
309
                            return
 
310
                        }
 
311
 
 
312
                        var errorText = securityPrivacy.setSecurity(
 
313
                            currentInput.visible ? currentInput.text : "",
 
314
                            newInput.text,
 
315
                            changeSecurityDialog.newMethod)
 
316
                        incorrect.text = errorText
 
317
                        if (errorText !== "") {
 
318
                            changeSecurityDialog.enabled = true
 
319
                            currentInput.forceActiveFocus()
 
320
                            currentInput.selectAll()
 
321
                            return
 
322
                        }
 
323
 
 
324
                        changeSecurityDialog.enabled = true
 
325
                        PopupUtils.close(changeSecurityDialog)
 
326
                    }
 
327
                }
317
328
            }
318
329
        }
319
330
    }
334
345
            property string passcodeAlt: i18n.tr("4-digit passcode…")
335
346
            property string passphraseAlt: i18n.tr("Passphrase…")
336
347
 
337
 
            property bool skip: true
338
 
            property bool firstRun: true
339
 
 
340
348
            id: unlockMethod
341
349
            model: 3
342
350
            delegate: OptionSelectorDelegate {
345
353
                                   (unlockMethod.selectedIndex == 2 ? unlockMethod.passphrase : unlockMethod.passphraseAlt))
346
354
            }
347
355
            expanded: true
348
 
            onSelectedIndexChanged: {
349
 
                if (securityPrivacy.securityType ===
350
 
                        UbuntuSecurityPrivacyPanel.Swipe && firstRun) {
351
 
                    changeSecurityDialog.show()
352
 
                    firstRun = false
353
 
                }
354
 
 
355
 
                // Otherwise the dialogs pop up the first time
356
 
                if (skip) {
357
 
                    skip = false
358
 
                    return
359
 
                }
360
 
 
361
 
                changeSecurityDialog.show()
 
356
            onDelegateClicked: {
 
357
                if (selectedIndex === index && !changeControl.visible)
 
358
                    return // nothing to do
 
359
 
 
360
                selectedIndex = index
 
361
                openDialog()
362
362
            }
363
363
        }
364
364
        Binding {
369
369
 
370
370
        ListItem.SingleControl {
371
371
 
 
372
            id: changeControl
372
373
            visible: securityPrivacy.securityType !==
373
374
                        UbuntuSecurityPrivacyPanel.Swipe
374
375
 
384
385
                text: passcode ? changePasscode : changePassphrase
385
386
                width: parent.width - units.gu(4)
386
387
 
387
 
                onClicked: changeSecurityDialog.show()
 
388
                onClicked: openDialog()
388
389
            }
389
390
        }
390
391
    }