[gedit] externaltools: use the right methods.



commit f08e9d2953fa213f77dce635127c3a0131fba02f
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu Jun 16 12:22:04 2011 +0200

    externaltools: use the right methods.

 plugins/externaltools/tools/capture.py    |    4 ++--
 plugins/externaltools/tools/filelookup.py |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/plugins/externaltools/tools/capture.py b/plugins/externaltools/tools/capture.py
index c513526..6184a82 100644
--- a/plugins/externaltools/tools/capture.py
+++ b/plugins/externaltools/tools/capture.py
@@ -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
diff --git a/plugins/externaltools/tools/filelookup.py b/plugins/externaltools/tools/filelookup.py
index 499776e..f8ebacf 100644
--- a/plugins/externaltools/tools/filelookup.py
+++ b/plugins/externaltools/tools/filelookup.py
@@ -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
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]