Exemplo n.º 1
0
def get_customization(action, name, parent):
    ans = CUSTOMIZATION.copy()
    try:
        if action == 'remove_unused_css':
            customize_remove_unused_css(name, parent, ans)
    except Abort:
        return None
    return ans
Exemplo n.º 2
0
def get_customization(action, name, parent):
    ans = CUSTOMIZATION.copy()
    try:
        if action == 'remove_unused_css':
            customize_remove_unused_css(name, parent, ans)
    except Abort:
        return None
    return ans
Exemplo n.º 3
0
def get_customization(action, name, parent):
    ans = CUSTOMIZATION.copy()
    try:
        if action == 'remove_unused_css':
            customize_remove_unused_css(name, parent, ans)
        elif action == 'upgrade_book':
            ans['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.'
                  ' Leaving it behind is useful only if you expect this book to be read on very'
                  ' 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'),
                yes_text=_('Remove NCX'), no_text=_('Keep NCX')
            )
    except Abort:
        return None
    return ans