I'm trying to create a new message dialog with no buttons inside. It will be showing some info, and I'm having problems with programmatically close it after some function executes. I've read about run() and response() functions and written some code:
def stop():
md.response(0)
md = gtk.MessageDialog(None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_QUESTION, gtk.BUTTONS_NONE, "Wait... computing...")
print 'closing in 5 secs...'
threading.Timer(5.0, stop).start()
md.run()
md.destroy()
The problem is, stop() executes after closing main application window. And even if the above program would work correctly, it wouldn't do what I wanted. Any ideas for closing a message dialog after a function executes?
Best regards, mopsiok