Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/LoopSettings.py
diff options
context:
space:
mode:
authorOli <olivier.belanger@umontreal.ca>2007-07-21 01:00:17 (GMT)
committer Oli <olivier.belanger@umontreal.ca>2007-07-21 01:00:17 (GMT)
commitb92cff136e1b7d77906a3da4fd984435180fb389 (patch)
tree435ab203f1092d2bdc5732bf4759e5237f1e8862 /Util/LoopSettings.py
parentbd4e4e6811256ea2983791a9073f677f826633c4 (diff)
loop settings
Diffstat (limited to 'Util/LoopSettings.py')
-rw-r--r--Util/LoopSettings.py13
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'])