Colin Walters [EMAIL PROTECTED] writes:
Paul Brannan [EMAIL PROTECTED] writes:
With this program:
[...]
I have no idea what's causing self=0x0, but I suspect that's why the
program is segfaulting.
Works fine for me using python-gnome 1.4.1.
Oops, spoke too soon, it doesn't work for
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 =
Paul,
Pass in None instead of widget as the first arg to menu.popup. Also need to
have the menu displayed. Changes below.
John
from gtk import *
def button_press(widget, event):
if event.button == 3:
menu = GtkMenu()
menu.append(GtkMenuItem('foo'))