diff -urN sketch.orig/ChangeLog sketch/ChangeLog
--- sketch.orig/ChangeLog	2005-12-13 11:08:08.000000000 +0200
+++ sketch/ChangeLog	2005-12-13 11:08:07.000000000 +0200
@@ -1,3 +1,66 @@
+2005-12-12
+
+	Unify ToolInstance and ToolInfo and remove the latter.
+
+	* Sketch/Editor/__init__.py (toolmap): Get the toolmap from tools.py
+
+	* Sketch/Editor/tools.py (ToolInfo): Removed.
+	(toolmap): New. Hold the toolmap here.
+	(RegisteredTool): New. Metaclass that registers the tools that have
+	the "title" attribute set and adds "name" and "icon" attributes.
+	(ToolInstance): Add the metaclass and some new class attributes:
+	cursor, active_cursor.
+	(ZoomToolInstance, ZoomTool): Rename ZoomToolInstance to ZoomTool and
+	add cursor attribute.
+	(DrawToolInstance): Add cursor attribute.
+	(RectangleToolInstance, RectangleTool): Rename RectangleToolInstance
+	to RectangleTool.
+	(EllipseToolInstance, EllipseTool): Rename EllipseToolInstance to
+	EllipseTool.
+	(FreehandToolInstance, FreehandTool): Rename FreehandToolInstance to
+	FreehandTool.
+	(PolyDrawToolInstance): Add cursor attribute.
+	(PolyBezierToolInstance, PolyBezierTool): Rename
+	PolyBezierToolInstance to PolyBezierTool.
+	(PolyLineToolInstance, PolyLineTool): Rename PolyLineToolInstance to
+	PolyLineTool.
+
+	* Sketch/Editor/selectiontool.py (SelectionToolInstance,
+	SelectionTool): Rename SelectionToolInstance to SelectionTool and add
+	active_cursor attribute.
+
+	* Sketch/Editor/edittool.py (EditToolInstance, EditTool): Rename
+	EditToolInstance to EditTool and add cursor attributes.
+	(check_polybezier_method, call_polybezier_method): Use EditTool
+	instead of EditToolInstance
+
+	* Sketch/Editor/aligntool.py (AlignToolInstance, AlignTool): Rename
+	AlignToolInstance to AlignTool and add cursor attributes.
+	(align_tool_has_selection): Use AlignTool instead of AlignToolInstance.
+
+	* Sketch/Editor/texttool.py (TextToolInstance, TextTool): Rename
+	TextToolInstance to TextTool and add cursor attributes.
+
+	* Sketch/Editor/doceditor.py (EditorWithSelection.SetTool): Replace
+	call to Instantiate with direct invocation of tool.
+
+	* Sketch/Editor/context.py: Modify the commands that activate the
+	tools to use the new names (e.g. "RectangleTool" instead of
+	"CreateRect").
+
+	* Sketch/Pixmaps/CreateCurve.xpm, Sketch/Pixmaps/CreateEllipse.xpm,
+	Sketch/Pixmaps/CreateFreehand.xpm, Sketch/Pixmaps/CreateLine.xpm,
+	Sketch/Pixmaps/CreatePoly.xpm, Sketch/Pixmaps/CreateRect.xpm: Removed.
+
+	* Sketch/Pixmaps/EllipseTool.xpm, Sketch/Pixmaps/FreehandTool.xpm,
+	Sketch/Pixmaps/PolyBezierTool.xpm, Sketch/Pixmaps/PolyBezierTool.xpm,
+	Sketch/Pixmaps/PolyLineTool.xpm, Sketch/Pixmaps/RectangleTool.xpm: New.
+
+	* Sketch/UI/skpixmaps.py (_pixmap_names): Modify the names of the tool
+	icons.
+
+	* Sketch/UI/toolbox.py (tools): Modify the names of the tools.
+
 2005-12-11
 
 	* Sketch/Editor/context.py (Context.set_editor): Use self.tool
diff -urN sketch.orig/Sketch/Editor/aligntool.py sketch/Sketch/Editor/aligntool.py
--- sketch.orig/Sketch/Editor/aligntool.py	2005-12-13 11:08:08.000000000 +0200
+++ sketch/Sketch/Editor/aligntool.py	2005-12-13 11:08:07.000000000 +0200
@@ -23,7 +23,7 @@
 from Sketch.Editor import AddEditorBuiltin
 
 from selectiontool import SelectionRectangle, selection_type
-from tools import ToolInstance, ToolInfo
+from tools import ToolInstance
 from handle import Handle
 from builtins import align_selected
 
@@ -49,7 +49,7 @@
                 Handle(HandleAlignC, Point(x2, y2)),
                 ]
 
-class AlignToolInstance(ToolInstance):
+class AlignTool(ToolInstance):
 
     """A tool that allows to align the selected objects.
 
@@ -74,6 +74,7 @@
     """
 
     title = ''"Align"
+    active_cursor = True
 
     def __init__(self, editor):
         ToolInstance.__init__(self, editor)
@@ -202,11 +203,9 @@
         return handles
 
 
-AlignTool = ToolInfo("AlignTool", AlignToolInstance, active_cursor = 1)
-
 def align_tool_has_selection(context):
     editor = context.editor
-    return isinstance(editor.tool, AlignToolInstance) and editor.HasSelection()
+    return isinstance(editor.tool, AlignTool) and editor.HasSelection()
 
 def set_align_reference(context, reference):
     if align_tool_has_selection(context):
