+ Framework: gcc-4.4 compilation fix (Orcan Ogetbil)
[calf.git] / bigbull / calfgtkutils.py
blobb62778f92e5f33a2e73201c39cd937dadd015795
1 import pygtk
2 pygtk.require('2.0')
3 import gtk
5 def add_option(menu, option, handler, data = None):
6 item = gtk.MenuItem(option)
7 item.connect_object("activate", handler, data)
8 menu.add(item)
10 def add_submenu(menu, option):
11 submenu = gtk.Menu()
12 item = gtk.MenuItem(option)
13 menu.append(item)
14 item.set_submenu(submenu)
15 return submenu