Debian Codegraph @

debian/patches/0008-Don-t-change-book-file-unless-user-s-consent-Closes-.patch

raw
1 From: YOKOTA Hiroshi <[email protected]>
2 Date: Wed, 18 Nov 2020 20:32:37 +0900
3 Subject: Don't change book file unless user's consent (Closes: #974974)
4
5 Forwarded: not-needed
6 Closes: #974974
7 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=974974
8
9 This fix changes default value and behavior of ebook-viewer(1) preferences
10 "Miscellaneous"->"Keep a copy of annotations/bookmarks in the e-book file,
11 for easy sharing".
12
13 * Set "False" for "save_annotations_in_ebook".
14 * Give "False" if askes default value of "save_annotations_in_ebook".
15 ---
16 resources/viewer.js | 2 +-
17 src/calibre/gui2/viewer/main.py | 2 +-
18 src/calibre/gui2/viewer/ui.py | 2 +-
19 src/pyj/session.pyj | 2 +-
20 4 files changed, 4 insertions(+), 4 deletions(-)
21
22 diff --git a/resources/viewer.js b/resources/viewer.js
23 index 4ed1850..2819cd1 100644
24 --- a/resources/viewer.js
25 +++ b/resources/viewer.js
26 @@ -7690,7 +7690,7 @@ return parser;
27 ρσ_d["remember_last_read"] = true;
28 ρσ_d["show_actions_toolbar"] = false;
29 ρσ_d["show_actions_toolbar_in_fullscreen"] = false;
30 - ρσ_d["save_annotations_in_ebook"] = true;
31 + ρσ_d["save_annotations_in_ebook"] = false;
32 ρσ_d["sync_annots_user"] = "";
33 ρσ_d["singleinstance"] = false;
34 ρσ_d["auto_hide_mouse"] = true;
35 diff --git a/src/calibre/gui2/viewer/main.py b/src/calibre/gui2/viewer/main.py
36 index cb6faf2..1e19d82 100644
37 --- a/src/calibre/gui2/viewer/main.py
38 +++ b/src/calibre/gui2/viewer/main.py
39 @@ -44,7 +44,7 @@ def migrate_previous_viewer_prefs():
40 ms = sd.get('standalone_misc_settings', {})
41 ms['remember_window_geometry'] = bool(old_prefs.get('remember_window_size', False))
42 ms['remember_last_read'] = bool(old_prefs.get('remember_current_page', True))
43 - ms['save_annotations_in_ebook'] = bool(old_prefs.get('copy_bookmarks_to_file', True))
44 + ms['save_annotations_in_ebook'] = bool(old_prefs.get('copy_bookmarks_to_file', False))
45 ms['singleinstance'] = bool(old_vprefs.get('singleinstance', False))
46 sd['standalone_misc_settings'] = ms
47
48 diff --git a/src/calibre/gui2/viewer/ui.py b/src/calibre/gui2/viewer/ui.py
49 index 0ad294b..f5e8905 100644
50 --- a/src/calibre/gui2/viewer/ui.py
51 +++ b/src/calibre/gui2/viewer/ui.py
52 @@ -825,7 +825,7 @@ class EbookViewer(MainWindow):
53 self.annotations_saver.start()
54 self.annotations_saver.save_annotations(
55 self.current_book_data,
56 - in_book_file and get_session_pref('save_annotations_in_ebook', default=True),
57 + in_book_file and get_session_pref('save_annotations_in_ebook', default=False),
58 get_session_pref('sync_annots_user', default=''),
59 )
60
61 diff --git a/src/pyj/session.pyj b/src/pyj/session.pyj
62 index 2603390..9c71d7e 100644
63 --- a/src/pyj/session.pyj
64 +++ b/src/pyj/session.pyj
65 @@ -273,7 +273,7 @@ standalone_reader_defaults = {
66 'remember_last_read': True,
67 'show_actions_toolbar': False,
68 'show_actions_toolbar_in_fullscreen': False,
69 - 'save_annotations_in_ebook': True,
70 + 'save_annotations_in_ebook': False,
71 'sync_annots_user': '',
72 'singleinstance': False,
73 'auto_hide_mouse': True,