This is the second part of the proposal filed originally as bug #1609111.
The result dialog, shown after replacements, slows down book editing in some cases.
For example, when the user repeatedly applies his own regex-function to relatively small pre-marked text fragments.
User should have a choice to suppress the result dialog.
This implementation allows for the following switch inside the user replace function:
replace.suppress_result_dialog = True
This way it nicely fits to the first part (see #1609111) and it allows individual configuration from case to case.
Actually, it's not dependent on the other two switches ('call_after_last_match' and 'append_final_output_to_marked'),
so it can be used in combination with any of them or even individually.
This implementation also should not have any impact on other modes of work and it should not change the previous behavior.
It also should not break the backwards compatibility, I hope.
Introduces a new flag "append_final_output_to_marked".
Depends also on existing flag "call_after_last_match".
Following two lines at the end of a user replace function will cause,
that the return value of the last additional call (after all replacements
are completed) will be appended to the marked text:
replace.call_after_last_match = True
replace.append_final_output_to_marked = True
TODO: Documentation update is required.
Part: Editing books
Chapter: Function Mode for Search & Replace in the Editor
Section: Having your function called an extra time after the last match is found
- collapse the two booleans controlling the heading into one string
- allow short-text to appear on the right in book details
- make the new server and book details do (more-or-less) the same thing with headings
- use different CSS for short-text and long-text.
I changed the name of the show_heading property to heading_position to ensure the properties had no odd values, making it easier to test.