[gnome-shell] PopupSwitchMenuItem: don't misuse this.active



commit e5dd86276de93159dbaa6818df94c9ec38f3ecf4
Author: Dan Winship <danw gnome org>
Date:   Wed Oct 13 14:10:38 2010 -0400

    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

 js/ui/popupMenu.js |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 7ef3bbb..23969a6 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -508,9 +508,8 @@ PopupSwitchMenuItem.prototype = {
     _init: function(text, active) {
         PopupBaseMenuItem.prototype._init.call(this);
 
-        this.active = !!active;
         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._switch.actor);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]