I have some code in which I need to display an introductory window, and based on the data collected in that window, then display the main window. How can it be achieved?
Here is the code where I hope to make it happen. How could I “wait” until proj_list be closed before checking for proj_list_status and then display the main window?
I tried using a different approach, namely, gtk_main () and gtk_main_quit ().
In the memoapp_proj_list_new () function, I run gtk_main () to create a new event loop, which “blocks” the main loop and does not display the main application window. Then, when I am done with the introductory window (an OK button or Cancel button is clicked), I invoke gtk_main_quit (), which ends the inner, nested event loop, and the main, original event loop comes back to life and the main application window is displayed.
You can nest calls to gtk_main(). In that case gtk_main_quit() will make the innermost invocation of the main loop return.
But it was not clear (from the manual) that one could use that to create this “wait for something to happen” effect. The first two links bellow enlightened me about it, though!