mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1926320 [[Enhancement] Show shortcuts in context menu of Book details panel](https://bugs.launchpad.net/calibre/+bug/1926320)
This commit is contained in:
parent
1471322f49
commit
4a7016f020
@ -441,11 +441,11 @@ def details_context_menu_event(view, ev, book_info, add_popup_action=False, edit
|
||||
if not ac.isEnabled():
|
||||
menu.removeAction(ac)
|
||||
menu.addSeparator()
|
||||
from calibre.gui2.ui import get_gui
|
||||
if add_popup_action:
|
||||
ac = menu.addAction(_('Open the Book details window'))
|
||||
ac.triggered.connect(book_info.show_book_info)
|
||||
ema = get_gui().iactions['Show Book Details'].menuless_qaction
|
||||
menu.addAction(_('Open the Book details window') + '\t' + ema.shortcut().toString(QKeySequence.SequenceFormat.NativeText), book_info.show_book_info)
|
||||
else:
|
||||
from calibre.gui2.ui import get_gui
|
||||
ema = get_gui().iactions['Edit Metadata'].menuless_qaction
|
||||
menu.addAction(_('Open the Edit metadata window') + '\t' + ema.shortcut().toString(QKeySequence.SequenceFormat.NativeText), edit_metadata)
|
||||
if len(menu.actions()) > 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user