Re: [gtk-list] Make an entire window insensitive?



On Fri, 6 Nov 1998, Jeff Garzik wrote:

> I'm interested in popping-up a progress dialog while my app does some
> work.  This dialog appears as the child of another dialog.
> 
> The parent dialog is not modal, but when the progress dialog appears, I
> don't want the user to be able to do anything in the parent, until the
> operation completes and the progress dialog disappears.
> 
> The best thing I can come up with is keeping track of all the widgets in
> the dialog and toggling the insensitivity of each.  That seems messy. 
> Is there a single function that will make an entire dialog disabled, or
> insensitive, or similar?
> 
> Thanks,
> 
> 	Jeff
> 

What you want is to call either:
	Gtk_Main::instance()->grab_add( *this);
	Gtk_Main::instance()->grab_remove( *this);

or 
	gtk_grab_add(widget);
	gtk_grab_remove(widget);

depending on whether you are using Gtk-- or Gtk+.  Either way, this
just prevents everything else from receiving events, which is the 
Right Way(tm) to make stuff be modal in Gtk+.
 
 -Erik

--
Erik B. Andersen   Web:    http://www.inconnect.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--




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