diff --git a/src/calibre/gui2/viewer/toolbars.py b/src/calibre/gui2/viewer/toolbars.py index 27de1c8434..597008341a 100644 --- a/src/calibre/gui2/viewer/toolbars.py +++ b/src/calibre/gui2/viewer/toolbars.py @@ -50,6 +50,7 @@ def all_actions(): 'previous': Action('previous.png', _('Previous page'), 'previous'), 'toc': Action('toc.png', _('Table of Contents'), 'toggle_toc'), 'bookmarks': Action('bookmarks.png', _('Bookmarks'), 'toggle_bookmarks'), + 'inspector': Action('debug.png', _('Inspector'), 'toggle_inspector'), 'reference': Action('reference.png', _('Toggle Reference mode'), 'toggle_reference_mode'), 'lookup': Action('generic-library.png', _('Lookup words'), 'toggle_lookup'), 'chrome': Action('tweaks.png', _('Show viewer controls'), 'show_chrome'), @@ -64,7 +65,7 @@ def all_actions(): DEFAULT_ACTIONS = ( 'back', 'forward', None, 'open', 'copy', 'increase_font_size', 'decrease_font_size', 'fullscreen', None, 'previous', 'next', None, 'toc', 'bookmarks', 'lookup', 'reference', 'chrome', None, 'mode', 'print', 'preferences', - 'metadata' + 'metadata', 'inspector' ) @@ -155,6 +156,8 @@ class ActionsToolBar(ToolBar): a.setCheckable(True) self.lookup_action = a = shortcut_action('lookup') a.setCheckable(True) + self.inspector_action = a = shortcut_action('inspector') + a.setCheckable(True) self.chrome_action = shortcut_action('chrome') self.mode_action = a = shortcut_action('mode') @@ -191,7 +194,7 @@ class ActionsToolBar(ToolBar): self.reference_action.setChecked(enabled) def update_dock_actions(self, visibility_map): - for k in ('toc', 'bookmarks', 'lookup'): + for k in ('toc', 'bookmarks', 'lookup', 'inspector'): ac = getattr(self, '{}_action'.format(k)) ac.setChecked(visibility_map[k])