Edit book: Upgrade book internals: Fix skipping the NCX removal dialog not remembering the chosen option. Fixes #1921604 [Suggestion about update book internal](https://bugs.launchpad.net/calibre/+bug/1921604)

This commit is contained in:
Kovid Goyal 2021-04-08 14:29:59 +05:30
parent 61bf9e10ce
commit 80364863a9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 1 deletions

View File

@ -83,6 +83,7 @@ d['preserve_aspect_ratio_when_inserting_image'] = False
d['file_list_shows_full_pathname'] = False
d['auto_link_stylesheets'] = True
d['check_external_link_anchors'] = True
d['remove_ncx'] = True
del d
ucase_map = {l:string.ascii_uppercase[i] for i, l in enumerate(string.ascii_lowercase)}

View File

@ -79,7 +79,7 @@ def get_customization(action, name, parent):
if action == 'remove_unused_css':
customize_remove_unused_css(name, parent, ans)
elif action == 'upgrade_book':
ans['remove_ncx'] = question_dialog(
ans['remove_ncx'] = tprefs['remove_ncx'] = question_dialog(
parent, _('Remove NCX ToC file'),
_('Remove the legacy Table of Contents in NCX form?'),
_('This form of Table of Contents is superseded by the new HTML based Table of Contents.'
@ -87,6 +87,7 @@ def get_customization(action, name, parent):
' old devices that lack proper support for EPUB 3'),
skip_dialog_name='edit-book-remove-ncx',
skip_dialog_msg=_('Ask this question again in the future'),
skip_dialog_skipped_value=tprefs['remove_ncx'],
yes_text=_('Remove NCX'), no_text=_('Keep NCX')
)
except Abort: