← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~j-corwin/openlp/general into lp:openlp

 

Jonathan Corwin has proposed merging lp:~j-corwin/openlp/general into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #634771 in OpenLP: "OpenLP 1.9.2+bzr1016-0ubuntu1~lucid1 does not start"
  https://bugs.launchpad.net/openlp/+bug/634771
  Bug #646718 in OpenLP: "Songbook, Number will not loaded, Title will not be saved"
  https://bugs.launchpad.net/openlp/+bug/646718
  Bug #696013 in OpenLP: "song import from powerpoint crashes every second time"
  https://bugs.launchpad.net/openlp/+bug/696013
  Bug #696021 in OpenLP: "presentation loader does not work fine in Windows using Powerpoint Viewer 2007"
  https://bugs.launchpad.net/openlp/+bug/696021
  Bug #696637 in OpenLP: "Alert not positioned correctly in single screen"
  https://bugs.launchpad.net/openlp/+bug/696637
  Bug #727732 in OpenLP: "Openlp 1.9.?? crashes on start"
  https://bugs.launchpad.net/openlp/+bug/727732
  Bug #735039 in OpenLP: "Cannot import PowerPoint Presentations with PowerPoint 2010"
  https://bugs.launchpad.net/openlp/+bug/735039
  Bug #860499 in OpenLP: "Libre Office does not shut down when OpenLP is closed"
  https://bugs.launchpad.net/openlp/+bug/860499

For more details, see:
https://code.launchpad.net/~j-corwin/openlp/general/+merge/85262

Add a couple of keywords for the SOF5 importer to capitalize correctly.

When a presentation controller is not enabled, only check if the app is available when necessary (i.e. when the user opens up the Presentation Configuration page). This prevents OpenLP starting up the applications unnecessarily.

LibreOffice 3.4 has a nice launcher window that opens up when you start it now which OpenLP saw as an document window opened outside OpenLP. This is now ignored when seeing if other documents are open and Libreoffice will now close down correctly at the end.
-- 
https://code.launchpad.net/~j-corwin/openlp/general/+merge/85262
Your team OpenLP Core is requested to review the proposed merge of lp:~j-corwin/openlp/general into lp:openlp.
=== modified file 'openlp/core/lib/settingstab.py'
--- openlp/core/lib/settingstab.py	2011-06-12 16:02:52 +0000
+++ openlp/core/lib/settingstab.py	2011-12-11 22:39:26 +0000
@@ -125,3 +125,9 @@
 
         """
         pass
+
+    def tabVisible(self):
+        """
+        Tab has just been made visible to the user
+        """
+        pass

=== modified file 'openlp/core/ui/settingsdialog.py'
--- openlp/core/ui/settingsdialog.py	2011-06-12 16:02:52 +0000
+++ openlp/core/ui/settingsdialog.py	2011-12-11 22:39:26 +0000
@@ -55,7 +55,7 @@
         QtCore.QMetaObject.connectSlotsByName(settingsDialog)
         QtCore.QObject.connect(self.settingListWidget,
             QtCore.SIGNAL(u'currentRowChanged(int)'),
-            self.stackedLayout.setCurrentIndex)
+            self.tabChanged)
 
     def retranslateUi(self, settingsDialog):
         settingsDialog.setWindowTitle(translate('OpenLP.SettingsForm',

=== modified file 'openlp/core/ui/settingsform.py'
--- openlp/core/ui/settingsform.py	2011-10-11 19:54:18 +0000
+++ openlp/core/ui/settingsform.py	2011-12-11 22:39:26 +0000
@@ -116,3 +116,10 @@
         for plugin in self.plugins:
             if plugin.settings_tab:
                 plugin.settings_tab.postSetUp()
+
+    def tabChanged(self, tabIndex):
+        """
+        A different settings tab is selected
+        """
+        self.stackedLayout.setCurrentIndex(tabIndex)
+        self.stackedLayout.currentWidget().tabVisible()

=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py	2011-06-12 16:02:52 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py	2011-12-11 22:39:26 +0000
@@ -184,7 +184,15 @@
         if not desktop:
             return
         docs = desktop.getComponents()
+        cnt = 0
         if docs.hasElements():
+            list = docs.createEnumeration()
+            while list.hasMoreElements():
+                doc = list.nextElement()
+                if doc.getImplementationName() != \
+                    u'com.sun.star.comp.framework.BackingComp':
+                    cnt = cnt + 1
+        if cnt > 0:
             log.debug(u'OpenOffice not terminated as docs are still open')
         else:
             try:

=== modified file 'openlp/plugins/presentations/lib/presentationcontroller.py'
--- openlp/plugins/presentations/lib/presentationcontroller.py	2011-10-03 20:12:57 +0000
+++ openlp/plugins/presentations/lib/presentationcontroller.py	2011-12-11 22:39:26 +0000
@@ -378,7 +378,7 @@
         self.name = name
         self.document_class = document_class
         self.settings_section = self.plugin.settingsSection
-        self.available = self.check_available()
+        self.available = None
         self.temp_folder = os.path.join(
             AppLocation.get_section_data_path(self.settings_section), name)
         self.thumbnail_folder = os.path.join(
@@ -392,14 +392,19 @@
         """
         Return whether the controller is currently enabled
         """
-        if self.available:
-            return QtCore.QSettings().value(
-                self.settings_section + u'/' + self.name,
-                QtCore.QVariant(QtCore.Qt.Checked)).toInt()[0] == \
-                    QtCore.Qt.Checked
+        if QtCore.QSettings().value(
+            self.settings_section + u'/' + self.name,
+            QtCore.QVariant(QtCore.Qt.Checked)).toInt()[0] == \
+                QtCore.Qt.Checked:
+            return self.is_available()
         else:
             return False
 
+    def is_available(self):
+        if self.available is None:
+            self.available = self.check_available()
+        return self.available
+
     def check_available(self):
         """
         Presentation app is able to run on this machine

