[gnome-books/wip/hadess/pagination: 22/22] epub: Remove need to scroll in epubs



commit 98e4fe64935213b008cd9363e896abc4c282bf08
Author: Daniel GarcĂ­a Moreno <danigm wadobo com>
Date:   Sat Jan 13 00:15:48 2018 +0100

    epub: Remove need to scroll in epubs
    
    Remove need to scroll in ePub files by using the pagination support in
    libgepub.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782884

 src/epubview.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/epubview.js b/src/epubview.js
index 6f347265..14e8d993 100644
--- a/src/epubview.js
+++ b/src/epubview.js
@@ -69,6 +69,7 @@ var EPUBView = new Lang.Class({
 
     createView: function() {
         let view = new Gepub.Widget();
+        view.paginate = true;
 
         this.invertedStyle = new WebKit2.UserStyleSheet(
             'body { background: black; filter: invert(100%); }',
@@ -145,11 +146,11 @@ var EPUBView = new Lang.Class({
     },
 
     goPrev: function() {
-        this._epubdoc.go_prev();
+        this.view.page_prev();
     },
 
     goNext: function() {
-        this._epubdoc.go_next();
+        this.view.page_next();
     },
 
     get hasPages() {


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