[gnome-documents/wip/lokdocview-rebase: 10/24] Use GFile.get_path()	to get a native path
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-documents/wip/lokdocview-rebase: 10/24] Use GFile.get_path()	to get a native path
- Date: Mon,  4 Jan 2016 12:34:46 +0000 (UTC)
commit 28f63469fa72b38e7738eabee9f0197405bafe82
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]