1. In the import wizard, if user goes back and next again, ensure a disabled button stays disabled.

2. Check for missing attributes in the easislides import XML

bzr-revno: 1652
This commit is contained in:
Jonathan Corwin 2011-06-21 22:09:33 +01:00
commit cb60e6e9ef
3 changed files with 27 additions and 6 deletions

View File

@ -190,6 +190,14 @@ class OpenLPWizard(QtGui.QWizard):
self.preWizard() self.preWizard()
self.performWizard() self.performWizard()
self.postWizard() self.postWizard()
else:
self.customPageChanged(pageId)
def customPageChanged(self, pageId):
"""
Called when changing to a page other than the progress page
"""
pass
def onErrorCopyToButtonClicked(self): def onErrorCopyToButtonClicked(self):
""" """

View File

@ -343,6 +343,13 @@ class SongImportForm(OpenLPWizard):
self.formatSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed, self.formatSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
QtGui.QSizePolicy.Fixed) QtGui.QSizePolicy.Fixed)
def customPageChanged(self, pageId):
"""
Called when changing to a page other than the progress page
"""
if self.page(pageId) == self.sourcePage:
self.onCurrentIndexChanged(self.formatStack.currentIndex())
def validateCurrentPage(self): def validateCurrentPage(self):
""" """
Validate the current page before moving on to the next page. Validate the current page before moving on to the next page.

View File

@ -73,14 +73,20 @@ class EasiSlidesImport(SongImport):
def _parse_song(self, song): def _parse_song(self, song):
self._success = True self._success = True
self._add_unicode_attribute(u'title', song.Title1, True) self._add_unicode_attribute(u'title', song.Title1, True)
if hasattr(song, u'Title2'):
self._add_unicode_attribute(u'alternate_title', song.Title2) self._add_unicode_attribute(u'alternate_title', song.Title2)
if hasattr(song, u'SongNumber'):
self._add_unicode_attribute(u'song_number', song.SongNumber) self._add_unicode_attribute(u'song_number', song.SongNumber)
if self.song_number == u'0': if self.song_number == u'0':
self.song_number = u'' self.song_number = u''
self._add_authors(song) self._add_authors(song)
if hasattr(song, u'Copyright'):
self._add_copyright(song.Copyright) self._add_copyright(song.Copyright)
if hasattr(song, u'LicenceAdmin1'):
self._add_copyright(song.LicenceAdmin1) self._add_copyright(song.LicenceAdmin1)
if hasattr(song, u'LicenceAdmin2'):
self._add_copyright(song.LicenceAdmin2) self._add_copyright(song.LicenceAdmin2)
if hasattr(song, u'BookReference'):
self._add_unicode_attribute(u'song_book_name', song.BookReference) self._add_unicode_attribute(u'song_book_name', song.BookReference)
self._parse_and_add_lyrics(song) self._parse_and_add_lyrics(song)
if self._success: if self._success: