Author: Lionel Le Folgoc <mrpouit@ubuntu.com>
Description: Set this var which causes ftbfs if missing.

diff -Naurp Filter/Makefile.pre.in Filter/Makefile.pre.in
--- Filter/Makefile.pre.in	2009-07-14 19:32:30.000000000 +0000
+++ Filter/Makefile.pre.in	2009-07-16 13:17:22.000000000 +0000
@@ -124,6 +124,7 @@ RANLIB=		@RANLIB@
 MACHDEP=	@MACHDEP@
 SO=		@SO@
 LDSHARED=	@LDSHARED@
+BLDSHARED=	@BLDSHARED@
 CCSHARED=	@CCSHARED@
 LINKFORSHARED=	@LINKFORSHARED@
 #@SET_CCC@
@@ -256,6 +257,7 @@ sedscript:	$(MAKEFILE)
 	 -e '/^MACHDEP=/s/^MACHDEP=[ 	]*\(.*\)/s%@MACHDEP[@]%\1%/p' \
 	 -e '/^SO=/s/^SO=[ 	]*\(.*\)/s%@SO[@]%\1%/p' \
 	 -e '/^LDSHARED=/s/^LDSHARED=[ 	]*\(.*\)/s%@LDSHARED[@]%\1%/p' \
+	 -e '/^BLDSHARED=/s/^BLDSHARED=[ 	]*\(.*\)/s%@BLDSHARED[@]%\1%/p' \
 	 -e '/^CCSHARED=/s/^CCSHARED=[ 	]*\(.*\)/s%@CCSHARED[@]%\1%/p' \
 	 -e '/^$L=/s/^$L=[ 	]*\(.*\)/s%@$L[@]%\1%/p' \
 	 -e '/^$P=/s/^$P=\(.*\)/s%^$P=.*%$P=\1%/p' \
diff -Naurp Pax/Makefile.pre.in Pax/Makefile.pre.in
--- Pax/Makefile.pre.in	2009-07-14 19:32:30.000000000 +0000
+++ Pax/Makefile.pre.in	2009-07-16 13:17:22.000000000 +0000
@@ -124,6 +124,7 @@ RANLIB=		@RANLIB@
 MACHDEP=	@MACHDEP@
 SO=		@SO@
 LDSHARED=	@LDSHARED@
+BLDSHARED=	@BLDSHARED@
 CCSHARED=	@CCSHARED@
 LINKFORSHARED=	@LINKFORSHARED@
 #@SET_CCC@
@@ -256,6 +257,7 @@ sedscript:	$(MAKEFILE)
 	 -e '/^MACHDEP=/s/^MACHDEP=[ 	]*\(.*\)/s%@MACHDEP[@]%\1%/p' \
 	 -e '/^SO=/s/^SO=[ 	]*\(.*\)/s%@SO[@]%\1%/p' \
 	 -e '/^LDSHARED=/s/^LDSHARED=[ 	]*\(.*\)/s%@LDSHARED[@]%\1%/p' \
+	 -e '/^BLDSHARED=/s/^BLDSHARED=[ 	]*\(.*\)/s%@BLDSHARED[@]%\1%/p' \
 	 -e '/^CCSHARED=/s/^CCSHARED=[ 	]*\(.*\)/s%@CCSHARED[@]%\1%/p' \
 	 -e '/^$L=/s/^$L=[ 	]*\(.*\)/s%@$L[@]%\1%/p' \
 	 -e '/^$P=/s/^$P=\(.*\)/s%^$P=.*%$P=\1%/p' \
diff -Naurp Sketch/Modules/Makefile.pre.in Sketch/Modules/Makefile.pre.in
--- Sketch/Modules/Makefile.pre.in	2009-07-14 19:32:30.000000000 +0000
+++ Sketch/Modules/Makefile.pre.in	2009-07-16 13:17:22.000000000 +0000
@@ -124,6 +124,7 @@ RANLIB=		@RANLIB@
 MACHDEP=	@MACHDEP@
 SO=		@SO@
 LDSHARED=	@LDSHARED@
+BLDSHARED=	@BLDSHARED@
 CCSHARED=	@CCSHARED@
 LINKFORSHARED=	@LINKFORSHARED@
 #@SET_CCC@
@@ -256,6 +257,7 @@ sedscript:	$(MAKEFILE)
 	 -e '/^MACHDEP=/s/^MACHDEP=[ 	]*\(.*\)/s%@MACHDEP[@]%\1%/p' \
 	 -e '/^SO=/s/^SO=[ 	]*\(.*\)/s%@SO[@]%\1%/p' \
 	 -e '/^LDSHARED=/s/^LDSHARED=[ 	]*\(.*\)/s%@LDSHARED[@]%\1%/p' \
+	 -e '/^BLDSHARED=/s/^BLDSHARED=[ 	]*\(.*\)/s%@BLDSHARED[@]%\1%/p' \
 	 -e '/^CCSHARED=/s/^CCSHARED=[ 	]*\(.*\)/s%@CCSHARED[@]%\1%/p' \
 	 -e '/^$L=/s/^$L=[ 	]*\(.*\)/s%@$L[@]%\1%/p' \
 	 -e '/^$P=/s/^$P=\(.*\)/s%^$P=.*%$P=\1%/p' \
Author: Gregor Hoffleit <flight@debian.org>
Description: Adjusting shebang.

diff -Naurp Pax/Generate/mkgc.py Pax/Generate/mkgc.py
--- Pax/Generate/mkgc.py	2009-07-14 19:32:30.000000000 +0000
+++ Pax/Generate/mkgc.py	2009-07-16 13:11:31.000000000 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python
 
 def drawfn(pname, *argtypes):
 	returntype = 'void'
diff -Naurp Tools/mkfontdb.py Tools/mkfontdb.py
--- Tools/mkfontdb.py	2009-07-14 19:32:30.000000000 +0000
+++ Tools/mkfontdb.py	2009-07-16 13:11:31.000000000 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python
 
 # mkfontdb.py - Generate 'font databases' from Type 1 AFM-files.
 # Copyright (C) 1997, 1998, 1999, 2000 by Bernhard Herzog
diff -Naurp finishinst.py finishinst.py
--- finishinst.py	2009-07-14 19:32:30.000000000 +0000
+++ finishinst.py	2009-07-16 13:11:31.000000000 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python
 import os
 from compileall import compile_dir
 
