Button: emit slopes (fix for stuck modulaor plug-ins)
[calf.git] / bigbull / calfgtkutils.py
blobbebee8adbbb0e4552982a5734772a16a6750c1bb
1 import pygtk
2 pygtk.require('2.0')
3 import gtk
5 def add_option(menu, option, handler, data = None, enabled = True):
6 item = gtk.MenuItem(option)
7 item.set_sensitive(enabled)
8 item.connect_object("activate", handler, data)
9 menu.add(item)
11 def add_submenu(menu, option):
12 submenu = gtk.Menu()
13 item = gtk.MenuItem(option)
14 menu.append(item)
15 item.set_submenu(submenu)
16 return submenu