[gtkada] "lock" the gui, to allow only the current window to interact

Thomas De Contes d.l.tDeContes at free.fr
Fri Feb 11 01:45:47 CET 2005


Le mercredi, 9 fév 2005, à 17:08 Europe/Paris, Thomas De Contes a écrit 
:

> is it easy to "lock" the gui, like with a Message_Dialog, to allow 
> only the current window to interact ?

i seem to have to use "Set_Modal"

> for example, i want to do that with a Gtk_File_Selection, because if 
> the user wants to do sth else, he can click on cancel,
> and it would be easier, for example i would not have to worry about 
> cases where the Gtk_File_Selection would be openned in background 
> while the user do other stuff

http://libre.act-europe.fr/GtkAda/docs/gtkada_rm_145.html#SEC654

"procedure Set_Modal
.....
In cunjunction with Gtk.Main.Main, this is the easiest way to show a 
dialog to which the user has to answer before the application can 
continue."

i'm not sure about how to use that
(i prefer do things as clear as possible, to have less chances as 
possible to do mistakes)

what do you think about making a callback procedure, so that it makes 
the window, it calls Gtk.Main.Main, and it finish depending on the 
result given by the user via the window ?

should i integrate Gtk.Main.Main in a procedure where is declared the 
window type, which would make Gtk_New, Show_All, and Gtk.Main.Main at 
the same time ?


an other question, about Gtk.Dialog
http://libre.act-europe.fr/GtkAda/docs/gtkada_rm_63.html#SEC270
i have red that, but it's a little bit confusius for me,
notably because of a lot of functions which make stuff, instead of 
being procedures

so, when have i to use a Gtk.Dialog rather than a Gtk.Window ?



> ps : if you don't understand what i want, please ask me more details / 
> to clarify matters

don't hesitate to give me a subject and an approximative date, if there 
already was answers, too :-)




More information about the gtkada mailing list