Fix Unicode error on database write

Try to add TextItemData again

bzr-revno: 414
This commit is contained in:
Tim Bentley 2009-03-13 16:00:14 +00:00
parent 6224795661
commit b525734702
3 changed files with 7 additions and 6 deletions

View File

@ -67,9 +67,9 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
count += 1
sxml.dump_xml()
customSlide = CustomSlide()
customSlide.title = str(self.TitleEdit.displayText())
customSlide.text = str(sxml.extract_xml())
customSlide.credits = str(self.CreditEdit.displayText())
customSlide.title = unicode(self.TitleEdit.displayText())
customSlide.text = unicode(sxml.extract_xml())
customSlide.credits = unicode(self.CreditEdit.displayText())
self.custommanager.save_slide(customSlide)
self.close()

View File

@ -24,7 +24,8 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem
from openlp.core.resources import *
#from openlp.plugins.custom.lib import TextListData
#from openlp.plugins.custom.lib import TextItemData
class CustomMediaItem(MediaManagerItem):
"""
@ -129,7 +130,7 @@ class CustomMediaItem(MediaManagerItem):
for CustomSlide in list:
print CustomSlide.title
# for CustomSlide in list:
# self.TextListData.addRow(CustomSlide.id,CustomSlide.title)
# self.CustomListData.addRow(CustomSlide.id,CustomSlide.title)
def onClearTextButtonClick(self):
"""

View File

@ -9,7 +9,7 @@ class TextListData(QAbstractListModel):
An abstract list of strings
"""
global log
log=logging.getLogger("ListData")
log=logging.getLogger("TextListData")
log.info("started")
def __init__(self):