messageTray: Inherit Notification, Source and NotificationPolicy from GObject
Register notifications, sources and policies as GObject gtypes so that they can be passed in signals and use native properties and signals. Reimplement all the extending classes. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
This commit is contained in:

committed by
Florian Müllner

parent
7059dcced3
commit
b5676a2a5c
@ -219,9 +219,10 @@ var ShellMountOperation = class {
|
||||
}
|
||||
};
|
||||
|
||||
var ShellUnmountNotifier = class extends MessageTray.Source {
|
||||
constructor() {
|
||||
super('', 'media-removable');
|
||||
var ShellUnmountNotifier = GObject.registerClass(
|
||||
class ShellUnmountNotifier extends MessageTray.Source {
|
||||
_init() {
|
||||
super._init('', 'media-removable');
|
||||
|
||||
this._notification = null;
|
||||
Main.messageTray.add(this);
|
||||
@ -238,7 +239,7 @@ var ShellUnmountNotifier = class extends MessageTray.Source {
|
||||
this._notification.update(header, text);
|
||||
}
|
||||
|
||||
this.notify(this._notification);
|
||||
this.showNotification(this._notification);
|
||||
}
|
||||
|
||||
done(message) {
|
||||
@ -251,10 +252,10 @@ var ShellUnmountNotifier = class extends MessageTray.Source {
|
||||
let notification = new MessageTray.Notification(this, message, null);
|
||||
notification.setTransient(true);
|
||||
|
||||
this.notify(notification);
|
||||
this.showNotification(notification);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
var ShellMountQuestionDialog = GObject.registerClass({
|
||||
Signals: { 'response': { param_types: [GObject.TYPE_INT] } }
|
||||
|
Reference in New Issue
Block a user