mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
E-book viewer: Add a keyboard shortcut to toggle the Table of Contents [Ctrl+T]
This commit is contained in:
parent
838665304d
commit
00ccf29b50
@ -78,6 +78,9 @@ SHORTCUTS = {
|
||||
'Search online': (['Ctrl+E'],
|
||||
_('Search online for word')),
|
||||
|
||||
'Table of Contents': (['Ctrl+T'],
|
||||
_('Show/hide the Table of Contents')),
|
||||
|
||||
'Lookup word': (['Ctrl+L'],
|
||||
_('Lookup word in dictionary')),
|
||||
|
||||
|
@ -933,6 +933,7 @@ class EbookViewer(MainWindow):
|
||||
'Next occurrence': self.view.search_action,
|
||||
'Bookmark': bac,
|
||||
'Reload': self.action_reload,
|
||||
'Table of Contents': self.action_table_of_contents,
|
||||
}.get(key, None)
|
||||
if action is not None:
|
||||
event.accept()
|
||||
|
@ -348,7 +348,7 @@ class Main(MainWindow):
|
||||
a('copy', _('Copy to clipboard'), 'edit-copy.png').setDisabled(True)
|
||||
a('font_size_larger', _('Increase font size'), 'font_size_larger.png')
|
||||
a('font_size_smaller', _('Decrease font size'), 'font_size_smaller.png')
|
||||
a('table_of_contents', self.toc_dock, 'highlight_only_on.png')
|
||||
a('table_of_contents', self.toc_dock, 'highlight_only_on.png', sc_name='Table of Contents')
|
||||
a('full_screen', _('Toggle full screen'), 'page.png', sc_name='Fullscreen').setCheckable(True)
|
||||
self.tool_bar.addSeparator()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user