PMLZ output options UI

This commit is contained in:
Kovid Goyal 2018-07-05 04:20:41 +05:30
parent e77c8cc7ab
commit 9bad72f2cc
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 12 additions and 2 deletions

View File

@ -305,7 +305,7 @@ OPTIONS = {
'pdf_page_margin_right', 'pdf_page_margin_bottom', 'pdf_page_margin_right', 'pdf_page_margin_bottom',
'pdf_use_document_margins',), 'pdf_use_document_margins',),
'pmlz': ('inline_toc', 'full_image_depth', 'pml_output_encoding'), 'pml': ('inline_toc', 'full_image_depth', 'pml_output_encoding'),
'rb': ('inline_toc',), 'rb': ('inline_toc',),

View File

@ -19,6 +19,6 @@ class PluginWidget(Widget, Ui_Form):
ICON = I('mimetypes/unknown.png') ICON = I('mimetypes/unknown.png')
def __init__(self, parent, get_option, get_help, db=None, book_id=None): def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, OPTIONS['output']['pmlz']) Widget.__init__(self, parent, OPTIONS['output']['pml'])
self.db, self.book_id = db, book_id self.db, self.book_id = db, book_id
self.initialize_options(get_option, get_help, db, book_id) self.initialize_options(get_option, get_help, db, book_id)

View File

@ -667,6 +667,16 @@ def pdf_output(container):
g.appendChild(lineedit('pdf_footer_template', _('&Footer template:'))) g.appendChild(lineedit('pdf_footer_template', _('&Footer template:')))
# }}} # }}}
# PMLZ Output {{{
@ep
def pml_output(container):
g = E.div(class_='simple-group')
container.appendChild(g)
g.appendChild(lineedit('pml_output_encoding', _('O&utput encoding:')))
g.appendChild(checkbox('inline_toc', _('&Inline TOC')))
g.appendChild(checkbox('full_image_depth', _('Do not &reduce image size and depth')))
# }}}
def restore_defaults(): def restore_defaults():
for setting in registry: for setting in registry:
set(setting, get_option_default_value(setting)) set(setting, get_option_default_value(setting))