diff options
author | Nat <natcl@hotmail.com> | 2007-07-05 19:10:26 (GMT) |
---|---|---|
committer | Nat <natcl@hotmail.com> | 2007-07-05 19:10:26 (GMT) |
commit | 06839311223289f02e1a128efeb1745fcf49ca34 (patch) | |
tree | 7353184e42d9f1f883a899d5b0c3a17a2661fd39 /Edit | |
parent | 273444d0cc21603f83b0aebe9643c32839decb02 (diff) |
Save stuff
Diffstat (limited to 'Edit')
-rw-r--r-- | Edit/MainWindow.py | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/Edit/MainWindow.py b/Edit/MainWindow.py index b1650b2..e69a9b5 100644 --- a/Edit/MainWindow.py +++ b/Edit/MainWindow.py @@ -1479,38 +1479,38 @@ class MainWindow( SubActivity ): chooser.destroy() self.delay = gobject.timeout_add(1000, self.waitToSet) - def handleJournalLoad(self,file_path): - self.noteDB.deletePages( self.noteDB.pages.keys() ) - - ifile = open(file_path, 'r') - ttt = ControlStream.TamTamTable ( self.noteDB ) - ttt.parseFile(ifile) - self.trackInstrument = self.trackInstrumentDefault[:] # these will get set correctly in displayPage - self._data['track_volume'] = ttt.tracks_volume - self._data['volume'] = float(ttt.masterVolume) - self._data['tempo'] = float(ttt.tempo) - self.GUI["2volumeAdjustment"].set_value(self._data['volume']) - self.GUI["2tempoAdjustment"].set_value(self._data['tempo']) - for i in range(Config.NUMBER_OF_TRACKS): - if i == 4: - string = '2drumvolumeAdjustment' - else: - string = '2instrument' + str(i+1) + 'volumeAdjustment' - self.GUI[string].set_value(self._data['track_volume'][i]) - for tid in range(Config.NUMBER_OF_TRACKS): - self.last_clicked_instTrackID = tid - if tid == 4: - self.donePickDrum(self.trackInstrument[tid].name) - else: - self.donePickInstrument(self.trackInstrument[tid].name) - ifile.close() + def handleJournalLoad(self,file_path): + self.noteDB.deletePages( self.noteDB.pages.keys() ) + + ifile = open(file_path, 'r') + ttt = ControlStream.TamTamTable ( self.noteDB ) + ttt.parseFile(ifile) + self.trackInstrument = self.trackInstrumentDefault[:] # these will get set correctly in displayPage + self._data['track_volume'] = ttt.tracks_volume + self._data['volume'] = float(ttt.masterVolume) + self._data['tempo'] = float(ttt.tempo) + self.GUI["2volumeAdjustment"].set_value(self._data['volume']) + self.GUI["2tempoAdjustment"].set_value(self._data['tempo']) + for i in range(Config.NUMBER_OF_TRACKS): + if i == 4: + string = '2drumvolumeAdjustment' + else: + string = '2instrument' + str(i+1) + 'volumeAdjustment' + self.GUI[string].set_value(self._data['track_volume'][i]) + for tid in range(Config.NUMBER_OF_TRACKS): + self.last_clicked_instTrackID = tid + if tid == 4: + self.donePickDrum(self.trackInstrument[tid].name) + else: + self.donePickInstrument(self.trackInstrument[tid].name) + ifile.close() - self.tuneInterface.selectPages( self.noteDB.tune ) - #self.displayPage(1) + self.tuneInterface.selectPages( self.noteDB.tune ) + #self.displayPage(1) - # TODO: if deletePages() worked the first time, we wouldn't need - # this - self.noteDB.deletePages( self.noteDB.tune[0:1] ) + # TODO: if deletePages() worked the first time, we wouldn't need + # this + self.noteDB.deletePages( self.noteDB.tune[0:1] ) #----------------------------------- # Record functions |