[gedit-plugins] Remove use of has_file_scheme function



commit 826d613e858f0afe1c1fe2d6dce4e1768ab6bdaa
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Jan 6 23:22:06 2013 +0100

    Remove use of has_file_scheme function

 plugins/terminal/terminal.py |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/plugins/terminal/terminal.py b/plugins/terminal/terminal.py
index 575b5ec..e4699e1 100644
--- a/plugins/terminal/terminal.py
+++ b/plugins/terminal/terminal.py
@@ -268,12 +268,11 @@ class TerminalPlugin(GObject.Object, Gedit.WindowActivatable):
 
     def get_active_document_directory(self):
         doc = self.window.get_active_document()
-        if doc is None:
-            return None
-        location = doc.get_location()
-        if location is not None and Gedit.utils_location_has_file_scheme(location):
-            directory = location.get_parent()
-            return directory.get_path()
+        if doc:
+            location = doc.get_location()
+            if location and location.has_uri_scheme(location, "file"):
+                directory = location.get_parent()
+                return directory.get_path()
         return None
 
     def on_panel_populate_popup(self, panel, menu):



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