Fix #1961 : Missing 'All' filter option for Label plugin

This commit is contained in:
Calum Lind 2012-01-04 17:02:11 +00:00
parent a83fd1d597
commit ee35fe1cad
2 changed files with 4 additions and 2 deletions

View File

@ -130,7 +130,9 @@ class Core(CorePluginBase):
pass pass
def init_filter_dict(self): 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 ## ## Plugin hooks ##
def post_torrent_add(self, torrent_id, from_state): def post_torrent_add(self, torrent_id, from_state):

View File

@ -426,7 +426,7 @@ Deluge.plugins.LabelPlugin = Ext.extend(Deluge.Plugin, {
var lbltpl = '<div class="x-deluge-filter">' + var lbltpl = '<div class="x-deluge-filter">' +
'<tpl if="filter">{filter}</tpl>' + '<tpl if="filter">{filter}</tpl>' +
'<tpl if="!filter">no label</tpl>' + '<tpl if="!filter">No Label</tpl>' +
' ({count})' + ' ({count})' +
'</div>'; '</div>';