[gnome-documents/wip/lokdocview-rebase] Start loading LO docs when load-started is emitted



commit 0ab782f83a21e4827fcfef28ef9938dd595c1d7c
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Dec 6 15:36:06 2015 +0100

    Start loading LO docs when load-started is emitted
    
    Note that this will break the Evince view because of the way signals are
    handled.

 libgd          |    2 +-
 src/lokview.js |   14 ++++++--------
 2 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/libgd b/libgd
index 9eecd99..7c12355 160000
--- a/libgd
+++ b/libgd
@@ -1 +1 @@
-Subproject commit 9eecd99e940a2579be64b79791337dc5048cabdc
+Subproject commit 7c1235591c4aa866b28c8b8dabdcb3b9084c5763
diff --git a/src/lokview.js b/src/lokview.js
index c7806da..d133bd5 100644
--- a/src/lokview.js
+++ b/src/lokview.js
@@ -146,7 +146,12 @@ const LOKView = new Lang.Class({
            }));
     },
 
-    _onLoadStarted: function() {
+    _onLoadStarted: function(manager, doc) {
+        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();
     },
 
     _onLoadError: function(manager, doc, message, exception) {
@@ -171,13 +176,6 @@ const LOKView = new Lang.Class({
     },
 
     _onLoadFinished: function(manager, doc, docModel) {
-        if (docModel == null && doc != null) {
-            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();
-        }
     },
 
     reset: function () {


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