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:
@@ -1,6 +1,6 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
const { Clutter, Gio, GLib, Meta, Shell, St } = imports.gi;
|
||||
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
|
||||
const Mainloop = imports.mainloop;
|
||||
|
||||
const AccessDialog = imports.ui.accessDialog;
|
||||
@@ -689,12 +689,13 @@ function queueDeferredWork(workId) {
|
||||
}
|
||||
}
|
||||
|
||||
var RestartMessage = class extends ModalDialog.ModalDialog {
|
||||
constructor(message) {
|
||||
super({ shellReactive: true,
|
||||
styleClass: 'restart-message headline',
|
||||
shouldFadeIn: false,
|
||||
destroyOnClose: true });
|
||||
var RestartMessage = GObject.registerClass(
|
||||
class RestartMessage extends ModalDialog.ModalDialog {
|
||||
_init(message) {
|
||||
super._init({ shellReactive: true,
|
||||
styleClass: 'restart-message headline',
|
||||
shouldFadeIn: false,
|
||||
destroyOnClose: true });
|
||||
|
||||
let label = new St.Label({ text: message });
|
||||
|
||||
@@ -704,7 +705,7 @@ var RestartMessage = class extends ModalDialog.ModalDialog {
|
||||
y_align: St.Align.MIDDLE });
|
||||
this.buttonLayout.hide();
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
function showRestartMessage(message) {
|
||||
let restartMessage = new RestartMessage(message);
|
||||
|
Reference in New Issue
Block a user