@ -66,6 +66,7 @@ class Data(template.engine.sequencer.Score):
#Create three tracks with their first pattern activated, so 'play' after startup already produces sounding notes. This is less confusing for a new user.
#self.tracks is created in the template.
self._emptyFile=True
self.addTrack(name="Melody A",color="#ffff00")
self.addTrack(name="Chords A",color="#0055ff")
self.addTrack(name="Bass A",color="#00ff00")
@ -107,6 +108,19 @@ class Data(template.engine.sequencer.Score):
self.sortTracks()
self._duringFileLoadGroupIndicator=False
defsetLanguageForEmptyFile(self,language):
"""Only use in api.startEngine. Overrides the empty.
@ -207,6 +207,7 @@ class MainWindow(TemplateMainWindow):
#Toolbar, which needs the widgets above already established
self._populateToolbar()
api.session.data.setLanguageForEmptyFile(language=QtCore.QLocale().languageToString(QtCore.QLocale().language()))#TODO: this is a hack because we access the session directly. But this is also a function tied to Qts language string. Two wrongs...
self.start()#This shows the GUI, or not, depends on the NSM gui save setting. We need to call that after the menu, otherwise the about dialog will block and then we get new menu entries, which looks strange.
#There is always a track. Forcing that to be active is better than having to hide all the pattern widgets, or to disable them.