mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Add an option under Preferences->Miscellaneous to not restore open panels such as Search, Table of Contents etc on restart. Fixes #1921689 [Enhancement Request: ebook-viewer: Option to save panels on exit](https://bugs.launchpad.net/calibre/+bug/1921689)
This commit is contained in:
parent
d2a2faae0d
commit
d8b0c1bb1f
@ -685,7 +685,7 @@ class EbookViewer(MainWindow):
|
||||
QApplication.instance().safe_restore_geometry(self, geom)
|
||||
else:
|
||||
QApplication.instance().ensure_window_on_screen(self)
|
||||
if state:
|
||||
if state and get_session_pref('restore_docks', True):
|
||||
self.restoreState(state, self.MAIN_WINDOW_STATE_VERSION)
|
||||
self.inspector_dock.setVisible(False)
|
||||
|
||||
|
@ -22,6 +22,7 @@ DEFAULTS = {
|
||||
'sync_annots_user': '',
|
||||
'singleinstance': False,
|
||||
'auto_hide_mouse': True,
|
||||
'restore_docks': True,
|
||||
}
|
||||
|
||||
|
||||
@ -74,6 +75,7 @@ def create_misc_panel(container, apply_func, cancel_func):
|
||||
container.append(cb('singleinstance', _('Allow only a single instance of the viewer (needs restart)')))
|
||||
container.append(cb('hide_tooltips', _('Hide mouse-over tooltips in the book text')))
|
||||
container.append(cb('auto_hide_mouse', _('Auto hide the mouse cursor when unused for a few seconds')))
|
||||
container.append(cb('restore_docks', _('Restore open panels such as Table of Contents, Search, etc. on restart')))
|
||||
|
||||
container.appendChild(create_button_box(restore_defaults, apply_func, cancel_func))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user