diff -Naurp setup.py setup.py
--- setup.py	2009-07-14 19:32:30.000000000 +0000
+++ setup.py	2009-07-16 13:11:31.000000000 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python
 
 # Skencil - A Python-based interactive drawing program
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 by Bernhard Herzog
diff -Naurp sk2ppm.py sk2ppm.py
--- sk2ppm.py	2009-07-14 19:32:30.000000000 +0000
+++ sk2ppm.py	2009-07-16 13:11:31.000000000 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python
 # Sketch - A Python-based interactive drawing program
 # Copyright (C) 1998, 1999, 2001, 2002, 2003 by Bernhard Herzog
 #
diff -Naurp sk2ps.py sk2ps.py
--- sk2ps.py	2009-07-14 19:32:30.000000000 +0000
+++ sk2ps.py	2009-07-16 13:11:31.000000000 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python
 
 # Sketch - A Python-based interactive drawing program
 # Copyright (C) 1998, 1999, 2000, 2003 by Bernhard Herzog
diff -Naurp skconvert.py skconvert.py
--- skconvert.py	2009-07-14 19:32:30.000000000 +0000
+++ skconvert.py	2009-07-16 13:11:31.000000000 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python
 
 # Sketch - A Python-based interactive drawing program
 # Copyright (C) 2002, 2003 by Bernhard Herzog
diff -Naurp skencil.py skencil.py
--- skencil.py	2009-07-14 19:32:30.000000000 +0000
+++ skencil.py	2009-07-16 13:11:31.000000000 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python
 
 # Sketch - A Python-based interactive drawing program
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2003 by Bernhard Herzog
diff -Naurp skshow.py skshow.py
--- skshow.py	2009-07-14 19:32:30.000000000 +0000
+++ skshow.py	2009-07-16 13:11:31.000000000 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
 
 # Sketch - A Python-based interactive drawing program
 # Copyright (C) 2000, 2001 by Bernhard Herzog
Author: Gregor Hoffleit <flight@debian.org>
Description: Adds message if python-reportlab is missing.

diff -Naurp Plugins/Filters/pdfgensaver.py Plugins/Filters/pdfgensaver.py
--- Plugins/Filters/pdfgensaver.py	2009-07-14 19:32:30.000000000 +0000
+++ Plugins/Filters/pdfgensaver.py	2009-07-16 13:13:07.000000000 +0000
@@ -27,8 +27,15 @@ from math import atan2, pi
 import PIL
 from Sketch import Bezier, EmptyPattern, Rotation, Translation, _sketch
 from Sketch.Graphics.curveop import arrow_trafos
-import reportlab.pdfgen.canvas
 
+from Sketch.warn import USER, warn_tb
+
+try:
+    import reportlab.pdfgen.canvas
+except ImportError:
+    warn_tb(USER, "ReportLab has to be installed to use the PDF export filter.\n"
+           "On Debian systems, install the 'python-reportlab' package.")
+    raise
 
 def make_pdf_path(pdfpath, paths):
     for path in paths:
Author: Gregor Hoffleit <flight@debian.org>
Description: Adds message if python-xml is missing.

diff -Naurp Plugins/Filters/svgloader.py Plugins/Filters/svgloader.py
--- Plugins/Filters/svgloader.py	2009-07-14 19:32:30.000000000 +0000
+++ Plugins/Filters/svgloader.py	2009-07-16 13:13:56.000000000 +0000
@@ -51,9 +51,8 @@ from Sketch.Graphics import text, proper
 try:
     from xml.sax import saxlib, saxexts
 except ImportError:
-    warn_tb(USER, "The Python xml package has to be installed for the svg "
-            "import filter.\n"
-            "See the README for more information.")
+    warn_tb(USER, "Python xml has to be installed to use the SVG import filter.\n"
+           "On Debian systems, install the 'python-xml' package.")
     raise
 
 # beginning with Python 2.0, the XML modules return Unicode strings,
Author: Daniel Baumann <daniel@debian.org>
Description: Adjusting directory names

diff -Naurp setup.py setup.py
--- setup.py	2009-07-14 19:32:30.000000000 +0000
+++ setup.py	2009-07-16 13:16:37.000000000 +0000
@@ -421,7 +421,7 @@ class InstallDirs:
             self.executable = os.path.join(self.exec_prefix, 'bin')
         if not self.library:
             self.library = os.path.join(self.prefix, 'lib',
-                                        progname + '-' + version)
+                                        progname)
 
     def replace_dirs(self, string):
         result = ''
