Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When closing the GnomeAbout box (or other GtkDialog subclasses), I get crashes and weird callback behaviour. What up with that?

0
Posted

When closing the GnomeAbout box (or other GtkDialog subclasses), I get crashes and weird callback behaviour. What up with that?

0
0

Normally, when handling closed signals on a window, you should follow the advice in FAQ 10.6. However, for GnomeAbout, things aren’t so simple. Jon Willeke took the time to point out that in the case of GnomeAbout, to avoid having a window be destroyed when you close it, you need to also connect to the “response” handler. Malcolm Tredinnick offered a more detailed explanation of how this works: A GtkDialog box has two main signals it implements: ‘close’ and ‘response’. It also inherits the ‘delete-event’ signal from the GtkWidget class which also has a role to play here. The ‘response’ signal is emitted pretty much whenever any action happens that causes the dialog box to finish running. The response signal emission will contain a “response ID” which can be user-defined or any one of the gtk.RESPONSE_* constants in pyGTK. The standard values correspond to things like one of the standard buttons being pushed or the window being destroyed. You can act differently based on the response ID

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123