[AppSwitcher] Do not show the glow for icons in alt+tab dialog.

Unlike icons in the application well, do not show the glow used to
indicate running apps.  It is somewhat redundant here.  These are all
running apps and it is fairly clear from the window list if there are
multiple instances available, according to mccann.

https://bugzilla.gnome.org/show_bug.cgi?id=590563
This commit is contained in:
Steve Frécinaux 2009-09-29 14:13:28 +02:00
parent 373fa3c325
commit fee385ba35
3 changed files with 17 additions and 12 deletions

View File

@ -102,7 +102,7 @@ AltTabPopup.prototype = {
// Contruct the AppIcons, sort by time, add to the popup
let icons = [];
for (let i = 0; i < apps.length; i++)
icons.push(new AppIcon.AppIcon(apps[i], AppIcon.MenuType.BELOW));
icons.push(new AppIcon.AppIcon(apps[i], AppIcon.MenuType.BELOW, false));
icons.sort(Lang.bind(this, this._sortAppIcon));
for (let i = 0; i < icons.length; i++)
this._addIcon(icons[i]);

View File

@ -462,7 +462,7 @@ BaseWellItem.prototype = {
__proto__: AppIcon.AppIcon.prototype,
_init: function(appInfo, isFavorite, hasMenu) {
AppIcon.AppIcon.prototype._init.call(this, appInfo, hasMenu ? AppIcon.MenuType.ON_RIGHT : AppIcon.MenuType.NONE);
AppIcon.AppIcon.prototype._init.call(this, appInfo, hasMenu ? AppIcon.MenuType.ON_RIGHT : AppIcon.MenuType.NONE, true);
this.isFavorite = isFavorite;

View File

@ -54,7 +54,7 @@ function AppIcon(appInfo, menuType) {
}
AppIcon.prototype = {
_init : function(appInfo, menuType) {
_init : function(appInfo, menuType, showGlow) {
this.appInfo = appInfo;
this._menuType = menuType;
@ -104,16 +104,21 @@ AppIcon.prototype = {
ellipsize: Pango.EllipsizeMode.END,
text: appInfo.get_name() });
nameBox.add_actor(this._name);
this._glowBox = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL });
let glowPath = GLib.filename_to_uri(global.imagedir + 'app-well-glow.png', '');
for (let i = 0; i < this.windows.length && i < 3; i++) {
let glow = Shell.TextureCache.get_default().load_uri_sync(Shell.TextureCachePolicy.FOREVER,
glowPath, -1, -1);
glow.keep_aspect_ratio = false;
this._glowBox.append(glow, Big.BoxPackFlags.EXPAND);
if (showGlow) {
this._glowBox = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL });
let glowPath = GLib.filename_to_uri(global.imagedir + 'app-well-glow.png', '');
for (let i = 0; i < this.windows.length && i < 3; i++) {
let glow = Shell.TextureCache.get_default().load_uri_sync(Shell.TextureCachePolicy.FOREVER,
glowPath, -1, -1);
glow.keep_aspect_ratio = false;
this._glowBox.append(glow, Big.BoxPackFlags.EXPAND);
}
this._nameBox.add_actor(this._glowBox);
this._glowBox.lower(this._name);
}
this._nameBox.add_actor(this._glowBox);
this._glowBox.lower(this._name);
else
this._glowBox = null;
this.actor.append(nameBox, Big.BoxPackFlags.NONE);
},