notification: Stop using old setter methods of MessageTray.Notification

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3173>
This commit is contained in:
Julian Sparber
2024-02-14 11:35:03 +01:00
committed by Florian Müllner
parent 9ac4c7da53
commit 1d1d9806f3
8 changed files with 40 additions and 28 deletions

View File

@ -2092,8 +2092,8 @@ export const ScreenshotUI = GObject.registerClass({
title,
// Translators: notification body when a screencast was recorded.
body: this._screencastPath ? _('Click here to view the video.') : '',
isTransient: true,
});
notification.setTransient(true);
if (this._screencastPath) {
const file = Gio.file_new_for_path(this._screencastPath);
@ -2337,6 +2337,7 @@ function _storeScreenshot(bytes, pixbuf) {
body: _('You can paste the image from the clipboard.'),
datetime: time,
gicon: content,
isTransient: true,
});
if (!disableSaveToDisk) {
@ -2363,7 +2364,6 @@ function _storeScreenshot(bytes, pixbuf) {
});
}
notification.setTransient(true);
Main.messageTray.add(source);
source.addNotification(notification);