diff options
author | Nat <Nat@localhost.localdomain> | 2007-02-26 17:58:38 (GMT) |
---|---|---|
committer | Nat <Nat@localhost.localdomain> | 2007-02-26 17:58:38 (GMT) |
commit | 6280ad5a2fc53f9830d53a7d30e1b39f48226801 (patch) | |
tree | 34caa0ee1ba49814a2ca18cdb959c5d8fbe94190 /Util/InstrumentPanel.py | |
parent | 81d11fb38d97d8b9e2d9e364ed2c2db556312a58 (diff) |
First cat selected
Diffstat (limited to 'Util/InstrumentPanel.py')
-rw-r--r-- | Util/InstrumentPanel.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Util/InstrumentPanel.py b/Util/InstrumentPanel.py index da56ca4..84c8f11 100644 --- a/Util/InstrumentPanel.py +++ b/Util/InstrumentPanel.py @@ -39,18 +39,21 @@ class InstrumentPanel(gtk.EventBox): def draw_toolbar(self): toolbarBox = gtk.HBox() - firstBtn = None + self.firstTbBtn = None for category in Config.CATEGORIES: btnBox = RoundVBox(fillcolor = '#6F947B', bordercolor = Config.PANEL_BCK_COLOR, radius = Config.PANEL_RADIUS) btnBox.set_border_width(Config.PANEL_SPACING) - btn = ImageRadioButton(firstBtn,Config.IMAGE_ROOT + category + '.png', Config.IMAGE_ROOT + category + 'sel.png', Config.IMAGE_ROOT + category + 'sel.png') - if firstBtn == None: - firstBtn = btn + btn = ImageRadioButton(self.firstTbBtn,Config.IMAGE_ROOT + category + '.png', Config.IMAGE_ROOT + category + 'sel.png', Config.IMAGE_ROOT + category + 'sel.png') + if self.firstTbBtn == None: + self.firstTbBtn = btn btn.connect('clicked',self.handleToolbarBtnPress,category) btnBox.add(btn) toolbarBox.pack_start(btnBox,True,True) self.mainVBox.pack_start(toolbarBox,False,False) + + def selectFirstCat(self): + self.firstTbBtn.set_active(True) def handleToolbarBtnPress(self, widget, category): self.draw_instruments_panel(category) |