From 2e59ac643e22ba262e82514ea02af277715f918a Mon Sep 17 00:00:00 2001 From: Gary Martin Date: Mon, 15 Jun 2009 23:58:32 +0000 Subject: Fixed radio buttons so tools are added to a group (toolbar now correctly shows state). --- 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) -- cgit v0.9.1