mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
UI for MOBI output options
This commit is contained in:
parent
8f1dd430e3
commit
19d2561f81
@ -42,6 +42,7 @@ class MOBIOutput(OutputFormatPlugin):
|
|||||||
author = 'Kovid Goyal'
|
author = 'Kovid Goyal'
|
||||||
file_type = 'mobi'
|
file_type = 'mobi'
|
||||||
commit_name = 'mobi_output'
|
commit_name = 'mobi_output'
|
||||||
|
ui_data = {'file_types': ['old', 'both', 'new']}
|
||||||
|
|
||||||
options = set([
|
options = set([
|
||||||
OptionRecommendation(name='prefer_author_sort',
|
OptionRecommendation(name='prefer_author_sort',
|
||||||
@ -96,8 +97,7 @@ class MOBIOutput(OutputFormatPlugin):
|
|||||||
'formats. This option tells calibre not to do this. '
|
'formats. This option tells calibre not to do this. '
|
||||||
'Useful if your document contains lots of GIF/PNG images that '
|
'Useful if your document contains lots of GIF/PNG images that '
|
||||||
'become very large when converted to JPEG.')),
|
'become very large when converted to JPEG.')),
|
||||||
OptionRecommendation(name='mobi_file_type', choices=['old', 'both',
|
OptionRecommendation(name='mobi_file_type', choices=ui_data['file_types'], recommended_value='old',
|
||||||
'new'], recommended_value='old',
|
|
||||||
help=_('By default calibre generates MOBI files that contain the '
|
help=_('By default calibre generates MOBI files that contain the '
|
||||||
'old MOBI 6 format. This format is compatible with all '
|
'old MOBI 6 format. This format is compatible with all '
|
||||||
'devices. However, by changing this setting, you can tell '
|
'devices. However, by changing this setting, you can tell '
|
||||||
|
@ -587,6 +587,23 @@ def lrf_output(container):
|
|||||||
g.appendChild(lineedit('mono_family', _('&Monospace font family:')))
|
g.appendChild(lineedit('mono_family', _('&Monospace font family:')))
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
# MOBI Output {{{
|
||||||
|
@ep
|
||||||
|
def mobi_output(container):
|
||||||
|
g = E.div(class_='simple-group')
|
||||||
|
container.appendChild(g)
|
||||||
|
g.appendChild(checkbox('no_inline_toc', _('Do not add &Table of Contents to book')))
|
||||||
|
g.appendChild(lineedit('toc_title', indent + _('&Title for Table of Contents:')))
|
||||||
|
g.appendChild(checkbox('mobi_toc_at_start', _('Put generated Table of Contents at &start of book instead of end')))
|
||||||
|
g.appendChild(checkbox('mobi_ignore_margins', _('Ignore &margins')))
|
||||||
|
g.appendChild(checkbox('prefer_author_sort', _('Use author &sort for author')))
|
||||||
|
g.appendChild(checkbox('mobi_keep_original_images', _('Do not convert all images to &JPEG (may result in images not working in older viewers)')))
|
||||||
|
g.appendChild(checkbox('dont_compress', _('Disable &compression of the file contents')))
|
||||||
|
g.appendChild(choices('mobi_file_type', _('MOBI fi&le type:'), ui_data.file_types))
|
||||||
|
g.appendChild(lineedit('personal_doc', _('Personal Doc tag:')))
|
||||||
|
g.appendChild(checkbox('share_not_sync', _('Enable &sharing of book content via Facebook, etc. WARNING: Disables last read syncing')))
|
||||||
|
# }}}
|
||||||
|
|
||||||
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))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user