commit 8fdaaf16fb7f38588dd2b64cddf2996e31c1786e
Author: FeRD (Frank Dana) <ferdnyc(a)gmail.com>
Date: Sun Dec 27 09:47:41 2020 -0500
Add patch to remove Ubuntu Unity hooks
openshot-2.5.1-unity.patch | 71 ++++++++++++++++++++++++++++++++++++++++++++++
openshot.spec | 9 +++++-
2 files changed, 79 insertions(+), 1 deletion(-)
---
diff --git a/openshot-2.5.1-unity.patch b/openshot-2.5.1-unity.patch
new file mode 100644
index 0000000..931656d
--- /dev/null
+++ b/openshot-2.5.1-unity.patch
@@ -0,0 +1,71 @@
+From 39a28df904fca53bcee07dfe502237e4e282626b Mon Sep 17 00:00:00 2001
+From: "FeRD (Frank Dana)" <ferdnyc(a)gmail.com>
+Date: Sun, 27 Dec 2020 09:38:48 -0500
+Subject: [PATCH] Backport fix for Unity progress crashes
+
+The Ubuntu Unity integration is causing crashes with Python 3.9,
+and since it's useless under Fedora anyway, we can just remove it.
+---
+ src/windows/main_window.py | 36 ++----------------------------------
+ 1 file changed, 2 insertions(+), 34 deletions(-)
+
+diff --git a/src/windows/main_window.py b/src/windows/main_window.py
+index d353596..8b21ec0 100644
+--- a/src/windows/main_window.py
++++ b/src/windows/main_window.py
+@@ -2415,36 +2415,11 @@ class MainWindow(QMainWindow, updates.UpdateWatcher):
+ self.cache_object = new_cache_object
+
+ def FrameExported(self, title_message, start_frame, end_frame, current_frame):
+- """Connect to Unity launcher (for Linux)"""
+- try:
+- if sys.platform == "linux" and self.has_launcher:
+- if not self.unity_launchers:
+- # Get launcher only once
+- import gi
+- gi.require_version('Unity', '7.0')
+- from gi.repository import Unity
+-
self.unity_launchers.append(Unity.LauncherEntry.get_for_desktop_id("openshot-qt.desktop"))
+-
self.unity_launchers.append(Unity.LauncherEntry.get_for_desktop_id("appimagekit-openshot-qt.desktop"))
+-
+- # Set progress and show progress bar
+- for launcher in self.unity_launchers:
+- launcher.set_property("progress", current_frame /
(end_frame - start_frame))
+- launcher.set_property("progress_visible", True)
+-
+- except Exception:
+- # Just ignore
+- self.has_launcher = False
++ pass
+
+ def ExportFinished(self, path):
+ """Export has completed"""
+- try:
+- if sys.platform == "linux" and self.has_launcher:
+- for launcher in self.unity_launchers:
+- # Set progress on Unity launcher and hide progress bar
+- launcher.set_property("progress", 0.0)
+- launcher.set_property("progress_visible", False)
+- except Exception:
+- pass
++ pass
+
+ def transformTriggered(self, clip_id):
+ """Handle transform signal (to keep track of whether a transform
is happening or not)"""
+@@ -2677,13 +2652,6 @@ class MainWindow(QMainWindow, updates.UpdateWatcher):
+ # Create tutorial manager
+ self.tutorial_manager = TutorialManager(self)
+
+- # Connect to Unity DBus signal (if linux)
+- if sys.platform == "linux":
+- self.unity_launchers = []
+- self.has_launcher = True
+- self.ExportFrame.connect(self.FrameExported)
+- self.ExportEnded.connect(self.ExportFinished)
+-
+ # Save settings
+ s.save()
+
+--
+2.29.2
+
diff --git a/openshot.spec b/openshot.spec
index 4410e59..6cc2ee5 100644
--- a/openshot.spec
+++ b/openshot.spec
@@ -3,7 +3,7 @@
Name: openshot
Version: 2.5.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Create and edit videos and movies
Group: Applications/Multimedia
@@ -18,6 +18,9 @@ Source100: openshot-find-lang.sh
# Add openshot-owner@rpmfusion to appdata as update_contact
Patch1: openshot-rpmfusion-contact.patch
+# Backported fix for crashes under Python 3.9, see
+#
https://github.com/OpenShot/openshot-qt/pull/3937/
+Patch2: openshot-2.5.1-unity.patch
BuildArch: noarch
# libopenshot is unavailable on ppc64le, see rfbz #5528
@@ -153,6 +156,10 @@ fi
%changelog
+* Sun Dec 27 2020 FeRD (Frank Dana) <ferdnyc(a)gmail.com> - 2.5.1-4
+- Backport fix to remove Ubuntu Unity integration, causing crashes in
+ Python 3.9.
+
* Tue Aug 18 2020 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
2.5.1-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild