← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/general into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/general into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #707725 in OpenLP: "Live mode, down arrow loops within service items"
  https://bugs.launchpad.net/openlp/+bug/707725
  Bug #730160 in OpenLP: ""Display if a single screen" does not work"
  https://bugs.launchpad.net/openlp/+bug/730160
  Bug #730474 in OpenLP: "Does not add big media to OOS"
  https://bugs.launchpad.net/openlp/+bug/730474

For more details, see:
https://code.launchpad.net/~trb143/openlp/general/+merge/53387

Various fixes:
Allow ServiceManager to use Cursor keys correctly and and Expand/Collapse to get at leaves.
Add "Display if Single " Fix.
Block Start / End time for files over 50 Meg. 
-- 
https://code.launchpad.net/~trb143/openlp/general/+merge/53387
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/general into lp:openlp.
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2011-03-14 10:10:10 +0000
+++ openlp/core/ui/maindisplay.py	2011-03-15 09:16:32 +0000
@@ -426,7 +426,14 @@
             if self.hideMode:
                 self.hideDisplay(self.hideMode)
             else:
-               self.setVisible(True)
+                # Single screen active
+                if self.screens.monitor_number == 0:
+                    # Only make visible if setting enabled
+                    if QtCore.QSettings().value(u'general/display on monitor',
+                        QtCore.QVariant(True)).toBool():
+                        self.setVisible(True)
+                else:
+                    self.setVisible(True)
         preview = QtGui.QImage(self.screen[u'size'].width(),
             self.screen[u'size'].height(),
             QtGui.QImage.Format_ARGB32_Premultiplied)

=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2011-03-10 18:31:34 +0000
+++ openlp/core/ui/servicemanager.py	2011-03-15 09:16:32 +0000
@@ -49,6 +49,19 @@
         QtGui.QTreeWidget.__init__(self, parent)
         self.mainwindow = mainwindow
 
+    def keyPressEvent(self, event):
+        if isinstance(event, QtGui.QKeyEvent):
+            # here accept the event and do something
+            if event.key() == QtCore.Qt.Key_Up:
+                self.mainwindow.onMoveSelectionUp()
+                event.accept()
+            elif event.key() == QtCore.Qt.Key_Down:
+                self.mainwindow.onMoveSelectionDown()
+                event.accept()
+            event.ignore()
+        else:
+            event.ignore()
+
     def mouseMoveEvent(self, event):
         """
         Drag and drop event does not care what data is selected
@@ -197,13 +210,13 @@
             u':/services/service_expand_all.png',
             translate('OpenLP.ServiceManager',
             'Expand all the service items.'),
-            self.onExpandAll)
+            self.onExpandAll, shortcut=QtCore.Qt.Key_Plus)
         self.serviceManagerList.collapse = self.orderToolbar.addToolbarButton(
             translate('OpenLP.ServiceManager', '&Collapse all'),
             u':/services/service_collapse_all.png',
             translate('OpenLP.ServiceManager',
             'Collapse all the service items.'),
-            self.onCollapseAll)
+            self.onCollapseAll, shortcut=QtCore.Qt.Key_Minus)
         self.orderToolbar.addSeparator()
         self.serviceManagerList.makeLive = self.orderToolbar.addToolbarButton(
             translate('OpenLP.ServiceManager', 'Go Live'),
@@ -293,7 +306,9 @@
             self.serviceManagerList.moveTop,
             self.serviceManagerList.moveBottom,
             self.serviceManagerList.up,
-            self.serviceManagerList.down
+            self.serviceManagerList.down,
+            self.serviceManagerList.expand,
+            self.serviceManagerList.collapse
             ])
         self.configUpdated()
 
@@ -306,6 +321,9 @@
         actionList.add_action(self.serviceManagerList.makeLive, u'Service')
         actionList.add_action(self.serviceManagerList.up, u'Service')
         actionList.add_action(self.serviceManagerList.down, u'Service')
+        actionList.add_action(self.serviceManagerList.expand, u'Service')
+        actionList.add_action(self.serviceManagerList.collapse, u'Service')
+
 
     def setModified(self, modified=True):
         """

=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py	2011-02-24 05:47:38 +0000
+++ openlp/plugins/media/lib/mediaitem.py	2011-03-15 09:16:32 +0000
@@ -132,14 +132,18 @@
             self.mediaObject.play()
             service_item.title = unicode(self.plugin.nameStrings[u'singular'])
             service_item.add_capability(ItemCapabilities.RequiresMedia)
-            service_item.add_capability(ItemCapabilities.AllowsVarableStartTime)
             # force a nonexistent theme
             service_item.theme = -1
             frame = u':/media/image_clapperboard.png'
             (path, name) = os.path.split(filename)
-            while not self.mediaState:
-                Receiver.send_message(u'openlp_process_events')
-            service_item.media_length = self.mediaLength
+            file_size = os.path.getsize(filename)
+            # File too big for processing
+            if file_size <= 52428800: # 50MiB
+                while not self.mediaState:
+                    Receiver.send_message(u'openlp_process_events')
+                service_item.media_length = self.mediaLength
+                service_item.add_capability(
+                    ItemCapabilities.AllowsVarableStartTime)
             service_item.add_from_command(path, name, frame)
             return True
         else:


Follow ups