From 5dfc58daff27d23d017c072da1f186cb17a6ad77 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 23 Dec 2019 09:29:11 +0530 Subject: [PATCH] Viewer toolbar: Add actions for next and previous section. They are not added to the toolbar by default, customize it to add them. --- src/calibre/gui2/viewer/toolbars.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/gui2/viewer/toolbars.py b/src/calibre/gui2/viewer/toolbars.py index c51062459b..af345ff2ac 100644 --- a/src/calibre/gui2/viewer/toolbars.py +++ b/src/calibre/gui2/viewer/toolbars.py @@ -49,6 +49,8 @@ def all_actions(): 'fullscreen': Action('page.png', _('Toggle full screen'), 'toggle_full_screen'), 'next': Action('next.png', _('Next page'), 'next'), 'previous': Action('previous.png', _('Previous page'), 'previous'), + 'next_section': Action('arrow-down.png', _('Next section'), 'next_section'), + 'previous_section': Action('arrow-up.png', _('Previous section'), 'previous_section'), 'toc': Action('toc.png', _('Table of Contents'), 'toggle_toc'), 'bookmarks': Action('bookmarks.png', _('Bookmarks'), 'toggle_bookmarks'), 'inspector': Action('debug.png', _('Inspector'), 'toggle_inspector'), @@ -148,6 +150,8 @@ class ActionsToolBar(ToolBar): self.next_action = shortcut_action('next') self.previous_action = shortcut_action('previous') + self.next_section_action = shortcut_action('next_section') + self.previous_section_action = shortcut_action('previous_section') self.toc_action = a = shortcut_action('toc') a.setCheckable(True)