[gnome-documents/wip/lokdocview-rebase: 19/22] Fix error view appearing when loading LO docs



commit 66b9692bbf61de83de60a0de9353b1ae28a04643
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Dec 11 12:54:38 2015 +0100

    Fix error view appearing when loading LO docs

 src/lokview.js |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/lokview.js b/src/lokview.js
index 183c747..5b54bf1 100644
--- a/src/lokview.js
+++ b/src/lokview.js
@@ -182,8 +182,7 @@ const LOKView = new Lang.Class({
             this.hasParts = false;
 
         this._progressBar.hide();
-        this.set_visible_child_full('view', Gtk.StackTransitionType.NONE);
-        this.view.show();
+        this.set_visible_child_name('view');
         this.view.set_edit(false);
         // FIXME https://bugs.documentfoundation.org/show_bug.cgi?id=96384
         this._copy.enabled = true;
@@ -192,13 +191,15 @@ const LOKView = new Lang.Class({
     reset: function () {
         if (!this.view)
             return;
-        this.view.hide()
+        this.view.reset_view();
+        this.set_visible_child_full('view', Gtk.StackTransitionType.NONE);
     },
 
     _createView: function() {
         if (isAvailable()) {
             this.view = LOKDocView.View.new(null, null, null);
             this._sw.add(this.view);
+            this.view.show();
             this.view.connect('load-changed', Lang.bind(this, this._onProgressChanged));
         }
 


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