diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2013-06-04 16:23:03 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-06-04 16:28:57 (GMT) |
commit | 0cd31b22cec4a05ad0337e97d433d768e2212a03 (patch) | |
tree | ca849913be39721cc2db5dd84f1adad6c36f8b18 | |
parent | 367829b5b983f234e8df9b68c71dcbe6fbade951 (diff) |
Make optative the use of signals request-clear-area/unset-clear-area - SL #4509
As these signals are used by the On screen keyboard,
and are not available for users of SoaS, use try/except to allow
the use without the signals.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r-- | widgets.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -305,8 +305,16 @@ class DocumentView(Abi.Widget): def __init__(self): Abi.Widget.__init__(self) self.connect('size-allocate', self.__size_allocate_cb) - self.connect('request-clear-area', self.__request_clear_area_cb) - self.connect('unset-clear-area', self.__unset_clear_area_cb) + try: + self.connect('request-clear-area', self.__request_clear_area_cb) + except: + logging.error('EXCEPTION: request-clear-area signal not available') + + try: + self.connect('unset-clear-area', self.__unset_clear_area_cb) + except: + logging.error('EXCEPTION: unset-clear-area signal not available') + self.osk_changed = False self.dy = 0 |