diff -urN sketch.orig/Sketch/Editor/context.py sketch/Sketch/Editor/context.py
--- sketch.orig/Sketch/Editor/context.py	2005-12-13 11:08:08.000000000 +0200
+++ sketch/Sketch/Editor/context.py	2005-12-13 11:08:07.000000000 +0200
@@ -124,11 +124,12 @@
 AddBuiltin('selection_tool', ''"Selection Tool", set_tool,
            args = 'SelectionTool')
 AddBuiltin('zoom_tool', ''"Zoom Tool", set_tool, args = 'ZoomTool')
-AddBuiltin('ellipse_tool', ''"Ellipse Tool", set_tool, args = 'CreateEllipse')
-AddBuiltin('rectangle_tool', ''"Rectangle Tool", set_tool, args = 'CreateRect')
-AddBuiltin('curve_tool', ''"Curve Tool", set_tool, args = 'CreateCurve')
-AddBuiltin('line_tool', ''"Line Tool", set_tool, args = 'CreatePoly')
+AddBuiltin('ellipse_tool', ''"Ellipse Tool", set_tool, args = 'EllipseTool')
+AddBuiltin('rectangle_tool', ''"Rectangle Tool", set_tool,
+            args = 'RectangleTool')
+AddBuiltin('curve_tool', ''"Curve Tool", set_tool, args = 'PolyBezierTool')
+AddBuiltin('line_tool', ''"Line Tool", set_tool, args = 'PolyLineTool')
 AddBuiltin('freehand_tool', ''"Freehand Tool", set_tool,
-           args = 'CreateFreehand')
+           args = 'FreehandTool')
 AddBuiltin('text_tool', ''"Text Tool", set_tool, args = 'TextTool')
 
diff -urN sketch.orig/Sketch/Editor/doceditor.py sketch/Sketch/Editor/doceditor.py
--- sketch.orig/Sketch/Editor/doceditor.py	2005-12-13 11:08:08.000000000 +0200
+++ sketch/Sketch/Editor/doceditor.py	2005-12-13 11:08:07.000000000 +0200
@@ -447,10 +447,10 @@
         tool = Sketch.Editor.toolmap.get(toolname)
         old_toolname = self.toolname
         if tool is not None:
-            if self.toolname != toolname:
+            if self.toolname != tool.name:
                 if self.tool is not None:
                     self.tool.End()
-            self.tool = tool.Instantiate(self)
+            self.tool = tool(self)
             self.toolname = toolname
         else:
             self.tool = None
diff -urN sketch.orig/Sketch/Editor/edittool.py sketch/Sketch/Editor/edittool.py
--- sketch.orig/Sketch/Editor/edittool.py	2005-12-13 11:08:08.000000000 +0200
+++ sketch/Sketch/Editor/edittool.py	2005-12-13 11:08:07.000000000 +0200
@@ -147,9 +147,11 @@
 
 
 
-class EditToolInstance(tools.ToolInstance):
+class EditTool(tools.ToolInstance):
 
     title = ''"Edit"
+    cursor = 'CurEdit'
+    active_cursor = True
 
     def __init__(self, editor):
         tools.ToolInstance.__init__(self, editor)
@@ -247,8 +249,6 @@
             handles = []
         return handles
 
-EditTool = tools.ToolInfo("EditTool", EditToolInstance, cursor = 'CurEdit',
-                          active_cursor = 1)
 
 # PolyBezier commands
 def check_polybezier_method(context, methodname, *args):
@@ -258,7 +258,7 @@
     can = 0
     editor = context.editor
     tool = editor.Tool()
-    if isinstance(tool, EditToolInstance) and context.tool == 'EditTool' and \
+    if isinstance(tool, EditTool) and context.tool == 'EditTool' and \
             editor.HasSelection():
         for objeditor in tool.multiedit.editors:
             if isinstance(objeditor, PolyBezierEditor):
@@ -270,7 +270,7 @@
 
 def call_polybezier_method(context, method, *args):
     tool = context.editor.Tool()
