def __init__(self, exname, name, sizegroup):
Gtk.VBox.__init__(self)
cfg.ConfigUtils.__dict__['__init__'](self, exname)
self.m_name = name
hbox = gu.bHBox(self)
hbox.set_spacing(gu.PAD_SMALL)
self.g_button = Gtk.Button(
soundcard.instrument_names[self.get_int(self.m_name)])
self.g_button.connect('clicked', self.on_btnclick)
hbox.pack_start(self.g_button, True, True, 0)
g = Gtk.VolumeButton()
g.props.value = self.get_int('%s_volume' % name) / MAX_VOLUME
def ff(volumebutton, value):
self.set_int('%s_volume' % name, int(value * MAX_VOLUME))
g.connect('value-changed', ff)
hbox.pack_start(g, False, False, 0)
self.g_menu = MidiInstrumentMenu(self.on_instrument_selected)
self.m_instrument = self.get_int('preferred_instrument')
hbox = Gtk.HBox()
hbox.set_spacing(6)
self.pack_start(hbox, True, True, 0)
评论列表
文章目录