mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
messageTray: Add notification-removed signal to Source
This allows us to drop the `destroy` signal handler for each notification in MessageTray. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
This commit is contained in:
parent
b1d2a5bac8
commit
ec5bbfe319
1 changed files with 2 additions and 0 deletions
|
|
@ -633,6 +633,7 @@ export const Source = GObject.registerClass({
|
|||
Signals: {
|
||||
'destroy': {param_types: [GObject.TYPE_UINT]},
|
||||
'notification-added': {param_types: [Notification.$gtype]},
|
||||
'notification-removed': {param_types: [Notification.$gtype]},
|
||||
'notification-show': {param_types: [Notification.$gtype]},
|
||||
},
|
||||
}, class Source extends MessageList.Source {
|
||||
|
|
@ -687,6 +688,7 @@ export const Source = GObject.registerClass({
|
|||
return;
|
||||
|
||||
this.notifications.splice(index, 1);
|
||||
this.emit('notification-removed', notification);
|
||||
this.countUpdated();
|
||||
|
||||
if (this.notifications.length === 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue