[gnome-shell/wip/fmuellner/fix-notification-warning: 37/37] notificationDaemon: Fix warning
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/fix-notification-warning: 37/37] notificationDaemon: Fix warning
- Date: Wed, 16 Jan 2019 17:57:29 +0000 (UTC)
commit e0a992af735348110c07e4ba4cefa75de26e3c81
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Nov 23 17:57:59 2018 +0100
notificationDaemon: Fix warning
Since commit 33b8537bf5, we unconditionally access the 'image-path'
hint, resulting in a gjs warning if the hint is not defined.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/309
js/ui/notificationDaemon.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index b897b8a71..0e5f8fcc2 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -77,8 +77,10 @@ var FdoNotificationDaemon = new Lang.Class({
bitsPerSample, nChannels, data] = hints['image-data'];
return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
bitsPerSample, width, height, rowStride);
+ } else if (hints['image-path']) {
+ return this._iconForNotificationData(hints['image-path'];
}
- return this._iconForNotificationData(hints['image-path']);
+ return null;
},
_fallbackIconForNotificationData(hints) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]