diff options
author | Gary Martin <gary@garycmartin.com> | 2011-05-29 15:27:44 (GMT) |
---|---|---|
committer | Gary Martin <gary@garycmartin.com> | 2011-05-29 15:27:44 (GMT) |
commit | f5095c78971bc3850e90555267d0c7ee11cf3b96 (patch) | |
tree | c96341aafcc1d2ce1a686a85b134113d10b6de2f /clock.py | |
parent | 8be037090837518d9adc8105cd81a44bf90ba6aa (diff) |
Fix broken new toolbars (failed testing in older Sugar release 0.88 due to xocolor.py changes)
Diffstat (limited to 'clock.py')
-rwxr-xr-x | clock.py | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -75,6 +75,7 @@ OLD_TOOLBAR = False try: from sugar.graphics.toolbarbox import ToolbarBox from sugar.activity.widgets import StopButton + from sugar.activity.widgets import ActivityToolbarButton except ImportError: OLD_TOOLBAR = True @@ -191,18 +192,15 @@ class ClockActivity(activity.Activity): else: toolbar_box = ToolbarBox() - activity_button = ToolButton() - color = XoColor(profile.get_color()) - bundle = ActivityBundle(activity.get_bundle_path()) - icon = Icon(file=bundle.get_icon(), xo_color=color) - activity_button.set_icon_widget(icon) + activity_button = ActivityToolbarButton(self) activity_button.show() - toolbar_box.toolbar.insert(activity_button, 0) + self._add_clock_controls(toolbar_box.toolbar) separator = gtk.SeparatorToolItem() separator.props.draw = False + separator.set_size_request(0, -1) separator.set_expand(True) toolbar_box.toolbar.insert(separator, -1) |