-    if isinstance(tool, EditToolInstance):
+    if isinstance(tool, EditTool):
         tool.CallObjectEditorMethod(PolyBezierEditor, method, *args)
 
 AddEditorBuiltin('cont_angle', ''"Angle",
diff -urN sketch.orig/Sketch/Editor/__init__.py sketch/Sketch/Editor/__init__.py
--- sketch.orig/Sketch/Editor/__init__.py	2005-12-13 11:08:08.000000000 +0200
+++ sketch/Sketch/Editor/__init__.py	2005-12-13 11:08:07.000000000 +0200
@@ -71,8 +71,9 @@
      InternalPathTextEditor, PathTextCreator
 
 import tools, selectiontool, edittool, texttool, aligntool
-import builtins
+toolmap = tools.toolmap
 
+import builtins
 from smoothcurve import smoothen_freehand_curve
 
 
@@ -290,18 +291,6 @@
 
 # text command not listed: insert_char
 
-toolmap = {'SelectionTool': selectiontool.SelectionTool,
-           'EditTool': edittool.EditTool,
-           'AlignTool': aligntool.AlignTool,
-           'TextTool': texttool.TextTool,
-           'ZoomTool': tools.ZoomTool,
-           'CreateRect': tools.RectangleTool,
-           'CreateCurve': tools.PolyBezierTool,
-           'CreateEllipse': tools.EllipseTool,
-           'CreatePoly': tools.PolyLineTool,
-           'CreateFreehand': tools.FreehandTool
-           }
-
 
 def GetEditor(object):
     cls = object.__class__
diff -urN sketch.orig/Sketch/Editor/selectiontool.py sketch/Sketch/Editor/selectiontool.py
--- sketch.orig/Sketch/Editor/selectiontool.py	2005-12-13 11:08:08.000000000 +0200
+++ sketch/Sketch/Editor/selectiontool.py	2005-12-13 11:08:07.000000000 +0200
@@ -31,7 +31,7 @@
 from Sketch.Base.const import SelectSet, SelectDrag, SELECTION, EDITED
 
 from drawer import SelectAndDrag
-from tools import ToolInstance, ToolInfo, selection_type
+from tools import ToolInstance, selection_type
 from selrect import SelRectBase, SelectionRectangle
 
 class SizeRectangle(SelectionRectangle):
@@ -343,9 +343,10 @@
 
 
 
-class SelectionToolInstance(ToolInstance):
+class SelectionTool(ToolInstance):
 
     title = ''"Select"
+    active_cursor = True
 
     def __init__(self, editor):
         ToolInstance.__init__(self, editor)
@@ -453,6 +454,3 @@
             handles = []
         return handles
 
-
-SelectionTool = ToolInfo("SelectionTool", SelectionToolInstance,
-                         active_cursor = 1)
diff -urN sketch.orig/Sketch/Editor/texttool.py sketch/Sketch/Editor/texttool.py
--- sketch.orig/Sketch/Editor/texttool.py	2005-12-13 11:08:08.000000000 +0200
+++ sketch/Sketch/Editor/texttool.py	2005-12-13 11:08:07.000000000 +0200
@@ -331,9 +331,11 @@
             self.SetCaret(caret)
 
 
-class TextToolInstance(tools.ToolInstance):
+class TextTool(tools.ToolInstance):
 
     title = ''"Text"
+    cursor = 'CurText'
+    active_cursor = True
 
     def __init__(self, editor):
         tools.ToolInstance.__init__(self, editor)
@@ -458,9 +460,6 @@
         if self.texteditor is not None and info is not None:
             self.texteditor.SetCaret(info)
 
-TextTool = tools.ToolInfo("TextTool", TextToolInstance, cursor = 'CurText',
-                          active_cursor = 1)
-
 #
 #
 #
diff -urN sketch.orig/Sketch/Editor/tools.py sketch/Sketch/Editor/tools.py
--- sketch.orig/Sketch/Editor/tools.py	2005-12-13 11:08:08.000000000 +0200
+++ sketch/Sketch/Editor/tools.py	2005-12-13 11:08:07.000000000 +0200
@@ -43,9 +43,26 @@
         type = SelectSet
     return type
 
+toolmap = {}
+
+class RegisteredTool(type):
+    """Register the tools that have a non empty title attribute"""
+    def __new__(cls, class_name, bases, class_dict):
+        if class_dict.get('title'):
+            class_dict['name'] = class_name
+            class_dict['icon'] = class_name
+        new_class = type.__new__(cls, class_name, bases, class_dict)
+        toolmap[class_name] = new_class
+        return new_class
 
 class ToolInstance:
 
+    __metaclass__ = RegisteredTool
+
+    title = ''
+    cursor = 'CurStd'
+    active_cursor = False
+
     def __init__(self, editor):
         self.editor = editor
         self.document = editor.Document()
@@ -168,35 +185,10 @@
         pass
 
 
-class ToolInfo:
-
-    def __init__(self, name, editor_tool, cursor = 'CurStd',
-                 active_cursor = 0, icon = ''):
-        self.name = name
-        self.editor_tool = editor_tool
-        self.cursor = cursor
-        self.active_cursor = active_cursor
-        if not icon:
-            icon = self.name
-        self.icon = icon
-
-    def Title(self):
-        return self.editor_tool.title
-
-    def Instantiate(self, editor):
-        return self.editor_tool(editor)
-
-    def __cmp__(self, other):
-        # This is perhaps a bit too much syntactic sugar: make it
-        # possible to compare tools with their names given as strings.
-        if isinstance(other, StringType):
-            return cmp(self.name, other)
-        return cmp(id(self), id(other))
-
-
-class ZoomToolInstance(ToolInstance):
+class ZoomTool(ToolInstance):
 
     title = ''"Zoom"
+    cursor = 'CurZoom'
 
     def ButtonPress(self, context, p, snapped, button, state, handle = None):
         ToolInstance.ButtonPress(self, context, p, snapped, button, state,
@@ -215,11 +207,11 @@
                                  handle = None)
         context.zoom_point(p, out = state & const.ZoomOutMask)
 
-ZoomTool = ToolInfo("ZoomTool", ZoomToolInstance, cursor = 'CurZoom')
-
 
 class DrawToolInstance(ToolInstance):
 
+    cursor = 'CurDraw'
+
     def __init__(self, editor, object_class):
         ToolInstance.__init__(self, editor)
         self.object_class = object_class
@@ -237,27 +229,23 @@
             self.editor.Insert(object.CreatedObject())
 
 
-class RectangleToolInstance(DrawToolInstance):
+class RectangleTool(DrawToolInstance):
 
     title = ''"Rectangle"
 
     def __init__(self, editor):
         DrawToolInstance.__init__(self, editor, Sketch.Editor.RectangleCreator)
 
-RectangleTool = ToolInfo("RectangleTool", RectangleToolInstance,
-                         cursor = 'CurDraw', icon = 'CreateRect')
 
-class EllipseToolInstance(DrawToolInstance):
+class EllipseTool(DrawToolInstance):
 
     title = ''"Ellipse"
 
     def __init__(self, editor):
         DrawToolInstance.__init__(self, editor, Sketch.Editor.EllipseCreator)
 
-EllipseTool = ToolInfo("EllipseTool", EllipseToolInstance, cursor = 'CurDraw',
-                       icon = 'CreateEllipse')
 
-class FreehandToolInstance(DrawToolInstance):
+class FreehandTool(DrawToolInstance):
 
     title = ''"Freehand"
 
@@ -275,12 +263,10 @@
             self.editor.Insert(object)
 
 
-FreehandTool = ToolInfo("FreehandTool", FreehandToolInstance,
-                        cursor = 'CurDraw', icon = 'CreateFreehand')
-
-
 class PolyDrawToolInstance(ToolInstance):
 
+    cursor = 'CurDraw'
+
     def __init__(self, editor, object_class):
         ToolInstance.__init__(self, editor)
         self.object_class = object_class
@@ -322,7 +308,7 @@
             self.editor.Insert(object.CreatedObject())
 
 
-class PolyBezierToolInstance(PolyDrawToolInstance):
+class PolyBezierTool(PolyDrawToolInstance):
 
     title = ''"Curves"
 
@@ -330,17 +316,11 @@
         PolyDrawToolInstance.__init__(self, editor,
                                       Sketch.Editor.PolyBezierCreator)
 
-PolyBezierTool = ToolInfo("PolyBezierTool", PolyBezierToolInstance,
-                          cursor = 'CurDraw', icon = 'CreateCurve')
-
 
-class PolyLineToolInstance(PolyDrawToolInstance):
+class PolyLineTool(PolyDrawToolInstance):
 
     title = ''"Polylines"
 
     def __init__(self, editor):
         PolyDrawToolInstance.__init__(self, editor,
                                       Sketch.Editor.PolyLineCreator)
-
-PolyLineTool = ToolInfo("PolyLineTool", PolyLineToolInstance,
-                        cursor = 'CurDraw', icon = 'CreatePoly')
diff -urN sketch.orig/Sketch/Pixmaps/CreateCurve.xpm sketch/Sketch/Pixmaps/CreateCurve.xpm
--- sketch.orig/Sketch/Pixmaps/CreateCurve.xpm	2005-12-13 11:08:09.000000000 +0200
+++ sketch/Sketch/Pixmaps/CreateCurve.xpm	1970-01-01 02:00:00.000000000 +0200
@@ -1,33 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 24 2 1",
-/* colors */
-"  c #000",
-". c none",
-/* pixels */
-"........................",
-"........................",
-"........................",
-"................... ....",
-"..................   ...",
-"..................   ...",
-"................. .. ...",
-"................. . ....",
-"................ .. ....",
-"................ . .....",
-"............... .. .....",
-"............... . ......",
-".............. .. ......",
-".............. . .......",
-"......    ....  ........",
-"....  ....  .. .........",
-"... ........  ....... ..",
-".. ...........  .... ...",
-".. .............    ....",
-"........................",
-"........................",
-"........................",
-"........................",
-"........................"
-};
diff -urN sketch.orig/Sketch/Pixmaps/CreateEllipse.xpm sketch/Sketch/Pixmaps/CreateEllipse.xpm
--- sketch.orig/Sketch/Pixmaps/CreateEllipse.xpm	2005-12-13 11:08:09.000000000 +0200
+++ sketch/Sketch/Pixmaps/CreateEllipse.xpm	1970-01-01 02:00:00.000000000 +0200
@@ -1,33 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 24 2 1",
-/* colors */
-"  c #000",
-". c none",
-/* pixels */
-"........................",
-"..................... ..",
-"....................   .",
-"....................   .",
-"................... .. .",
-"................... . ..",
-".................. .. ..",
-".................. . ...",
-"................. .. ...",
-"......      ..... . ....",
-"...   ......   . .. ....",
-".. ............  . .....",
-". ..............  ......",
-". .............. .......",
-". .............. .......",
-". .............. .......",
-".. ............ ........",
-"...   ......   .........",
-"......      ............",
-"........................",
-"........................",
-"........................",
-"........................",
-"........................"
-};
diff -urN sketch.orig/Sketch/Pixmaps/CreateFreehand.xpm sketch/Sketch/Pixmaps/CreateFreehand.xpm
--- sketch.orig/Sketch/Pixmaps/CreateFreehand.xpm	2005-12-13 11:08:09.000000000 +0200
+++ sketch/Sketch/Pixmaps/CreateFreehand.xpm	1970-01-01 02:00:00.000000000 +0200
@@ -1,30 +0,0 @@
-/* XPM */
-static char * CreateFreehand_xpm[] = {
-"24 24 3 1",
-" 	c None",
-".	c #000000",
-"+	c #FFFFFF",
-"                        ",
-"                        ",
-"                        ",
-"                        ",
-"                     .  ",
-"                    ... ",
-"    .....           ... ",
-"   ..   ..         .  . ",
-"   .     .         . .  ",
-"   .     .        .  .  ",
-"    .    .        . .   ",
-"     ..  ....    .  .   ",
-"      ..    .    . .    ",
-"       ..    .  .  .    ",
-"        .    .  . .     ",
-"    .....    .  ..      ",
-"    .        .. .       ",
-"    ..        ...       ",
-"     .                  ",
-"    .                   ",
-" ....                   ",
-"                        ",
-"                        ",
-"                        "};
diff -urN sketch.orig/Sketch/Pixmaps/CreateLine.xpm sketch/Sketch/Pixmaps/CreateLine.xpm
--- sketch.orig/Sketch/Pixmaps/CreateLine.xpm	2005-12-13 11:08:09.000000000 +0200
+++ sketch/Sketch/Pixmaps/CreateLine.xpm	1970-01-01 02:00:00.000000000 +0200
@@ -1,33 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 24 2 1",
-/* colors */
-"  c #000",
-". c none",
-/* pixels */
-"........................",
-"........................",
-"........................",
-"........................",
-"..................... ..",
-"....................   .",
-"....................   .",
-"................... .. .",
-"................... . ..",
-".................. .. ..",
-".................. . ...",
-"................. .. ...",
-"................. . ....",
-"................ .. ....",
-"................ . .....",
-"................  ......",
-".                .......",
-"........................",
-"........................",
-"........................",
-"........................",
-"........................",
-"........................",
-"........................"
-};
diff -urN sketch.orig/Sketch/Pixmaps/CreatePoly.xpm sketch/Sketch/Pixmaps/CreatePoly.xpm
--- sketch.orig/Sketch/Pixmaps/CreatePoly.xpm	2005-12-13 11:08:09.000000000 +0200
+++ sketch/Sketch/Pixmaps/CreatePoly.xpm	1970-01-01 02:00:00.000000000 +0200
@@ -1,33 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 24 2 1",
-/* colors */
-"  c #000",
-". c none",
-/* pixels */
-"........................",
-"........................",
-"........................",
-"...    .................",
-".......    ......... ...",
-".......... ........   ..",
-"......... .........   ..",
-"......... ........ .. ..",
-"........ ......... . ...",
-"........ ........ .. ...",
-"....... ......... . ....",
-"....... ........ .. ....",
-"...... ......... . .....",
-"...... ........ .. .....",
-"....... ....... . ......",
-"....... .......  .......",
-"........ ...... ........",
-"........ ..... .........",
-"......... ... ..........",
-"......... .. ...........",
-"..........  ............",
-".......... .............",
-"........................",
-"........................"
-};
diff -urN sketch.orig/Sketch/Pixmaps/CreateRect.xpm sketch/Sketch/Pixmaps/CreateRect.xpm
--- sketch.orig/Sketch/Pixmaps/CreateRect.xpm	2005-12-13 11:08:09.000000000 +0200
+++ sketch/Sketch/Pixmaps/CreateRect.xpm	1970-01-01 02:00:00.000000000 +0200
@@ -1,33 +0,0 @@
-/* XPM */
-static char *noname[] = {
-/* width height ncolors chars_per_pixel */
-"24 24 2 1",
-/* colors */
-"  c #000",
-". c none",
-/* pixels */
-"........................",
-"........................",
-"........................",
-"..              ........",
-".. ............ ........",
-".. ............ ........",
-".. ............ ........",
-".. ............ ..... ..",
-".. ............ ....   .",
-".. ............ ....   .",
-".. ............ ... .. .",
-".. ............ ... . ..",
-".. ............ .. .. ..",
-".. ............ .. . ...",
-".. ............ . .. ...",
-".. ............ . . ....",
-".. ............  .. ....",
-".. ............  . .....",
-".. ............   ......",
-"..               .......",
-"........................",
-"........................",
-"........................",
-"........................"
-};
diff -urN sketch.orig/Sketch/Pixmaps/EllipseTool.xpm sketch/Sketch/Pixmaps/EllipseTool.xpm
--- sketch.orig/Sketch/Pixmaps/EllipseTool.xpm	1970-01-01 02:00:00.000000000 +0200
+++ sketch/Sketch/Pixmaps/EllipseTool.xpm	2005-12-13 11:08:08.000000000 +0200
@@ -0,0 +1,33 @@
+/* XPM */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"24 24 2 1",
+/* colors */
+"  c #000",
+". c none",
+/* pixels */
+"........................",
+"..................... ..",
+"....................   .",
+"....................   .",
+"................... .. .",
+"................... . ..",
+".................. .. ..",
+".................. . ...",
+"................. .. ...",
+"......      ..... . ....",
+"...   ......   . .. ....",
+".. ............  . .....",
+". ..............  ......",
+". .............. .......",
+". .............. .......",
+". .............. .......",
+".. ............ ........",
+"...   ......   .........",
+"......      ............",
+"........................",
+"........................",
+"........................",
+"........................",
+"........................"
+};
diff -urN sketch.orig/Sketch/Pixmaps/FreehandTool.xpm sketch/Sketch/Pixmaps/FreehandTool.xpm
--- sketch.orig/Sketch/Pixmaps/FreehandTool.xpm	1970-01-01 02:00:00.000000000 +0200
+++ sketch/Sketch/Pixmaps/FreehandTool.xpm	2005-12-13 11:08:08.000000000 +0200
@@ -0,0 +1,30 @@
+/* XPM */
+static char * CreateFreehand_xpm[] = {
+"24 24 3 1",
+" 	c None",
+".	c #000000",
+"+	c #FFFFFF",
+"                        ",
+"                        ",
+"                        ",
+"                        ",
+"                     .  ",
+"                    ... ",
+"    .....           ... ",
+"   ..   ..         .  . ",
+"   .     .         . .  ",
+"   .     .        .  .  ",
+"    .    .        . .   ",
+"     ..  ....    .  .   ",
+"      ..    .    . .    ",
+"       ..    .  .  .    ",
+"        .    .  . .     ",
+"    .....    .  ..      ",
+"    .        .. .       ",
+"    ..        ...       ",
+"     .                  ",
+"    .                   ",
+" ....                   ",
+"                        ",
+"                        ",
+"                        "};
diff -urN sketch.orig/Sketch/Pixmaps/PolyBezierTool.xpm sketch/Sketch/Pixmaps/PolyBezierTool.xpm
--- sketch.orig/Sketch/Pixmaps/PolyBezierTool.xpm	1970-01-01 02:00:00.000000000 +0200
+++ sketch/Sketch/Pixmaps/PolyBezierTool.xpm	2005-12-13 11:08:08.000000000 +0200
@@ -0,0 +1,33 @@
+/* XPM */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"24 24 2 1",
+/* colors */
+"  c #000",
+". c none",
+/* pixels */
+"........................",
+"........................",
+"........................",
+"................... ....",
+"..................   ...",
+"..................   ...",
+"................. .. ...",
+"................. . ....",
+"................ .. ....",
+"................ . .....",
+"............... .. .....",
+"............... . ......",
+".............. .. ......",
+".............. . .......",
+"......    ....  ........",
+"....  ....  .. .........",
+"... ........  ....... ..",
+".. ...........  .... ...",
+".. .............    ....",
+"........................",
+"........................",
+"........................",
+"........................",
+"........................"
+};
diff -urN sketch.orig/Sketch/Pixmaps/PolyLineTool.xpm sketch/Sketch/Pixmaps/PolyLineTool.xpm
--- sketch.orig/Sketch/Pixmaps/PolyLineTool.xpm	1970-01-01 02:00:00.000000000 +0200
+++ sketch/Sketch/Pixmaps/PolyLineTool.xpm	2005-12-13 11:08:08.000000000 +0200
@@ -0,0 +1,33 @@
+/* XPM */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"24 24 2 1",
+/* colors */
+"  c #000",
+". c none",
+/* pixels */
+"........................",
+"........................",
+"........................",
+"...    .................",
+".......    ......... ...",
+".......... ........   ..",
+"......... .........   ..",
+"......... ........ .. ..",
+"........ ......... . ...",
+"........ ........ .. ...",
+"....... ......... . ....",
+"....... ........ .. ....",
+"...... ......... . .....",
+"...... ........ .. .....",
+"....... ....... . ......",
+"....... .......  .......",
+"........ ...... ........",
+"........ ..... .........",
+"......... ... ..........",
+"......... .. ...........",
+"..........  ............",
+".......... .............",
+"........................",
+"........................"
+};
diff -urN sketch.orig/Sketch/Pixmaps/RectangleTool.xpm sketch/Sketch/Pixmaps/RectangleTool.xpm
--- sketch.orig/Sketch/Pixmaps/RectangleTool.xpm	1970-01-01 02:00:00.000000000 +0200
+++ sketch/Sketch/Pixmaps/RectangleTool.xpm	2005-12-13 11:08:08.000000000 +0200
@@ -0,0 +1,33 @@
+/* XPM */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"24 24 2 1",
+/* colors */
+"  c #000",
+". c none",
+/* pixels */
+"........................",
+"........................",
+"........................",
+"..              ........",
+".. ............ ........",
+".. ............ ........",
+".. ............ ........",
+".. ............ ..... ..",
+".. ............ ....   .",
+".. ............ ....   .",
+".. ............ ... .. .",
+".. ............ ... . ..",
+".. ............ .. .. ..",
+".. ............ .. . ...",
+".. ............ . .. ...",
+".. ............ . . ....",
+".. ............  .. ....",
+".. ............  . .....",
+".. ............   ......",
+"..               .......",
+"........................",
+"........................",
+"........................",
+"........................"
+};
diff -urN sketch.orig/Sketch/UI/skpixmaps.py sketch/Sketch/UI/skpixmaps.py
--- sketch.orig/Sketch/UI/skpixmaps.py	2005-12-13 11:08:09.000000000 +0200
+++ sketch/Sketch/UI/skpixmaps.py	2005-12-13 11:08:08.000000000 +0200
@@ -60,8 +60,8 @@
 bitmaps = SketchBitmaps()
 
 _pixmap_names = ['SelectionTool', 'EditTool', 'ZoomTool', 'TextTool',
-                 'CreateRect', 'CreateCurve', 'CreateEllipse', 'CreatePoly',
-                 'CreateFreehand',
+                 'RectangleTool', 'PolyBezierTool', 'EllipseTool',
+                 'PolyLineTool', 'FreehandTool',
                  'tree_layer', 'tree_object', 'tree_ellipse', 'tree_group',
                  'tree_rectangle',
                  'LightBulbOn', 'LightBulbOff', 
diff -urN sketch.orig/Sketch/UI/toolbox.py sketch/Sketch/UI/toolbox.py
--- sketch.orig/Sketch/UI/toolbox.py	2005-12-13 11:08:09.000000000 +0200
+++ sketch/Sketch/UI/toolbox.py	2005-12-13 11:08:08.000000000 +0200
@@ -44,8 +44,8 @@
 
 
 tools = ['SelectionTool', 'EditTool', 'ZoomTool',
-         'CreateRect', 'CreatePoly', 'CreateFreehand',
-         'CreateEllipse', 'CreateCurve', 'TextTool']
+         'RectangleTool', 'PolyLineTool', 'FreehandTool',
+         'EllipseTool', 'PolyBezierTool', 'TextTool']
 
 
 class ToolButton(Publisher, gtk.ToggleButton):
