openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #19705
[Merge] lp:~googol/openlp/registry into lp:openlp
Andreas Preikschat has proposed merging lp:~googol/openlp/registry into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~googol/openlp/registry/+merge/151458
Hello,
- fixed slidecontroller regression
--
https://code.launchpad.net/~googol/openlp/registry/+merge/151458
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/registry into lp:openlp.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2013-02-26 17:27:30 +0000
+++ openlp/core/ui/mainwindow.py 2013-03-04 10:54:21 +0000
@@ -489,7 +489,7 @@
Settings().remove_obsolete_settings()
self.serviceNotSaved = False
self.aboutForm = AboutForm(self)
- self.media_controller = MediaController(self)
+ self.media_controller = MediaController()
self.settingsForm = SettingsForm(self)
self.formattingTagForm = FormattingTagForm(self)
self.shortcutForm = ShortcutListForm(self)
=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py 2013-02-21 21:18:26 +0000
+++ openlp/core/ui/media/mediacontroller.py 2013-03-04 10:54:21 +0000
@@ -93,11 +93,10 @@
currentMediaPlayer is an array of player instances keyed on ControllerType.
"""
- def __init__(self, parent):
+ def __init__(self):
"""
Constructor
"""
- self.mainWindow = parent
Registry().register(u'media_controller', self)
Registry().register_function(u'bootstrap_initialise', self.check_available_media_players)
self.mediaPlayers = {}
@@ -674,7 +673,7 @@
isLive = msg[1]
if not isLive:
return
- controller = self.mainWindow.liveController
+ controller = self.main_window.live_controller
display = self._define_display(controller)
if controller.controllerType in self.currentMediaPlayer and \
self.currentMediaPlayer[controller.controllerType].state == MediaState.Playing:
@@ -694,7 +693,7 @@
if not isLive:
return
Registry().execute(u'live_display_hide', hide_mode)
- controller = self.mainWindow.liveController
+ controller = self.main_window.live_controller
display = self._define_display(controller)
if self.currentMediaPlayer[controller.controllerType].state == MediaState.Playing:
self.currentMediaPlayer[controller.controllerType].pause(display)
@@ -712,7 +711,7 @@
isLive = msg[1]
if not isLive:
return
- controller = self.mainWindow.liveController
+ controller = self.main_window.live_controller
display = self._define_display(controller)
if controller.controllerType in self.currentMediaPlayer and \
self.currentMediaPlayer[controller.controllerType].state != MediaState.Playing:
@@ -750,3 +749,13 @@
return self._service_manager
service_manager = property(_get_service_manager)
+
+ def _get_main_window(self):
+ """
+ Adds the main window to the class dynamically
+ """
+ if not hasattr(self, u'_main_window'):
+ self._main_window = Registry().get(u'main_window')
+ return self._main_window
+
+ main_window = property(_get_main_window)
Follow ups