(forw) [gtk-list] Re: one function takes the control



I just read this in gtk-list:

----- Forwarded message from Johannes Keukelaar <johannes@nada.kth.se> -----
[...]
//I need one function that launch a dialog and only returns when this dialog
//have been closed. The function is something like this:

You'll want to make the dialog modal (with gtk_grab_add), connect your signal
handlers, recursively call gtk_main, then call gtk_main_quit from one of your
signal handlers (when the user clicks the ok or cancel button, for example),
and then the call to gtk_main will return (eventually). You'll then also want
to call gtk_grab_remove, otherwise the rest of your application will remain
dead.
[...]
----- End forwarded message -----

IMHO, it would be *much* better if a the destroy hook of a modal dialog
would call gtk_grab_remove() - This way, you would never lock up your
X server (that can happen if you create a dialog which is not modal for
the app but for the display - If you close the window and don't ungrab
it, the whole display is locked and there is no way out. If you are
unlucky, the keyboard won't work, so you can't even kill the X server !).

--
Dipl. Inf. (FH) Aaron "Optimizer" Digulla     Assistent im BIKS Labor, FB WI
"(to) optimize: Make a program faster by      FH Konstanz, Brauneggerstr. 55
improving the algorithms rather than by       Tel:+49-7531-206-514
buying a faster machine."                     EMail: digulla@fh-konstanz.de



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