← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/screen into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol/openlp/screen into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~googol/openlp/screen/+merge/146811

Hello,

- use own ScreenList() call instead of using parents to access it

http://ci.openlp.org/view/Specific%20Branch/job/OpenLP-Pull_and_Run_Functional_Tests/37/
-- 
https://code.launchpad.net/~googol/openlp/screen/+merge/146811
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/screen into lp:openlp.
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py	2013-01-05 22:17:30 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py	2013-02-06 10:02:20 +0000
@@ -58,6 +58,7 @@
 
 from PyQt4 import QtCore
 
+from openlp.core.lib import ScreenList
 from openlp.core.utils import delete_file, get_uno_command, get_uno_instance
 from presentationcontroller import PresentationController, PresentationDocument
 
@@ -254,7 +255,7 @@
             window = self.document.getCurrentController().getFrame().getContainerWindow()
             window.setVisible(False)
         self.presentation = self.document.getPresentation()
-        self.presentation.Display = self.controller.plugin.renderer.screens.current[u'number'] + 1
+        self.presentation.Display = ScreenList().current[u'number'] + 1
         self.control = None
         self.create_thumbnails()
         return True

=== modified file 'openlp/plugins/presentations/lib/powerpointcontroller.py'
--- openlp/plugins/presentations/lib/powerpointcontroller.py	2013-01-05 22:17:30 +0000
+++ openlp/plugins/presentations/lib/powerpointcontroller.py	2013-02-06 10:02:20 +0000
@@ -36,6 +36,7 @@
     import win32ui
     import pywintypes
 
+from openlp.core.lib import ScreenList
 from presentationcontroller import PresentationController, PresentationDocument
 
 log = logging.getLogger(__name__)
@@ -252,8 +253,7 @@
                     dpi = win32ui.GetForegroundWindow().GetDC().GetDeviceCaps(88)
                 except win32ui.error:
                     dpi = 96
-            renderer = self.controller.plugin.renderer
-            rect = renderer.screens.current[u'size']
+            rect = ScreenList().current[u'size']
             ppt_window = self.presentation.SlideShowSettings.Run()
             if not ppt_window:
                 return

=== modified file 'openlp/plugins/presentations/lib/pptviewcontroller.py'
--- openlp/plugins/presentations/lib/pptviewcontroller.py	2013-02-02 14:09:22 +0000
+++ openlp/plugins/presentations/lib/pptviewcontroller.py	2013-02-06 10:02:20 +0000
@@ -34,6 +34,7 @@
     from ctypes import cdll
     from ctypes.wintypes import RECT
 
+from openlp.core.lib import ScreenList
 from presentationcontroller import PresentationController, PresentationDocument
 
 log = logging.getLogger(__name__)
@@ -120,8 +121,7 @@
         PptView task started earlier.
         """
         log.debug(u'LoadPresentation')
-        renderer = self.controller.plugin.renderer
-        rect = renderer.screens.current[u'size']
+        rect = ScreenList().current[u'size']
         rect = RECT(rect.x(), rect.y(), rect.right(), rect.bottom())
         filepath = str(self.filepath.replace(u'/', u'\\'))
         if not os.path.isdir(self.get_temp_folder()):


Follow ups