Rename 'panel' local to 'me'
To match our style other places, use 'me' rather than 'panel' when we want a substitute for 'this' that we can refer to from closures. svn path=/trunk/; revision=62
This commit is contained in:
parent
48a2cca476
commit
71a35e495e
@ -54,21 +54,21 @@ Panel.prototype = {
|
|||||||
this._grid.set_position(global.screen_width - 2, (PANEL_HEIGHT - TRAY_HEIGHT) / 2);
|
this._grid.set_position(global.screen_width - 2, (PANEL_HEIGHT - TRAY_HEIGHT) / 2);
|
||||||
|
|
||||||
this._traymanager = new Shell.TrayManager();
|
this._traymanager = new Shell.TrayManager();
|
||||||
let panel = this;
|
let me = this;
|
||||||
// the anchor point needs to be updated each time the height/width of the content might have changed, because
|
// the anchor point needs to be updated each time the height/width of the content might have changed, because
|
||||||
// it doesn't get updated on its own
|
// it doesn't get updated on its own
|
||||||
this._traymanager.connect('tray-icon-added',
|
this._traymanager.connect('tray-icon-added',
|
||||||
function(o, icon) {
|
function(o, icon) {
|
||||||
panel._grid.add_actor(icon);
|
me._grid.add_actor(icon);
|
||||||
/* bump the clock back to the end */
|
/* bump the clock back to the end */
|
||||||
panel._grid.remove_actor(panel._clock);
|
me._grid.remove_actor(me._clock);
|
||||||
panel._grid.add_actor(panel._clock);
|
me._grid.add_actor(me._clock);
|
||||||
panel._grid.move_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
|
me._grid.move_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
|
||||||
});
|
});
|
||||||
this._traymanager.connect('tray-icon-removed',
|
this._traymanager.connect('tray-icon-removed',
|
||||||
function(o, icon) {
|
function(o, icon) {
|
||||||
panel._grid.remove_actor(icon);
|
me._grid.remove_actor(icon);
|
||||||
panel._grid.move_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
|
me._grid.move_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
|
||||||
});
|
});
|
||||||
this._traymanager.manage_stage(global.stage);
|
this._traymanager.manage_stage(global.stage);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user