Re: waiting for popup dialogs



In message <Pine LNX 4 33 0107241152480 4021-100000 idra di unipi it>you write:
>
>how can I wait for a popupdialog to terminate before going on with the
>code written after the function which creates the dialogs?
>I cannot put up a destroy-handler on the popup dialog and i have to use
>gtk mechanism for portability reasons.

you create the dialog, show it, then call gtk_main() again (it can be
called recursively). then in the handlers for the destroy_event,
delete_event plus any regular ways of completing the dialog, you call
gtk_quit(). this puts you back at the same level of the main loop as
you were to begin with. its very elegant once you understand the idea.

--p




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]