← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol-hush/openlp/fixes into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol-hush/openlp/fixes into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #598393 in OpenLP: "After adding a new image to a selected (image) item in the service manager it is not selected anymore"
  https://bugs.launchpad.net/openlp/+bug/598393
  Bug #719102 in OpenLP: "editing author after editing song causes traceback"
  https://bugs.launchpad.net/openlp/+bug/719102
  Bug #730979 in OpenLP: "Song export crashes"
  https://bugs.launchpad.net/openlp/+bug/730979
  Bug #749296 in OpenLP: "Blank icon confused if blank song then go live on ppt"
  https://bugs.launchpad.net/openlp/+bug/749296

For more details, see:
https://code.launchpad.net/~googol-hush/openlp/fixes/+merge/56084

Hello,

- fixed bug #749296

How I fixed it:
1) When sending a presentation live I hide the "hideMenu" and hide the display to the desktop (maindisplay_hide). I do this, to ensure that whatever hide mode was checked/unckecked is not reset.
2) When sending another item live (and we recognise the item before was a presentation) we set the menu visible again and "re check" (or "re uncheck") the current hide mode (if we do not do this, the next item will be shown even though you had for example "Blank to Theme")

Note:
The presentation plugin (or the API we use to control OpenOffice.org) seemed to blank if OpenLp was set to "blank". However, I have removed this, as I did not see a possibility to remove the unblank from the hide menu.
-- 
https://code.launchpad.net/~googol-hush/openlp/fixes/+merge/56084
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/fixes into lp:openlp.
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2011-03-26 19:50:15 +0000
+++ openlp/core/ui/slidecontroller.py	2011-04-03 18:05:55 +0000
@@ -567,19 +567,36 @@
         """
         log.debug(u'processManagerItem live = %s' % self.isLive)
         self.onStopLoop()
-        # If old item was a command tell it to stop
         if self.serviceItem:
+            # If old item was a command tell it to stop.
             if self.serviceItem.is_command():
                 Receiver.send_message(u'%s_stop' %
                     self.serviceItem.name.lower(), [serviceItem, self.isLive])
+            # If the old item had its own display, we have to restore the menu.
+            if self.isLive and self.serviceItem.is_capable(
+                ItemCapabilities.ProvidesOwnDisplay):
+                self.toolbar.actions[u'Hide Menu'].setVisible(True)
+                action = self.hideMenu.defaultAction()
+                # Re check the current blank mode, so that the current item will
+                # not ignore it.
+                if self.blankScreen == action:
+                    self.onBlankDisplay(action.isChecked())
+                elif self.themeScreen == action:
+                    self.onThemeDisplay(action.isChecked())
+                elif self.desktopScreen == action:
+                    self.onHideDisplay(action.isChecked())
             if self.serviceItem.is_media():
                 self.onMediaClose()
+        blanked = False
         if self.isLive:
             if serviceItem.is_capable(ItemCapabilities.ProvidesOwnDisplay):
-                self._forceUnblank()
-            blanked = self.blankScreen.isChecked()
-        else:
-            blanked = False
+                # Hide the menu and the screen. Note, that we do not want to use
+                # onHideDisplay, as we want to be able to restore the current
+                # hide mode.
+                self.toolbar.actions[u'Hide Menu'].setVisible(False)
+                Receiver.send_message(u'maindisplay_hide', HideMode.Screen)
+            else:
+                blanked = self.blankScreen.isChecked()
         Receiver.send_message(u'%s_start' % serviceItem.name.lower(),
             [serviceItem, self.isLive, blanked, slideno])
         self.slideList = {}
@@ -1094,21 +1111,3 @@
             self.video.hide()
         self.slidePreview.clear()
         self.slidePreview.show()
-
-    def _forceUnblank(self):
-        """
-        Used by command items which provide their own displays to reset the
-        screen hide attributes
-        """
-        blank = None
-        if self.blankScreen.isChecked:
-            blank = self.blankScreen
-        if self.themeScreen.isChecked:
-            blank = self.themeScreen
-        if self.desktopScreen.isChecked:
-            blank = self.desktopScreen
-        if blank:
-            blank.setChecked(False)
-            self.hideMenu.setDefaultAction(blank)
-            QtCore.QSettings().remove(
-                self.parent.generalSettingsSection + u'/screen blank')

=== modified file 'openlp/plugins/presentations/lib/messagelistener.py'
--- openlp/plugins/presentations/lib/messagelistener.py	2011-03-24 19:04:02 +0000
+++ openlp/plugins/presentations/lib/messagelistener.py	2011-04-03 18:05:55 +0000
@@ -333,7 +333,6 @@
         """
         is_live = message[1]
         if is_live:
-            Receiver.send_message(u'maindisplay_show')
             self.live_handler.shutdown()
         else:
             self.preview_handler.shutdown()

=== modified file 'openlp/plugins/presentations/lib/presentationcontroller.py'
--- openlp/plugins/presentations/lib/presentationcontroller.py	2011-03-24 19:04:02 +0000
+++ openlp/plugins/presentations/lib/presentationcontroller.py	2011-04-03 18:05:55 +0000
@@ -105,7 +105,7 @@
         Loads the presentation and starts it
 
         ``presentation``
-        The file name of the presentations to the run.
+            The file name of the presentations to the run.
 
         Returns False if the file could not be opened
         """


Follow ups