@@ -132,7 +132,7 @@
             button.add(image)
             button.set_mode(0)
             self.context.Subscribe(TOOL, button.ToolChanged)
-            self.application.tooltips.set_tip(button, tool.Title())
+            self.application.tooltips.set_tip(button, tool.title)
             self.table.attach(button, x, x + 1, y, y + 1, 0, 0)
 
         self.window.show_all()
diff -urN sketch.orig/test/ChangeLog sketch/test/ChangeLog
--- sketch.orig/test/ChangeLog	2005-12-13 11:08:09.000000000 +0200
+++ sketch/test/ChangeLog	2005-12-13 11:08:08.000000000 +0200
@@ -1,3 +1,25 @@
+2005-12-12
+
+	* test_doceditor.py: Remove ToolInfo import and use the new tool
+	names.
+	(MockToolInstance, MockTool): Rename MockToolInstance to MockTool and
+	add the "title" attribute.
+	(TestEditorWithSelectionTools.test_set_tool): Use MockTool instead of
+	MockToolInstance
+	(TestEditorWithSelectionTools.test_set_tool_with_unfinished_poly_line,
+	TestEditorWithSelectionTools.test_switch_tool_before_release_simple,
+	TestEditorWithSelectionTools.test_switch_tool_before_release): Use
+	"RectangleTool" instead of "CreateRect" and "EllipseTool" instead of
+	"CreateEllipse" when setting the tool.
+	(TestEditorWithSelectionTools.test_set_tool_with_unfinished_poly_line,
+	TestEditorWithSelectionTools.test_create_poly_tool_single,
+	TestEditorWithSelectionTools.test_create_poly_tool_click,
+	TestEditorWithSelectionTools.test_create_poly_tool_multiple): Use
+	"PolyLineTool" instead of "CreatePoly" when setting the tool.
+
+	* test_aligntool.py: Use AlignTool instead of AlignToolInstance and
+	SelectionTool instead of SelectionToolInstance.
+
 2005-11-27  Bernhard Herzog  <bh@intevation.de>
 
 	* support.py: Fix typos and tweak the wording of some doc-strings.
