.....
def contextMenu(self, widget, event, data=None):
menu = gtk.Menu()
one = gtk.MenuItem("One")
menu.append(one)
menu.show_all()
menu.popup(None, None, None, event.button, event.get_time())
return True
...
evbox = gtk.EventBox()
evbox.connect('button-release-event', contextMenu)
...
self.menu = gtk.Menu()
for i in ((gtk.STOCK_COPY, "Copy", self.m_copy),
(gtk.STOCK_CLEAR, "Clear", self.m_clear),
(gtk.STOCK_CLEAR, "Clear All", self.m_clear_all)):
menu_items = gtk.ImageMenuItem(i[1])
img = gtk.image_new_from_stock(i[0], gtk.ICON_SIZE_MENU)
menu_items.set_image(img)
self.menu.append(menu_items)
menu_items.connect("activate", i[2])
menu_items.show()