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() iter = self.song_xml.getiterator()
verse_list = [] verse_list = []
for element in iter: for element in iter:
print element.tag, element.text
if element.tag == u'verse': if element.tag == u'verse':
if element.text is None:
element.text = u''
verse_list.append([element.attrib, verse_list.append([element.attrib,
unicode(element.text).decode('unicode-escape')]) unicode(element.text).decode('unicode-escape')])
print verse_list
return verse_list return verse_list
def dump_xml(self): def dump_xml(self):

View File

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

View File

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