From: YOKOTA Hiroshi Date: Wed, 18 Nov 2020 20:32:37 +0900 Subject: Don't change book file unless user's consent (Closes: #974974) Forwarded: not-needed Closes: #974974 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=974974 This fix changes default value and behavior of ebook-viewer(1) preferences "Miscellaneous"->"Keep a copy of annotations/bookmarks in the e-book file, for easy sharing". * Set "False" for "save_annotations_in_ebook". * Give "False" if askes default value of "save_annotations_in_ebook". --- resources/viewer.js | 2 +- src/calibre/gui2/viewer/main.py | 2 +- src/calibre/gui2/viewer/ui.py | 2 +- src/pyj/session.pyj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/viewer.js b/resources/viewer.js index 4ed1850..2819cd1 100644 --- a/resources/viewer.js +++ b/resources/viewer.js @@ -7690,7 +7690,7 @@ return parser; ρσ_d["remember_last_read"] = true; ρσ_d["show_actions_toolbar"] = false; ρσ_d["show_actions_toolbar_in_fullscreen"] = false; - ρσ_d["save_annotations_in_ebook"] = true; + ρσ_d["save_annotations_in_ebook"] = false; ρσ_d["sync_annots_user"] = ""; ρσ_d["singleinstance"] = false; ρσ_d["auto_hide_mouse"] = true; diff --git a/src/calibre/gui2/viewer/main.py b/src/calibre/gui2/viewer/main.py index cb6faf2..1e19d82 100644 --- a/src/calibre/gui2/viewer/main.py +++ b/src/calibre/gui2/viewer/main.py @@ -44,7 +44,7 @@ def migrate_previous_viewer_prefs(): ms = sd.get('standalone_misc_settings', {}) ms['remember_window_geometry'] = bool(old_prefs.get('remember_window_size', False)) ms['remember_last_read'] = bool(old_prefs.get('remember_current_page', True)) - ms['save_annotations_in_ebook'] = bool(old_prefs.get('copy_bookmarks_to_file', True)) + ms['save_annotations_in_ebook'] = bool(old_prefs.get('copy_bookmarks_to_file', False)) ms['singleinstance'] = bool(old_vprefs.get('singleinstance', False)) sd['standalone_misc_settings'] = ms diff --git a/src/calibre/gui2/viewer/ui.py b/src/calibre/gui2/viewer/ui.py index 0ad294b..f5e8905 100644 --- a/src/calibre/gui2/viewer/ui.py +++ b/src/calibre/gui2/viewer/ui.py @@ -825,7 +825,7 @@ class EbookViewer(MainWindow): self.annotations_saver.start() self.annotations_saver.save_annotations( self.current_book_data, - in_book_file and get_session_pref('save_annotations_in_ebook', default=True), + in_book_file and get_session_pref('save_annotations_in_ebook', default=False), get_session_pref('sync_annots_user', default=''), ) diff --git a/src/pyj/session.pyj b/src/pyj/session.pyj index 2603390..9c71d7e 100644 --- a/src/pyj/session.pyj +++ b/src/pyj/session.pyj @@ -273,7 +273,7 @@ standalone_reader_defaults = { 'remember_last_read': True, 'show_actions_toolbar': False, 'show_actions_toolbar_in_fullscreen': False, - 'save_annotations_in_ebook': True, + 'save_annotations_in_ebook': False, 'sync_annots_user': '', 'singleinstance': False, 'auto_hide_mouse': True,