Fix NONE appearing as song verses

Delay the hidden window display
Fix missing add status for custom slides
This commit is contained in:
Tim Bentley 2010-03-21 14:24:41 +00:00
parent 7eaaf22467
commit 848eb601af
3 changed files with 11 additions and 1 deletions

View File

@ -147,9 +147,13 @@ class SongXMLParser(object):
iter = self.song_xml.getiterator()
verse_list = []
for element in iter:
print element.tag, element.text
if element.tag == u'verse':
if element.text is None:
element.text = u''
verse_list.append([element.attrib,
unicode(element.text).decode('unicode-escape')])
print verse_list
return verse_list
def dump_xml(self):

View File

@ -67,7 +67,8 @@ class VersionThread(QtCore.QThread):
"""
Run the thread.
"""
time.sleep(2)
time.sleep(1)
Receiver.send_message(u'blank_check')
version = check_latest_version(self.generalConfig, self.app_version)
#new version has arrived
if version != self.app_version:
@ -493,6 +494,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
QtCore.SIGNAL(u'update_global_theme'), self.defaultThemeChanged)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'version_check'), self.versionCheck)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'blank_check'), self.blankCheck)
QtCore.QObject.connect(self.FileNewItem,
QtCore.SIGNAL(u'triggered()'),
self.ServiceManagerContents.onNewService)
@ -582,6 +585,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.activateWindow()
if str_to_bool(self.generalConfig.get_config(u'auto open', False)):
self.ServiceManagerContents.onLoadService(True)
def blankCheck(self):
if str_to_bool(self.generalConfig.get_config(u'screen blank', False)) \
and str_to_bool(self.generalConfig.get_config(u'blank warning', False)):
self.LiveController.onBlankDisplay(True)

View File

@ -87,6 +87,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
def initialise(self):
self.editAll = False
self.AddButton.setEnabled(True)
self.DeleteButton.setEnabled(False)
self.EditButton.setEnabled(False)
self.EditAllButton.setEnabled(True)