Skip to content

Commit d67856f

Browse files
committed
Make it compatible with Nautilus 43
1 parent 12538b3 commit d67856f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

code-nautilus.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
#
66
# This script was written by cra0zy and is released to the public domain
77

8-
from gi import require_version
9-
require_version('Gtk', '3.0')
10-
require_version('Nautilus', '3.0')
118
from gi.repository import Nautilus, GObject
129
from subprocess import call
1310
import os
@@ -42,7 +39,8 @@ def launch_vscode(self, menu, files):
4239

4340
call(VSCODE + ' ' + args + safepaths + '&', shell=True)
4441

45-
def get_file_items(self, window, files):
42+
def get_file_items(self, *args):
43+
files = args[-1]
4644
item = Nautilus.MenuItem(
4745
name='VSCodeOpen',
4846
label='Open in ' + VSCODENAME,
@@ -52,7 +50,8 @@ def get_file_items(self, window, files):
5250

5351
return [item]
5452

55-
def get_background_items(self, window, file_):
53+
def get_background_items(self, *args):
54+
file_ = args[-1]
5655
item = Nautilus.MenuItem(
5756
name='VSCodeOpenBackground',
5857
label='Open in ' + VSCODENAME,

0 commit comments

Comments
 (0)