diff options
author | Gary Martin <gary@garycmartin.com> | 2009-06-15 23:58:32 (GMT) |
---|---|---|
committer | Gary Martin <gary@garycmartin.com> | 2009-06-15 23:58:32 (GMT) |
commit | 2e59ac643e22ba262e82514ea02af277715f918a (patch) | |
tree | 4779fddb083f61e74831fbf06dfa0bc2f9a97386 /activity.py | |
parent | a75928cbdc794209c688980420235dea2307b58f (diff) |
Fixed radio buttons so tools are added to a group (toolbar now correctly shows state).
Diffstat (limited to 'activity.py')
-rw-r--r-- | activity.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activity.py b/activity.py index b0918dd..53c3f00 100644 --- a/activity.py +++ b/activity.py @@ -25,8 +25,14 @@ class PhysicsActivity(olpcgames.PyGameActivity): # make + add the component buttons self.radioList = {} + firstButton = None for c in tools.allTools: button = RadioToolButton(named_icon=c.icon) + if firstButton: + button.set_group(firstButton) + else: + button.set_group(None) + firstButton = button button.set_tooltip(_(c.toolTip)) button.connect('clicked',self.radioClicked) create_toolbar.insert(button,-1) |