parent
12e9a2150b
commit
2044116828
@ -1,64 +0,0 @@
|
||||
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
|
@ -1 +1 @@
|
||||
SHA512 (desktop-3.6.1.tar.gz) = 444062440570efd82b8cd9acf85dcc5826552c86c31edc19ae2f87d9fdf23afa501aac03e4b8135bb037feb523fdcbc230339387acbf56c0ca6e5df3e7bae583
|
||||
SHA512 (desktop-3.6.2.tar.gz) = 1baae103c08a981e86aee74550d31a195f639fef830d0a78213f7890b820ddf2cd39fa742b99c9222930a4ef9587acc820678c56527e98ca482689b3bffd14ff
|
||||
|
Loading…
Reference in new issue