diff options
author | Gonzalo Odiard <godiard@sugarlabs.org> | 2011-05-12 17:26:41 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@sugarlabs.org> | 2011-05-12 17:26:41 (GMT) |
commit | afecca36600205998891e6c08f5b4c85fbfa60fe (patch) | |
tree | 8603fd0d32698b59c8738c8ac693a8b8bc57517a /Area.py | |
parent | fb49407a8ec953639547deb0bc7741b7593ad8bb (diff) |
Change the cursor to clock when effects applied - OLPC #10563
Diffstat (limited to 'Area.py')
-rw-r--r-- | Area.py | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -73,7 +73,6 @@ from fill import fill from Desenho import Desenho from urlparse import urlparse - ##Tools and events manipulation are handle with this class. TARGET_URI = 0 @@ -1007,6 +1006,9 @@ class Area(gtk.DrawingArea): def _do_process(self, widget, apply_process): width, height = self.window.get_size() + self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) + self.drain_events() + if self.selmove: size = self.pixmap_sel.get_size() temp_pix = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, @@ -1045,6 +1047,11 @@ class Area(gtk.DrawingArea): self.queue_draw() if not self.selmove: self.enableUndo(widget) + self.set_tool_cursor() + + def drain_events(self, block=gtk.FALSE): + while gtk.events_pending(): + gtk.mainiteration(block) def _pixbuf2Image(self, pb): """change a pixbuf to RGB image @@ -1308,6 +1315,9 @@ class Area(gtk.DrawingArea): except AttributeError: pass + self.set_tool_cursor() + + def set_tool_cursor(self): # Setting the cursor try: cursors = {'pencil': 'pencil', @@ -1328,7 +1338,6 @@ class Area(gtk.DrawingArea): cursor = gtk.gdk.Cursor(display, pixbuf, 0, 0) except gobject.GError: cursor = None - self.window.set_cursor(cursor) def getout(self, undo=False, widget=None): |