Re: Possibly Stupid question: Blocking events to parent window
- From: JParker coinstar com
- To: Jack Challen <jack_challen ocsl co uk>
- Cc: gtk-app-devel-list gnome org, gtk-app-devel-list-admin gnome org
- Subject: Re: Possibly Stupid question: Blocking events to parent window
- Date: Mon, 9 Oct 2000 10:21:19 -0700
G'Day !
It sounds like you are creating a Modal dialog window. This is done with the
function "gtk_grab_add ( )" ...
void CreateDialogWindow ( )
{
dialog_window = gtk_dialog_new ( );
gtk_signal_connect (GTK_OBJECT (dialog_window), "destroy",
GTK_SIGNAL_FUNC (ClosingDialog),
&dialog_window);
/* lots of code to make it do something useful and be pretty to look at */
gtk_grab_add (dialog_window);
}
You release control by calling the function "gtk_grab_remove ( )" from the call
back function mapped to something on your dialog box (ie "OK" button.
void ClosingDialog (GtkWidget *widget, gpointer data)
{
gtk_grab_remove (GTK_WIDGET (widget));
}
cheers,
Jim Parker
Sailboat racing is not a matter of life and death .... It is far more important
than that !!!
Jack Challen
<jack_challen ocsl co uk To: gtk-app-devel-list gnome org
> cc:
Sent by: Subject: Possibly Stupid question: Blocking events to
parent window
gtk-app-devel-list-admin
@gnome.org
10/09/00 09:49 AM
First of all, sorry if this seems like a stupid question, but I have
searched the mailing list archives, plus all the documentation and
references I could find.
I'm bashing out a program (surprise) and I have a button that creates
a
child window by using a callback function - the thing is, I want to
ignore all input to any other window except the newly created child
window, until the user performs some abitrary action in the child (like
filling in a bunch of text boxes). I could post some source code, but my
current stuff is fairly convoluted (read "absolutely unreadable"), and I
didn't think it was worth posting for such a (hopefully) simple
question.
I've got Havoc Pennington's book on order, which'll take about 2
weeks
to get here, and it feels like I'm banging my head against a brick wall
- I imagine I am, and there's a really easy way to do it.
Many thanks in advance.
Jack Challen
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]