Move/Copy many files in one step via nautilus extension
This commit is contained in:
parent
d698e7878f
commit
9fa75314f1
@ -26,11 +26,9 @@ class CopyToAppvmItemExtension(GObject.GObject, Nautilus.MenuProvider):
|
|||||||
def on_menu_item_clicked(self, menu, files):
|
def on_menu_item_clicked(self, menu, files):
|
||||||
'''Called when user chooses files though Nautilus context menu.
|
'''Called when user chooses files though Nautilus context menu.
|
||||||
'''
|
'''
|
||||||
for file_obj in files:
|
cmd = [file_obj.get_location().get_path()
|
||||||
|
for file_obj in files
|
||||||
# Check if file still exists
|
# Check if file is not gone
|
||||||
if file_obj.is_gone():
|
if not file_obj.is_gone()]
|
||||||
return
|
cmd.insert(0, '/usr/lib/qubes/qvm-copy-to-vm.gnome')
|
||||||
|
subprocess.call(cmd)
|
||||||
gio_file = file_obj.get_location()
|
|
||||||
subprocess.call(['/usr/lib/qubes/qvm-copy-to-vm.gnome', gio_file.get_path()])
|
|
||||||
|
@ -26,11 +26,9 @@ class MoveToAppvmItemExtension(GObject.GObject, Nautilus.MenuProvider):
|
|||||||
def on_menu_item_clicked(self, menu, files):
|
def on_menu_item_clicked(self, menu, files):
|
||||||
'''Called when user chooses files though Nautilus context menu.
|
'''Called when user chooses files though Nautilus context menu.
|
||||||
'''
|
'''
|
||||||
for file_obj in files:
|
cmd = [file_obj.get_location().get_path()
|
||||||
|
for file_obj in files
|
||||||
# Check if file still exists
|
# Check if file is not gone
|
||||||
if file_obj.is_gone():
|
if not file_obj.is_gone()]
|
||||||
return
|
cmd.insert(0, '/usr/lib/qubes/qvm-move-to-vm.gnome')
|
||||||
|
subprocess.call(cmd)
|
||||||
gio_file = file_obj.get_location()
|
|
||||||
subprocess.call(['/usr/lib/qubes/qvm-move-to-vm.gnome', gio_file.get_path()])
|
|
||||||
|
Loading…
Reference in New Issue
Block a user