forked from openlp/openlp
Fixed bug #789046 and cleaned up one or two other things.
This commit is contained in:
parent
b1b3583846
commit
d337ecacb6
@ -483,7 +483,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
pluginpath = AppLocation.get_directory(AppLocation.PluginsDir)
|
||||
self.pluginManager = PluginManager(pluginpath)
|
||||
self.pluginHelpers = {}
|
||||
self.image_manager = ImageManager()
|
||||
self.imageManager = ImageManager()
|
||||
# Set up the interface
|
||||
self.setupUi(self)
|
||||
# Load settings after setupUi so default UI sizes are overwritten
|
||||
@ -552,7 +552,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
# warning cyclic dependency
|
||||
# renderer needs to call ThemeManager and
|
||||
# ThemeManager needs to call Renderer
|
||||
self.renderer = Renderer(self.image_manager, self.themeManagerContents)
|
||||
self.renderer = Renderer(self.imageManager, self.themeManagerContents)
|
||||
# Define the media Dock Manager
|
||||
self.mediaDockManager = MediaDockManager(self.mediaToolBox)
|
||||
log.info(u'Load Plugins')
|
||||
@ -598,6 +598,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
# Once all components are initialised load the Themes
|
||||
log.info(u'Load Themes')
|
||||
self.themeManagerContents.loadThemes(True)
|
||||
# Hide/show the theme combobox on the service manager
|
||||
Receiver.send_message(u'theme_update_global')
|
||||
# Reset the cursor
|
||||
Receiver.send_message(u'cursor_normal')
|
||||
|
||||
def setAutoLanguage(self, value):
|
||||
@ -652,13 +655,14 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.modeLiveItem.setChecked(True)
|
||||
|
||||
def appStartup(self):
|
||||
# Give all the plugins a chance to perform some tasks at startup
|
||||
"""
|
||||
Give all the plugins a chance to perform some tasks at startup
|
||||
"""
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
for plugin in self.pluginManager.plugins:
|
||||
if plugin.isActive():
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
plugin.appStartup()
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
|
||||
def firstTime(self):
|
||||
# Import themes if first time
|
||||
@ -809,7 +813,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
"""
|
||||
log.debug(u'screenChanged')
|
||||
Receiver.send_message(u'cursor_busy')
|
||||
self.image_manager.update_display()
|
||||
self.imageManager.update_display()
|
||||
self.renderer.update_display()
|
||||
self.previewController.screenSizeChanged()
|
||||
self.liveController.screenSizeChanged()
|
||||
|
@ -63,7 +63,7 @@ class SlideController(QtGui.QWidget):
|
||||
self.screens = ScreenList.get_instance()
|
||||
self.ratio = float(self.screens.current[u'size'].width()) / \
|
||||
float(self.screens.current[u'size'].height())
|
||||
self.image_manager = self.parent().image_manager
|
||||
self.imageManager = self.parent().imageManager
|
||||
self.loopList = [
|
||||
u'Play Slides Menu',
|
||||
u'Loop Separator',
|
||||
@ -425,7 +425,7 @@ class SlideController(QtGui.QWidget):
|
||||
# rebuild display as screen size changed
|
||||
if self.display:
|
||||
self.display.close()
|
||||
self.display = MainDisplay(self, self.image_manager, self.isLive)
|
||||
self.display = MainDisplay(self, self.imageManager, self.isLive)
|
||||
self.display.alertTab = self.alertTab
|
||||
self.display.setup()
|
||||
if self.isLive:
|
||||
@ -632,8 +632,8 @@ class SlideController(QtGui.QWidget):
|
||||
# If current slide set background to image
|
||||
if framenumber == slideno:
|
||||
self.serviceItem.bg_image_bytes = \
|
||||
self.image_manager.get_image_bytes(frame[u'title'])
|
||||
image = self.image_manager.get_image(frame[u'title'])
|
||||
self.imageManager.get_image_bytes(frame[u'title'])
|
||||
image = self.imageManager.get_image(frame[u'title'])
|
||||
label.setPixmap(QtGui.QPixmap.fromImage(image))
|
||||
self.previewListWidget.setCellWidget(framenumber, 0, label)
|
||||
slideHeight = width * self.parent().renderer.screen_ratio
|
||||
|
Loading…
Reference in New Issue
Block a user