Re: [gtk-list] Creating a modal dialog box?
- From: David Abilleira Freijeiro <odaf nexo es>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Creating a modal dialog box?
- Date: Thu, 10 Sep 1998 08:46:04 +0200
Curtiss Howard wrote:
>
> Any way to make a dialog box (or window) to be modal? Or at least is
> there some other way to prevent input in other parts of the application
> before a dialog box has been closed?
>
> ______________________________________________________
There are modal support in gtkwindow now.
You have this function:
/* If window is set modal, input will be grabbed when show and released
when hide */
void gtk_window_set_modal (GtkWindow
*window,
gboolean modal);
If you want to wait until dialog get close you can do something like:
gtk_window_set_modal(GTK_WINDOW(dlg),TRUE);
gtk_main() /* Here we stop until dialog get closed */
And in the dialog destroy signal (or hide o whatever you want) you MUST
do:
gtk_main_quit();
The last things are only if you want to wait in that point of code and
then after user close dialog do whatever you have to do.
--
+--------------------------+---------------------------+
|David Abilleira Freijeiro | Pontevedra, España |
+--------------------------+---------------------------+
|http://members.xoom.com/odaf (mailto:odaf@nexo.es) |
| (UNED, Mis Programas, Linux, Programación, etc.) |
|WAINU: http://www.geocities.com/Athens/Forum/5889/ |
+------------------------------------------------------+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]