mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
pep8
This commit is contained in:
parent
0e721e1604
commit
0bd81146d8
@ -396,7 +396,7 @@ class TagsView(QTreeView): # {{{
|
|||||||
return
|
return
|
||||||
|
|
||||||
def show_context_menu(self, point):
|
def show_context_menu(self, point):
|
||||||
def display_name( tag):
|
def display_name(tag):
|
||||||
if tag.category == 'search':
|
if tag.category == 'search':
|
||||||
n = tag.name
|
n = tag.name
|
||||||
if len(n) > 45:
|
if len(n) > 45:
|
||||||
@ -486,7 +486,7 @@ class TagsView(QTreeView): # {{{
|
|||||||
dict(item=display_name(tag), cat=item.py_name),
|
dict(item=display_name(tag), cat=item.py_name),
|
||||||
partial(self.context_menu_handler,
|
partial(self.context_menu_handler,
|
||||||
action='delete_item_from_user_category',
|
action='delete_item_from_user_category',
|
||||||
key = key, index = tag_item))
|
key=key, index=tag_item))
|
||||||
if tag.is_searchable:
|
if tag.is_searchable:
|
||||||
# Add the search for value items. All leaf nodes are searchable
|
# Add the search for value items. All leaf nodes are searchable
|
||||||
self.context_menu.addAction(self.search_icon,
|
self.context_menu.addAction(self.search_icon,
|
||||||
@ -582,7 +582,6 @@ class TagsView(QTreeView): # {{{
|
|||||||
self.context_menu.addAction(_('Show all categories'),
|
self.context_menu.addAction(_('Show all categories'),
|
||||||
partial(self.context_menu_handler, action='defaults'))
|
partial(self.context_menu_handler, action='defaults'))
|
||||||
|
|
||||||
|
|
||||||
m = self.context_menu.addMenu(_('Change sub-categorization scheme'))
|
m = self.context_menu.addMenu(_('Change sub-categorization scheme'))
|
||||||
da = m.addAction(_('Disable'),
|
da = m.addAction(_('Disable'),
|
||||||
partial(self.context_menu_handler, action='categorization', category='disable'))
|
partial(self.context_menu_handler, action='categorization', category='disable'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user