PopupSwitchMenuItem: don't misuse this.active

The constructor was setting this.active to reflect the switch state,
which is wrong; this.active indicates whether or not the item is
highlighted.

https://bugzilla.gnome.org/show_bug.cgi?id=621671
This commit is contained in:
Dan Winship 2010-10-13 14:10:38 -04:00
parent 9ae1238038
commit e5dd86276d

View File

@ -508,9 +508,8 @@ PopupSwitchMenuItem.prototype = {
_init: function(text, active) { _init: function(text, active) {
PopupBaseMenuItem.prototype._init.call(this); PopupBaseMenuItem.prototype._init.call(this);
this.active = !!active;
this.label = new St.Label({ text: text }); this.label = new St.Label({ text: text });
this._switch = new Switch(this.active); this._switch = new Switch(active);
this.addActor(this.label); this.addActor(this.label);
this.addActor(this._switch.actor); this.addActor(this._switch.actor);