diff -urN sketch.orig/test/test_aligntool.py sketch/test/test_aligntool.py
--- sketch.orig/test/test_aligntool.py	2005-12-13 11:08:09.000000000 +0200
+++ sketch/test/test_aligntool.py	2005-12-13 11:08:08.000000000 +0200
@@ -65,8 +65,8 @@
 from Sketch import Trafo, Identity, Point, Rectangle, UnionRects, Rect
 from Sketch.Editor import EditorWithSelection, InteractiveDocument, Context, \
      Button1Mask, ShiftMask, ControlMask, HandleAlignL, Registry
-from Sketch.Editor.aligntool import AlignToolInstance
-from Sketch.Editor.selectiontool import SelectionToolInstance
+from Sketch.Editor.aligntool import AlignTool
+from Sketch.Editor.selectiontool import SelectionTool
 from Sketch.Base.const import SelectSet, SelectAdd, TOOL, SHAPE
 
 from test_doceditor import MockCanvas, MockGC, RecordingMockGC, \
@@ -178,7 +178,7 @@
                                                      self.r3])
         self.assertEquals(self.layer.GetObjects(), [self.r1, self.r2,
                                                      self.r3, self.r4])
-        self.failUnless(isinstance(editor.Tool(), AlignToolInstance))
+        self.failUnless(isinstance(editor.Tool(), AlignTool))
 
     #
     # Test mouse interaction - selecting and deselecting with clicks
