[gnome-documents] epubview: Update the visibility of the controls when the page changes
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] epubview: Update the visibility of the controls when the page changes
- Date: Fri, 2 Jun 2017 14:39:45 +0000 (UTC)
commit bec1ce21bc8031ee125bd70c08e320dd6c2d46c2
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Jun 1 14:58:45 2017 +0200
epubview: Update the visibility of the controls when the page changes
Currently, the previous and next keys are not disabled at the limits
of the document. That's why we need to re-evaluate their visibility
whenever the page changes.
https://bugzilla.gnome.org/show_bug.cgi?id=782685
src/epubview.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/epubview.js b/src/epubview.js
index 7f146dc..52baba3 100644
--- a/src/epubview.js
+++ b/src/epubview.js
@@ -214,7 +214,10 @@ const EPUBViewNavControls = new Lang.Class({
if (this._epubdoc != null) {
this._level.set_range(1.0, this.preview.numPages);
- this._epubdoc.connect('notify::page', Lang.bind(this, this._updatePage));
+ this._epubdoc.connect('notify::page', Lang.bind(this, function() {
+ this._updatePage();
+ this._updateVisibility();
+ }));
this._updatePage();
}
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]