mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
messageTray: Let the tray decide whether to show a banner
Always use the same code path to add new messages to a source, and let the `MessageTray` decide whether it shows a banner. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
This commit is contained in:
parent
940b658071
commit
34f05b075b
13 changed files with 65 additions and 55 deletions
|
|
@ -53,12 +53,12 @@ export async function run() {
|
|||
const source = new MessageTray.getSystemSource();
|
||||
|
||||
Scripting.scriptEvent('notificationShowStart');
|
||||
source.connect('notification-show',
|
||||
source.connect('notification-request-banner',
|
||||
() => Scripting.scriptEvent('notificationShowDone'));
|
||||
|
||||
const notification = new MessageTray.Notification(source,
|
||||
'A test notification');
|
||||
source.showNotification(notification);
|
||||
source.addNotification(notification);
|
||||
await Scripting.sleep(400);
|
||||
|
||||
console.debug('Show date menu');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue