dash: rename a local variable for clarity

createAppIcon creates an appIcon, not a 'display', which made things
unnecessarily more difficult to understand.

https://bugzilla.gnome.org/show_bug.cgi?id=657315
This commit is contained in:
Stéphane Démurget 2012-11-03 21:03:49 +01:00
parent ee2f12fe81
commit df0151d338

View File

@ -492,31 +492,31 @@ const Dash = new Lang.Class({
},
_createAppItem: function(app) {
let display = new AppDisplay.AppWellIcon(app,
let appIcon = new AppDisplay.AppWellIcon(app,
{ setSizeManually: true,
showLabel: false });
display._draggable.connect('drag-begin',
appIcon._draggable.connect('drag-begin',
Lang.bind(this, function() {
display.actor.opacity = 50;
appIcon.actor.opacity = 50;
}));
display._draggable.connect('drag-end',
appIcon._draggable.connect('drag-end',
Lang.bind(this, function() {
display.actor.opacity = 255;
appIcon.actor.opacity = 255;
}));
display.connect('menu-state-changed',
Lang.bind(this, function(display, opened) {
appIcon.connect('menu-state-changed',
Lang.bind(this, function(appIcon, opened) {
this._itemMenuStateChanged(item, opened);
}));
let item = new DashItemContainer();
item.setChild(display.actor);
item.setChild(appIcon.actor);
// Override default AppWellIcon label_actor, now the
// accessible_name is set at DashItemContainer.setLabelText
display.actor.label_actor = null;
appIcon.actor.label_actor = null;
item.setLabelText(app.get_name());
display.icon.setIconSize(this.iconSize);
appIcon.icon.setIconSize(this.iconSize);
this._hookUpLabel(item);
return item;