mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Enhancement #1821992: Add "show books by author in book list" to manage authors dialog.
This commit is contained in:
parent
a811bfa502
commit
08692f4acb
@ -187,6 +187,9 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
|
||||
if self.context_item is not None and self.context_item.column() == 0:
|
||||
ca = m.addAction(_('Copy to author sort'))
|
||||
ca.triggered.connect(self.copy_au_to_aus)
|
||||
m.addSeparator()
|
||||
ca = m.addAction(_("Show books by author in book list"))
|
||||
ca.triggered.connect(self.search)
|
||||
else:
|
||||
ca = m.addAction(_('Copy to author'))
|
||||
ca.triggered.connect(self.copy_aus_to_au)
|
||||
@ -194,6 +197,11 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
|
||||
m.addMenu(case_menu)
|
||||
m.exec_(self.table.mapToGlobal(point))
|
||||
|
||||
def search(self):
|
||||
from calibre.gui2.ui import get_gui
|
||||
row = self.context_item.row()
|
||||
get_gui().search.set_search_string(self.table.item(row, 0).text())
|
||||
|
||||
def copy_to_clipboard(self):
|
||||
cb = QApplication.clipboard()
|
||||
cb.setText(unicode_type(self.context_item.text()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user