There's a sodipodi:namedview element in each SVG file saved, but it's empty. Is it right to assume that it was supposed to store the contents of the SPNamedView object of the document's desktop? If so, why it's empty - not implemented yet, or disabled? I propose to enable/implement it, and additionally, to extend SPNamedView with these fields:
- zoom level and visible part of the canvas
- window width/height and maximized status
so that these settings could also be restored when the document is opened. Besides, the window size of the last closed document is saved into preferences, so the new empty document created next time will use them. (I'm so tired of the 400x400 default window!)
Also, what about storing the absolute file name in SPDocument, as I proposed some time ago? Can anyone suggest a function for creating absolute name?
_________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2f...
On Sat, 2003-12-20 at 17:20, bulia byak wrote:
There's a sodipodi:namedview element in each SVG file saved, but it's empty. Is it right to assume that it was supposed to store the contents of the SPNamedView object of the document's desktop? If so, why it's empty - not implemented yet, or disabled? I propose to enable/implement it, and additionally, to extend SPNamedView with these fields:
zoom level and visible part of the canvas
window width/height and maximized status
so that these settings could also be restored when the document is opened. Besides, the window size of the last closed document is saved into preferences, so the new empty document created next time will use them. (I'm so tired of the 400x400 default window!)
I believe that's what sodipodi:namedview is for, yes. If you add new attributes to it, though, please put the attributes in the inkscape namespace, so we don't collide with Sodipodi.
Also, what about storing the absolute file name in SPDocument, as I proposed some time ago? Can anyone suggest a function for creating absolute name?
Using glib facilities, you can do this (assumes filename has been g_malloc()ed):
if (!g_path_is_absolute(filename)) { gchar *abs_filename, *current_dir;
current_dir = g_get_current_dir(); abs_filename = g_build_filename(current_dir, filename, NULL);
g_free(current_dir); g_free(filename); filename = abs_filename; }
Obviously you can take a similar approach for making a path with directories other than the current directory as well.
Anyway, have a look at http://developer.gnome.org/doc/API/2.0/glib/glib-Miscellaneous-Utility-Funct... -- there's a lot of useful stuff there, including g_path_get_basename(), g_path_get_dirname() and more.
-mental
participants (2)
-
bulia byak
-
MenTaLguY