[gnome-shell] messageTray: Fix custom notification icons



commit 3614da684533d755a5d872fb18819dd8c4cef525
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Mar 6 18:05:29 2015 +0100

    messageTray: Fix custom notification icons
    
    NotificationMessages set the icon either from the corresponding
    notification's gicon property, or fall back to the source icon.
    Except that we never actually set a notification's gicon property to
    the provided icon, so we currently just always fall back, whoops!

 js/ui/messageTray.js |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index f4b4f88..d809ca8 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -571,8 +571,10 @@ const Notification = new Lang.Class({
 
         let oldFocus = global.stage.key_focus;
 
-        if (this._icon && (params.gicon || params.clear)) {
-            this._icon.destroy();
+        if (params.gicon || params.clear) {
+            this.gicon = params.gicon;
+            if (this._icon)
+                this._icon.destroy();
             this._icon = null;
         }
 
@@ -604,8 +606,8 @@ const Notification = new Lang.Class({
         if (!this._scrollArea && !this._actionArea)
             this._table.remove_style_class_name('multi-line-notification');
 
-        if (params.gicon) {
-            this._icon = new St.Icon({ gicon: params.gicon,
+        if (this.gicon) {
+            this._icon = new St.Icon({ gicon: this.gicon,
                                        icon_size: this.ICON_SIZE });
         } else {
             this._icon = this.source.createIcon(this.ICON_SIZE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]