openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #08902
[Merge] lp:~googol-hush/openlp/tweaks into lp:openlp
Andreas Preikschat has proposed merging lp:~googol-hush/openlp/tweaks into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~googol-hush/openlp/tweaks/+merge/61102
Hello,
Update the theme preview images if the screen setup changed.
--
https://code.launchpad.net/~googol-hush/openlp/tweaks/+merge/61102
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/tweaks into lp:openlp.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2011-05-14 11:48:15 +0000
+++ openlp/core/ui/mainwindow.py 2011-05-16 12:28:34 +0000
@@ -778,16 +778,19 @@
def screenChanged(self):
"""
- The screen has changed to so tell the displays to update_display
- their locations
+ The screen has changed so we have to update components such as the
+ renderer.
"""
log.debug(u'screenChanged')
+ Receiver.send_message(u'cursor_busy')
self.image_manager.update_display()
self.renderer.update_display()
+ self.themeManagerContents.updatePreviewImages()
+ self.previewController.screenSizeChanged()
self.liveController.screenSizeChanged()
- self.previewController.screenSizeChanged()
self.setFocus()
self.activateWindow()
+ Receiver.send_message(u'cursor_normal')
def closeEvent(self, event):
"""
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2011-05-03 17:05:17 +0000
+++ openlp/core/ui/thememanager.py 2011-05-16 12:28:34 +0000
@@ -660,6 +660,15 @@
pixmap.save(thumb, u'png')
log.debug(u'Theme image written to %s', samplepathname)
+ def updatePreviewImages(self):
+ """
+ Called to update the themes' preview images.
+ """
+ for theme in self.themelist:
+ self.generateAndSaveImage(
+ self.path, theme, self.getThemeData(theme))
+ self.loadThemes()
+
def generateImage(self, themeData, forcePage=False):
"""
Call the renderer to build a Sample Image
Follow ups