[gnome-documents] evinceview: simplify code



commit 793d2b0c5762e7077fc8f0c2794401a95a2a0e76
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Apr 1 14:56:47 2017 -0700

    evinceview: simplify code

 src/evinceview.js |   21 +--------------------
 1 files changed, 1 insertions(+), 20 deletions(-)
---
diff --git a/src/evinceview.js b/src/evinceview.js
index 9ff73d6..afbbf65 100644
--- a/src/evinceview.js
+++ b/src/evinceview.js
@@ -216,12 +216,6 @@ const EvinceView = new Lang.Class({
         return new EvinceViewToolbar(this);
     },
 
-    createFullscreenToolbar: function() {
-        let toolbar = new EvinceViewFullscreenToolbar(this);
-        toolbar.setModel(this._model);
-        return toolbar;
-    },
-
     createView: function() {
         let sw = new Gtk.ScrolledWindow({ hexpand: true,
                                           vexpand: true });
@@ -299,7 +293,7 @@ const EvinceView = new Lang.Class({
 
         this._evView.set_model(this._model);
         this.navControls.setModel(this._model);
-        this.toolbar.setModel(this._model);
+        this.toolbar.updateTitle();
 
         this.set_visible_child_full('view', Gtk.StackTransitionType.NONE);
         this.grab_focus();
@@ -630,18 +624,5 @@ const EvinceViewToolbar = new Lang.Class({
         this._handleEvent = false;
 
         this.addSearchButton('view.find');
-    },
-
-    setModel: function() {
-        this.updateTitle();
-    }
-});
-
-const EvinceViewFullscreenToolbar = new Lang.Class({
-    Name: 'EvinceViewFullscreenToolbar',
-    Extends: Preview.PreviewFullscreenToolbar,
-
-    setModel: function(model) {
-        this.toolbar.setModel(model);
     }
 });


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