4 def __init__(self
, items
):
5 "'items' is a list of (label, callback) tuples."
6 "If callback is None then the item is shaded."
10 for (label
, callback
) in items
:
11 item
= GtkMenuItem(label
)
13 item
.connect('activate', lambda widget
, cb
= callback
: cb())
15 item
.set_sensitive(FALSE
)
21 def popup(self
, button
, time
):
22 self
.menu
.popup(None, None, None, button
, time
)