[gedit] Use doc.get_location where possible.



commit 2919c5b733c00cf5e349351b08a79e0619b14f68
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sat Apr 3 12:48:26 2010 +0200

    Use doc.get_location where possible.

 plugins/quickopen/quickopen/virtualdirs.py  |    5 +++--
 plugins/quickopen/quickopen/windowhelper.py |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/quickopen/quickopen/virtualdirs.py b/plugins/quickopen/quickopen/virtualdirs.py
index b15b7e7..ef0b8dc 100644
--- a/plugins/quickopen/quickopen/virtualdirs.py
+++ b/plugins/quickopen/quickopen/virtualdirs.py
@@ -80,7 +80,8 @@ class CurrentDocumentsDirectory(VirtualDirectory):
 
         def fill(self, window):
                 for doc in window.get_documents():
-                        if doc.get_uri():
-                                self.append(gio.File(doc.get_uri()))
+                        location = doc.get_location()
+                        if location:
+                                self.append(location)
 
 # ex:ts=8:et:
diff --git a/plugins/quickopen/quickopen/windowhelper.py b/plugins/quickopen/quickopen/windowhelper.py
index e6dea96..992c28d 100644
--- a/plugins/quickopen/quickopen/windowhelper.py
+++ b/plugins/quickopen/quickopen/windowhelper.py
@@ -84,7 +84,7 @@ class WindowHelper:
 
                 # Current document directory
                 if doc and doc.is_local():
-                        gfile = gio.File(doc.get_uri())
+                        gfile = doc.get_location()
                         paths.append(gfile.get_parent())
 
                 # File browser root directory



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