messageTray: Drop createBanner()
This removes the `createBanner()` method on `Notification` and `Source`. Since we want to use the same widget for the calendar and the banner, let's not allow to create custom widgets just for the banner. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
This commit is contained in:
parent
d44adf3b78
commit
83ea818a0a
@ -555,15 +555,6 @@ export const Notification = GObject.registerClass({
|
||||
this.sound?.play(this.title);
|
||||
}
|
||||
|
||||
// Allow customizing the banner UI:
|
||||
// the default implementation defers the creation to
|
||||
// the source (which will create a NotificationBanner),
|
||||
// so customization can be done by subclassing either
|
||||
// Notification or Source
|
||||
createBanner() {
|
||||
return this.source.createBanner(this);
|
||||
}
|
||||
|
||||
activate() {
|
||||
this.emit('activated');
|
||||
|
||||
@ -664,10 +655,6 @@ export const Source = GObject.registerClass({
|
||||
: PrivacyScope.USER;
|
||||
}
|
||||
|
||||
createBanner(notification) {
|
||||
return new NotificationBanner(notification);
|
||||
}
|
||||
|
||||
_onNotificationDestroy(notification) {
|
||||
let index = this.notifications.indexOf(notification);
|
||||
if (index < 0)
|
||||
@ -1160,7 +1147,7 @@ export const MessageTray = GObject.registerClass({
|
||||
this.idleMonitor.add_user_active_watch(this._onIdleMonitorBecameActive.bind(this));
|
||||
}
|
||||
|
||||
this._banner = this._notification.createBanner();
|
||||
this._banner = new NotificationBanner(this._notification);
|
||||
this._banner.connectObject('done-displaying', this._escapeTray.bind(this), this);
|
||||
|
||||
this._bannerBin.add_child(this._banner);
|
||||
|
Loading…
x
Reference in New Issue
Block a user