From 9740d80aa410e2e96c406103e90811077505d985 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Wed, 11 Feb 2009 15:19:05 +0000 Subject: Remove discard timeout_add() on stop --- diff --git a/activity.py b/activity.py index 86f3a4a..78af8d8 100644 --- a/activity.py +++ b/activity.py @@ -131,7 +131,7 @@ class MontageToolbar(gtk.Toolbar): tempo = TempoSlider(0, 99) tempo.adjustment.connect("value-changed", self._tempo_cb) tempo.set_size_request(250, -1) - tempo.set_value(5) + tempo.set_value(50) tempo_item = gtk.ToolItem() tempo_item.add(tempo) self.insert(tempo_item, -1) diff --git a/montage.py b/montage.py index b1c4515..a0c0e86 100644 --- a/montage.py +++ b/montage.py @@ -55,6 +55,9 @@ class View(gtk.EventBox): self.playing = gobject.timeout_add(self.waittime, self.playframe) def playbackwards(self): + if self.playing: + gobject.source_remove(self.playing) + self.frames = kinematic.makeframes() fsecs = self.frames.keys() fsecs.sort() @@ -68,6 +71,9 @@ class View(gtk.EventBox): self.playing = gobject.timeout_add(self.waittime, self.playframe) def playforwards(self): + if self.playing: + gobject.source_remove(self.playing) + self.frames = kinematic.makeframes() fsecs = self.frames.keys() fsecs.sort() @@ -84,7 +90,9 @@ class View(gtk.EventBox): if not self.playing: return - self.playing = False + gobject.source_remove(self.playing) + self.playing = None + # set the main window to the keyframe if not model.keys[self.kfselected].empty(): self.key.assign(model.keys[self.kfselected]) -- cgit v0.9.1