diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2011-06-10 18:43:55 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2011-06-10 20:06:09 (GMT) |
commit | c4c65cad8e5e327d21a986594c6fc16cdfc28c07 (patch) | |
tree | 6066130c58e75754a66e54e7f9848e294a0d22f4 /evinceadapter.py | |
parent | e0906618fd63558b60425f647158537407906e6e (diff) |
PDF scrolls to start and end with the Home End keys
Manuel QuiƱones <manuel.por.aca@gmail.com>
with a small change by Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'evinceadapter.py')
-rw-r--r-- | evinceadapter.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/evinceadapter.py b/evinceadapter.py index 3d3350c..863dbd5 100644 --- a/evinceadapter.py +++ b/evinceadapter.py @@ -223,7 +223,8 @@ class EvinceViewer(): Scrolling is horizontal if horizontal is set to True Valid scrolltypes are: gtk.SCROLL_PAGE_BACKWARD, gtk.SCROLL_PAGE_FORWARD, - gtk.SCROLL_STEP_BACKWARD and gtk.SCROLL_STEP_FORWARD + gtk.SCROLL_STEP_BACKWARD, gtk.SCROLL_STEP_FORWARD, + gtk.SCROLL_START and gtk.SCROLL_END ''' _logger.error('scroll: %s', scrolltype) @@ -235,6 +236,10 @@ class EvinceViewer(): self._scroll_step(False) elif scrolltype == gtk.SCROLL_STEP_FORWARD: self._scroll_step(True) + elif scrolltype == gtk.SCROLL_START: + self.set_current_page(0) + elif scrolltype == gtk.SCROLL_END: + self.set_current_page(self._document.get_n_pages()) else: print ('Got unsupported scrolltype %s' % str(scrolltype)) |