See PyGTK FAQ 10.6 for my description of how to use gnome.ui.About:

<http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq10.006.htp>

In short, you have to stop the emission of the "reponse" signal. Returning True is not sufficient.

I've asked in GNOME bug 119405 whether this is expected behavior. There is a tentative response that is not.

At 01:11 AM 9/1/03 -0700, Colin Fox wrote:
On Mon, 2003-09-01 at 00:51, David M. Cook wrote:
> > If I show the about box, then dismiss it, then show it again, my program
> > aborts immediately with a segfault. No traceback stack or anything. I've
> > tried handling the 'response' and 'close' signals (hiding the dialog &
> > returning gtk.TRUE), to no avail.
>
> You also need to handle the delete_event signal and keep it from propagating
> by returning gtk.TRUE.


Hmm. The About box is getting stranger. I am now catching delete_event,
close & response. Here are my functions:

def on_about2_delete_event(widget, event=None):
    print "delete_event"
    return gtk.TRUE

def on_about2_response(widget, event=None):
    print "response"
    return gtk.TRUE

def on_about2_close(widget, event=None):
    print "close"
    return gtk.TRUE

I have the appropriate signals set up in Glade, calling these functions.

According to this, the ONLY function getting called is
on_about2_response(). The delete & close functions never execute.

And I still get a segfault when I try to re-show the about box.

cf

ps. I wonder if this has anything to do with the problem James has
mentioned about the improper invocation of gnome_program_init() from
libgnome?

_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to