Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/readactivity.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-09-10 14:03:43 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-09-10 14:19:33 (GMT)
commiteafed20bd06a82e1737786da10fa829b1e220b70 (patch)
treeb2df004d09c79eeda3dda0a5d2c753be726e9c93 /readactivity.py
parentef1810e61bf4658a48191fcff238857e1458b21b (diff)
Fix index management in epub files - SL #3853
Epub index can point to internal links in the content files. This patch manage this cases. A particular case was found in a file generated in UY (see attachment in the ticket) where the links don't point to the start of a file, but to the end of the previous file. Then, if the index is at the end of a file, we open the next file. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'readactivity.py')
-rw-r--r--readactivity.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/readactivity.py b/readactivity.py
index cd00014..53ac755 100644
--- a/readactivity.py
+++ b/readactivity.py
@@ -599,11 +599,7 @@ class ReadActivity(activity.Activity):
if current_link == selected_link:
return
- link_iter = self._toc_model.get_iter_first()
-
- while link_iter is not None and \
- self._toc_model.get_value(link_iter, 1) != current_link:
- link_iter = self._toc_model.iter_next(link_iter)
+ link_iter = self._view.get_link_iter(current_link)
if link_iter is not None:
self._navigator.handler_block(self._navigator_changed_handler_id)