Author: Fabien Ninoles <fabien@tzone.org>
Description: SVG export convert text too low (Closes: #152969).

diff -Naurp Plugins/Filters/svgsaver.py Plugins/Filters/svgsaver.py
--- Plugins/Filters/svgsaver.py	2009-07-14 19:32:30.000000000 +0000
+++ Plugins/Filters/svgsaver.py	2009-07-16 13:16:45.000000000 +0000
@@ -234,7 +234,8 @@ class SVGSaver:
         # sketch) since the y axis points toward the bottom of the page
         # in SVG, but the characters are oriented toward the top of the
         # page. This extra transform inverts them.
-        textTrafo = Trafo(1, 0, 0, -1, 0, 0)
+	textTrafo = Trafo(1, 0, 0, -1, 0,
+		object.bounding_rect.top-object.trafo(0,0).y )
 
         tm = self.trafo(object.Trafo()(textTrafo)).coeff()
 
Author: Daniel Baumann <daniel@debian.org>
Description:
 Does not put the author name into the header of postscript files
 (Closes: #177928).

diff -Naurp Sketch/Graphics/psdevice.py Sketch/Graphics/psdevice.py
--- Sketch/Graphics/psdevice.py	2009-07-14 19:32:30.000000000 +0000
+++ Sketch/Graphics/psdevice.py	2009-07-16 13:16:53.000000000 +0000
@@ -53,8 +53,7 @@ ps_join = (0, 1, 2)
 ps_cap = (None, 0, 1, 2)
 
 # header comments. Currently the type of all parameters is <textline>
-HeaderComments = [('For', '%%%%For: %s\n'),
-		  ('CreationDate', '%%%%CreationDate: %s\n'),
+HeaderComments = [('CreationDate', '%%%%CreationDate: %s\n'),
 		  ('Title', '%%%%Title: %s\n')]
 
 class PostScriptDevice(CommonDevice):
Author: Barry deFreese <bddebian@comcast.net>
Description: Replace PyMem_DEL usage with PyObject_Del (Closes: #469004).

diff -Naurp Filter/binfile.c Filter/binfile.c
--- Filter/binfile.c	2009-07-14 19:32:30.000000000 +0000
+++ Filter/binfile.c	2009-07-16 13:17:03.000000000 +0000
@@ -277,7 +277,7 @@ static void
 binfile_dealloc(BinaryInputObject * self)
 {
     Py_DECREF(self->stream);
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 static PyObject *
diff -Naurp Filter/filterobj.c Filter/filterobj.c
--- Filter/filterobj.c	2009-07-14 19:32:30.000000000 +0000
+++ Filter/filterobj.c	2009-07-16 13:17:03.000000000 +0000
@@ -126,7 +126,7 @@ new_filter(PyObject * stream, const char
     if (!self->buffer)
     {
     error:
-	PyMem_DEL(self);
+	PyObject_Del(self);
 	PyErr_NoMemory();
 	if (dealloc)
 	    dealloc(client_data);
@@ -136,7 +136,7 @@ new_filter(PyObject * stream, const char
     self->filtername = PyString_FromString(name);
     if (!self->filtername)
     {
-	PyMem_DEL(self->buffer);
+	PyObject_Del(self->buffer);
 	goto error;
     }
 
@@ -215,8 +215,8 @@ filter_dealloc(FilterObject * self)
 	self->dealloc(self->client_data);
     Py_DECREF(self->filtername);
     Py_DECREF(self->stream);
-    PyMem_DEL(self->buffer);
-    PyMem_DEL(self);
+    PyObject_Del(self->buffer);
+    PyObject_Del(self);
 }
 
 static PyObject *
diff -Naurp Filter/subfilefilter.c Filter/subfilefilter.c
--- Filter/subfilefilter.c	2009-07-14 19:32:30.000000000 +0000
+++ Filter/subfilefilter.c	2009-07-16 13:17:03.000000000 +0000
@@ -90,7 +90,7 @@ dealloc_subfile(void * clientdata)
 {
     SubFileDecodeState * state = (SubFileDecodeState*)clientdata;
     Py_DECREF(state->delim_object);
-    PyMem_DEL(state);
+    PyObject_Del(state);
 }
 
 static void
diff -Naurp Filter/zlibfilter.c Filter/zlibfilter.c
--- Filter/zlibfilter.c	2009-07-14 19:32:30.000000000 +0000
+++ Filter/zlibfilter.c	2009-07-16 13:17:03.000000000 +0000
@@ -82,7 +82,7 @@ dealloc_zlib(void * clientdata)
 {
     FlateDecodeState * state = (FlateDecodeState*)clientdata;
     inflateEnd(&state->zstr); /* XXX error handling */
-    PyMem_DEL(state);
+    PyObject_Del(state);
 }
 
 
@@ -102,7 +102,7 @@ Filter_FlateDecode(PyObject * self, PyOb
     state->buffer = PyMem_NEW(char, INBUFSIZE);
     if (!state->buffer)
     {
-	PyMem_DEL(state);
+	PyObject_Del(state);
 	return PyErr_NoMemory();
     }
 
@@ -132,8 +132,8 @@ Filter_FlateDecode(PyObject * self, PyOb
 			     "FlateDecode: Zlib Error %i: %.200s",
 			     result, state->zstr.msg);  
 	}
-	PyMem_DEL(state->buffer);
-	PyMem_DEL(state);
+	PyObject_Del(state->buffer);
+	PyObject_Del(state);
 	return NULL;
     }
 
diff -Naurp Pax/Generate/typedefs.py Pax/Generate/typedefs.py
--- Pax/Generate/typedefs.py	2009-07-14 19:32:30.000000000 +0000
+++ Pax/Generate/typedefs.py	2009-07-16 13:17:03.000000000 +0000
@@ -24,7 +24,7 @@ typedefs = {
 	'intlist': ('O',
 		'PyObject *%(arg)s; int *ints_%(arg)s; int nints_%(arg)s',
 		'checkintlist(%(arg)s, sizeof(int), &ints_%(arg)s, &nints_%(arg)s)',
-		'ints_%(arg)s, nints_%(arg)s', '', 'PyMem_DEL(ints_%(arg)s)'),
+		'ints_%(arg)s, nints_%(arg)s', '', 'PyObject_Del(ints_%(arg)s)'),
 	'long': ('l', 'long %(arg)s', '', '', 'PyInt_FromLong(%(arg)s)'),
 	'unsigned int': ('i', 'unsigned int %(arg)s', '', '',
 		'PyInt_FromLong((long)%(arg)s)'),
@@ -38,7 +38,7 @@ typedefs = {
 		'PyObject *%(arg)s; Atom *atoms_%(arg)s; int natoms_%(arg)s',
 		'checkintlist(%(arg)s, sizeof(Atom), &atoms_%(arg)s, &natoms_%(arg)s)',
 		'atoms_%(arg)s, natoms_%(arg)s', '',
-		'PyMem_DEL(atoms_%(arg)s)'),
+		'PyObject_Del(atoms_%(arg)s)'),
 	'Bool': ('i', 'int %(arg)s', '', '(Bool)%(arg)s',
 		'PyInt_FromLong((long)%(arg)s)'),
 	'Boolean': ('i', 'int %(arg)s', '', '(Boolean)%(arg)s',
@@ -90,7 +90,7 @@ typedefs = {
 		'PyObject *%(arg)s; XmString *tmp_%(arg)s; int nstrs_%(arg)s',
 		'checkxmstringlist(%(arg)s, &tmp_%(arg)s, &nstrs_%(arg)s)',
 		'tmp_%(arg)s, nstrs_%(arg)s', '',
-		'while (--nstrs_%(arg)s >= 0) XmStringFree(tmp_%(arg)s[nstrs_%(arg)s]); PyMem_DEL(tmp_%(arg)s)'),
+		'while (--nstrs_%(arg)s >= 0) XmStringFree(tmp_%(arg)s[nstrs_%(arg)s]); PyObject_Del(tmp_%(arg)s)'),
 	'XmTextDirection': ('l', 'XmTextDirection %(arg)s', '', '',
 		'PyInt_FromLong((long)%(arg)s)'),
 	'XmTextPosition': ('l', 'XmTextPosition %(arg)s', '', '',
@@ -121,11 +121,11 @@ typedefs = {
 	'argdict': ('O',
 		'PyObject *%(arg)s, *dict; ArgList tmp_%(arg)s; int nargs_%(arg)s',
 		'(dict = checkargdict(wClist, sizeof(wClist)/sizeof(wClist[0]), %(w)s, %(arg)s, &tmp_%(arg)s, &nargs_%(arg)s))',
-		'tmp_%(arg)s, nargs_%(arg)s', '', 'PyMem_DEL(tmp_%(arg)s)'),
+		'tmp_%(arg)s, nargs_%(arg)s', '', 'PyObject_Del(tmp_%(arg)s)'),
 	'stringlist': ('O',
 		 'PyObject *%(arg)s; char **tmp_%(arg)s; int nstrs_%(arg)s',
 		'checkstringlist(%(arg)s, &tmp_%(arg)s, &nstrs_%(arg)s)',
-		'tmp_%(arg)s, nstrs_%(arg)s', '', 'PyMem_DEL(tmp_%(arg)s)'),
+		'tmp_%(arg)s, nstrs_%(arg)s', '', 'PyObject_Del(tmp_%(arg)s)'),
 	'cbfunc': ('O', 'PyObject *%(arg)s, *cbfunc', 'cbfunc = %(arg)s;',
 		'univ_callback', ''),
 	'cbarg': ('O', 'PyObject *%(arg)s, *cbarg',
@@ -154,20 +154,20 @@ typedefs = {
 	'XPoint[]': ('O',
 		'PyObject *%(arg)s; XPoint *pts_%(arg)s; int npts_%(arg)s',
 		'checkshortlist(2, %(arg)s, (short**)&pts_%(arg)s, &npts_%(arg)s)',
-		'pts_%(arg)s, npts_%(arg)s', '', 'PyMem_DEL(pts_%(arg)s)'),
+		'pts_%(arg)s, npts_%(arg)s', '', 'PyObject_Del(pts_%(arg)s)'),
 	'XSegment[]': ('O',
 		'PyObject *%(arg)s; XSegment *segs_%(arg)s; int nsegs_%(arg)s',
 		'checkshortlist(4, %(arg)s, (short**)&segs_%(arg)s, &nsegs_%(arg)s)',
-		'segs_%(arg)s, nsegs_%(arg)s', '', 'PyMem_DEL(segs_%(arg)s)'),
+		'segs_%(arg)s, nsegs_%(arg)s', '', 'PyObject_Del(segs_%(arg)s)'),
 	'XRectangle[]': ('O',
 		'PyObject *%(arg)s; XRectangle *rects_%(arg)s; int nrects_%(arg)s',
 		'checkshortlist(4, %(arg)s, (short**)&rects_%(arg)s, &nrects_%(arg)s)',
 		'rects_%(arg)s, nrects_%(arg)s', '',
-		'PyMem_DEL(rects_%(arg)s)'),
+		'PyObject_Del(rects_%(arg)s)'),
 	'XArc[]': ('O',
 		'PyObject *%(arg)s; XArc *arcs_%(arg)s; int narcs_%(arg)s',
 		'checkshortlist(6, %(arg)s, (short**)&arcs_%(arg)s, &narcs_%(arg)s)',
-		'arcs_%(arg)s, narcs_%(arg)s', '', 'PyMem_DEL(arcs_%(arg)s)'),
+		'arcs_%(arg)s, narcs_%(arg)s', '', 'PyObject_Del(arcs_%(arg)s)'),
 	'XGCValues#': ('O',
 		'PyObject *%(arg)s; unsigned long mask; XGCValues values',
 		'PaxGC_MakeValues(%(arg)s, &mask, &values)',
diff -Naurp Pax/borderobject.c Pax/borderobject.c
--- Pax/borderobject.c	2009-07-14 19:32:30.000000000 +0000
+++ Pax/borderobject.c	2009-07-16 13:17:03.000000000 +0000
@@ -40,7 +40,7 @@ paxborder_dealloc(PaxBorderObject *self)
     {
 	Tk_Free3DBorder(self->tkborder);
     }
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 /* a converter function suitable for PyArg_ParseTuple */
@@ -115,7 +115,7 @@ paxborder_Draw3DPolygon(PaxBorderObject 
     
     Tk_Draw3DPolygon(self->tkwin, drawable, self->tkborder, points, npoints,
 		     border_width, left_relief);
-    PyMem_DEL(points);
+    PyObject_Del(points);
 
     Py_INCREF(Py_None);
     return Py_None;
@@ -142,7 +142,7 @@ paxborder_Fill3DPolygon(PaxBorderObject 
     
     Tk_Fill3DPolygon(self->tkwin, drawable, self->tkborder, points, npoints,
 		     border_width, left_relief);
-    PyMem_DEL(points);
+    PyObject_Del(points);
 
     Py_INCREF(Py_None);
     return Py_None;
diff -Naurp Pax/cmapobject.c Pax/cmapobject.c
--- Pax/cmapobject.c	2009-07-14 19:32:30.000000000 +0000
+++ Pax/cmapobject.c	2009-07-16 13:17:03.000000000 +0000
@@ -30,17 +30,17 @@ paxcm_AllocColorCells(PaxCMapObject *sel
     if (plane_masks == NULL || pixels == NULL)
     {
 	if (plane_masks)
-	    PyMem_DEL(plane_masks);
+	    PyObject_Del(plane_masks);
 	if (pixels)
-	    PyMem_DEL(pixels);
+	    PyObject_Del(pixels);
 	return PyErr_NoMemory();
     }
     if (!XAllocColorCells(self->display, self->colormap, contig,
 			  plane_masks, nplanes, pixels, npixels))
     {
 	PyErr_SetString(PyExc_RuntimeError, "XAllocColorCells failed");
-	PyMem_DEL(plane_masks);
-	PyMem_DEL(pixels);
+	PyObject_Del(plane_masks);
+	PyObject_Del(pixels);
 	return NULL;
     }
 
@@ -50,8 +50,8 @@ paxcm_AllocColorCells(PaxCMapObject *sel
     res2 = PyList_New(npixels);
     for (i = 0; i < npixels; i++)
 	PyList_SetItem(res2, i, PyInt_FromLong(pixels[i]));
-    PyMem_DEL(plane_masks);
-    PyMem_DEL(pixels);
+    PyObject_Del(plane_masks);
+    PyObject_Del(pixels);
     if (PyErr_Occurred())
     {
 	Py_XDECREF(res1);
@@ -85,7 +85,7 @@ paxcm_StoreColors(PaxCMapObject *self, P
 	item = PyList_GetItem(colorlist, i);
 	if (!PyTuple_Check(item) || PyTuple_Size(item) != 5)
 	{
-	    PyMem_DEL(color);
+	    PyObject_Del(color);
 	    PyErr_BadArgument();
 	    return NULL;
 	}
@@ -96,7 +96,7 @@ paxcm_StoreColors(PaxCMapObject *self, P
 	if (!PyArg_ParseTuple(item, "liiib", &color[i].pixel,
 			      &red, &green, &blue, &color[i].flags))
 	{
-	    PyMem_DEL(color);
+	    PyObject_Del(color);
 	    return NULL;
 	}
 	color[i].red = red;
@@ -106,7 +106,7 @@ paxcm_StoreColors(PaxCMapObject *self, P
 
     XStoreColors(self->display, self->colormap, color, ncolors);
 
-    PyMem_DEL(color);
+    PyObject_Del(color);
     if (PyErr_Occurred())
 	return NULL;
     Py_INCREF(Py_None);
@@ -221,7 +221,7 @@ paxcm_QueryColors(PaxCMapObject *self, P
 	}
     }
 done:
-    PyMem_DEL(defs);
+    PyObject_Del(defs);
     return list;
 }
 
@@ -285,7 +285,7 @@ paxcm_FreeColors(PaxCMapObject *self, Py
 	item = PyList_GetItem(pixellist, i);
 	if (!PyInt_Check(item))
 	{
-	    PyMem_DEL(pixels);
+	    PyObject_Del(pixels);
 	    PyErr_BadArgument();
 	    return NULL;
 	}
@@ -294,7 +294,7 @@ paxcm_FreeColors(PaxCMapObject *self, Py
 
     XFreeColors(self->display, self->colormap, pixels, npixels, planes);
 
-    PyMem_DEL(pixels);
+    PyObject_Del(pixels);
     if (PyErr_Occurred())
 	return NULL;
     Py_INCREF(Py_None);
@@ -345,7 +345,7 @@ paxcm_dealloc(PaxCMapObject *self)
     if (self->owner)
 	XFreeColormap(self->display, self->colormap);
 
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 PyTypeObject PaxCMapType = {
diff -Naurp Pax/fontobject.c Pax/fontobject.c
--- Pax/fontobject.c	2009-07-14 19:32:30.000000000 +0000
+++ Pax/fontobject.c	2009-07-16 13:17:03.000000000 +0000
@@ -69,7 +69,7 @@ PaxFont_FromName(Display *display, char 
     f->font_struct = XLoadQueryFont(display, name);
     if (f->font_struct == NULL)
     {
-	PyMem_DEL(f);
+	PyObject_Del(f);
 	PyErr_SetString(PyExc_RuntimeError, "no such font");
 	return NULL;
     }
@@ -87,7 +87,7 @@ PaxFont_FromFont(Display *display, Font 
     f->font_struct = XQueryFont(display, fid);
     if (f->font_struct == NULL)
     {
-	PyMem_DEL(f);
+	PyObject_Del(f);
 	PyErr_SetString(PyExc_RuntimeError, "no such font");
 	return NULL;
     }
@@ -269,7 +269,7 @@ Dealloc(PaxFontObject *self)
 	XFreeFontInfo(NULL, self->font_struct, 1);
     else
 	XFreeFont(self->display, self->font_struct);
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 PyTypeObject PaxFontType = {
diff -Naurp Pax/gcmethods.c Pax/gcmethods.c
--- Pax/gcmethods.c	2009-07-14 19:32:30.000000000 +0000
+++ Pax/gcmethods.c	2009-07-16 13:17:03.000000000 +0000
@@ -45,7 +45,7 @@ PaxGC_DrawArcs(PaxGCObject * self, PyObj
 	}
 XDrawArcs(self->display, self->drawable, self->gc,
 			arcs_arg1, narcs_arg1);
-	PyMem_DEL(arcs_arg1);
+	PyObject_Del(arcs_arg1);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
@@ -113,7 +113,7 @@ PaxGC_DrawLines(PaxGCObject * self, PyOb
 XDrawLines(self->display, self->drawable, self->gc,
 			pts_arg1, npts_arg1,
 			arg2);
-	PyMem_DEL(pts_arg1);
+	PyObject_Del(pts_arg1);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
@@ -151,7 +151,7 @@ PaxGC_DrawPoints(PaxGCObject * self, PyO
 XDrawPoints(self->display, self->drawable, self->gc,
 			pts_arg1, npts_arg1,
 			arg2);
-	PyMem_DEL(pts_arg1);
+	PyObject_Del(pts_arg1);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
@@ -192,7 +192,7 @@ PaxGC_DrawRectangles(PaxGCObject * self,
 	}
 XDrawRectangles(self->display, self->drawable, self->gc,
 			rects_arg1, nrects_arg1);
-	PyMem_DEL(rects_arg1);
+	PyObject_Del(rects_arg1);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
@@ -211,7 +211,7 @@ PaxGC_DrawSegments(PaxGCObject * self, P
 	}
 XDrawSegments(self->display, self->drawable, self->gc,
 			segs_arg1, nsegs_arg1);
-	PyMem_DEL(segs_arg1);
+	PyObject_Del(segs_arg1);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
@@ -282,7 +282,7 @@ PaxGC_FillArcs(PaxGCObject * self, PyObj
 	}
 XFillArcs(self->display, self->drawable, self->gc,
 			arcs_arg1, narcs_arg1);
-	PyMem_DEL(arcs_arg1);
+	PyObject_Del(arcs_arg1);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
@@ -307,7 +307,7 @@ XFillPolygon(self->display, self->drawab
 			pts_arg1, npts_arg1,
 			arg2,
 			arg3);
-	PyMem_DEL(pts_arg1);
+	PyObject_Del(pts_arg1);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
@@ -348,7 +348,7 @@ PaxGC_FillRectangles(PaxGCObject * self,
 	}
 XFillRectangles(self->display, self->drawable, self->gc,
 			rects_arg1, nrects_arg1);
-	PyMem_DEL(rects_arg1);
+	PyObject_Del(rects_arg1);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
@@ -492,7 +492,7 @@ XSetClipRectangles(self->display, self->
 			arg2,
 			rects_arg3, nrects_arg3,
 			arg4);
-	PyMem_DEL(rects_arg3);
+	PyObject_Del(rects_arg3);
 	Py_INCREF(Py_None);
 	return Py_None;
 }
diff -Naurp Pax/gcobject.c Pax/gcobject.c
--- Pax/gcobject.c	2009-07-14 19:32:30.000000000 +0000
+++ Pax/gcobject.c	2009-07-16 13:17:03.000000000 +0000
@@ -152,7 +152,7 @@ pax_checkcharlist(PyObject *list, char *
 	PyObject *item = PyList_GetItem(list, i);
 	if (!PyInt_Check(item))
 	{
-	    PyMem_DEL(*parray);
+	    PyObject_Del(*parray);
 	    PyErr_SetString(PyExc_TypeError, "list of ints expected");
 	    return 0;
 	}
@@ -241,7 +241,7 @@ PaxGC_SetDashes(PaxGCObject * self, PyOb
 	return NULL;
 
     XSetDashes(self->display, self->gc, dash_offset, dashes, num_dashes);
-    PyMem_DEL(dashes);
+    PyObject_Del(dashes);
 
     Py_INCREF(Py_None);
     return Py_None;
@@ -478,7 +478,7 @@ Dealloc(PaxGCObject *self)
     else if (self->shared == PAXGC_OWNED)
 	XFreeGC(self->display, self->gc);
     Py_XDECREF(self->drawable_object);
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 PyTypeObject PaxGCType =
diff -Naurp Pax/imageobject.c Pax/imageobject.c
--- Pax/imageobject.c	2009-07-14 19:32:30.000000000 +0000
+++ Pax/imageobject.c	2009-07-16 13:17:03.000000000 +0000
@@ -153,13 +153,13 @@ image_dealloc(PaxImageObject *self)
 	XDestroyImage(self->ximage);
 	shmdt(self->shminfo->shmaddr);
 	shmctl(self->shminfo->shmid, IPC_RMID, 0);
-	PyMem_DEL(self->shminfo);
+	PyObject_Del(self->shminfo);
     }
     else
 #endif
 	XDestroyImage(self->ximage);
     
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 PyTypeObject PaxImageType = {
@@ -215,7 +215,7 @@ PaxImage_FromShmImage(XImage *ximage, XS
     self = (PaxImageObject*)PaxImage_FromImage(ximage);
     if (!self)
     {
-	PyMem_DEL(shminfo);
+	PyObject_Del(shminfo);
 	return NULL;
     }
 
diff -Naurp Pax/paxtkinter.c Pax/paxtkinter.c
--- Pax/paxtkinter.c	2009-07-14 19:32:30.000000000 +0000
+++ Pax/paxtkinter.c	2009-07-16 13:17:03.000000000 +0000
@@ -1201,7 +1201,7 @@ PythonCmdDelete(ClientData clientData)
 	ENTER_PYTHON
 	Py_XDECREF(data->self);
 	Py_XDECREF(data->func);
-	PyMem_DEL(data);
+	PyObject_Del(data);
 	LEAVE_PYTHON
 }
 
@@ -1236,7 +1236,7 @@ Tkapp_CreateCommand(PyObject *self, PyOb
 	LEAVE_TCL
 	if (err == NULL) {
 		PyErr_SetString(Tkinter_TclError, "can't create Tcl command");
-		PyMem_DEL(data);
+		PyObject_Del(data);
 		return NULL;
 	}
 
@@ -1307,7 +1307,7 @@ DeleteFHCD(int id)
 			*pp = p->next;
 			Py_XDECREF(p->func);
 			Py_XDECREF(p->file);
-			PyMem_DEL(p);
+			PyObject_Del(p);
 		}
 		else
 			pp = &p->next;
@@ -1499,7 +1499,7 @@ Tktt_Dealloc(PyObject *self)
 
 	Py_XDECREF(func);
 
-	PyMem_DEL(self);
+	PyObject_Del(self);
 }
 
 static PyObject *
@@ -1825,7 +1825,7 @@ Tkapp_Dealloc(PyObject *self)
 	ENTER_TCL
 	Tcl_DeleteInterp(Tkapp_Interp(self));
 	LEAVE_TCL
-	PyMem_DEL(self);
+	PyObject_Del(self);
 	DisableEventHook();
 }
 
diff -Naurp Pax/paxutil.c Pax/paxutil.c
--- Pax/paxutil.c	2009-07-14 19:32:30.000000000 +0000
+++ Pax/paxutil.c	2009-07-16 13:17:03.000000000 +0000
@@ -25,7 +25,7 @@ pax_checkshortlist(int width, PyObject *
 	if (!PyTuple_Check(item) || PyTuple_Size(item) != width)
 	{
 	    char buf[100];
-	    PyMem_DEL(*parray);
+	    PyObject_Del(*parray);
 	    sprintf(buf, "list of %d-tuples expected", width);
 	    PyErr_SetString(PyExc_TypeError, buf);
 	    return 0;
@@ -35,7 +35,7 @@ pax_checkshortlist(int width, PyObject *
 	    PyObject *elem = PyTuple_GetItem(item, j);
 	    if (!PyInt_Check(elem))
 	    {
-		PyMem_DEL(*parray);
+		PyObject_Del(*parray);
 		PyErr_SetString(PyExc_TypeError,
 				"list of tuples of ints expected");
 		return 0;
diff -Naurp Pax/pixmapobject.c Pax/pixmapobject.c
--- Pax/pixmapobject.c	2009-07-14 19:32:30.000000000 +0000
+++ Pax/pixmapobject.c	2009-07-16 13:17:03.000000000 +0000
@@ -381,7 +381,7 @@ static void pixmap_dealloc(PaxPixmapObje
 {
     if (self->owner)
 	XFreePixmap(self->display, self->pixmap);
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 PyTypeObject PaxPixmapType = {
diff -Naurp Pax/regionobject.c Pax/regionobject.c
--- Pax/regionobject.c	2009-07-14 19:32:30.000000000 +0000
+++ Pax/regionobject.c	2009-07-16 13:17:03.000000000 +0000
@@ -178,7 +178,7 @@ static void
 region_dealloc(PaxRegionObject  *self)
 {
     XDestroyRegion(self->region);
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 
diff -Naurp Pax/tkwinobject.c Pax/tkwinobject.c
--- Pax/tkwinobject.c	2009-07-14 19:32:30.000000000 +0000
+++ Pax/tkwinobject.c	2009-07-16 13:17:03.000000000 +0000
@@ -47,7 +47,7 @@ TkWin_AsWindowID(PyObject * self)
 static void
 tkwin_dealloc(TkWinObject * self)
 {
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 
@@ -365,7 +365,7 @@ tkwin_CreateImage(TkWinObject *self, PyO
     if (ximage == NULL)
     {
 	PyErr_SetString(PyExc_RuntimeError, "XCreateImage failed");
-	PyMem_DEL(newdata);
+	PyObject_Del(newdata);
 	return NULL;
     }
     return PaxImage_FromImage(ximage);
@@ -463,7 +463,7 @@ tkwin_ShmCreateImage(TkWinObject *self, 
 	    shmdt(shminfo->shmaddr);
 	if (shminfo->shmid != -1)
 	    shmctl(shminfo->shmid, IPC_RMID, 0);
-	PyMem_DEL(shminfo);
+	PyObject_Del(shminfo);
     }
     return NULL;
 }
@@ -551,7 +551,7 @@ static PyObject * try_shm_image(TkWinObj
 	XDestroyImage(ximage);
 	shmdt(shminfo->shmaddr);
 	shmctl(shminfo->shmid, IPC_RMID, 0);
-	PyMem_DEL(shminfo);
+	PyObject_Del(shminfo);
 	Py_INCREF(Py_None);
 	return Py_None;
     }
@@ -567,7 +567,7 @@ static PyObject * try_shm_image(TkWinObj
 	    shmdt(shminfo->shmaddr);
 	if (shminfo->shmid != -1)
 	    shmctl(shminfo->shmid, IPC_RMID, 0);
-	PyMem_DEL(shminfo);
+	PyObject_Del(shminfo);
     }
     return NULL;
 }
@@ -704,7 +704,7 @@ tkwin_PolygonRegion(TkWinObject *self, P
 	return NULL;
     }
     reg = XPolygonRegion(points, npoints, fill_rule);
-    PyMem_DEL(points);
+    PyObject_Del(points);
     if (reg == NULL)
 	return PyErr_NoMemory();
     return PaxRegion_FromRegion(reg);
diff -Naurp Sketch/Modules/curveobject.c Sketch/Modules/curveobject.c
--- Sketch/Modules/curveobject.c	2009-07-14 19:32:30.000000000 +0000
+++ Sketch/Modules/curveobject.c	2009-07-16 13:17:03.000000000 +0000
@@ -117,7 +117,7 @@ SKCurve_New(int length)
     self->segments = malloc(length * sizeof(CurveSegment));
     if (!self->segments)
     {
-	PyMem_DEL(self);
+	PyObject_Del(self);
 	return PyErr_NoMemory();
     }
     self->allocated = length;
@@ -218,7 +218,7 @@ static void
 curve_dealloc(SKCurveObject * self)
 {
     free(self->segments);
-    PyMem_DEL(self);
+    PyObject_Del(self);
     paths_allocated--;
 }
 
diff -Naurp Sketch/Modules/pstokenize.c Sketch/Modules/pstokenize.c
--- Sketch/Modules/pstokenize.c	2009-07-14 19:32:30.000000000 +0000
+++ Sketch/Modules/pstokenize.c	2009-07-16 13:17:03.000000000 +0000
@@ -691,7 +691,7 @@ static void 
 pstokenizer_dealloc(PSTokenizerObject * self)
 {
     Py_DECREF(self->source);
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 static PyObject *
diff -Naurp Sketch/Modules/skaux.c Sketch/Modules/skaux.c
--- Sketch/Modules/skaux.c	2009-07-14 19:32:30.000000000 +0000
+++ Sketch/Modules/skaux.c	2009-07-16 13:17:03.000000000 +0000
@@ -287,7 +287,7 @@ SKCache_New(void)
     self->dict = PyDict_New();
     if (!self->dict)
     {
-	PyMem_DEL(self);
+	PyObject_Del(self);
 	return NULL;
     }
 
@@ -298,7 +298,7 @@ static void
 SKCache_dealloc(SKCacheObject * self)
 {
     Py_DECREF(self->dict);
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 static PyObject *
diff -Naurp Sketch/Modules/skcolor.c Sketch/Modules/skcolor.c
--- Sketch/Modules/skcolor.c	2009-07-14 19:32:30.000000000 +0000
+++ Sketch/Modules/skcolor.c	2009-07-16 13:17:03.000000000 +0000
@@ -103,7 +103,7 @@ skcolor_dealloc(SKColorObject * self)
     self->ob_type = (PyTypeObject*)free_list;
     free_list = self;
 #else
-    PyMem_DEL(self);
+    PyObject_Del(self);
 #endif
 #if SKCOLOR_COUNT_ALLOC
     skcolor_allocated--;
@@ -478,20 +478,20 @@ skvisual_pseudocolor_free(SKVisualObject
 	{
 	    for (j = 0; j < 8; j++)
 	    {
-		PyMem_DEL(self->dither_matrix[i][j]);
+		PyObject_Del(self->dither_matrix[i][j]);
 	    }
-	    PyMem_DEL(self->dither_matrix[i]);
+	    PyObject_Del(self->dither_matrix[i]);
 	}
-	PyMem_DEL(self->dither_matrix);
+	PyObject_Del(self->dither_matrix);
     }
     if (self->dither_red)
-	PyMem_DEL(self->dither_red);
+	PyObject_Del(self->dither_red);
     if (self->dither_green)
-	PyMem_DEL(self->dither_green);
+	PyObject_Del(self->dither_green);
     if (self->dither_blue)
-	PyMem_DEL(self->dither_blue);
+	PyObject_Del(self->dither_blue);
     if (self->dither_gray)
-	PyMem_DEL(self->dither_gray);
+	PyObject_Del(self->dither_gray);
 }
 
 static int
@@ -594,7 +594,7 @@ SKVisual_FromXVisualInfo(Display *displa
     self->visualinfo = PyMem_NEW(XVisualInfo, 1);
     if (!self->visualinfo)
     {
-	PyMem_DEL(self);
+	PyObject_Del(self);
 	return PyErr_NoMemory();
     }
     memcpy(self->visualinfo, info, sizeof(XVisualInfo));
@@ -629,7 +629,7 @@ skvisual_dealloc(SKVisualObject * self)
     if (self->free_extra)
 	self->free_extra(self);
     free(self->visualinfo);
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 static PyObject *
diff -Naurp Sketch/Modules/skfm.c Sketch/Modules/skfm.c
--- Sketch/Modules/skfm.c	2009-07-14 19:32:30.000000000 +0000
+++ Sketch/Modules/skfm.c	2009-07-16 13:17:03.000000000 +0000
@@ -85,7 +85,7 @@ SKFontMetric_New()
 static void
 skfm_dealloc(SKFontMetric * self)
 {
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 
diff -Naurp Sketch/Modules/skpoint.c Sketch/Modules/skpoint.c
--- Sketch/Modules/skpoint.c	2009-07-14 19:32:30.000000000 +0000
+++ Sketch/Modules/skpoint.c	2009-07-16 13:17:03.000000000 +0000
@@ -62,7 +62,7 @@ SKPoint_FromXY(SKCoord x, SKCoord y)
 static void
 skpoint_dealloc(SKPointObject * self)
 {
-    PyMem_DEL(self);
+    PyObject_Del(self);
 #if SKPOINT_COUNT_ALLOC
     allocated -= 1;
 #endif
diff -Naurp Sketch/Modules/skrect.c Sketch/Modules/skrect.c
--- Sketch/Modules/skrect.c	2009-07-14 19:32:30.000000000 +0000
+++ Sketch/Modules/skrect.c	2009-07-16 13:17:03.000000000 +0000
@@ -114,7 +114,7 @@ skrect_dealloc(SKRectObject * self)
     self->ob_type = (PyTypeObject*)free_list;
     free_list = self;
 #else
-    PyMem_DEL(self);
+    PyObject_Del(self);
 #endif
 #if SKRECT_COUNT_ALLOC
     allocated--;
diff -Naurp Sketch/Modules/sktrafo.c Sketch/Modules/sktrafo.c
--- Sketch/Modules/sktrafo.c	2009-07-14 19:32:30.000000000 +0000
+++ Sketch/Modules/sktrafo.c	2009-07-16 13:17:03.000000000 +0000
@@ -82,7 +82,7 @@ SKTrafo_FromDouble(double m11, double m2
 static void
 sktrafo_dealloc(SKTrafoObject * self)
 {
-    PyMem_DEL(self);
+    PyObject_Del(self);
 #if SKTRAFO_COUNT_ALLOC
     allocated--;
 #endif
Author: Bernhard Herzog <bh@intevation.de>
Description: Updating svg header (Closes: #410430).

diff -Naurp Plugins/Filters/svgsaver.py Plugins/Filters/svgsaver.py
--- Plugins/Filters/svgsaver.py	2009-07-14 19:32:30.000000000 +0000
+++ Plugins/Filters/svgsaver.py	2009-07-16 13:17:15.000000000 +0000
@@ -1,5 +1,6 @@
 # Sketch - A Python-based interactive drawing program
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004 by Bernhard Herzog
+# Copyright (C) 2004, 2006 by Bernhard Herzog
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 by Bernhard Herzog
 # Part of the code for Arrow heads and text from Paul Giotta (2002)
 #
 # This library is free software; you can redistribute it and/or
@@ -260,7 +261,8 @@ class SVGSaver:
         width = right - left
         height = top - bottom
         self.trafo = Trafo(1, 0, 0, -1, -left, top)
-        self.file.write('<svg width="%g" height="%g"' % (width, height))
+        self.file.write('<svg xmlns="http://www.w3.org/2000/svg"'
+                        ' width="%g" height="%g"' % (width, height))
         #self.file.write(' transform="matrix(%g,%g,%g,%g,%g,%g)">\n' % trafo)
         self.file.write('>\n')
 
Author: Octavian Voicu <octavian.voicu@gmail.com>
Description: Catch tcl delete command (Closes: #498223, #524554).

diff -Naurp Sketch/UI/tkext.py Sketch/UI/tkext.py
--- Sketch/UI/tkext.py	2009-07-14 19:32:30.000000000 +0000
+++ Sketch/UI/tkext.py	2009-07-16 13:25:11.000000000 +0000
@@ -364,7 +364,10 @@ class UpdatedMenu:
 
     def RebuildMenu(self):
 	if self.entries is not None:
-	    self.menu.delete(0, END)
+	    try:
+		self.menu.delete(0, END)
+	    except:
+		warn_tb(INTERNAL, 'Delete failed (bug #524554)')
 	if self.rebuild_func is not None:
 	    try:
 		self.entries = self.rebuild_func()
Author: Jens Seidel <jensseidel@users.sf.net>
Description: Fixes typos in German translation

diff -Naurp po/de.po po/de.po
--- po/de.po	2009-07-14 19:32:30.000000000 +0000
+++ po/de.po	2009-07-16 13:16:28.000000000 +0000
@@ -1240,7 +1240,7 @@ msgstr "Öffnen"
 
 #: ../Sketch/UI/mainwindow.py:202
 msgid "An error occurred:\n"
-msgstr "Ein Fehler is aufgetreten:\n"
+msgstr "Ein Fehler ist aufgetreten:\n"
 
 #: ../Sketch/UI/mainwindow.py:209
 msgid "Warnings from the import filter:\n"
@@ -1857,7 +1857,7 @@ msgstr "Unbekanntes Plugin-Objekt: %s"
 
 #: ../Plugins/Filters/skloader.py:484
 msgid "Omitted some arguments for function %s"
-msgstr "Habe einige Argumente für die Funtion %s weggelassen"
+msgstr "Habe einige Argumente für die Funktion %s weggelassen"
 
 #: ../Plugins/Filters/skloader.py:487
 msgid "Cannot call function %s"
