[gnome-documents: 22/22] evince: simplify code
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents: 22/22] evince: simplify code
- Date: Thu, 23 Jun 2016 14:45:24 +0000 (UTC)
commit b4550d783c7c4eb8366f4ffb41665c6c61aaa285
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Jun 21 13:33:54 2016 -0700
evince: simplify code
src/evinceview.js | 22 ++--------------------
1 files changed, 2 insertions(+), 20 deletions(-)
---
diff --git a/src/evinceview.js b/src/evinceview.js
index 8190a17..5856a64 100644
--- a/src/evinceview.js
+++ b/src/evinceview.js
@@ -635,18 +635,8 @@ const EvinceViewNavControls = new Lang.Class({
Name: 'EvinceViewNavControls',
Extends: Preview.PreviewNavControls,
- _init: function(previewView, overlay) {
- this._pageChangedId = 0;
-
- this._previewView = previewView;
- this._model = previewView.getModel();
-
- this.parent(previewView, overlay);
- },
-
createBarWidget: function() {
- let barWidget = new GdPrivate.NavBar({ document_model: this._model,
- margin: Preview.PREVIEW_NAVBAR_MARGIN,
+ let barWidget = new GdPrivate.NavBar({ margin: Preview.PREVIEW_NAVBAR_MARGIN,
valign: Gtk.Align.END,
opacity: 0 });
@@ -672,16 +662,8 @@ const EvinceViewNavControls = new Lang.Class({
},
setModel: function(model) {
- if (this._pageChangedId != 0) {
- this._model.disconnect(this._pageChangedId);
- this._pageChangedId = 0;
- }
-
- this._model = model;
this.barWidget.document_model = model;
-
- if (this._model)
- this._pageChangedId = this._model.connect('page-changed', Lang.bind(this,
this._updateVisibility));
+ model.connect('page-changed', Lang.bind(this, this._updateVisibility));
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]