diff --git a/openlp.pyw b/openlp.pyw index 0c1227b6a..5fe962f82 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -169,7 +169,7 @@ def main(): filename = os.path.join(log_path, u'openlp.log') logfile = FileHandler(filename, u'w') logfile.setFormatter(logging.Formatter( - u'%(asctime)s %(name)-20s %(levelname)-8s %(message)s')) + u'%(asctime)s %(name)-55s %(levelname)-8s %(message)s')) log.addHandler(logfile) logging.addLevelName(15, u'Timer') # Parse command line options and deal with them. diff --git a/openlp/core/lib/settingsmanager.py b/openlp/core/lib/settingsmanager.py index de1401d56..d6b987db4 100644 --- a/openlp/core/lib/settingsmanager.py +++ b/openlp/core/lib/settingsmanager.py @@ -53,7 +53,7 @@ class SettingsManager(object): self.slidecontroller_image = self.slidecontroller - 50 self.showPreviewPanel = QtCore.QSettings().value( - u'user interface/preview panel', True).toBool() + u'user interface/preview panel', QtCore.QVariant(True)).toBool() def togglePreviewPanel(self, isVisible): QtCore.QSettings().setValue(u'user interface/preview panel', diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index af52e5ffd..4b2c4d268 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -118,7 +118,11 @@ class MainDisplay(DisplayWidget): DisplayWidget.__init__(self, parent) self.parent = parent self.setWindowTitle(u'OpenLP Display') - self.setAttribute(QtCore.Qt.WA_TranslucentBackground) + # WA_TranslucentBackground is not available in QT4.4 + try: + self.setAttribute(QtCore.Qt.WA_TranslucentBackground) + except AttributeError: + pass self.screens = screens self.display_image = QtGui.QLabel(self) self.display_image.setScaledContents(True) @@ -340,8 +344,14 @@ class VideoDisplay(Phonon.VideoWidget): self.audioObject = Phonon.AudioOutput(Phonon.VideoCategory) Phonon.createPath(self.mediaObject, self) Phonon.createPath(self.mediaObject, self.audioObject) - self.setWindowFlags(QtCore.Qt.WindowStaysOnBottomHint | - QtCore.Qt.FramelessWindowHint | QtCore.Qt.Dialog) + flags = QtCore.Qt.FramelessWindowHint | QtCore.Qt.Dialog + # WindowsStaysOnBottomHint is not available in QT4.4 + try: + flags = flags | QtCore.Qt.WindowStaysOnBottomHint + except AttributeError: + pass + self.setWindowFlags(flags) + QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'maindisplay_hide'), self.mediaHide) QtCore.QObject.connect(Receiver.get_receiver(), diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index e44c424a4..136f45633 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -337,13 +337,14 @@ class BibleMediaItem(MediaManagerItem): # load bibles into the combo boxes first = True for bible in bibles: - self.QuickVersionComboBox.addItem(bible) - self.QuickSecondBibleComboBox.addItem(bible) - self.AdvancedVersionComboBox.addItem(bible) - self.AdvancedSecondBibleComboBox.addItem(bible) - if first: - first = False - self.initialiseBible(bible) + if bible: + self.QuickVersionComboBox.addItem(bible) + self.QuickSecondBibleComboBox.addItem(bible) + self.AdvancedVersionComboBox.addItem(bible) + self.AdvancedSecondBibleComboBox.addItem(bible) + if first: + first = False + self.initialiseBible(bible) def onListViewResize(self, width, height): self.SearchProgress.setGeometry(self.ListView.geometry().x(), diff --git a/openlp/plugins/presentations/lib/presentationcontroller.py b/openlp/plugins/presentations/lib/presentationcontroller.py index 84a3d83a2..f976aa4e7 100644 --- a/openlp/plugins/presentations/lib/presentationcontroller.py +++ b/openlp/plugins/presentations/lib/presentationcontroller.py @@ -105,7 +105,7 @@ class PresentationController(object): if self.available: self.enabled = QtCore.QSettings().value( self.settingsSection + u'/' + name, - QtCore.Qt.Unchecked).toInt()[0] == QtCore.Qt.Checked + QtCore.QVariant(QtCore.Qt.Unchecked)).toInt()[0] == QtCore.Qt.Checked else: self.enabled = False self.thumbnailroot = os.path.join( diff --git a/openlp/plugins/songs/lib/manager.py b/openlp/plugins/songs/lib/manager.py index ff9231fe2..dc275cc98 100644 --- a/openlp/plugins/songs/lib/manager.py +++ b/openlp/plugins/songs/lib/manager.py @@ -50,7 +50,7 @@ class SongManager(): settings.beginGroup(u'songs') self.db_url = u'' db_type = unicode( - settings.value(u'songs/db type', u'sqlite').toString()) + settings.value(u'songs/db type', QtCore.QVariant(u'sqlite')).toString()) if db_type == u'sqlite': self.db_url = u'sqlite:///%s/songs.sqlite' % \ AppLocation.get_section_data_path(u'songs')