[gedit/zbrown/deteplification-src: 122/633] quickopen: Fix use of removed document `get_location` method




commit 7f399f8d1cedbcd997b143f9b62cb62b6294cdf9
Author: Ben Mather <bwhmather bwhmather com>
Date:   Sun Feb 9 10:45:31 2020 +0000

    quickopen: Fix use of removed document `get_location` method
    
    This currently causes the quickopen dialogue to crash while populating
    the list of starting directories, preventing it from opening.
    
    Solution appears to be to get the file object associated with the
    document and call the `get_location` method on that.

 plugins/quickopen/quickopen/virtualdirs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/quickopen/quickopen/virtualdirs.py b/plugins/quickopen/quickopen/virtualdirs.py
index e080e2782..6792f9b4c 100644
--- a/plugins/quickopen/quickopen/virtualdirs.py
+++ b/plugins/quickopen/quickopen/virtualdirs.py
@@ -79,7 +79,7 @@ class CurrentDocumentsDirectory(VirtualDirectory):
 
     def fill(self, window):
         for doc in window.get_documents():
-            location = doc.get_location()
+            location = doc.get_file().get_location()
 
             if location:
                 self.append(location)


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