Lets save songs now

bzr-revno: 504
This commit is contained in:
Tim Bentley 2009-08-08 15:13:25 +01:00
commit dfc9dcf354
2 changed files with 5 additions and 4 deletions

View File

@ -380,11 +380,10 @@ class Ui_EditSongDialog(object):
self.verticalLayout.addWidget(self.ButtonBox)
self.retranslateUi(EditSongDialog)
self.SongTabWidget.setCurrentIndex(0)
QtCore.QObject.connect(self.ButtonBox,
QtCore.SIGNAL(u'rejected()'), EditSongDialog.close)
QtCore.QObject.connect(self.ButtonBox,
QtCore.SIGNAL(u'accepted()'), EditSongDialog.close)
QtCore.SIGNAL(u'accepted()'), EditSongDialog.accept)
QtCore.QMetaObject.connectSlotsByName(EditSongDialog)
EditSongDialog.setTabOrder(self.SongTabWidget, self.TitleEditItem)
EditSongDialog.setTabOrder(self.TitleEditItem, self.AlternativeEdit)

View File

@ -122,6 +122,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
def newSong(self):
log.debug(u'New Song')
self.SongTabWidget.setCurrentIndex(0)
self.song = Song()
self.TitleEditItem.setText(u'')
self.AlternativeEdit.setText(u'')
@ -140,6 +141,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
def loadSong(self, id):
log.debug(u'Load Song')
self.SongTabWidget.setCurrentIndex(0)
self.loadAuthors()
self.loadTopics()
self.loadBooks()
@ -341,8 +343,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.loadBooks()
self.loadTopics()
def onAccept(self):
log.debug(u'OnAccept')
def accept(self):
log.debug(u'accept')
if not self._validate_song():
return
self.song.title = unicode(self.TitleEditItem.displayText())