URGENT BREAKAGE: preferences loading/saving
Someone's recent change (likely the repr changes by swingincelt) broke preferences loading and saving. Now upon exit, a new <inkscape> element with all its children is nested at the end of the ~/.inkscape/preferences.xml instead of replacing the existing <inkscape>. Thus the size of the file grows by 13K on each run of the program, and any changes you make to the prefs are not read next time you run. Please fix ASAP.
On Mon, 28 Feb 2005 16:15:39 -0400, bulia byak <buliabyak@...400...> wrote:
Someone's recent change (likely the repr changes by swingincelt) broke preferences loading and saving. Now upon exit, a new <inkscape> element with all its children is nested at the end of the ~/.inkscape/preferences.xml instead of replacing the existing <inkscape>. Thus the size of the file grows by 13K on each run of the program, and any changes you make to the prefs are not read next time you run. Please fix ASAP.
Terribly sorry, I wouldn't have noticed this in the testing I performed. It's a little peplexing though since I thought I was just making one-to-one conversions of function calls.
I'll review my patches, but it will be late evening (EST) before I can look into this.
Cheers,
Quoting bulia byak <buliabyak@...400...>:
Someone's recent change (likely the repr changes by swingincelt) broke preferences loading and saving. Now upon exit, a new <inkscape> element with all its children is nested at the end of
the
~/.inkscape/preferences.xml instead of replacing the existing <inkscape>. Thus the size of the file grows by 13K on each run of the program, and any changes you make to the prefs are not read
next
time you run. Please fix ASAP.
If current settings are going to the redundant <inkscape> element(s), that means this things are getting screwed up in the actual loading of the preferences file. That should narrow down the search a bit.
It must be remembering the redundant root node created at that time too -- if it were using XML::Document::getRoot() to find the root node, then the settings would still be going to the initial <inkscape> element.
[ I'm a bit surprised that having the redundant root nodes isn't causing a parse failure, though (it should, IMO)... ]
By the way, have you filed a bug so we can track this?
-mental
On Mon, 28 Feb 2005 17:55:48 -0500, mental@...3... <mental@...3...> wrote:
[ I'm a bit surprised that having the redundant root nodes isn't causing a parse failure, though (it should, IMO)... ]
it's not another root - it's nested _under_ the original <inkscape> as its last child
By the way, have you filed a bug so we can track this?
i will if it's not fixed soon enough
On Mon, 28 Feb 2005 19:00:03 -0400, bulia byak <buliabyak@...400...> wrote:
On Mon, 28 Feb 2005 17:55:48 -0500, mental@...3... <mental@...3...> wrote:
[ I'm a bit surprised that having the redundant root nodes isn't causing a parse failure, though (it should, IMO)... ]
it's not another root - it's nested _under_ the original <inkscape> as its last child
By the way, have you filed a bug so we can track this?
i will if it's not fixed soon enough
Ok, it was an improper conversion on my part and I've fixed it in current CVS. Thanks Buila for finding this.
diff -u -3 -r1.85 inkscape.cpp --- src/inkscape.cpp 27 Feb 2005 02:26:26 -0000 1.85 +++ src/inkscape.cpp 28 Feb 2005 23:47:16 -0000 @@ -629,7 +629,7 @@ return FALSE; }
- config->root()->mergeFrom(doc, "id"); + config->root()->mergeFrom(doc->root(), "id");
Luckily, there was only one use of sp_repr_document_merge that I converted.
There may be another issue that Ill look at later. After a default preferences is written, the next time inkscape exits, it will expand the preferences settings.
< <group id="printing"> < <settings id="ps"/> < <group id="debug" add-label-comments="0"/> < </group>
will become:
<group id="printing"> <settings id="ps" /> <group add-label-comments="0" id="debug" />
</group>
It seems to stay stable after that.
Cheers,
On Mon, 28 Feb 2005 19:01:22 -0500, Robert Crosbie <swingincelt@...400...> wrote:
Ok, it was an improper conversion on my part and I've fixed it in current CVS. Thanks Buila for finding this.
Cool, thanks for the fix! :)
There may be another issue that Ill look at later. After a default preferences is written, the next time inkscape exits, it will expand the preferences settings.
That line-wrapping is hardcoded in repr-io.cpp, which is used both for SVG output and for writing preferences. In general it does no harm, though it may be useful to be able to configure it.
participants (3)
-
unknown@example.com
-
bulia byak
-
Robert Crosbie