store the states as a dictionary

This commit is contained in:
Damien Churchill 2010-04-28 15:33:05 +01:00
parent 7420c6f12f
commit 0f12200f6f
1 changed files with 5 additions and 1 deletions

View File

@ -110,7 +110,11 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
* Update the states in the FilterPanel * Update the states in the FilterPanel
*/ */
updateStates: function(states) { updateStates: function(states) {
this.states = states; this.states = {};
Ext.each(states, function(state) {
this.states[state[0]] = state[1];
}, this);
var show_zero = (this.show_zero == null) ? deluge.config.sidebar_show_zero : this.show_zero; var show_zero = (this.show_zero == null) ? deluge.config.sidebar_show_zero : this.show_zero;
if (!show_zero) { if (!show_zero) {
var newStates = []; var newStates = [];