This commit is contained in:
Kovid Goyal 2020-05-13 21:33:10 +05:30
parent a4bb2b93f0
commit 9af6fc5d62
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 8 additions and 5 deletions

View File

@ -24,6 +24,7 @@ class tableItem(QTableWidgetItem):
def __lt__(self, other):
return sort_key(unicode_type(self.text())) < sort_key(unicode_type(other.text()))
class EditColumnDelegate(QItemDelegate):
def __init__(self, completion_data):
@ -43,6 +44,7 @@ class EditColumnDelegate(QItemDelegate):
return editor
return QItemDelegate.createEditor(self, parent, option, index)
class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
def __init__(self, parent, db, id_to_select, select_sort, select_link):

View File

@ -502,10 +502,10 @@ class Quickview(QDialog, Ui_Quickview):
for v in vals:
a = QListWidgetItem(v)
a.setToolTip('<p>' +
_('Click to show only books with this item. '
'Double click to search for this item in the tag browser')
+ '</p>')
a.setToolTip(
'<p>' + _(
'Click to show only books with this item. '
'Double click to search for this item in the tag browser') + '</p>')
self.items.addItem(a)
self.items.setCurrentRow(0)

View File

@ -103,6 +103,7 @@ class EditColumnDelegate(QItemDelegate):
return editor
return None
class TagListEditor(QDialog, Ui_TagListEditor):
def __init__(self, window, cat_name, tag_to_match, get_book_ids, sorter):

View File

@ -620,7 +620,7 @@ class TagBrowserWidget(QFrame): # {{{
if colon > 0:
key = self._parent.library_view.model().db.\
field_metadata.search_term_to_field_key(txt[:colon])
if self._parent.library_view.model().db.field_metadata.has_key(key):
if key in self._parent.library_view.model().db.field_metadata:
txt = txt[colon+1:]
else:
key = None