mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
cleanups
This commit is contained in:
commit
b895a2214a
@ -35,7 +35,7 @@ bool_custom_columns_are_tristate = 'yes'
|
||||
|
||||
|
||||
# Provide a set of columns to be sorted on when calibre starts
|
||||
# The argument is None of saved sort history is to be used
|
||||
# The argument is None if saved sort history is to be used
|
||||
# otherwise it is a list of column,order pairs. Column is the
|
||||
# lookup/search name, found using the tooltip for the column
|
||||
# Order is 0 for ascending, 1 for descending
|
||||
|
@ -200,13 +200,6 @@ class TagTreeItem(object): # {{{
|
||||
|
||||
class TagsModel(QAbstractItemModel): # {{{
|
||||
|
||||
categories_orig = [_('Authors'), _('Series'), _('Formats'), _('Publishers'),
|
||||
_('Ratings'), _('News'), _('Tags')]
|
||||
row_map_orig = ['authors', 'series', 'formats', 'publishers', 'ratings',
|
||||
'news', 'tags']
|
||||
search_keys=['search', _('Searches')]
|
||||
|
||||
|
||||
def __init__(self, db, parent=None):
|
||||
QAbstractItemModel.__init__(self, parent)
|
||||
|
||||
@ -257,12 +250,6 @@ class TagsModel(QAbstractItemModel): # {{{
|
||||
|
||||
return data
|
||||
|
||||
def get_search_nodes(self, icon):
|
||||
l = []
|
||||
for i in saved_searches.names():
|
||||
l.append(Tag(i, tooltip=saved_searches.lookup(i), icon=icon))
|
||||
return l
|
||||
|
||||
def refresh(self):
|
||||
data = self.get_node_tree(config['sort_by_popularity']) # get category data
|
||||
for i, r in enumerate(self.row_map):
|
||||
|
@ -743,7 +743,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
||||
categories['formats'].sort(cmp=lambda x,y:cmp(x.name, y.name))
|
||||
|
||||
#### Now do the user-defined categories. ####
|
||||
user_categories = dict.copy(prefs['user_categories'])
|
||||
user_categories = prefs['user_categories']
|
||||
|
||||
# remove all user categories from tag_browser_categories. They can
|
||||
# easily come and go. We will add all the existing ones in below.
|
||||
|
Loading…
x
Reference in New Issue
Block a user