diff options
Diffstat (limited to 'ReckonPrimer.activity/toolbar.py')
-rw-r--r-- | ReckonPrimer.activity/toolbar.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ReckonPrimer.activity/toolbar.py b/ReckonPrimer.activity/toolbar.py new file mode 100644 index 0000000..e243a05 --- /dev/null +++ b/ReckonPrimer.activity/toolbar.py @@ -0,0 +1,41 @@ +import gtk + +from sugar.activity.widgets import ActivityToolbarButton +from sugar.activity.widgets import StopButton +from sugar.graphics.toolbutton import ToolButton +from sugar.graphics.toolbarbox import ToolbarButton, ToolbarBox + +class Toolbar: + + def __init__(self, parent): + self._parent = parent + + def show(self): + toolbar_box = ToolbarBox() + + activity_button = ActivityToolbarButton(self._parent) + toolbar_box.toolbar.insert(activity_button, 0) + + separator = gtk.SeparatorToolItem() + separator.show() + toolbar_box.toolbar.insert(separator, -1) + + learner_button = ToolButton() + learner_button.set_tooltip('Learner') + toolbar_box.toolbar.insert(learner_button, -1) + + authour_button = ToolButton() + authour_button.set_tooltip('Author') + toolbar_box.toolbar.insert(authour_button, -1) + + separator = gtk.SeparatorToolItem() + separator.props.draw = False + separator.set_expand(True) + separator.show() + toolbar_box.toolbar.insert(separator, -1) + + stop = StopButton(self._parent) + toolbar_box.toolbar.insert(stop, -1) + + toolbar_box.show_all() + self._parent.set_toolbar_box(toolbar_box)
\ No newline at end of file |