Save window geometry options in preferences
Hi,
I have been working with Inkscape in the past on a spare-time single-user basis. Now I started to look into using it for producing graphics in a collaborative environment and I ran into some problems. I'm looking at SVG because it is a standardized and flexible format. More to the point, it is text-based, which makes it so much easier to work with in terms of version control and simultaneous editing.
The following discussion concerns Inkscape 0.48 on Windows.
I noticed that my window layout, among other things, is being saved by default to the Inkscape SVG file. As, this is not a good thing when collaborating with other people, because everyone will mess up each others environment, I tried to turn it off in the Preferences. Then I couldn't get the "Windows -> Remember and use last window's geometry" option to work. When I turned it on, the window layout was still being saved to (and loaded from) the SVG file. Only when I choose the "Don't save the window geometry" option was the saving omitted from the file. This seems like a bug, and I couldn't find it in the issue tracker. I would like to discuss some solutions.
One alternative is of course to make the current intended behavior work. This means that the "Remember and use last window's geometry" option should only save window layout info to user preferences, not to the file.
An alternative that I think makes more sense is to still save the layout along with each file (because different projects motivates different layouts), but to save them in a separate user settings file. So if I saved my foo.svg I would also get a foo.svg.user, or something similar. Actually I think all the attributes in the sodipodi:namedview tag could be moved out from the SVG to the user settings file, because they are all related to the work environment, and would differ from user to user. The benefit of having two files is that the user file can be excluded from version control and be kept locally for each user, while only committing changes to the actual SVG image.
Also, at the moment when using the option to save layout to the SVG file, changes to the layout does not mark the file as dirty. If I just change the window layout and press Save, nothing will be saved. I have to modify an object to make the file save-able for the layout to be saved.
What do you guys think?
Kind regards,
-- Staffan Einarsson
The* 'save namespace' *option could prompt for saving to the same directory as the SVG file or to a default user's directory:*
** inkscape/.config/sodipodi*
The filename could be *<SVGfilename>.sodipodi* by default or user specified to help standardize work for particular websites, publications, clients, etc. A command line option for people who use scripts:
* --sodipodi=<directory>/<filename>* with <directory> optional, defaulting to the new sodipodi directory
The file could be referenced in an extension's .inx file.
Within the GUI, the save as* plain SVG* option could embed the sodipodi:namespace data into the file.
A similar approach can be applied to the* *XML *<defs>* section and to *Inkscape Preferences*, saving to new user directories* ** * * inkscape/.config/defs inkscape/.config/preferences*
or to the same directory as the SVG file.
New command line options would be possible: *--preferences=<filename> --defs=<filename>* These files could be also be referenced in an extensions' .inx.
I'm not sure if def tags can be referenced if they are in a referenced file, maybe they must be explicit in the SVG, written into the SVG file when the document is created via command line or extension, or when imported into an open document.
The namespaces and defs settings would have context local to the document. New documents would not inherit the namespace or defs data.
Inscape Preference settings if changed during an instance of Inkscape would trigger a prompt when the instance is closed to enable saving to default preferences, to the most recently imported preference file, to a new file, or discard changes.
If it's not possible to develop this functionality at the moment, let's put it on the roadmap for the future. I will help test & document.
- Susan
On Thu, Oct 18, 2012 at 6:42 AM, Staffan Einarsson < staffan.einarsson@...400...> wrote:
Hi,
I have been working with Inkscape in the past on a spare-time single-user basis. Now I started to look into using it for producing graphics in a collaborative environment and I ran into some problems. I'm looking at SVG because it is a standardized and flexible format. More to the point, it is text-based, which makes it so much easier to work with in terms of version control and simultaneous editing.
The following discussion concerns Inkscape 0.48 on Windows.
I noticed that my window layout, among other things, is being saved by default to the Inkscape SVG file. As, this is not a good thing when collaborating with other people, because everyone will mess up each others environment, I tried to turn it off in the Preferences. Then I couldn't get the "Windows -> Remember and use last window's geometry" option to work. When I turned it on, the window layout was still being saved to (and loaded from) the SVG file. Only when I choose the "Don't save the window geometry" option was the saving omitted from the file. This seems like a bug, and I couldn't find it in the issue tracker. I would like to discuss some solutions.
One alternative is of course to make the current intended behavior work. This means that the "Remember and use last window's geometry" option should only save window layout info to user preferences, not to the file.
An alternative that I think makes more sense is to still save the layout along with each file (because different projects motivates different layouts), but to save them in a separate user settings file. So if I saved my foo.svg I would also get a foo.svg.user, or something similar. Actually I think all the attributes in the sodipodi:namedview tag could be moved out from the SVG to the user settings file, because they are all related to the work environment, and would differ from user to user. The benefit of having two files is that the user file can be excluded from version control and be kept locally for each user, while only committing changes to the actual SVG image.
Also, at the moment when using the option to save layout to the SVG file, changes to the layout does not mark the file as dirty. If I just change the window layout and press Save, nothing will be saved. I have to modify an object to make the file save-able for the layout to be saved.
What do you guys think?
Kind regards,
-- Staffan Einarsson
Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
my window layout, among other things, is being saved by default to the Inkscape SVG file
There is a new setting (coming in 0.49) - "Save and restore documents viewport" - when unchecked - prevents the zoom and panning settings from being saved to the SVG. Hope this will help somewhat with shared access files.
I couldn't get the "Windows -> Remember and use last window's geometry" option to work
This is now fixed (r11843) - window size and window location should not be written to the SVG anymore with this preference.
participants (3)
-
John Smith
-
Staffan Einarsson
-
Susan Spencer