From 5e07389d79dbb25ecb819a89550e2a087a840c6a Mon Sep 17 00:00:00 2001 From: Alexandre Antonino Gonçalves Martinazzo Date: Tue, 11 Sep 2007 22:09:33 +0000 Subject: Tools Toolbar modified (it is the only one for now) Each tool has its own controls only into its palette; size, shape and fill color are chosen there All toolbox.ToolsToolbar features were adapted to the new tool description used in Area module --- (limited to 'Area.py') diff --git a/Area.py b/Area.py index e2ffa62..448ee45 100644 --- a/Area.py +++ b/Area.py @@ -912,7 +912,9 @@ class Area(gtk.DrawingArea): print tool self.tool = tool['name'] - self.configure_line(tool['size']) + + if tool['size'] is not None: + self.configure_line(tool['size']) if tool['fill color'] is not None: self.set_fill_color(tool['fill color']) @@ -940,4 +942,10 @@ class Area(gtk.DrawingArea): self.polygon_sides = tool['points'] #TODO: set cursors (?) + try: + pixbuf = gtk.gdk.pixbuf_new_from_file('./images/' + tool['name'] + '.png') + cursor = gtk.gdk.Cursor(gtk.gdk.display_get_default() , pixbuf, 6, 21) + except gobject.GError: + cursor = None + self.window.set_cursor(cursor) -- cgit v0.9.1