diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 65efc0f20..318f14768 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -200,13 +200,15 @@ class FdoNotificationDaemon { const soundFile = 'sound-file' in hints ? Gio.File.new_for_path(hints['sound-file']) : null; - notification.acknowledged = false; - notification.update(summary, body, { + notification.set({ + title: summary, + body, gicon, bannerMarkup: true, - clear: true, sound: new MessageTray.Sound(soundFile, hints['sound-name']), + acknowledged: false, }); + notification.clearActions(); let hasDefaultAction = false; @@ -444,7 +446,9 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification { this._defaultAction = defaultAction?.unpack(); this._defaultActionTarget = defaultActionTarget; - this.update(title.unpack(), body?.unpack(), { + this.set({ + title: title.unpack(), + body: body?.unpack(), gicon: gicon ? Gio.icon_deserialize(gicon) : null, datetime: time diff --git a/js/ui/overview.js b/js/ui/overview.js index 8d7001ecb..7e431b68e 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -28,7 +28,7 @@ const DND_WINDOW_SWITCH_TIMEOUT = 750; const OVERVIEW_ACTIVATION_TIMEOUT = 0.5; class ShellInfo { - setMessage(text, options) { + setMessage(title, options) { options = Params.parse(options, { undoCallback: null, forFeedback: false, @@ -41,14 +41,14 @@ class ShellInfo { if (!this._notification) { this._notification = new MessageTray.Notification({ source, - title: text, isTransient: true, forFeedback, }); this._notification.connect('destroy', () => delete this._notification); - } else { - this._notification.update(text, null, {clear: true}); } + this._notification.set({title}); + + this._notification.clearActions(); if (undoCallback) this._notification.addAction(_('Undo'), () => undoCallback()); diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index 00e577482..915c39a7c 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -218,7 +218,7 @@ export class ShellMountOperation { if (!this._notification) this._createNotification(title, body); else - this._notification.update(title, body); + this._notification.set({title, body}); } } diff --git a/js/ui/windowAttentionHandler.js b/js/ui/windowAttentionHandler.js index 9ca857a3e..e346b1cad 100644 --- a/js/ui/windowAttentionHandler.js +++ b/js/ui/windowAttentionHandler.js @@ -53,7 +53,7 @@ export class WindowAttentionHandler { window.connectObject('notify::title', () => { [title, body] = this._getTitleAndBanner(app, window); - notification.update(title, body); + notification.set({title, body}); }, source); } }