mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
5d967e3ba6
commit
8f640edc1e
@ -45,6 +45,7 @@ class TableItem(QTableWidgetItem):
|
||||
return self.sort_idx < other.sort_idx
|
||||
return 0
|
||||
|
||||
|
||||
IN_WIDGET_ITEMS = 0
|
||||
IN_WIDGET_BOOKS = 1
|
||||
IN_WIDGET_LOCK = 2
|
||||
@ -134,9 +135,9 @@ class Quickview(QDialog, Ui_Quickview):
|
||||
self.db = self.view.model().db
|
||||
self.gui = gui
|
||||
self.is_closed = False
|
||||
self.current_book_id = None # the db id of the book used to fill the lh pane
|
||||
self.current_column = None # current logical column in books list
|
||||
self.current_key = None # current lookup key in books list
|
||||
self.current_book_id = None # the db id of the book used to fill the lh pane
|
||||
self.current_column = None # current logical column in books list
|
||||
self.current_key = None # current lookup key in books list
|
||||
self.last_search = None
|
||||
self.no_valid_items = False
|
||||
|
||||
@ -322,7 +323,6 @@ class Quickview(QDialog, Ui_Quickview):
|
||||
if self.last_search is not None:
|
||||
self.gui.search.set_search_string(self.last_search)
|
||||
|
||||
|
||||
def book_was_changed(self, mi):
|
||||
'''
|
||||
Called when book information is changed in the library view. Make that
|
||||
@ -580,6 +580,7 @@ class Quickview(QDialog, Ui_Quickview):
|
||||
self._close()
|
||||
QDialog.reject(self)
|
||||
|
||||
|
||||
def get_qv_field_list(fm, use_defaults=False):
|
||||
from calibre.gui2.ui import get_gui
|
||||
db = get_gui().current_db
|
||||
@ -590,9 +591,7 @@ def get_qv_field_list(fm, use_defaults=False):
|
||||
fieldlist = list(src['qv_display_fields'])
|
||||
names = frozenset([x[0] for x in fieldlist])
|
||||
for field in fm.displayable_field_keys():
|
||||
if (field != 'comments'
|
||||
and fm[field]['datatype'] != 'comments'
|
||||
and field not in names):
|
||||
if (field != 'comments' and fm[field]['datatype'] != 'comments' and field not in names):
|
||||
fieldlist.append((field, False))
|
||||
available = frozenset(fm.displayable_field_keys())
|
||||
return [(f, d) for f, d in fieldlist if f in available]
|
||||
|
@ -211,6 +211,7 @@ class IdLinksEditor(Dialog):
|
||||
self.table.removeRow(r)
|
||||
# }}}
|
||||
|
||||
|
||||
class DisplayedFields(QAbstractListModel): # {{{
|
||||
|
||||
def __init__(self, db, parent=None):
|
||||
@ -388,7 +389,6 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
r('qv_retkey_changes_column', gprefs)
|
||||
r('qv_show_on_startup', gprefs)
|
||||
|
||||
|
||||
r('cover_flow_queue_length', config, restart_required=True)
|
||||
r('cover_browser_reflections', gprefs)
|
||||
r('cover_browser_title_template', db.prefs)
|
||||
@ -644,7 +644,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
self.changed_signal.emit()
|
||||
self.update_font_display()
|
||||
self.display_model.restore_defaults()
|
||||
self.qv_display_model.restore_defaults();
|
||||
self.qv_display_model.restore_defaults()
|
||||
self.edit_rules.clear()
|
||||
self.icon_rules.clear()
|
||||
self.grid_rules.clear()
|
||||
|
Loading…
x
Reference in New Issue
Block a user