mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Edit Book: Add the reports tool to the toolbar by default
Also do not raise an exception when running reports with no book open.
This commit is contained in:
parent
8ec93d806f
commit
bb8dc6d095
@ -51,7 +51,10 @@ d['custom_themes'] = {}
|
||||
d['remove_unused_classes'] = False
|
||||
d['global_book_toolbar'] = [
|
||||
'new-file', 'open-book', 'save-book', None, 'global-undo', 'global-redo', 'create-checkpoint', None, 'donate', 'user-manual']
|
||||
d['global_tools_toolbar'] = ['check-book', 'spell-check-book', 'edit-toc', 'insert-character', 'manage-fonts', 'smarten-punctuation', 'remove-unused-css']
|
||||
d['global_tools_toolbar'] = [
|
||||
'check-book', 'spell-check-book', 'edit-toc', 'insert-character',
|
||||
'manage-fonts', 'smarten-punctuation', 'remove-unused-css', 'show-reports'
|
||||
]
|
||||
d['global_plugins_toolbar'] = []
|
||||
d['editor_common_toolbar'] = [('editor-' + x) if x else None for x in ('undo', 'redo', None, 'cut', 'copy', 'paste')]
|
||||
d['editor_css_toolbar'] = ['pretty-current', 'insert-image']
|
||||
|
@ -1165,6 +1165,9 @@ class Boss(QObject):
|
||||
self.gui.image_browser.raise_()
|
||||
|
||||
def show_reports(self):
|
||||
if current_container() is None:
|
||||
return error_dialog(self.gui, _('No book open'), _(
|
||||
'You must first open a book in order to see the report.'), show=True)
|
||||
self.gui.reports.refresh()
|
||||
self.gui.reports.show()
|
||||
self.gui.reports.raise_()
|
||||
|
Loading…
x
Reference in New Issue
Block a user