diff options
Diffstat (limited to 'animation.py')
-rw-r--r-- | animation.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/animation.py b/animation.py index 8259bc8..29b83ab 100644 --- a/animation.py +++ b/animation.py @@ -31,6 +31,9 @@ logging.basicConfig() class Animation(gtk.Image): + __gsignals__ = {"current-frame-updated": (gobject.SIGNAL_RUN_LAST, + gobject.TYPE_NONE, + (gobject.TYPE_INT,))} def __init__(self, width, height, sleep_time=1): gtk.Image.__init__(self) @@ -111,7 +114,7 @@ class Animation(gtk.Image): elif not self._current_image != len(self.images) - 1 and self._return: self._current_image = 0 - self.set_pos(self._current_image) + self.emit("current-frame-updated", self._current_image) return True |