← Back to team overview

openlp-core team mailing list archive

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

 

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

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #693150 in OpenLP: "Custom Slide Display footer option"
  https://bugs.launchpad.net/openlp/+bug/693150
  Bug #693202 in OpenLP: "delete theme"
  https://bugs.launchpad.net/openlp/+bug/693202
  Bug #712252 in OpenLP: "Service song already in database detection logic broken"
  https://bugs.launchpad.net/openlp/+bug/712252

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

Due to a mistake on my part I have mixed up updates and merges.
Changes here
 Define a mime type for the install 
 Update the desktop file to use it.   

This may need to be adapted for each environment

Fix up the code to use the passed file and load it as a service.

Tested on Fedora only.
-- 
https://code.launchpad.net/~trb143/openlp/bugs/+merge/53306
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp.pyw'
--- openlp.pyw	2011-03-14 06:48:23 +0000
+++ openlp.pyw	2011-03-14 19:17:14 +0000
@@ -184,7 +184,12 @@
         # make sure Qt really display the splash screen
         self.processEvents()
         # start the main app window
+<<<<<<< TREE
         self.mainWindow = MainWindow(screens, app_version, self.clipboard())
+=======
+        self.mainWindow = MainWindow(screens, app_version, self.clipboard(),
+            not has_run_wizard, self.arguments)
+>>>>>>> MERGE-SOURCE
         self.mainWindow.show()
         if show_splash:
             # now kill the splashscreen
@@ -252,7 +257,6 @@
     logfile.setFormatter(logging.Formatter(
         u'%(asctime)s %(name)-55s %(levelname)-8s %(message)s'))
     log.addHandler(logfile)
-    logging.addLevelName(15, u'Timer')
     # Parse command line options and deal with them.
     (options, args) = parser.parse_args()
     qt_args = []

=== modified file 'openlp/.version'
--- openlp/.version	2010-09-14 18:18:47 +0000
+++ openlp/.version	2011-03-14 19:17:14 +0000
@@ -1,1 +1,1 @@
-1.9.2-bzr987
\ No newline at end of file
+1.9.4-bzr1387
\ No newline at end of file

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2011-03-14 06:54:18 +0000
+++ openlp/core/ui/mainwindow.py	2011-03-14 19:17:14 +0000
@@ -463,11 +463,19 @@
 
     actionList = ActionList()
 
+<<<<<<< TREE
     def __init__(self, screens, applicationVersion, clipboard):
+=======
+    def __init__(self, screens, applicationVersion, clipboard, firstTime, args):
+>>>>>>> MERGE-SOURCE
         """
         This constructor sets up the interface, the various managers, and the
         plugins.
         """
+        # Turn Stringlist back to an array
+        self.args = []
+        for a in args():
+            self.args.extend([a])
         QtGui.QMainWindow.__init__(self)
         self.screens = screens
         self.applicationVersion = applicationVersion
@@ -626,7 +634,14 @@
                 self.MediaToolBox.setCurrentIndex(savedPlugin)
         self.settingsForm.postSetUp()
         Receiver.send_message(u'cursor_normal')
-
+<<<<<<< TREE
+
+=======
+        # Import themes if first time
+        if firstTime:
+            self.themeManagerContents.firstTime()
+
+>>>>>>> MERGE-SOURCE
     def setAutoLanguage(self, value):
         self.LanguageGroup.setDisabled(value)
         LanguageManager.auto_language = value
@@ -653,7 +668,9 @@
         if self.liveController.display.isVisible():
             self.liveController.display.setFocus()
         self.activateWindow()
-        if QtCore.QSettings().value(
+        if len(self.args) > 0:
+            self.ServiceManagerContents.loadFile(unicode(self.args[0]))
+        elif QtCore.QSettings().value(
             self.generalSettingsSection + u'/auto open',
             QtCore.QVariant(False)).toBool():
             self.ServiceManagerContents.loadLastFile()

=== modified file 'resources/openlp.desktop'
--- resources/openlp.desktop	2010-09-27 18:34:40 +0000
+++ resources/openlp.desktop	2011-03-14 19:17:14 +0000
@@ -3,11 +3,11 @@
 Comment[de]=
 Comment=
 Encoding=UTF-8
-Exec=openlp
+Exec=openlp %F
 GenericName[de]=Church lyrics projection
 GenericName=Church lyrics projection
 Icon=openlp
-MimeType=
+MimeType=application/x-openlp-service;
 Name[de]=OpenLP
 Name=OpenLP
 Path=

=== added file 'resources/openlp.xml'
--- resources/openlp.xml	1970-01-01 00:00:00 +0000
+++ resources/openlp.xml	2011-03-14 19:17:14 +0000
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+It comes with ABSOLUTELY NO WARRANTY, to the extent permitted by law. You may
+redistribute copies of update-mime-database under the terms of the GNU General
+Public License. For more information about these matters, see the file named
+COPYING.
+-->
+<!--
+Notes:
+- the mime types in this file are valid with the version 0.30 of the
+  shared-mime-info package.
+- the "fdo #xxxxx" are the wish in the freedesktop.org bug database to include
+  the mime type there.
+--> 
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info";>
+  <mime-type type="application/x-openlp-service">
+    <sub-class-of type="application/zip"/>
+    <comment>OpenLP Service File</comment>
+    <glob pattern="*.osz"/>
+  </mime-type> 
+  <mime-type type="application/x-openlp-theme">
+    <sub-class-of type="application/zip"/>
+    <comment>OpenLP Theme File</comment>
+    <glob pattern="*.otz"/>
+  </mime-type> 
+</mime-info>