Re: [pygtk] Segfault with popup menus

2001-11-25 Thread Colin Walters
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

[pygtk] Segfault with popup menus

2001-11-19 Thread Paul Brannan
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 =

Re: [pygtk] Segfault with popup menus

2001-11-19 Thread John Finlay
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'))