mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
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:
parent
7059dcced3
commit
b5676a2a5c
13 changed files with 211 additions and 131 deletions
|
|
@ -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] } }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue