messageTray: Don't create notification policy on demand

This was changed in commit 8f15193b4 as a work-around for an ES6
class limitation, but now that Sources are GObject subclasses, we
no longer need to use that somewhat surprising pattern.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1131
This commit is contained in:
Florian Müllner
2020-03-23 20:59:31 +01:00
committed by Georges Basile Stavracas Neto
parent 279072795f
commit 01a57206bc
4 changed files with 9 additions and 11 deletions

View File

@ -416,11 +416,11 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
var FdoNotificationDaemonSource = GObject.registerClass(
class FdoNotificationDaemonSource extends MessageTray.Source {
_init(title, pid, sender, appId) {
super._init(title);
this.pid = pid;
this.app = this._getApp(appId);
super._init(title);
this.initialTitle = title;
if (this.app)
@ -631,12 +631,12 @@ class GtkNotificationDaemonAppSource extends MessageTray.Source {
if (!app)
throw new InvalidAppError();
super._init(app.get_name());
this._appId = appId;
this._app = app;
this._objectPath = objectPath;
super._init(app.get_name());
this._notifications = {};
this._notificationPending = false;
}