@@ -277,7 +277,7 @@
                                                      self.r3])
         self.assertEquals(editor.LastSelectedObjects(), [self.r1, self.r2,
                                                      self.r3])
-        self.failUnless(isinstance(editor.Tool(), SelectionToolInstance))
+        self.failUnless(isinstance(editor.Tool(), SelectionTool))
 
     #
     # Test mouse interaction - selecting and deselecting with
@@ -401,7 +401,7 @@
 
     def check_before(self, after_undo):
         editor = self.editor
-        self.failUnless(isinstance(editor.Tool(), AlignToolInstance))
+        self.failUnless(isinstance(editor.Tool(), AlignTool))
         self.assertEquals(editor.LastSelectedObjects(), [self.r2])
         self.assertEquals(editor.SelectedObjects(), [self.r1, self.r2,
                                                      self.r3])
@@ -409,7 +409,7 @@
 
     def check_after(self, after_redo):
         editor = self.editor
-        self.failUnless(isinstance(editor.Tool(), AlignToolInstance))
+        self.failUnless(isinstance(editor.Tool(), AlignTool))
         self.assertEquals(editor.LastSelectedObjects(), [self.r2])
         self.assertEquals(editor.SelectedObjects(), [self.r1, self.r2,
                                                      self.r3])
@@ -425,7 +425,7 @@
 
     def check_before(self, after_undo):
         editor = self.editor
