mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add renumber_headings option to GUI.
This commit is contained in:
parent
afb72b8a59
commit
d6256ef452
@ -21,7 +21,7 @@ class HeuristicsWidget(Widget, Ui_Form):
|
|||||||
'italicize_common_cases', 'fix_indents',
|
'italicize_common_cases', 'fix_indents',
|
||||||
'html_unwrap_factor', 'unwrap_lines',
|
'html_unwrap_factor', 'unwrap_lines',
|
||||||
'delete_blank_paragraphs', 'format_scene_breaks',
|
'delete_blank_paragraphs', 'format_scene_breaks',
|
||||||
'dehyphenate']
|
'dehyphenate', 'renumber_headings']
|
||||||
)
|
)
|
||||||
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)
|
||||||
@ -53,6 +53,7 @@ class HeuristicsWidget(Widget, Ui_Form):
|
|||||||
self.opt_delete_blank_paragraphs.setEnabled(state)
|
self.opt_delete_blank_paragraphs.setEnabled(state)
|
||||||
self.opt_format_scene_breaks.setEnabled(state)
|
self.opt_format_scene_breaks.setEnabled(state)
|
||||||
self.opt_dehyphenate.setEnabled(state)
|
self.opt_dehyphenate.setEnabled(state)
|
||||||
|
self.opt_renumber_headings(state)
|
||||||
|
|
||||||
self.opt_unwrap_lines.setEnabled(state)
|
self.opt_unwrap_lines.setEnabled(state)
|
||||||
if state and self.opt_unwrap_lines.checkState() == Qt.Checked:
|
if state and self.opt_unwrap_lines.checkState() == Qt.Checked:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>657</width>
|
<width>811</width>
|
||||||
<height>479</height>
|
<height>479</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -80,42 +80,42 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2">
|
<item row="4" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="opt_delete_blank_paragraphs">
|
<widget class="QCheckBox" name="opt_delete_blank_paragraphs">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Delete blank lines between paragraphs</string>
|
<string>Delete blank lines between paragraphs</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
<item row="5" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="opt_format_scene_breaks">
|
<widget class="QCheckBox" name="opt_format_scene_breaks">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Ensure scene breaks are consistently formatted</string>
|
<string>Ensure scene breaks are consistently formatted</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" colspan="2">
|
<item row="6" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="opt_dehyphenate">
|
<widget class="QCheckBox" name="opt_dehyphenate">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Remove unnecessary hyphens</string>
|
<string>Remove unnecessary hyphens</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0" colspan="2">
|
<item row="7" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="opt_italicize_common_cases">
|
<widget class="QCheckBox" name="opt_italicize_common_cases">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Italicize common words and patterns</string>
|
<string>Italicize common words and patterns</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0" colspan="2">
|
<item row="8" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="opt_fix_indents">
|
<widget class="QCheckBox" name="opt_fix_indents">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Replace entity indents with CSS indents</string>
|
<string>Replace entity indents with CSS indents</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="9" column="0">
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@ -141,6 +141,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QCheckBox" name="opt_renumber_headings">
|
||||||
|
<property name="text">
|
||||||
|
<string>Renumber sequences of <h1> or <h2> tags to prevent splitting</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user