diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2013-01-22 15:46:25 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-01-22 15:48:57 (GMT) |
commit | 4e0210968c6fb8862b6c808f783536899ade1644 (patch) | |
tree | ec8a2e6444fe5cf8396590b58832b47753460710 /Jam/Fillin.py | |
parent | 2ced9950cd6511ef1ce36673df332e11d570c1d6 (diff) |
Start port of TamTamJam to Gtk3
Using pygi-convert.sh, sugar-convert.sh and a few manual fixes.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'Jam/Fillin.py')
-rw-r--r-- | Jam/Fillin.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Jam/Fillin.py b/Jam/Fillin.py index 8588f6d..61af3cc 100644 --- a/Jam/Fillin.py +++ b/Jam/Fillin.py @@ -1,7 +1,4 @@ -import pygtk -pygtk.require( '2.0' ) -import gtk -import gobject +from gi.repository import GObject from RythmGenerator import * from common.Util.CSoundClient import new_csound_client @@ -43,7 +40,7 @@ class Fillin: def setBeats( self, nbeats ): if self.playBackTimeout != None: - gobject.source_remove( self.playBackTimeout ) + GObject.source_remove( self.playBackTimeout ) self.nbeats = nbeats self.clear() @@ -52,7 +49,7 @@ class Fillin: def setTempo( self, tempo ): self.tempo = tempo if self.playBackTimeout != None: - gobject.source_remove( self.playBackTimeout ) + GObject.source_remove( self.playBackTimeout ) self.play() def setReverb( self, reverb ): @@ -63,12 +60,12 @@ class Fillin: def play( self ): if self.playBackTimeout == None: - self.playBackTimeout = gobject.timeout_add( int(60000/self.tempo/8), self.handleClock ) + self.playBackTimeout = GObject.timeout_add( int(60000/self.tempo/8), self.handleClock ) self.handleClock() def stop( self ): if self.playBackTimeout != None: - gobject.source_remove( self.playBackTimeout ) + GObject.source_remove( self.playBackTimeout ) self.clear() def clear( self ): |