Hi Debian QT/KDE team!
Nautilus 43 has been ported to GTK 4 which affects the nautilus extension in
kdeconnect. Attached is a patch created from my pull request at [1] which uses
the suggestion from [2] and is identical to the patch used in [3] for the same
function.
This is needed before nautilus 43 can transition.
Thanks!
[1] https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/488
[2] https://gitlab.gnome.org/GNOME/nautilus-python/-/blob/master/docs/
reference/nautilus-python-migrating-to-4.xml
[3] https://github.com/GSConnect/gnome-shell-extension-gsconnect/pull/1441/
commits/c7b8aeddcab97ecbaefa35ccbfde0e1a1928e493
----
Erich Eickmeyer
Ubuntu MOTU
Leader, Ubuntu Studio
>From 9b6d3a7c3db8e9fb4e01a33fff5ad3f96cf997df Mon Sep 17 00:00:00 2001
From: Erich Eickmeyer <er...@ericheickmeyer.com>
Date: Wed, 17 Aug 2022 14:10:16 +0000
Subject: [PATCH] nautilus: Update for compatibility with Nautilus 43
---
nautilus-extension/kdeconnect-share.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/nautilus-extension/kdeconnect-share.py b/nautilus-extension/kdeconnect-share.py
index 930f8cb0..3522d3b0 100644
--- a/nautilus-extension/kdeconnect-share.py
+++ b/nautilus-extension/kdeconnect-share.py
@@ -84,7 +84,10 @@ class KdeConnectShareExtension(GObject.GObject, Nautilus.MenuProvider):
variant = GLib.Variant('(s)', (file.get_uri(),))
device_proxy.call_sync('shareUrl', variant, 0, -1, None)
- def get_file_items(self, window, files):
+ def get_file_items(self, *args):
+ # `args` will be `[files: List[Nautilus.FileInfo]]` in Nautilus 4.0 API,
+ # and `[window: Gtk.Widget, files: List[Nautilus.FileInfo]]` in Nautilus 3.0 API.
+ files = args[-1]
#We can only send regular files
for uri in files:
--
GitLab