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, Shell } = imports.gi;
|
||||
const { Clutter, Gio, GLib, GObject, Shell } = imports.gi;
|
||||
|
||||
const Dialog = imports.ui.dialog;
|
||||
const Main = imports.ui.main;
|
||||
@ -342,9 +342,11 @@ var AppAuthorizer = class {
|
||||
}
|
||||
};
|
||||
|
||||
var GeolocationDialog = class extends ModalDialog.ModalDialog {
|
||||
constructor(name, subtitle, reqAccuracyLevel) {
|
||||
super({ styleClass: 'geolocation-dialog' });
|
||||
var GeolocationDialog = GObject.registerClass({
|
||||
Signals: { 'response': { param_types: [GObject.TYPE_UINT] } }
|
||||
}, class GeolocationDialog extends ModalDialog.ModalDialog {
|
||||
_init(name, subtitle, reqAccuracyLevel) {
|
||||
super._init({ styleClass: 'geolocation-dialog' });
|
||||
this.reqAccuracyLevel = reqAccuracyLevel;
|
||||
|
||||
let icon = new Gio.ThemedIcon({ name: 'find-location-symbolic' });
|
||||
@ -375,5 +377,4 @@ var GeolocationDialog = class extends ModalDialog.ModalDialog {
|
||||
this.emit('response', GeoclueAccuracyLevel.NONE);
|
||||
this.close();
|
||||
}
|
||||
};
|
||||
Signals.addSignalMethods(GeolocationDialog.prototype);
|
||||
});
|
||||
|
Reference in New Issue
Block a user