diff options
author | Walter Bender <walter.bender@gmail.com> | 2012-07-27 14:30:02 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2012-07-27 14:30:02 (GMT) |
commit | 87e3dde4fb44b872cf3f7077491b616abdcedb7a (patch) | |
tree | ef9470c0d9f279c7b986fa13cbf852c3fa87ffe7 /toolbar_utils.py | |
parent | d5a5d69ee61b704a6abd88cc2c802227fe30d52a (diff) |
support for old-style Sugar
Diffstat (limited to 'toolbar_utils.py')
-rw-r--r-- | toolbar_utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/toolbar_utils.py b/toolbar_utils.py index 94e6883..cd5538d 100644 --- a/toolbar_utils.py +++ b/toolbar_utils.py @@ -70,7 +70,8 @@ def button_factory(icon_name, toolbar, callback, cb_arg=None, tooltip=None, button.set_tooltip(tooltip) button.props.sensitive = True if accelerator is not None: - button.props.accelerator = accelerator + if hasattr(button.props, 'accelerator'): + button.props.accelerator = accelerator if cb_arg is not None: button.connect('clicked', callback, cb_arg) else: |