From ee35fe1cadeba54fdad873ff5d77e1e73f7a3508 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 4 Jan 2012 17:02:11 +0000 Subject: [PATCH] Fix #1961 : Missing 'All' filter option for Label plugin --- deluge/plugins/Label/deluge/plugins/label/core.py | 4 +++- deluge/plugins/Label/deluge/plugins/label/data/label.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deluge/plugins/Label/deluge/plugins/label/core.py b/deluge/plugins/Label/deluge/plugins/label/core.py index d255e77eb..9760f831f 100644 --- a/deluge/plugins/Label/deluge/plugins/label/core.py +++ b/deluge/plugins/Label/deluge/plugins/label/core.py @@ -130,7 +130,9 @@ class Core(CorePluginBase): pass def init_filter_dict(self): - return dict( [(label, 0) for label in self.labels.keys()]) + filter_dict = dict([(label, 0) for label in self.labels.keys()]) + filter_dict['All'] = len(self.torrents.keys()) + return filter_dict ## Plugin hooks ## def post_torrent_add(self, torrent_id, from_state): diff --git a/deluge/plugins/Label/deluge/plugins/label/data/label.js b/deluge/plugins/Label/deluge/plugins/label/data/label.js index 8ae0584bc..dfbf269f1 100644 --- a/deluge/plugins/Label/deluge/plugins/label/data/label.js +++ b/deluge/plugins/Label/deluge/plugins/label/data/label.js @@ -426,7 +426,7 @@ Deluge.plugins.LabelPlugin = Ext.extend(Deluge.Plugin, { var lbltpl = '
' + '{filter}' + - 'no label' + + 'No Label' + ' ({count})' + '
';