[gnome-shell-extensions] window-list: Always use ShellApp icon rather than _NET_WM_ICON



commit 040c106c7b7d26f484e8fac362a7f10059729c4d
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Feb 28 18:28:08 2013 +0100

    window-list: Always use ShellApp icon rather than _NET_WM_ICON
    
    We currently use the application icon for items that are grouped
    by application and the window icon otherwise. However with the
    icon property being unused anywhere else in GNOME3, applications
    have started to not set any window icon at all.
    Rather than complaining to application authors, switch to using
    the app icon everywhere, which improves consistency with the rest
    of GNOME3 anyway.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694850

 extensions/window-list/extension.js |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index fd08aec..8c482bc 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -14,6 +14,8 @@ const ExtensionUtils = imports.misc.extensionUtils;
 const Me = ExtensionUtils.getCurrentExtension();
 const Convenience = Me.imports.convenience;
 
+const ICON_TEXTURE_SIZE = 24;
+
 const GroupingMode = {
     NEVER: 0,
     ALWAYS: 1
@@ -37,10 +39,9 @@ const WindowTitle = new Lang.Class({
         this._metaWindow = metaWindow;
         this.actor = new St.BoxLayout();
 
-        let textureCache = St.TextureCache.get_default();
-        let icon = textureCache.bind_pixbuf_property(this._metaWindow, "icon");
+        let app = Shell.WindowTracker.get_default().get_window_app(metaWindow);
         this._icon = new St.Bin({ style_class: 'window-button-icon',
-                                  child: icon });
+                                  child: app.create_icon_texture(ICON_TEXTURE_SIZE) });
         this.actor.add(this._icon);
         this._label = new St.Label();
         this.actor.add(this._label);
@@ -165,7 +166,7 @@ const AppButton = new Lang.Class({
         stack.add_actor(this._multiWindowTitle);
 
         let icon = new St.Bin({ style_class: 'window-button-icon',
-                                child: app.create_icon_texture(24) });
+                                child: app.create_icon_texture(ICON_TEXTURE_SIZE) });
         this._multiWindowTitle.add(icon);
         this._multiWindowTitle.add(new St.Label({ text: app.get_name() }));
 


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