[Sugar-devel] [PATCH Read] initialise EvinceViewer._view_notify_zoom_handler

Sascha Silbe silbe at activitycentral.com
Thu Feb 24 11:16:31 EST 2011


This fixes the following traceback during start-up:

Traceback (most recent call last):
  File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar/activities/Read.activity/readtoolbar.py", line 252, in _zoom_spin_notify_value_cb
    self._view.set_zoom(zoom_spin.props.value)
  File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar/activities/Read.activity/evinceadapter.py", line 130, in set_zoom
    if not self._view_notify_zoom_handler:
AttributeError: EvinceViewer instance has no attribute '_view_notify_zoom_handler'

Signed-off-by: Sascha Silbe <silbe at activitycentral.com>
---
 evinceadapter.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/evinceadapter.py b/evinceadapter.py
index a4d8aca..2c5d77b 100644
--- a/evinceadapter.py
+++ b/evinceadapter.py
@@ -10,6 +10,7 @@ _logger = logging.getLogger('read-activity')
 class EvinceViewer():
 
     def __init__(self):
+        self._view_notify_zoom_handler = None
         self._view = evince.View()
 
     def setup(self, activity):
-- 
1.7.2.3



More information about the Sugar-devel mailing list