[Glade-users] Glade questions.

Andrae Muys amuys@shortech.com.au
Fri, 16 Feb 2001 16:10:06 +1000


James Cameron wrote:
> 
> Matthew Tuck wrote:
> > Andrae Muys wrote:
> > > Matthew Tuck wrote:
> > > > 2.  Is there some way I can declare a "disable condition", and
> > > > disable lots of things at once in code?  One way might be if GLADE
> > > > automatically generated a function that I can call into.
> > > Could you explain this further?
> > Basically the point is to define groups of things that you can disable
> > at once, especially menu items and stuff.  As far as I know GTK+
> > doesn't support this, my thought was that Glade could support groups,
> > and it could automatically generate functions to toggle groups en
> > masse.
> 
> Yes, GTK+ doesn't support this directly, nor does Glade.  Nor should
> they, in my opinion.  It adds unnecessary complexity that only a few UI
> designers would use.
> 
Sorry James, but this isn't entirely correct.  The key here is that
GtkWidget's have a sensitive property so any widget can be made
insensitive, and that of course includes GtkContainer's :).

Attached is some sample code to demonstrate.  The code may also be of
more general interest as it demonstrates a) how easy libglade is to use
and b) how much of the scaffolding can be shared.

Andrae Muys