forked from openlp/openlp
wow_import implemented in to import wizard
bug fix in wizzard, so that it starts from the first page if used previously bux fix in importer, so that it resets the defualts after commiting a song to the db
This commit is contained in:
parent
3645c9400e
commit
6b6da86c54
@ -160,7 +160,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_SongImportWizard):
|
|||||||
self.openSongAddButton.setFocus()
|
self.openSongAddButton.setFocus()
|
||||||
return False
|
return False
|
||||||
elif source_format == SongFormat.WordsOfWorship:
|
elif source_format == SongFormat.WordsOfWorship:
|
||||||
if self.wordsOfWorshipListWidget.count() == 0:
|
if self.wordsOfWorshipFileListWidget.count() == 0:
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate('SongsPlugin.ImportWizardForm',
|
translate('SongsPlugin.ImportWizardForm',
|
||||||
'No Words of Worship Files Selected'),
|
'No Words of Worship Files Selected'),
|
||||||
@ -315,6 +315,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_SongImportWizard):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def setDefaults(self):
|
def setDefaults(self):
|
||||||
|
self.restart()
|
||||||
self.formatComboBox.setCurrentIndex(0)
|
self.formatComboBox.setCurrentIndex(0)
|
||||||
self.openLP2FilenameEdit.setText(u'')
|
self.openLP2FilenameEdit.setText(u'')
|
||||||
self.openLP1FilenameEdit.setText(u'')
|
self.openLP1FilenameEdit.setText(u'')
|
||||||
|
@ -29,6 +29,7 @@ from olpimport import OpenLPSongImport
|
|||||||
try:
|
try:
|
||||||
from sofimport import SofImport
|
from sofimport import SofImport
|
||||||
from oooimport import OooImport
|
from oooimport import OooImport
|
||||||
|
from wowimport import WowImport
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -63,6 +64,8 @@ class SongFormat(object):
|
|||||||
return OpenSongImport
|
return OpenSongImport
|
||||||
elif format == SongFormat.SongsOfFellowship:
|
elif format == SongFormat.SongsOfFellowship:
|
||||||
return SofImport
|
return SofImport
|
||||||
|
elif format == SongFormat.WordsOfWorship:
|
||||||
|
return WowImport
|
||||||
elif format == SongFormat.Generic:
|
elif format == SongFormat.Generic:
|
||||||
return OooImport
|
return OooImport
|
||||||
# else:
|
# else:
|
||||||
|
@ -52,6 +52,13 @@ class SongImport(QtCore.QObject):
|
|||||||
"""
|
"""
|
||||||
self.manager = manager
|
self.manager = manager
|
||||||
self.stop_import_flag = False
|
self.stop_import_flag = False
|
||||||
|
self.copyright_string = unicode(translate(
|
||||||
|
'SongsPlugin.SongImport', 'copyright'))
|
||||||
|
self.copyright_symbol = unicode(translate(
|
||||||
|
'SongsPlugin.SongImport', '\xa9'))
|
||||||
|
self.setDefaults()
|
||||||
|
|
||||||
|
def setDefaults(self):
|
||||||
self.title = u''
|
self.title = u''
|
||||||
self.song_number = u''
|
self.song_number = u''
|
||||||
self.alternate_title = u''
|
self.alternate_title = u''
|
||||||
@ -67,13 +74,7 @@ class SongImport(QtCore.QObject):
|
|||||||
self.verses = []
|
self.verses = []
|
||||||
self.versecount = 0
|
self.versecount = 0
|
||||||
self.choruscount = 0
|
self.choruscount = 0
|
||||||
self.copyright_string = unicode(translate(
|
|
||||||
'SongsPlugin.SongImport', 'copyright'))
|
|
||||||
self.copyright_symbol = unicode(translate(
|
|
||||||
'SongsPlugin.SongImport', '\xa9'))
|
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'songs_stop_import'), self.stop_import)
|
|
||||||
|
|
||||||
def stop_import(self):
|
def stop_import(self):
|
||||||
"""
|
"""
|
||||||
Sets the flag for importers to stop their import
|
Sets the flag for importers to stop their import
|
||||||
@ -298,6 +299,7 @@ class SongImport(QtCore.QObject):
|
|||||||
topic = Topic.populate(name=topictext)
|
topic = Topic.populate(name=topictext)
|
||||||
song.topics.append(topic)
|
song.topics.append(topic)
|
||||||
self.manager.save_object(song)
|
self.manager.save_object(song)
|
||||||
|
self.setDefaults()
|
||||||
|
|
||||||
def print_song(self):
|
def print_song(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user