[gnome-documents] epubview: Don't blindly advertise the presence of pages
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] epubview: Don't blindly advertise the presence of pages
- Date: Thu, 1 Jun 2017 18:31:57 +0000 (UTC)
commit 07cf26fec6674fb65d57fa1003b5b90f43cde2cf
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Jun 1 14:23:59 2017 +0200
epubview: Don't blindly advertise the presence of pages
Preview.hasPages should only be true when the document has finished
loading and is known to have a non-zero number of pages. Otherwise, it
will show an empty EPUBBarWidget while loading the document.
This brings it in line with the EvinceView implementation.
https://bugzilla.gnome.org/show_bug.cgi?id=782685
src/epubview.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/epubview.js b/src/epubview.js
index 28a0023..baeb64e 100644
--- a/src/epubview.js
+++ b/src/epubview.js
@@ -145,7 +145,7 @@ const EPUBView = new Lang.Class({
},
get hasPages() {
- return true;
+ return this._epubdoc ? this._epubdoc.get_n_pages() > 0 : false;
},
get page() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]