GtkDialog::run

int run();

This is the method that allows you to analyze the response generated by the dialog. When you call this method on a GtkDialog, the main GTK loop is blocked until the dialog is either destroyed or emits a response signal.

The dialog is also automatically set as the modal type, and the show method is also called automatically. However, you need to show any child widgets yourself.

It is highly recommended to generate a response signal to exit from the run loop. If you destroy the dialog when the loop is being run, then your post-run code will not know whether the dialog was actually destroyed or not.

The function will return the response ID as soon as one is generated and exit itself. Note that you need to destroy the dialog manually when you have processed the response.