I have a main window with a Gtk Button named openDialog. If I click on this button another Window (addName) popups. I would like to write a method (or a function, don’t know which is the right name in python) in my main window file, called printHi. I would like to run this printHi method (in my main window file), when addName window is destroyed.
I tried something like this:
def on_addName_destroy():
printHi()
But it doesn’t work. Any suggestion?
You can make use of
"delete-event"signal ofgtk.Widget. It is also possible to make use of"destroy"signal ofgtk.Object. Here is a sample which connects to both the signals although in your case connecting to any one of them should suffice.Hope this helps!