[gnome-documents/wip/lokdocview-rebase: 15/29] Use GFile.get_path() to get a native path



commit 0a6b08d30df55b77d8cb9bc8d6f44ce054876d1b
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Dec 4 19:05:11 2015 +0100

    Use GFile.get_path() to get a native path
    
    This means that we can support remote filesystems mounted by GNOME
    (like OwnCloud).

 src/lokview.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/lokview.js b/src/lokview.js
index fcf0b34..1896c9c 100644
--- a/src/lokview.js
+++ b/src/lokview.js
@@ -169,7 +169,8 @@ const LOKView = new Lang.Class({
 
     _onLoadFinished: function(manager, doc, docModel) {
         if (docModel == null && doc != null) {
-            let [ location, ] = GLib.filename_from_uri (doc.uri);
+            let file = Gio.File.new_for_uri (doc.uri);
+            let location = file.get_path();
             this._doc = doc;
             this.view.open_document(location, "{}", null, Lang.bind(this, this.open_document_cb));
             this._progressBar.show();


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