diff options
author | amartin <olpc@xo-00-CE-12.localdomain> | 2007-07-20 21:08:31 (GMT) |
---|---|---|
committer | amartin <olpc@xo-00-CE-12.localdomain> | 2007-07-20 21:08:31 (GMT) |
commit | ca2dfa150f9a76f40025e5ad8a890cafe7910910 (patch) | |
tree | 27b15b7d460f7a4c70adc2effa2b7e62cd2dae60 /Util/LoopSettings.py | |
parent | aab75f49a58c50892472d81561f455efa239b5a5 (diff) | |
parent | f7c812f92e07f1e676a956bf88cb28f9a77aa0b0 (diff) |
Merge branch 'master' of git+ssh://amartin@dev.laptop.org/git/projects/tamtam
Diffstat (limited to 'Util/LoopSettings.py')
-rw-r--r-- | Util/LoopSettings.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Util/LoopSettings.py b/Util/LoopSettings.py index f90966e..f4c7ebb 100644 --- a/Util/LoopSettings.py +++ b/Util/LoopSettings.py @@ -5,19 +5,23 @@ import gobject import os from Util.ThemeWidgets import * import Config +import commands Tooltips = Config.Tooltips() class LoopSettings( gtk.VBox ): - def __init__( self, popup, playFunction, setChannelFunction ): + def __init__( self, popup, playFunction, setChannelFunction, doneLoopSettingsPopup ): gtk.VBox.__init__( self ) self.tooltips = gtk.Tooltips() self.popup = popup self.playFunction = playFunction self.setChannel = setChannelFunction + self.doneLoopSettingsPopup = doneLoopSettingsPopup self.loopedSound = False self.soundLength = 1.00 self.start = 0 self.end = 1.00 + self.dur = 0.01 + self.register = 0 self.settingsBox = gtk.HBox() self.pack_start(self.settingsBox) @@ -147,8 +151,15 @@ class LoopSettings( gtk.VBox ): ofile.write(name + ' ' + tied + ' ' + register + ' ' + melo + ' ' + category + ' ' + start + ' ' + end + ' ' + dur + '\n') ofile.close() + (s,o) = commands.getstatusoutput('cp ' + Config.SNDS_DIR + '/' + self.oldName + ' ' + Config.SNDS_DIR + '/' + name) + if self.playStopButton.get_active() == False: + self.playStopButton.set_active(True) + self.handlePlayButton(self.playStopButton) + + self.doneLoopSettingsPopup() def set_values(self, name, soundLength): + self.oldName = name self.nameEntry.set_text(name) self.soundLength = soundLength self.handleStart(self.GUI['startSlider']) |