Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSayamindu Dasgupta <sayamindu@gmail.com>2009-09-16 11:52:33 (GMT)
committer Sayamindu Dasgupta <sayamindu@gmail.com>2009-10-09 11:11:15 (GMT)
commitd5954c32f23da2593010cecec60865008205fe14 (patch)
tree530a7451ed2aec6b63a77c5b0bb08849062853db
parent6fab69dd45035ac61033a12b9b206bbda079f44f (diff)
Workaround possible Evince API b0rkage. (dslo#1328)
-rw-r--r--readactivity.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/readactivity.py b/readactivity.py
index 750fb91..ab55231 100644
--- a/readactivity.py
+++ b/readactivity.py
@@ -523,14 +523,16 @@ class ReadActivity(activity.Activity):
_logger.debug('Found sizing mode: %s', sizing_mode)
if sizing_mode == "best-fit":
self._view.props.sizing_mode = evince.SIZING_BEST_FIT
- self._view.update_view_size(self._scrolled)
+ if hasattr(self._view, 'update_view_size'):
+ self._view.update_view_size(self._scrolled)
elif sizing_mode == "free":
self._view.props.sizing_mode = evince.SIZING_FREE
self._view.props.zoom = float(self.metadata.get('Read_zoom', '1.0'))
_logger.debug('Set zoom to %f', self._view.props.zoom)
elif sizing_mode == "fit-width":
self._view.props.sizing_mode = evince.SIZING_FIT_WIDTH
- self._view.update_view_size(self._scrolled)
+ if hasattr(self._view, 'update_view_size'):
+ self._view.update_view_size(self._scrolled)
else:
# this may happen when we get a document from a buddy with a later
# version of Read, for example.
@@ -653,7 +655,7 @@ class ReadActivity(activity.Activity):
self._topbar.hide()
def __view_toolbar_needs_update_size_cb(self, view_toolbar):
- if not self._epub:
+ if hasattr(self._view, 'update_view_size'):
self._view.update_view_size(self._scrolled)
def __view_toolbar_go_fullscreen_cb(self, view_toolbar):