Finally! Now when you save a document, its zoom and view center are written to sodipodi:namedview in the SVG file and restored on load. Moreover, optionally Inkscape saves and restored window geometry for each document (size and position). Whether this is done is controlled by options.savewindowgeometry in the preferences; for now I set this to 1 so you can test this feature.
Still more, reading a template from preferences now works (some rudimentary code was there but it didn't work properly). This means you can pull the sodipodi:namedview element from any of your documents and insert it into your ~/.inkscape/preferences.xml into the group with id="template", for example:
<group id="template"> <sodipodi:namedview id="base" inkscape:zoom="13.6834309" inkscape:cx="345.390036" inkscape:cy="184.555047" inkscape:window-width="1268" inkscape:window-height="999" inkscape:window-x="0" inkscape:window-y="0" showgrid="true"> <sodipodi:guide orientation="vertical" position="481.748035" id="guide573" /> </sodipodi:namedview> </group>
and all new documents you create will have the zoom and window geometry of that document, plus its guides, grid, and other settings. There's no UI for setting this template yet, but it's easy to add a command that will save the current document's namedview into the preferences, with a given id (which is "base" by default, but we can add a variant of the New command that selects one of the namedviews stored in preferences. Or perhaps it's better to leave one namedview template only in preferences, but add a "New from template" command that creates a new document from a separate empty SVG file that will store not only the namedview but paper size, etc.).
_________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2f...
This is all great, two small issues though:
1) The window "flickers" when it's created, because at first it appears at standard position, then it gets moved and resized immediately. Wouldn't it be possible to do this before the window is shown?
2) I wanted to save the new size of my document but at first it didn't let me because "no changes needed to be saved". :) I think it would make sense now if the modified flag would also be set whenever the user resizes the window or does anything else that can be saved.
Daniel
On Wed, 2003-12-24 at 00:04, bulia byak wrote:
Finally! Now when you save a document, its zoom and view center are written to sodipodi:namedview in the SVG file and restored on load. Moreover, optionally Inkscape saves and restored window geometry for each document (size and position). Whether this is done is controlled by options.savewindowgeometry in the preferences; for now I set this to 1 so you can test this feature.
Still more, reading a template from preferences now works (some rudimentary code was there but it didn't work properly). This means you can pull the sodipodi:namedview element from any of your documents and insert it into your ~/.inkscape/preferences.xml into the group with id="template", for example:
<group id="template"> <sodipodi:namedview id="base" inkscape:zoom="13.6834309" inkscape:cx="345.390036" inkscape:cy="184.555047" inkscape:window-width="1268" inkscape:window-height="999" inkscape:window-x="0" inkscape:window-y="0" showgrid="true"> <sodipodi:guide orientation="vertical" position="481.748035" id="guide573" /> </sodipodi:namedview> </group>
and all new documents you create will have the zoom and window geometry of that document, plus its guides, grid, and other settings. There's no UI for setting this template yet, but it's easy to add a command that will save the current document's namedview into the preferences, with a given id (which is "base" by default, but we can add a variant of the New command that selects one of the namedviews stored in preferences. Or perhaps it's better to leave one namedview template only in preferences, but add a "New from template" command that creates a new document from a separate empty SVG file that will store not only the namedview but paper size, etc.).
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2f...
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (2)
-
bulia byak
-
Daniel Borgmann