117
117
Lang.bind(this, this._onShowProcesses2));
118
118
this.mountOp.connect('aborted',
119
119
Lang.bind(this, this.close));
120
this.mountOp.connect('show-unmount-progress',
121
Lang.bind(this, this._onShowUnmountProgress));
121
123
this._gicon = source.get_icon();
208
215
this._processesDialog.update(message, processes, choices);
218
_onShowUnmountProgress: function(op, message, timeLeft, bytesLeft) {
220
this._notifier = new ShellUnmountNotifier();
223
this._notifier.done(message);
225
this._notifier.show(message);
211
228
borrowDialog: function() {
212
229
if (this._dialogId != 0) {
213
230
this._dialog.disconnect(this._dialogId);
238
const ShellUnmountNotifier = new Lang.Class({
239
Name: 'ShellUnmountNotifier',
240
Extends: MessageTray.Source,
243
this.parent('', 'media-removable');
245
this._notification = null;
246
Main.messageTray.add(this);
249
show: function(message) {
250
let [header, text] = message.split('\n', 2);
252
if (!this._notification) {
253
this._notification = new MessageTray.Notification(this, header, text);
254
this._notification.setTransient(true);
255
this._notification.setUrgency(MessageTray.Urgency.CRITICAL);
257
this._notification.update(header, text);
260
this.notify(this._notification);
263
done: function(message) {
264
if (this._notification) {
265
this._notification.destroy();
266
this._notification = null;
270
let notification = new MessageTray.Notification(this, message, null);
271
notification.setTransient(true);
273
this.notify(notification);
221
278
const ShellMountQuestionDialog = new Lang.Class({
222
279
Name: 'ShellMountQuestionDialog',
223
280
Extends: ModalDialog.ModalDialog,
305
362
description.set_text(strings[1]);
307
this._passwordBox = new St.BoxLayout({ vertical: false });
364
this._passwordBox = new St.BoxLayout({ vertical: false, style_class: 'prompt-dialog-password-box' });
308
365
this._messageBox.add(this._passwordBox);
310
367
this._passwordLabel = new St.Label(({ style_class: 'prompt-dialog-password-label',
311
text: _("Passphrase") }));
312
this._passwordBox.add(this._passwordLabel);
368
text: _("Password") }));
369
this._passwordBox.add(this._passwordLabel, { y_fill: false, y_align: St.Align.MIDDLE });
314
371
this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
330
387
if (flags & Gio.AskPasswordFlags.SAVING_SUPPORTED) {
331
388
this._rememberChoice = new CheckBox.CheckBox();
332
this._rememberChoice.getLabelActor().text = _("Remember Passphrase");
389
this._rememberChoice.getLabelActor().text = _("Remember Password");
333
390
this._rememberChoice.actor.checked = true;
334
391
this._messageBox.add(this._rememberChoice.actor);
341
398
key: Clutter.Escape
343
400
{ label: _("Unlock"),
344
action: Lang.bind(this, this._onUnlockButton)
401
action: Lang.bind(this, this._onUnlockButton),
347
405
this.setButtons(buttons);
413
471
scrollView.hide();
415
473
this._applicationList = new St.BoxLayout({ vertical: true });
416
scrollView.add_actor(this._applicationList,
419
x_align: St.Align.START,
420
y_align: St.Align.MIDDLE });
474
scrollView.add_actor(this._applicationList);
422
476
this._applicationList.connect('actor-added',
423
477
Lang.bind(this, function() {