[Glade-users] Glade questions.
James Cameron
james.cameron@compaq.com
Fri, 16 Feb 2001 16:45:00 +1100
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.
The way I would implement such functionality is to define a common
widget map callback for the group that registers the widgets in a list.
Add the callback to each widget. Then use the list to mark the widgets
insensitive or sensitive, according to the UI design requirements.
Two other alternatives;
(a) if the goal is to disable almost everything, consider modal dialog
boxes,
(b) if chunks of things are disabled, write something that recursively
marks children of a widget as insensitive.
--
James Cameron (james.cameron@compaq.com)
http://quozl.linux.org.au/ (or) http://quozl.netrek.org/