Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Area.py
diff options
context:
space:
mode:
authorAlexandre Antonino Gonçalves Martinazzo <alexandremartinazzo@gmail.com>2007-09-11 22:09:33 (GMT)
committer Alexandre Antonino Gonçalves Martinazzo <alexandremartinazzo@gmail.com>2007-09-11 22:09:33 (GMT)
commit5e07389d79dbb25ecb819a89550e2a087a840c6a (patch)
tree0d1359bdaaf504b5129090fbdf2b91cc22eb4e22 /Area.py
parentf3a3965e9b1baac7e30c0e55eb851fc2b30aa836 (diff)
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
Diffstat (limited to 'Area.py')
-rw-r--r--Area.py10
1 files changed, 9 insertions, 1 deletions
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)