Skip to content

Commit

Permalink
Fix compatibility with newer python3-nautilus
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Pratta Teodosio <nathan.teodosio@canonical.com>
  • Loading branch information
nteodosio authored and claucambra committed Oct 29, 2022
1 parent bbfe9ca commit 2ba0820
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion shell_integration/nautilus/syncstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,13 @@ def check_registered_paths(self, filename):
break
return (topLevelFolder, internalFile)

def get_file_items(self, window, files):
# The get_file_items method of Nautilus.MenuProvider no longer takes
# the window argument. To keep supporting older versions of Nautilus,
# we can use variadic arguments.
def get_file_items(self, *args):
# Show the menu extension to share a file or folder

files = args[-1]
# Get usable file paths from the uris
all_internal_files = True
for i, file_uri in enumerate(files):
Expand Down

0 comments on commit 2ba0820

Please sign in to comment.