← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~mzibricky/openlp/bug-1018442 into lp:openlp

 

matysek has proposed merging lp:~mzibricky/openlp/bug-1018442 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1018442 in OpenLP: "OpenLP started  from dmg behaves like portable app (OSX)"
  https://bugs.launchpad.net/openlp/+bug/1018442

For more details, see:
https://code.launchpad.net/~mzibricky/openlp/bug-1018442/+merge/112444

This fix removes the -psn_XXXX argument on Mac.
-- 
https://code.launchpad.net/~mzibricky/openlp/bug-1018442/+merge/112444
Your team OpenLP Core is requested to review the proposed merge of lp:~mzibricky/openlp/bug-1018442 into lp:openlp.
=== modified file 'openlp.pyw'
--- openlp.pyw	2012-06-22 14:14:53 +0000
+++ openlp.pyw	2012-06-27 21:36:22 +0000
@@ -27,6 +27,7 @@
 # Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
 ###############################################################################
 
+import sys
 from openlp.core import main
 
 
@@ -34,4 +35,10 @@
     """
     Instantiate and run the application.
     """
+    # Mac OS X passes arguments like '-psn_XXXX' to gui application.
+    # This argument is process serial number. However, this causes
+    # conflict with other OpenLP arguments. Since we do not use this
+    # argument we can delete it to avoid any potential conflicts.
+    if sys.platform.startswith('darwin'):
+        sys.argv = filter(lambda x: not x.startswith('-psn'), sys.argv)
     main()


Follow ups