GNOME Bugzilla – Bug 573027
Sheet and objects messes up icons and descriptions when icons are included in sheet
Last modified: 2009-02-25 22:40:35 UTC
Hi, it seems that it messes up the *.sheet xml-files. More detailed how-to (just an example): * Open Dia (fresh install) * Press F9 * Copy a shape from the Assorted sheet to the UML sheet (e.g. perfect square) * Apply and close Dia * Restart Dia * Switch to the UML sheet * Look at it, some icons and descriptions are messed up The file %USERPROFILE%\.dia\sheets\UML.sheet contains the following: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <sheet xmlns="http://www.lysator.liu.se/~alla/dia/dia-sheet-ns"> <!--Dia-Version: 0.97-pre2--> <!--File: C:\Dokumente und Einstellungen\Bart.S\.dia\sheets\UML.sheet--> <!--Date: Fri Feb 20 11:15:03 2009--> <!--For: Bart.S--> <name>UML</name> <description>Editor for UML Static Structure Diagrams</description> <contents> <!--add shapes here--> <object name="UML - Class" intdata="0"> <description>Class</description></object><object name="UML - Class" intdata="1"> <description>Template class<icon>C:\Programme\Dia\sheets\UML/umlclass_template.png</icon></description>
It's actually two problems: <icon> is written to <description> instead of <object> - this is fixed in SVN now. Second problem: Icon path is given as an absolute path, while only relative paths work right now. I see two options: * Allow absolute paths in <icon></icon> * Change write_user_sheet() to write relative path (check for system path as well as for user defined part)
In SVN: User defined sheets are saved with relative icon path now. Sheet loader falls back to system sheets directory if icon isn't found in user (config) sheets directory.