externaltools: use the right methods.

parent 6a90e8ae
......@@ -101,7 +101,7 @@ class Capture(GObject.Object):
fcntl.fcntl(self.pipe.stdout.fileno(), fcntl.F_SETFL, flags)
GObject.io_add_watch(self.pipe.stdout,
GObject.IOCondition.IN | GObject.IOCondition.HUP,
GObject.IO_IN | GObject.IO_HUP,
self.on_output)
if self.flags & self.CAPTURE_STDERR:
......@@ -110,7 +110,7 @@ class Capture(GObject.Object):
fcntl.fcntl(self.pipe.stderr.fileno(), fcntl.F_SETFL, flags)
GObject.io_add_watch(self.pipe.stderr,
GObject.IOCondition.IN | GObject.IOCondition.HUP,
GObject.IO_IN | GObject.IO_HUP,
self.on_output)
# IO
......
......@@ -72,7 +72,7 @@ class AbsoluteFileLookupProvider(FileLookupProvider):
def lookup(self, path):
if os.path.isabs(path) and os.path.isfile(path):
return gio.File(path)
return Gio.file_new_for_path(path)
else:
return None
......@@ -92,7 +92,7 @@ class CwdFileLookupProvider(FileLookupProvider):
real_path = os.path.join(cwd, path)
if os.path.isfile(real_path):
return gio.File(real_path)
return Gio.file_new_for_path(real_path)
else:
return None
......@@ -116,7 +116,7 @@ class OpenDocumentRelPathFileLookupProvider(FileLookupProvider):
rel_path = location.get_parent().get_path()
joined_path = os.path.join(rel_path, path)
if os.path.isfile(joined_path):
return gio.File(joined_path)
return Gio.file_new_for_path(joined_path)
return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment