Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qubes-rpc/nautilus: Add support for Nautilus API 4.0 #396

Merged
merged 1 commit into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion qubes-rpc/nautilus/qvm_copy_nautilus.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ class CopyToAppvmItemExtension(GObject.GObject, Nautilus.MenuProvider):
Uses the nautilus-python api to provide a context menu with Nautilus which
will enable the user to select file(s) to to copy to another AppVM
'''
def get_file_items(self, window, files):
def get_file_items(self, *args):
'''Attaches context menu in Nautilus

`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
6 changes: 5 additions & 1 deletion qubes-rpc/nautilus/qvm_dvm_nautilus.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ class OpenInDvmItemExtension(GObject.GObject, Nautilus.MenuProvider):
will enable the user to select file(s) to to open in a disposableVM
'''

def get_file_items(self, window, files):
def get_file_items(self, *args):
'''Attaches context menu in Nautilus

`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
6 changes: 5 additions & 1 deletion qubes-rpc/nautilus/qvm_move_nautilus.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ class MoveToAppvmItemExtension(GObject.GObject, Nautilus.MenuProvider):
Uses the nautilus-python api to provide a context menu within Nautilus which
will enable the user to select file(s) to to move to another AppVM
'''
def get_file_items(self, window, files):
def get_file_items(self, *args):
'''Attaches context menu in Nautilus

`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