[gnome-documents] lokview: Stop the error view from appearing when loading LO docs



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

    lokview: Stop the error view from appearing when loading LO docs
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753686

 src/lokview.js |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/lokview.js b/src/lokview.js
index e19268f..dadc7c7 100644
--- a/src/lokview.js
+++ b/src/lokview.js
@@ -168,21 +168,22 @@ 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);
     },
 
     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]