I have a function in my main application that looks like this:
def foo(stuff):
a_line_that_takes_a_while(stuff)
return result
I'm trying to add a dialog to show before a_line_that_takes_a_while and destroy it right after that line was executed.
I've tried:
def foo(stuff):
dialog = Gtk.MessageDialog(...)
dialog.show_all()
a_line_that_takes_a_while(stuff)
dialog.destroy()
return result
But surprisingly, the dialog shows up just when a_line_that_takes_a_while was already executed. Of course I can't use dialog.run() because that'd block my application's main loop.
Any ideas?