The main change is that now output-related options will also
be saved to (and restored from) the books.xml file. If the
user has three books for instance, each will keep the last
filename it was written to, and present that filename to the
user in the final dialog, for acceptance or modification.
Similarly for things like paper size and orientation.
Also, the error reporting mechanism was enhanced, so that
now if a report inside a book has a ReportError the user
will be told gracefully (instead of gramps crashing). The
(translated) name of the report will also be shown.
A few more dialogs were given a "parent" also.
Historically, a new Book made from an old Book argument would
contain the exact same BookItem objects as the original Book.
That behavior is retained (even though I can't see that it is
ever used), but now copies are possible where the BookItems
are of the same number and type as the original, but not the
exact same BookItem objects. (No "paper" options are copied.)
In the process of doing that, the "save" method was slightly
tweaked, so its recently-changed (for pylint reasons) strings
have their XML terminator on the same (Python) line as the
XML-start of the keyword, for more clarity. In the process of
checking that a pathological case was noticed where the metric
paper option could be Boolean in some cases (instead of the
expected zero/one), so that was coped with also.
database consistently check that the database exists and is open. Add a
few missing checks. Remove redundant load and direct close of dummy
database on closure.
Formerly, the books.xml file was read in multiple times,
even if it hadn't changed at all. And since books.xml can
contain multiple books, each of which potentially contains
multiple reports, each with multiple options, all of which
get parsed every time the books.xml file gets read in, the
process potentially can take a while.
Similarly the books.xml file was written out every time a
book was added or deleted, even if the book report continued
to be run, with potentially more changes being made.
So it's changed so that the books.xml file is only read in
once, and written out once, and only then if it needs it.