-        self.failUnless(isinstance(editor.Tool(), AlignToolInstance))
+        self.failUnless(isinstance(editor.Tool(), AlignTool))
         self.assertEquals(editor.LastSelectedObjects(), [self.r2])
         self.assertEquals(editor.SelectedObjects(), [self.r1, self.r2,
                                                      self.r3])
@@ -433,7 +433,7 @@
 
     def check_after(self, after_redo):
         editor = self.editor
-        self.failUnless(isinstance(editor.Tool(), AlignToolInstance))
+        self.failUnless(isinstance(editor.Tool(), AlignTool))
         self.assertEquals(editor.LastSelectedObjects(), [self.r2])
         self.assertEquals(editor.SelectedObjects(), [self.r1, self.r2,
                                                      self.r3])
diff -urN sketch.orig/test/test_doceditor.py sketch/test/test_doceditor.py
--- sketch.orig/test/test_doceditor.py	2005-12-13 11:08:09.000000000 +0200
+++ sketch/test/test_doceditor.py	2005-12-13 11:08:08.000000000 +0200
@@ -44,7 +44,7 @@
 from Sketch.Graphics.base import Primitive
 from Sketch.Editor import EditorWithSelection, InteractiveDocument, Context, \
      toolmap, Button1Mask, ShiftMask, ControlMask, HandleSelectedNode
-from Sketch.Editor.tools import ToolInstance, ToolInfo
+from Sketch.Editor.tools import ToolInstance
 
 
 class TestEditorWithSelection(unittest.TestCase):
@@ -138,12 +138,14 @@
         self.received_messages.append(args)
 
 
