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:
parent
ee2f12fe81
commit
df0151d338
@ -492,31 +492,31 @@ const Dash = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_createAppItem: function(app) {
|
_createAppItem: function(app) {
|
||||||
let display = new AppDisplay.AppWellIcon(app,
|
let appIcon = new AppDisplay.AppWellIcon(app,
|
||||||
{ setSizeManually: true,
|
{ setSizeManually: true,
|
||||||
showLabel: false });
|
showLabel: false });
|
||||||
display._draggable.connect('drag-begin',
|
appIcon._draggable.connect('drag-begin',
|
||||||
Lang.bind(this, function() {
|
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() {
|
Lang.bind(this, function() {
|
||||||
display.actor.opacity = 255;
|
appIcon.actor.opacity = 255;
|
||||||
}));
|
}));
|
||||||
display.connect('menu-state-changed',
|
appIcon.connect('menu-state-changed',
|
||||||
Lang.bind(this, function(display, opened) {
|
Lang.bind(this, function(appIcon, opened) {
|
||||||
this._itemMenuStateChanged(item, opened);
|
this._itemMenuStateChanged(item, opened);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let item = new DashItemContainer();
|
let item = new DashItemContainer();
|
||||||
item.setChild(display.actor);
|
item.setChild(appIcon.actor);
|
||||||
|
|
||||||
// Override default AppWellIcon label_actor, now the
|
// Override default AppWellIcon label_actor, now the
|
||||||
// accessible_name is set at DashItemContainer.setLabelText
|
// accessible_name is set at DashItemContainer.setLabelText
|
||||||
display.actor.label_actor = null;
|
appIcon.actor.label_actor = null;
|
||||||
item.setLabelText(app.get_name());
|
item.setLabelText(app.get_name());
|
||||||
|
|
||||||
display.icon.setIconSize(this.iconSize);
|
appIcon.icon.setIconSize(this.iconSize);
|
||||||
this._hookUpLabel(item);
|
this._hookUpLabel(item);
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
|
Loading…
Reference in New Issue
Block a user