mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make the news category clickable.
This commit is contained in:
parent
a3c461890f
commit
832d0db523
@ -610,7 +610,7 @@ class TagTreeItem(object): # {{{
|
||||
self.temporary = temporary
|
||||
self.tag = Tag(data, category=category_key,
|
||||
is_editable=category_key not in ['news', 'search', 'identifiers'],
|
||||
is_searchable=category_key not in ['news', 'search'])
|
||||
is_searchable=category_key not in ['search'])
|
||||
|
||||
elif self.type == self.TAG:
|
||||
self.icon_state_map[0] = QVariant(data.icon)
|
||||
@ -1642,6 +1642,12 @@ class TagsModel(QAbstractItemModel): # {{{
|
||||
|
||||
for node in self.category_nodes:
|
||||
if node.tag.state:
|
||||
if node.category_key == "news":
|
||||
if node_searches[node.tag.state] == 'true':
|
||||
ans.append('tags:=news')
|
||||
else:
|
||||
ans.append('( not tags:=news )')
|
||||
else:
|
||||
ans.append('%s:%s'%(node.category_key, node_searches[node.tag.state]))
|
||||
|
||||
key = node.category_key
|
||||
|
Loading…
x
Reference in New Issue
Block a user