diff options
author | Sayamindu Dasgupta <sayamindu@gmail.com> | 2009-06-30 21:31:28 (GMT) |
---|---|---|
committer | Sayamindu Dasgupta <sayamindu@gmail.com> | 2009-06-30 21:31:28 (GMT) |
commit | c5a2554daed5430cfff62bd1c3b497c33f639cd1 (patch) | |
tree | eaec0ebd64cf3e966878bf6be50a31517dd28d0a | |
parent | 92c510c0eb10bbb125f2217c7ae900ce0c46080b (diff) |
Minor tweaks to page numbering related stuff
-rw-r--r-- | epubadapter.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/epubadapter.py b/epubadapter.py index 130acd0..3fa4576 100644 --- a/epubadapter.py +++ b/epubadapter.py @@ -26,13 +26,14 @@ class View(epubview.EpubView): # When the book is being loaded, calling this does not help # In such a situation, we go into a loop and try to load the # supplied page when the book has loaded completely + n += 1 if self._ready: - self._load_page(n + 1) + self._load_page(n) else: - gobject.timeout_add(200, self._try_load_page, n + 1) + gobject.timeout_add(200, self._try_load_page, n) def get_current_page(self): - return self._loaded_page - 1 + return int(self._loaded_page - 1) def find_changed(self, job, page = None): self._find_changed(job) @@ -53,7 +54,7 @@ class EpubDocument(epubview.Epub): return self._page_cache def get_n_pages(self): - return self._page_cache.get_pagecount() + return int(self._page_cache.get_pagecount()) def has_document_links(self): return True |