=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
--- openlp/plugins/presentations/lib/presentationtab.py	2011-06-12 16:02:52 +0000
+++ openlp/plugins/presentations/lib/presentationtab.py	2011-12-11 22:39:26 +0000
@@ -55,7 +55,6 @@
         for key in self.controllers:
             controller = self.controllers[key]
             checkbox = QtGui.QCheckBox(self.ControllersGroupBox)
-            checkbox.setEnabled(controller.available)
             checkbox.setObjectName(controller.name + u'CheckBox')
             self.PresenterCheckboxes[controller.name] = checkbox
             self.ControllersLayout.addWidget(checkbox)
@@ -81,17 +80,20 @@
         for key in self.controllers:
             controller = self.controllers[key]
             checkbox = self.PresenterCheckboxes[controller.name]
-            if controller.available:
-                checkbox.setText(controller.name)
-            else:
-                checkbox.setText(
-                    unicode(translate('PresentationPlugin.PresentationTab',
-                    '%s (unavailable)')) % controller.name)
+            self.setControllerText(checkbox, controller)
         self.AdvancedGroupBox.setTitle(UiStrings().Advanced)
         self.OverrideAppCheckBox.setText(
             translate('PresentationPlugin.PresentationTab',
             'Allow presentation application to be overriden'))
 
+    def setControllerText(self, checkbox, controller):
+        if checkbox.isEnabled():
+            checkbox.setText(controller.name)
+        else:
+            checkbox.setText(
+                unicode(translate('PresentationPlugin.PresentationTab',
+                '%s (unavailable)')) % controller.name)
+
     def load(self):
         """
         Load the settings.
@@ -113,7 +115,7 @@
         changed = False
         for key in self.controllers:
             controller = self.controllers[key]
-            if controller.available:
+            if controller.is_available():
                 checkbox = self.PresenterCheckboxes[controller.name]
                 setting_key = self.settingsSection + u'/' + controller.name
                 if QtCore.QSettings().value(setting_key) != \
@@ -133,3 +135,13 @@
             changed = True
         if changed:
             Receiver.send_message(u'mediaitem_presentation_rebuild')
+
+    def tabVisible(self):
+        """
+        Tab has just been made visible to the user
+        """
+        for key in self.controllers:
+            controller = self.controllers[key]
+            checkbox = self.PresenterCheckboxes[controller.name]
+            checkbox.setEnabled(controller.is_available())
+            self.setControllerText(checkbox, controller)

=== modified file 'openlp/plugins/songs/lib/sofimport.py'
--- openlp/plugins/songs/lib/sofimport.py	2011-12-09 00:08:59 +0000
+++ openlp/plugins/songs/lib/sofimport.py	2011-12-11 22:39:26 +0000
@@ -345,7 +345,8 @@
                 u'I\'M', u'I\'LL', u'SAVIOUR', u'O', u'YOU\'RE', u'HE', u'HIS',
                 u'HIM', u'ZION', u'EMMANUEL', u'MAJESTY', u'JESUS\'', u'JIREH',
                 u'JUDAH', u'LION', u'LORD\'S', u'ABRAHAM', u'GOD\'S',
-                u'FATHER\'S', u'ELIJAH'):
+                u'FATHER\'S', u'ELIJAH' u'MARTHA', u'CHRISTMAS', u'ALPHA', 
+                u'OMEGA'):
                 textarr[i] = textarr[i].capitalize()
             else:
                 textarr[i] = textarr[i].lower()


Follow ups