From 9b6d3a7c3db8e9fb4e01a33fff5ad3f96cf997df Mon Sep 17 00:00:00 2001 From: Erich Eickmeyer 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 930f8cb0f..3522d3b01 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: