modalDialog: Inherit from St.Widget
Make the dialog a widget itself, removing the `_group` property used for handling the actor. Update all the inherited classes to be also GObject implementations, moving all the signals to proper object ones. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/55
This commit is contained in:
@ -10,9 +10,10 @@ const CheckBox = imports.ui.checkBox;
|
||||
|
||||
var WORK_SPINNER_ICON_SIZE = 16;
|
||||
|
||||
var KeyringDialog = class extends ModalDialog.ModalDialog {
|
||||
constructor() {
|
||||
super({ styleClass: 'prompt-dialog' });
|
||||
var KeyringDialog = GObject.registerClass(
|
||||
class KeyringDialog extends ModalDialog.ModalDialog {
|
||||
_init() {
|
||||
super._init({ styleClass: 'prompt-dialog' });
|
||||
|
||||
this.prompt = new Shell.KeyringPrompt();
|
||||
this.prompt.connect('show-password', this._onShowPassword.bind(this));
|
||||
@ -212,7 +213,7 @@ var KeyringDialog = class extends ModalDialog.ModalDialog {
|
||||
_onCancelButton() {
|
||||
this.prompt.cancel();
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
var KeyringDummyDialog = class {
|
||||
constructor() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
const { Clutter, Gio, GLib, NM, Pango, Shell, St } = imports.gi;
|
||||
const { Clutter, Gio, GLib, GObject, NM, Pango, Shell, St } = imports.gi;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const Config = imports.misc.config;
|
||||
@ -12,9 +12,10 @@ const ShellEntry = imports.ui.shellEntry;
|
||||
|
||||
const VPN_UI_GROUP = 'VPN Plugin UI';
|
||||
|
||||
var NetworkSecretDialog = class extends ModalDialog.ModalDialog {
|
||||
constructor(agent, requestId, connection, settingName, hints, flags, contentOverride) {
|
||||
super({ styleClass: 'prompt-dialog' });
|
||||
var NetworkSecretDialog = GObject.registerClass(
|
||||
class NetworkSecretDialog extends ModalDialog.ModalDialog {
|
||||
_init(agent, requestId, connection, settingName, hints, flags, contentOverride) {
|
||||
super._init({ styleClass: 'prompt-dialog' });
|
||||
|
||||
this._agent = agent;
|
||||
this._requestId = requestId;
|
||||
@ -347,7 +348,7 @@ var NetworkSecretDialog = class extends ModalDialog.ModalDialog {
|
||||
|
||||
return content;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
var VPNRequestHandler = class {
|
||||
constructor(agent, requestId, authHelper, serviceType, connection, hints, flags) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
const { AccountsService, Clutter, Gio, GLib,
|
||||
Pango, PolkitAgent, Polkit, Shell, St } = imports.gi;
|
||||
GObject, Pango, PolkitAgent, Polkit, Shell, St } = imports.gi;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const Animation = imports.ui.animation;
|
||||
@ -15,9 +15,11 @@ var DIALOG_ICON_SIZE = 48;
|
||||
|
||||
var WORK_SPINNER_ICON_SIZE = 16;
|
||||
|
||||
var AuthenticationDialog = class extends ModalDialog.ModalDialog {
|
||||
constructor(actionId, body, cookie, userNames) {
|
||||
super({ styleClass: 'prompt-dialog' });
|
||||
var AuthenticationDialog = GObject.registerClass({
|
||||
Signals: { 'done': { param_types: [GObject.TYPE_BOOLEAN] } }
|
||||
}, class AuthenticationDialog extends ModalDialog.ModalDialog {
|
||||
_init(actionId, body, cookie, userNames) {
|
||||
super._init({ styleClass: 'prompt-dialog' });
|
||||
|
||||
this.actionId = actionId;
|
||||
this.message = body;
|
||||
@ -25,7 +27,7 @@ var AuthenticationDialog = class extends ModalDialog.ModalDialog {
|
||||
this._wasDismissed = false;
|
||||
|
||||
this._sessionUpdatedId = Main.sessionMode.connect('updated', () => {
|
||||
this._group.visible = !Main.sessionMode.isLocked;
|
||||
this.visible = !Main.sessionMode.isLocked;
|
||||
});
|
||||
|
||||
this.connect('closed', this._onDialogClosed.bind(this));
|
||||
@ -326,8 +328,7 @@ var AuthenticationDialog = class extends ModalDialog.ModalDialog {
|
||||
|
||||
this._destroySession();
|
||||
}
|
||||
};
|
||||
Signals.addSignalMethods(AuthenticationDialog.prototype);
|
||||
});
|
||||
|
||||
var AuthenticationAgent = class {
|
||||
constructor() {
|
||||
|
Reference in New Issue
Block a user