Fix #1448433 [New option for footnotes in docx input](https://bugs.launchpad.net/calibre/+bug/1448433)

This commit is contained in:
Kovid Goyal 2015-04-25 18:49:11 +05:30
parent be4d44c3d8
commit b0e51635f5
3 changed files with 6 additions and 7 deletions

View File

@ -19,9 +19,8 @@ class DOCXInput(InputFormatPlugin):
help=_('Normally, if a large image is present at the start of the document that looks like a cover, '
'it will be removed from the document and used as the cover for created ebook. This option '
'turns off that behavior.')),
OptionRecommendation(name='docx_notes_nopb', recommended_value=False,
help=_('Normally, a page break is added after every footnote, '
'This option turns off that behavior.')),
OptionRecommendation(name='docx_no_pagebreaks_between_notes', recommended_value=False,
help=_('Do not insert a page break after every endnote.')),
}
@ -29,5 +28,5 @@ class DOCXInput(InputFormatPlugin):
def convert(self, stream, options, file_ext, log, accelerators):
from calibre.ebooks.docx.to_html import Convert
return Convert(stream, detect_cover=not options.docx_no_cover, log=log, notes_nopb=options.docx_notes_nopb)()
return Convert(stream, detect_cover=not options.docx_no_cover, log=log, notes_nopb=options.docx_no_pagebreaks_between_notes)()

View File

@ -18,6 +18,6 @@ class PluginWidget(Widget, Ui_Form):
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent,
['docx_no_cover', 'docx_notes_nopb'])
['docx_no_cover', 'docx_no_pagebreaks_between_notes'])
self.initialize_options(get_option, get_help, db, book_id)

View File

@ -22,9 +22,9 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="opt_docx_notes_nopb">
<widget class="QCheckBox" name="opt_docx_no_pagebreaks_between_notes">
<property name="text">
<string>Do not add a page after before every footnote</string>
<string>Do not add a page after after every endnote</string>
</property>
</widget>
</item>