I have an AboutDialog
box made in glade, but the Close button doesn't work. I don't know how to connect this button to a separate function, since it sits in a widget called dialog-action_area
.
Another problem is if I use the close button created by the window manager, I can't open it again because it has been destroyed.
How can I change this so it just hides?
You need to call the widget's hide() method when you receive delete or cancel signals:
response = self.wTree.get_widget("aboutdialog1").run() # or however you run it
if response == gtk.RESPONSE_DELETE_EVENT or response == gtk.RESPONSE_CANCEL:
self.wTree.get_widget("aboutdialog1").hide()
You can find the Response Type constants in the GTK documentation