From 0f12200f6fd214377f3ca7def3efe40af03f8955 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Wed, 28 Apr 2010 15:33:05 +0100 Subject: [PATCH] store the states as a dictionary --- deluge/ui/web/js/deluge-all/FilterPanel.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deluge/ui/web/js/deluge-all/FilterPanel.js b/deluge/ui/web/js/deluge-all/FilterPanel.js index de20cb7f1..0010a0c3d 100644 --- a/deluge/ui/web/js/deluge-all/FilterPanel.js +++ b/deluge/ui/web/js/deluge-all/FilterPanel.js @@ -110,7 +110,11 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, { * Update the states in the FilterPanel */ 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; if (!show_zero) { var newStates = [];