mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Manage authors dialog: Add an etry to the right click menu to show books by the current author in the main book list. Fixes #1821992 [[enhancement] right click option to go to books when managing authors](https://bugs.launchpad.net/calibre/+bug/1821992)
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
b0543d1bb5
@ -187,6 +187,9 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
|
|||||||
if self.context_item is not None and self.context_item.column() == 0:
|
if self.context_item is not None and self.context_item.column() == 0:
|
||||||
ca = m.addAction(_('Copy to author sort'))
|
ca = m.addAction(_('Copy to author sort'))
|
||||||
ca.triggered.connect(self.copy_au_to_aus)
|
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:
|
else:
|
||||||
ca = m.addAction(_('Copy to author'))
|
ca = m.addAction(_('Copy to author'))
|
||||||
ca.triggered.connect(self.copy_aus_to_au)
|
ca.triggered.connect(self.copy_aus_to_au)
|
||||||
@ -194,6 +197,11 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
|
|||||||
m.addMenu(case_menu)
|
m.addMenu(case_menu)
|
||||||
m.exec_(self.table.mapToGlobal(point))
|
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):
|
def copy_to_clipboard(self):
|
||||||
cb = QApplication.clipboard()
|
cb = QApplication.clipboard()
|
||||||
cb.setText(unicode_type(self.context_item.text()))
|
cb.setText(unicode_type(self.context_item.text()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user