From 848eb601af248a8b4e74546b73ebdb1a3a304abd Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 21 Mar 2010 14:24:41 +0000 Subject: [PATCH] Fix NONE appearing as song verses Delay the hidden window display Fix missing add status for custom slides --- openlp/core/lib/songxmlhandler.py | 4 ++++ openlp/core/ui/mainwindow.py | 7 ++++++- openlp/plugins/custom/forms/editcustomform.py | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/openlp/core/lib/songxmlhandler.py b/openlp/core/lib/songxmlhandler.py index 7a532970d..076523545 100644 --- a/openlp/core/lib/songxmlhandler.py +++ b/openlp/core/lib/songxmlhandler.py @@ -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): diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index ab2eaf7d8..30530669c 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -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) diff --git a/openlp/plugins/custom/forms/editcustomform.py b/openlp/plugins/custom/forms/editcustomform.py index b4402ceb3..bb2607a74 100644 --- a/openlp/plugins/custom/forms/editcustomform.py +++ b/openlp/plugins/custom/forms/editcustomform.py @@ -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)