commit c084703c41143fcc0204b9c9d383ca98358e4b1e
Author: FeRD (Frank Dana) <ferdnyc(a)gmail.com>
Date: Wed Nov 14 17:46:46 2018 -0500
Add patch to fix opening files
Opening project files via commandline / .desktop "Open with..."
was broken in 2.4.3, this applies the upstream fix (#2355)
openshot-2.4.3-cmdline.patch | 51 ++++++++++++++++++++++++++++++++++++++++++++
openshot.spec | 7 +++++-
2 files changed, 57 insertions(+), 1 deletion(-)
---
diff --git a/openshot-2.4.3-cmdline.patch b/openshot-2.4.3-cmdline.patch
new file mode 100644
index 0000000..4b98657
--- /dev/null
+++ b/openshot-2.4.3-cmdline.patch
@@ -0,0 +1,51 @@
+From e095de96bca04508beb31d8802a6177c5c34df4d Mon Sep 17 00:00:00 2001
+From: "FeRD (Frank Dana)" <ferdnyc(a)gmail.com>
+Date: Wed, 14 Nov 2018 17:04:17 -0500
+Subject: [PATCH] Pass remaining command line args to Qt
+
+Make sure we don't error out when a project file name is passed on the
+command line.
+
+Fixes #1872
+---
+ src/launch.py | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/src/launch.py b/src/launch.py
+index 76c5d5e9..a7f676f7 100755
+--- a/src/launch.py
++++ b/src/launch.py
+@@ -41,7 +41,7 @@
+ """
+
+ import sys
+-from argparse import ArgumentParser
++from argparse import ArgumentParser, REMAINDER
+
+ try:
+ from classes import info
+@@ -67,6 +67,7 @@ def main():
+ action='store_true', help='List all language '
+ 'codes supported by OpenShot')
+ parser.add_argument('-V', '--version', action='store_true')
++ parser.add_argument('remain', nargs=REMAINDER)
+
+ args = parser.parse_args()
+
+@@ -94,8 +95,11 @@ def main():
+ log.info(" OpenShot (version %s)" % info.SETUP['version'])
+ log.info("------------------------------------------------")
+
+- # Create Qt application
+- app = OpenShotApp(sys.argv)
++ # Create Qt application, pass any unprocessed arguments
++ argv = [sys.argv[0]]
++ for arg in args.remain:
++ argv.append(arg)
++ app = OpenShotApp(argv)
+
+ # Run and return result
+ sys.exit(app.run())
+--
+2.19.1
+
diff --git a/openshot.spec b/openshot.spec
index 3205a73..973cd7a 100644
--- a/openshot.spec
+++ b/openshot.spec
@@ -3,7 +3,7 @@
Name: openshot
Version: 2.4.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Create and edit videos and movies
Group: Applications/Multimedia
@@ -22,6 +22,8 @@ Source100: openshot-find-lang.sh
Patch0: openshot-2.4.3-appdata.patch
# Add openshot-owner@rpmfusion to appdata as update_contact
Patch1: openshot-rpmfusion-contact.patch
+# Fix opening project files via the command line / .desktop "Open with..."
+Patch2: openshot-2.4.3-cmdline.patch
BuildArch: noarch
@@ -157,6 +159,9 @@ fi
%changelog
+* Wed Nov 14 2018 FeRD (Frank Dana) <ferdnyc AT gmail com> - 2.4.3-2
+- Add patch to fix opening files via commandline / .desktop
+
* Mon Sep 3 2018 FeRD (Frank Dana) <ferdnyc AT gmail com> - 2.4.3-1
- New upstream release 2.4.3
- Update libopenshot dependency version to new 0.2.2 release
Show replies by date