Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgnacio Rodriguez <ignacio@sugarlabs.org>2013-12-12 20:50:19 (GMT)
committer Ignacio Rodriguez <ignacio@sugarlabs.org>2013-12-12 20:50:19 (GMT)
commitd96d19085570856ca1e2549ce77f08afcdf04f7b (patch)
tree027e62098e74d2642ebcc99a0d1b996aff5de92e
parent9d6a29af5ec0724967244cc8a64d9b512dc01651 (diff)
Corrections
-rw-r--r--Area.py7
-rw-r--r--toolbox.py6
2 files changed, 5 insertions, 8 deletions
diff --git a/Area.py b/Area.py
index 68c0e1c..f4c05b6 100644
--- a/Area.py
+++ b/Area.py
@@ -1198,7 +1198,7 @@ class Area(Gtk.DrawingArea):
self._do_process(widget, proc_grayscale)
- def invert_colors(self, widget, old_cursor, source_id, window):
+ def invert_colors(self, widget, old_cursor, window):
"""Apply invert effect.
@param self -- the Area object (GtkDrawingArea)
@@ -1206,7 +1206,7 @@ class Area(Gtk.DrawingArea):
"""
- def internal_invert(self, old_cursor, source_id, window):
+ def internal_invert(self, old_cursor, window):
# load a array with the surface data
for array_type in ['H', 'I', 'L']:
pixels = array.array(array_type)
@@ -1240,8 +1240,7 @@ class Area(Gtk.DrawingArea):
GObject.source_remove(source_id)
window.set_cursor(old_cursor)
- GObject.idle_add(internal_invert, self, old_cursor,
- source_id, window)
+ GObject.idle_add(internal_invert, self, old_cursor, window)
def mirror(self, widget, horizontal=True):
"""Apply mirror horizontal/vertical effect.
diff --git a/toolbox.py b/toolbox.py
index 0646892..acd770b 100644
--- a/toolbox.py
+++ b/toolbox.py
@@ -816,10 +816,8 @@ class ImageToolbar(Gtk.Toolbar):
def invert_colors(self, widget):
window = self.get_window()
old_cursor = window.get_cursor()
- source_id = GObject.idle_add(self.set_watch_cursor, window)
- self._activity.area.invert_colors(widget, old_cursor,
- source_id, window)
+ GObject.idle_add(self.set_watch_cursor, window)
+ self._activity.area.invert_colors(widget, old_cursor, window)
def set_watch_cursor(self, window):
window.set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
- return True