From c7a90102a2cd09a6fd2369d4f8935c9badcff8db Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Wed, 1 Jun 2011 08:38:19 +0100 Subject: [PATCH] Fix some startup blank/hide problems --- openlp.pyw | 1 + openlp/core/lib/renderer.py | 2 +- openlp/core/ui/maindisplay.py | 1 - openlp/core/ui/mainwindow.py | 5 ++--- openlp/core/ui/screen.py | 1 + openlp/core/ui/slidecontroller.py | 4 +++- openlp/core/utils/__init__.py | 1 - 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/openlp.pyw b/openlp.pyw index afd0b01f8..0bd7c940d 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -133,6 +133,7 @@ class OpenLP(QtGui.QApplication): u'general/update check', QtCore.QVariant(True)).toBool() if update_check: VersionThread(self.mainWindow).start() + Receiver.send_message(u'maindisplay_blank_check') self.mainWindow.appStartup() DelayStartThread(self.mainWindow).start() return self.exec_() diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 4acf88202..c6e729be8 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -67,7 +67,7 @@ class Renderer(object): ``theme_manager`` The ThemeManager instance, used to get the current theme details. """ - log.debug(u'Initilisation started') + log.debug(u'Initialisation started') self.theme_manager = theme_manager self.image_manager = image_manager self.screens = ScreenList.get_instance() diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index 715bb3b5b..e2117cc10 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -148,7 +148,6 @@ class MainDisplay(QtGui.QGraphicsView): self.__hideMouse() # To display or not to display? if not self.screen[u'primary']: - self.show() self.primary = False else: self.primary = True diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 6a5a753f3..7f41027a3 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -678,13 +678,12 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): def blankCheck(self): """ Check and display message if screen blank on setup. - Triggered by delay thread. """ settings = QtCore.QSettings() + self.liveController.mainDisplaySetBackground() if settings.value(u'%s/screen blank' % self.generalSettingsSection, QtCore.QVariant(False)).toBool(): - self.liveController.mainDisplaySetBackground() - if settings.value(u'blank warning', + if settings.value(u'%s/blank warning' % self.generalSettingsSection, QtCore.QVariant(False)).toBool(): QtGui.QMessageBox.question(self, translate('OpenLP.MainWindow', diff --git a/openlp/core/ui/screen.py b/openlp/core/ui/screen.py index 2b6e10644..1e24c8681 100644 --- a/openlp/core/ui/screen.py +++ b/openlp/core/ui/screen.py @@ -241,6 +241,7 @@ class ScreenList(object): height = settings.value(u'height', QtCore.QVariant(self.current[u'size'].height())).toInt()[0] self.override[u'size'] = QtCore.QRect(x, y, width, height) + self.override[u'primary'] = False settings.endGroup() if override_display: self.set_override_display() diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index a59f00f21..5b6212cf8 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -742,8 +742,10 @@ class SlideController(QtGui.QWidget): self.onThemeDisplay(True) elif display_type == u'hidden': self.onHideDisplay(True) - else: + elif display_type == u'blanked': self.onBlankDisplay(True) + else: + Receiver.send_message(u'maindisplay_show') def onSlideBlank(self): """ diff --git a/openlp/core/utils/__init__.py b/openlp/core/utils/__init__.py index 4ef445e36..ec20346d8 100644 --- a/openlp/core/utils/__init__.py +++ b/openlp/core/utils/__init__.py @@ -69,7 +69,6 @@ class VersionThread(QtCore.QThread): Run the thread. """ time.sleep(1) - Receiver.send_message(u'maindisplay_blank_check') app_version = get_application_version() version = check_latest_version(app_version) remote_version = {}