Add upstream patch to support nautilus 43; fixes bz#2131796

f40
Mukundan Ragavan 2 years ago
parent 8e4138b576
commit 0587ce5a0a

@ -0,0 +1,64 @@
From 7d40ea421f25f816fe3c780c7ebefeabff9617a9 Mon Sep 17 00:00:00 2001
From: Gabriele Musco <emaildigabry@gmail.com>
Date: Mon, 3 Oct 2022 13:46:18 +0200
Subject: [PATCH 1/2] feat: support Nautilus 4.0 API
As explained in the comment, the Nautilus 4.0 API just passes files without the window object (which was unused anyway). This small fix keeps compatibility with the 3.0 API and checks the number of arguments.
Would be really nice if you could make this count towards hacktoberfest as well!
Signed-off-by: Gabriele Musco <emaildigabry@gmail.com>
---
shell_integration/nautilus/syncstate.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/shell_integration/nautilus/syncstate.py b/shell_integration/nautilus/syncstate.py
index c4dacb5b0f5..5733cf69d88 100644
--- a/shell_integration/nautilus/syncstate.py
+++ b/shell_integration/nautilus/syncstate.py
@@ -26,7 +26,7 @@
import tempfile
import time
-from gi.repository import GObject, Nautilus
+from repository import GObject, Nautilus
# Note: setappname.sh will search and replace 'ownCloud' on this file to update this line and other
# occurrences of the name
@@ -200,8 +200,11 @@ def check_registered_paths(self, filename):
break
return (topLevelFolder, internalFile)
- def get_file_items(self, window, files):
+ def get_file_items(self, *args):
# Show the menu extension to share a file or folder
+
+ # Nautilus 3.0 API passes args (window, files), 4.0 API just passes files
+ files = args[0] if len(args) == 1 else args[1]
# Get usable file paths from the uris
all_internal_files = True
From 2543329741b731ef01e03d24683efa73da4b3f82 Mon Sep 17 00:00:00 2001
From: Gabriele Musco <emaildigabry@gmail.com>
Date: Mon, 3 Oct 2022 21:09:26 +0200
Subject: [PATCH 2/2] fix import
Signed-off-by: Gabriele Musco <emaildigabry@gmail.com>
---
shell_integration/nautilus/syncstate.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shell_integration/nautilus/syncstate.py b/shell_integration/nautilus/syncstate.py
index 5733cf69d88..b6141e00102 100644
--- a/shell_integration/nautilus/syncstate.py
+++ b/shell_integration/nautilus/syncstate.py
@@ -26,7 +26,7 @@
import tempfile
import time
-from repository import GObject, Nautilus
+from gi.repository import GObject, Nautilus
# Note: setappname.sh will search and replace 'ownCloud' on this file to update this line and other
# occurrences of the name

@ -15,8 +15,11 @@ Source0: https://github.com/nextcloud/desktop/archive/v%{version}/desktop
Source1: com.nextcloud.desktopclient.nextcloud.metainfo.xml
# Patch0: fixes GNOME quirks on Wayland sessions. Read
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/3BVLBS4B3XHJEXFVGD7RK2ZMXZG6JQZT/
Patch0: xcb_%{version}.patch
Patch0: xcb_%{version}.patch
# Nautilus 43 support
# https://github.com/nextcloud/desktop/pull/5001
Patch1: nautilus_43.patch
%if 0%{?rhel}
BuildRequires: rpmautospec-rpm-macros
@ -155,7 +158,7 @@ The nextcloud desktop client dolphin extension.
%prep
%setup -n desktop-%{version}
%patch0 -p1
%patch1 -p1
# change compiler flag
sed -i 's/-fPIE/-fPIC/g' src/gui/CMakeLists.txt

Loading…
Cancel
Save