With this program:
from gtk import *
def button_press(widget, event):
if event.button == 3:
menu = GtkMenu()
menu.append(GtkMenuItem('foo'))
menu.append(GtkMenuItem('bar'))
menu.popup(widget, None, None, event.button, event.time)
window = GtkWindow(WINDOW_TOPLE
With this program:
from gtk import *
def button_press(widget, event):
if event.button == 3:
menu = GtkMenu()
menu.append(GtkMenuItem('foo'))
menu.append(GtkMenuItem('bar'))
menu.popup(widget, None, None, event.button, event.time)
window = GtkWindow(WINDOW_TOPLE