diff --git a/openlp/core/lib/htmlbuilder.py b/openlp/core/lib/htmlbuilder.py index 5dfe00d36..4a0e7275f 100644 --- a/openlp/core/lib/htmlbuilder.py +++ b/openlp/core/lib/htmlbuilder.py @@ -121,8 +121,8 @@ sup { } switch(state){ case 'init': - vid.src = path; - vid2.src = path; + vid.src = 'file:///' + path; + vid2.src = 'file:///' + path; if(loop == null) loop = false; vid.looping = loop; vid2.looping = loop; diff --git a/openlp/core/ui/exceptiondialog.py b/openlp/core/ui/exceptiondialog.py index cbb3fb50c..6ed45c5d8 100644 --- a/openlp/core/ui/exceptiondialog.py +++ b/openlp/core/ui/exceptiondialog.py @@ -39,6 +39,8 @@ class Ui_ExceptionDialog(object): self.messageLayout.addSpacing(12) self.bugLabel = QtGui.QLabel(exceptionDialog) self.bugLabel.setPixmap(QtGui.QPixmap(u':/graphics/exception.png')) + self.bugLabel.setSizePolicy(QtGui.QSizePolicy.Fixed, + QtGui.QSizePolicy.Fixed) self.bugLabel.setObjectName(u'bugLabel') self.messageLayout.addWidget(self.bugLabel) self.messageLayout.addSpacing(12) diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index d871dc474..7ea288dc5 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -26,9 +26,9 @@ ############################################################################### import logging -import os import time import copy +from collections import deque from PyQt4 import QtCore, QtGui from PyQt4.phonon import Phonon @@ -91,6 +91,8 @@ class SlideController(QtGui.QWidget): self.typeLabel.setText(UiStrings().Live) self.split = 1 self.typePrefix = u'live' + self.keypress_queue = deque() + self.keypress_loop = False else: self.typeLabel.setText(UiStrings().Preview) self.split = 0 @@ -578,12 +580,34 @@ class SlideController(QtGui.QWidget): self.display.videoStop() def servicePrevious(self): - time.sleep(0.1) - Receiver.send_message('servicemanager_previous_item') + """ + Live event to select the previous service item from the service manager. + """ + self.keypress_queue.append(u'previous') + self._process_queue() + def serviceNext(self): - time.sleep(0.1) - Receiver.send_message('servicemanager_next_item') + """ + Live event to select the next service item from the service manager. + """ + self.keypress_queue.append(u'next') + self._process_queue() + + def _process_queue(self): + """ + Process the service item request queue. The key presses can arrive + faster than the processing so implement a FIFO queue. + """ + if len(self.keypress_queue): + while len(self.keypress_queue) and not self.keypress_loop: + self.keypress_loop = True + if self.keypress_queue.popleft() == u'previous': + Receiver.send_message('servicemanager_previous_item') + else: + Receiver.send_message('servicemanager_next_item') + self.keypress_loop = False + def screenSizeChanged(self): """ @@ -771,7 +795,7 @@ class SlideController(QtGui.QWidget): log.debug(u'processManagerItem live = %s' % self.isLive) self.onStopLoop() old_item = self.serviceItem - # take a copy not a link to the servicemeanager copy. + # take a copy not a link to the servicemanager copy. self.serviceItem = copy.copy(serviceItem) if old_item and self.isLive and old_item.is_capable( ItemCapabilities.ProvidesOwnDisplay): diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index b472ccef0..596bce5d9 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -300,7 +300,6 @@ class ThemeManager(QtGui.QWidget): if self.checkIfThemeExists(newThemeName): themeData = self.getThemeData(oldThemeName) self.cloneThemeData(themeData, newThemeName) - self.loadThemes() def cloneThemeData(self, themeData, newThemeName): """ @@ -370,7 +369,7 @@ class ThemeManager(QtGui.QWidget): def onExportTheme(self): """ - Save the theme in a zip file + Export the theme in a zip file """ item = self.themeListWidget.currentItem() if item is None: @@ -625,7 +624,7 @@ class ThemeManager(QtGui.QWidget): theme_dir = os.path.join(self.path, name) check_directory_exists(theme_dir) theme_file = os.path.join(theme_dir, name + u'.xml') - if imageTo and self.oldBackgroundImage and \ + if self.oldBackgroundImage and \ imageTo != self.oldBackgroundImage: delete_file(self.oldBackgroundImage) outfile = None diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 9ec5b45b2..243e7f967 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -638,14 +638,14 @@ class BiblesResourcesDB(QtCore.QObject, Manager): chapters = BiblesResourcesDB.run_sql(u'SELECT id, book_reference_id, ' u'chapter, verse_count FROM chapters WHERE book_reference_id = ?', (book_id,)) - if chapters: + try: return { u'id': chapters[chapter-1][0], u'book_reference_id': chapters[chapter-1][1], u'chapter': chapters[chapter-1][2], u'verse_count': chapters[chapter-1][3] } - else: + except (IndexError, TypeError): return None @staticmethod @@ -753,7 +753,7 @@ class BiblesResourcesDB(QtCore.QObject, Manager): u'language_id, download_source_id FROM webbibles WHERE ' u'download_source_id = ? AND abbreviation = ?', (source[u'id'], abbreviation)) - if bible: + try: return { u'id': bible[0][0], u'name': bible[0][1], @@ -761,7 +761,7 @@ class BiblesResourcesDB(QtCore.QObject, Manager): u'language_id': bible[0][3], u'download_source_id': bible[0][4] } - else: + except (IndexError, TypeError): return None @staticmethod diff --git a/openlp/plugins/remotes/html/images/icons-18-black.png b/openlp/plugins/remotes/html/images/icons-18-black.png index 3657baea8..1ecfd26fb 100644 Binary files a/openlp/plugins/remotes/html/images/icons-18-black.png and b/openlp/plugins/remotes/html/images/icons-18-black.png differ diff --git a/openlp/plugins/remotes/html/images/icons-18-white.png b/openlp/plugins/remotes/html/images/icons-18-white.png index ccca7b44b..0c70831ac 100644 Binary files a/openlp/plugins/remotes/html/images/icons-18-white.png and b/openlp/plugins/remotes/html/images/icons-18-white.png differ diff --git a/openlp/plugins/remotes/html/images/icons-36-black.png b/openlp/plugins/remotes/html/images/icons-36-black.png index 79b6d601b..4c72adf1e 100644 Binary files a/openlp/plugins/remotes/html/images/icons-36-black.png and b/openlp/plugins/remotes/html/images/icons-36-black.png differ diff --git a/openlp/plugins/remotes/html/images/icons-36-white.png b/openlp/plugins/remotes/html/images/icons-36-white.png index e1b9c04ea..84ea9fb31 100644 Binary files a/openlp/plugins/remotes/html/images/icons-36-white.png and b/openlp/plugins/remotes/html/images/icons-36-white.png differ diff --git a/openlp/plugins/remotes/html/index.html b/openlp/plugins/remotes/html/index.html index 4d3076e3a..1339e9dda 100644 --- a/openlp/plugins/remotes/html/index.html +++ b/openlp/plugins/remotes/html/index.html @@ -62,15 +62,29 @@