-class MockToolInstance(ToolInstance):
+class MockTool(ToolInstance):
 
     """
     ToolInstance that records whether some of the methods have been called
     """
 
+    title = "Mock Tool"
+
     def __init__(self, *args):
         ToolInstance.__init__(self, *args)
         self.called_methods = []
@@ -179,7 +181,6 @@
         ToolInstance.End(self)
         self.called_methods.append(("End",))
 
-MockTool = ToolInfo("MockTool", MockToolInstance, cursor = 'CurZoom')
 
 class MockCanvas:
 
@@ -286,7 +287,7 @@
         # used and select another tool
         editor.SetTool("MockTool")
         mock_tool = editor.Tool()
-        self.assert_(isinstance(mock_tool, MockToolInstance))
+        self.assert_(isinstance(mock_tool, MockTool))
         editor.SetTool("SelectionTool")
 
         # Now the mock tool's End method should have been called and a
@@ -366,13 +367,13 @@
         """Test EditorWithSelection.SetTool() with unfinished poly line
 
         Test for savannah bugs #3760 and #3918.  applies to both
-        PolyBezierToolInstance and PolyLineToolInstance.
+        PolyBezierTool and PolyLineTool.
         """
         editor = self.editor
         canvas = MockCanvas()
 
         # Start creating a poly line with a singe click-drag-release
-        editor.SetTool("CreatePoly")
+        editor.SetTool("PolyLineTool")
         editor.ButtonPress(canvas, Point(0, 0), 1, 0)
         editor.PointerMotion(canvas, Point(10, 10), Button1Mask)
         editor.ButtonRelease(canvas, Point(10, 10), 1, Button1Mask)
@@ -384,7 +385,7 @@
         # In this state we switch the tools.  This should result in the
         # poly line being inserted into the document.  The bug was an
         # exception during this.
-        editor.SetTool("CreateRect")
+        editor.SetTool("RectangleTool")
 
         # If all went well the object has been inserted and is now the
         # selected object
@@ -393,13 +394,13 @@
         self.failUnless(obj.is_Bezier)
 
     def test_create_poly_tool_single(self):
-        """Test EditorWithSelection and CreatePoly single press/drag/release
+        """Test EditorWithSelection and PolyLineTool single press/drag/release
         """
         editor = self.editor
         canvas = MockCanvas()
 
         # Start creating a poly line with a single click-drag-release
-        editor.SetTool("CreatePoly")
+        editor.SetTool("PolyLineTool")
         editor.ButtonPress(canvas, Point(0, 0), 1, 0)
         editor.PointerMotion(canvas, Point(10, 10), Button1Mask)
         editor.ButtonRelease(canvas, Point(10, 10), 1, Button1Mask)
@@ -418,7 +419,7 @@
                            (10, 10, ContAngle)])
 
     def test_create_poly_tool_click(self):
-        """Test EditorWithSelection and CreatePoly starting with click
+        """Test EditorWithSelection and PolyLineTool starting with click
         """
         editor = self.editor
         canvas = MockCanvas()
@@ -426,7 +427,7 @@
         # Start creating a poly line with a click for the first point
         # and a click-drag-release for the second.  Then finish with a
         # middle button click
-        editor.SetTool("CreatePoly")
+        editor.SetTool("PolyLineTool")
         editor.ButtonPress(canvas, Point(0, 0), 1, 0)
         editor.ButtonRelease(canvas, Point(0, 0), 1, Button1Mask)
         editor.ButtonPress(canvas, Point(8, 2), 1, 0)
@@ -445,13 +446,13 @@
                            (10, 0, ContAngle)])
 
     def test_create_poly_tool_multiple(self):
-        """Test EditorWithSelection and CreatePoly multiple press/drag/release
+        """Test EditorWithSelection and PolyLineTool multiple press/drag/release
         """
         editor = self.editor
         canvas = MockCanvas()
 
         # Start creating a poly line with a singe click-drag-release
-        editor.SetTool("CreatePoly")
+        editor.SetTool("PolyLineTool")
         editor.ButtonPress(canvas, Point(0, 0), 1, 0)
         editor.PointerMotion(canvas, Point(10, 0), Button1Mask)
         editor.ButtonRelease(canvas, Point(10, 0), 1, Button1Mask)
@@ -486,11 +487,11 @@
         canvas = MockCanvas()
 
         # Start creating a rectangle with click-drag-release
-        editor.SetTool("CreateRect")
+        editor.SetTool("RectangleTool")
         editor.ButtonPress(canvas, Point(0, 0), 1, 0)
         editor.PointerMotion(canvas, Point(10, 10), Button1Mask)
         # Switch the tool:
-        editor.SetTool("CreateEllipse")
+        editor.SetTool("EllipseTool")
         # ButtonRelease should not cause errors:
         editor.ButtonRelease(canvas, Point(10, 10), 1, Button1Mask)
 
@@ -507,7 +508,7 @@
         canvas.inverting_device = RecordingMockGC('DrawRectangle')
 
         # Start creating a rectangle with click-drag-release
-        editor.SetTool("CreateRect")
+        editor.SetTool("RectangleTool")
         editor.ButtonPress(canvas, Point(0, 0), 1, 0)
         self.assertEquals(canvas.inverting_device.called_methods,
                           [('DrawRectangle', (Point(0, 0), Point(0, 0)), {})])
@@ -522,7 +523,7 @@
         # Now we have started to create the rectangle.
         # In this state we switch the tools.
         # This should cancel the rectangle tool and clear the canvas.
-        editor.SetTool("CreateEllipse")
+        editor.SetTool("EllipseTool")
 
         # Now the inverting_device should be cleaned up; in the
         # end each method should have been called twice with the same
