From 1e0ef1ecb8be79248e8496fcffb4a57efe3937a4 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Mon, 9 May 2011 10:15:59 +0200 Subject: [PATCH] clean up --- openlp.pyw | 2 +- openlp/core/ui/screen.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openlp.pyw b/openlp.pyw index 3badf1701..76d334bae 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -97,7 +97,7 @@ class OpenLP(QtGui.QApplication): QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'cursor_normal'), self.setNormalCursor) # Decide how many screens we have and their size - screens = ScreenList.get_instance(self.desktop()) + screens = ScreenList(self.desktop()) # First time checks in settings has_run_wizard = QtCore.QSettings().value( u'general/has run wizard', QtCore.QVariant(False)).toBool() diff --git a/openlp/core/ui/screen.py b/openlp/core/ui/screen.py index 88d8b2b64..2186a221e 100644 --- a/openlp/core/ui/screen.py +++ b/openlp/core/ui/screen.py @@ -46,9 +46,7 @@ class ScreenList(object): instance = None @staticmethod - def get_instance(desktop=None): - if desktop is not None and ScreenList.instance is None: - ScreenList.instance = ScreenList(desktop) + def get_instance(): return ScreenList.instance def __init__(self, desktop): @@ -58,6 +56,7 @@ class ScreenList(object): ``desktop`` A ``QDesktopWidget`` object. """ + ScreenList.instance = self self.desktop = desktop self.preview = None self.current = None