[gnome-shell] ctrlAltTab: Use a symbolic icon for desktop windows



commit 33cad9a824fa7b4eae0010eece44435210e25b0a
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Apr 18 00:20:45 2013 -0400

    ctrlAltTab: Use a symbolic icon for desktop windows
    
    The nautilus icon sticks out pretty badly among the symbolic
    icons we use for other desktop components. This commit finds
    windows of type DESKTOP, and uses the video-display-symbolic
    icon for them.
    https://bugzilla.gnome.org/show_bug.cgi?id=697914

 js/ui/ctrlAltTab.js |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js
index f751cb1..6fbd24e 100644
--- a/js/ui/ctrlAltTab.js
+++ b/js/ui/ctrlAltTab.js
@@ -96,12 +96,18 @@ const CtrlAltTabManager = new Lang.Class({
             let windowTracker = Shell.WindowTracker.get_default();
             let textureCache = St.TextureCache.get_default();
             for (let i = 0; i < windows.length; i++) {
-                let icon;
-                let app = windowTracker.get_window_app(windows[i]);
-                if (app)
-                    icon = app.create_icon_texture(POPUP_APPICON_SIZE);
-                else
-                    icon = textureCache.bind_pixbuf_property(windows[i], 'icon');
+                let icon = null;
+                let iconName = null;
+                if (windows[i].get_window_type () == Meta.WindowType.DESKTOP) {
+                    iconName = 'video-display-symbolic';
+                } else {
+                    let app = windowTracker.get_window_app(windows[i]);
+                    if (app)
+                        icon = app.create_icon_texture(POPUP_APPICON_SIZE);
+                    else
+                        icon = textureCache.bind_pixbuf_property(windows[i], 'icon');
+                }
+
                 items.push({ name: windows[i].title,
                              proxy: windows[i].get_compositor_private(),
                              focusCallback: Lang.bind(windows[i],
@@ -109,6 +115,7 @@ const CtrlAltTabManager = new Lang.Class({
                                      Main.activateWindow(this, timestamp);
                                  }),
                              iconActor: icon,
+                             iconName: iconName,
                              sortGroup: SortGroup.MIDDLE });
             }
         }


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