mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Ui for PDB output options
This commit is contained in:
parent
664ddf49cc
commit
202137dc22
@ -17,13 +17,13 @@ class PDBOutput(OutputFormatPlugin):
|
||||
author = 'John Schember'
|
||||
file_type = 'pdb'
|
||||
commit_name = 'pdb_output'
|
||||
ui_data = {'formats': tuple(ALL_FORMAT_WRITERS)}
|
||||
|
||||
options = set([
|
||||
OptionRecommendation(name='format', recommended_value='doc',
|
||||
level=OptionRecommendation.LOW,
|
||||
short_switch='f', choices=list(ALL_FORMAT_WRITERS),
|
||||
help=(_('Format to use inside the pdb container. Choices are:')+
|
||||
' %s' % sorted(ALL_FORMAT_WRITERS))),
|
||||
help=(_('Format to use inside the pdb container. Choices are:') + ' %s' % sorted(ALL_FORMAT_WRITERS))),
|
||||
OptionRecommendation(name='pdb_output_encoding', recommended_value='cp1252',
|
||||
level=OptionRecommendation.LOW,
|
||||
help=_('Specify the character encoding of the output document. '
|
||||
|
@ -617,6 +617,16 @@ def azw3_output(container):
|
||||
g.appendChild(checkbox('share_not_sync', _('Enable &sharing of book content via Facebook, etc. WARNING: Disables last read syncing')))
|
||||
# }}}
|
||||
|
||||
# PDB Output {{{
|
||||
@ep
|
||||
def pdb_output(container):
|
||||
g = E.div(class_='simple-group')
|
||||
container.appendChild(g)
|
||||
g.appendChild(choices('format', _('Forma&t:'), ui_data.formats))
|
||||
g.appendChild(lineedit('pdb_output_encoding', _('O&utput encoding:')))
|
||||
g.appendChild(checkbox('inline_toc', _('&Inline TOC')))
|
||||
# }}}
|
||||
|
||||
def restore_defaults():
|
||||
for setting in registry:
|
||||
set(setting, get_option_default_value(setting))
|
||||
|
Loading…
x
Reference in New Issue
Block a user