1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
From: YOKOTA Hiroshi <yokota.hgml@gmail.com>
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 f7a7f0a..6902302 100644
@@ -7447,7 +7447,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 555d3e9..8e70383 100644
@@ -45,7 +45,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 8c8e5e6..146f037 100644
@@ -714,7 +714,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 d731a3c..6edb71f 100644
@@ -263,7 +263,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,
|