From 154c82f5ea623d7c83731efcf1694f04712d62f4 Mon Sep 17 00:00:00 2001 From: Patrick Zimmermann Date: Sat, 27 Apr 2013 12:00:27 +0200 Subject: [PATCH] Rename a method and remove a non needed registry var. --- openlp/core/ui/listpreviewwidget.py | 12 +----------- openlp/core/ui/slidecontroller.py | 2 +- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/openlp/core/ui/listpreviewwidget.py b/openlp/core/ui/listpreviewwidget.py index d259d43e7..94385dd91 100644 --- a/openlp/core/ui/listpreviewwidget.py +++ b/openlp/core/ui/listpreviewwidget.py @@ -86,7 +86,7 @@ class ListPreviewWidget(QtGui.QTableWidget): self.screen_ratio = screen_ratio self.__recalculate_layout() - def replace_service_manager_item(self, service_item, width, slideNumber): + def replace_service_item(self, service_item, width, slideNumber): """ Replaces the current preview items with the ones in service_item. Displays the given slide. @@ -170,13 +170,3 @@ class ListPreviewWidget(QtGui.QTableWidget): image_manager = property(_get_image_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) - diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index 2c24faca0..e1b8b8183 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -784,7 +784,7 @@ class SlideController(DisplayController): if not self.service_item.is_command() and framenumber == slideno: self.service_item.bg_image_bytes = self.image_manager.get_image_bytes(frame[u'path'], ImageSource.ImagePlugin) - self.preview_widget.replace_service_manager_item(self.service_item, width, slideno) + self.preview_widget.replace_service_item(self.service_item, width, slideno) self.enableToolBar(service_item) # Pass to display for viewing. # Postpone image build, we need to do this later to avoid the theme