This commit is contained in:
Andreas Preikschat 2011-05-09 10:15:59 +02:00
parent 2a0f3b272a
commit 1e0ef1ecb8
2 changed files with 3 additions and 4 deletions

View File

@ -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()

View File

@ -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