Skip to content

Commit

Permalink
qvm_convert_pdf_nautilus.py: adjust to work with Nautilus API 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
noskb committed Nov 28, 2022
1 parent 92e2598 commit ebb4460
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qvm_convert_pdf_nautilus.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ class ConvertPdfItemExtension(GObject.GObject, Nautilus.MenuProvider):
machine for safe processing
'''

def get_file_items(self, window, files):
def get_file_items(self, *args):
'''Attaches context menu in Nautilus to local file objects only.
`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]
if not files:
return

Expand Down

0 comments on commit ebb4460

Please sign in to comment.