Fix v2 song importer and various cleanups

bzr-revno: 1132
This commit is contained in:
Jon Tibble 2010-12-07 13:59:28 +00:00
commit b361064300
6 changed files with 7 additions and 8 deletions

View File

@ -306,8 +306,8 @@ def expand_tags(text):
text = text.replace(tag[u'end tag'], tag[u'end html']) text = text.replace(tag[u'end tag'], tag[u'end html'])
return text return text
from theme import ThemeLevel, ThemeXML, BackgroundGradientType, BackgroundType, \ from theme import ThemeLevel, ThemeXML, BackgroundGradientType, \
HorizontalType, VerticalType BackgroundType, HorizontalType, VerticalType
from spelltextedit import SpellTextEdit from spelltextedit import SpellTextEdit
from eventreceiver import Receiver from eventreceiver import Receiver
from imagemanager import ImageManager from imagemanager import ImageManager

View File

@ -31,7 +31,6 @@ import re
import logging import logging
from xml.dom.minidom import Document from xml.dom.minidom import Document
from xml.etree.ElementTree import ElementTree, XML
from lxml import etree, objectify from lxml import etree, objectify
from openlp.core.lib import str_to_bool from openlp.core.lib import str_to_bool

View File

@ -82,7 +82,8 @@ class AdvancedTab(SettingsTab):
self.doubleClickLiveCheckBox.setObjectName(u'doubleClickLiveCheckBox') self.doubleClickLiveCheckBox.setObjectName(u'doubleClickLiveCheckBox')
self.uiLayout.addWidget(self.doubleClickLiveCheckBox) self.uiLayout.addWidget(self.doubleClickLiveCheckBox)
# self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox) # self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox)
# self.expandServiceItemCheckBox.setObjectName(u'expandServiceItemCheckBox') # self.expandServiceItemCheckBox.setObjectName(
# u'expandServiceItemCheckBox')
# self.uiLayout.addWidget(self.expandServiceItemCheckBox) # self.uiLayout.addWidget(self.expandServiceItemCheckBox)
self.leftLayout.addWidget(self.uiGroupBox) self.leftLayout.addWidget(self.uiGroupBox)
self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox) self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox)

View File

@ -624,5 +624,5 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
new_color = QtGui.QColorDialog.getColor( new_color = QtGui.QColorDialog.getColor(
QtGui.QColor(field), self) QtGui.QColor(field), self)
if new_color.isValid(): if new_color.isValid():
field = new_color.name() field = new_color.name()
return field return field

View File

@ -42,9 +42,8 @@ The basic XML is of the format::
import logging import logging
from xml.dom.minidom import Document from xml.dom.minidom import Document
from xml.etree.ElementTree import ElementTree, XML, dump from xml.etree.ElementTree import dump
from lxml import etree, objectify from lxml import etree, objectify
from xml.parsers.expat import ExpatError
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -152,7 +152,7 @@ class OpenLPSongImport(SongImport):
u'Importing song %s of %s' % (song_count, song_total)) u'Importing song %s of %s' % (song_count, song_total))
new_song = Song() new_song = Song()
new_song.title = song.title new_song.title = song.title
if has_media_files: if has_media_files and hasattr(song, 'alternate_title'):
new_song.alternate_title = song.alternate_title new_song.alternate_title = song.alternate_title
else: else:
old_titles = song.search_title.split(u'@') old_titles = song.search_title.split(u'@')