[Glade-users] Glade questions.
- From: matty chariot net au (Matthew Tuck)
- Subject: [Glade-users] Glade questions.
- Date: Sun, 18 Feb 2001 11:01:55 +1030
James Cameron wrote:
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.
I beg to differ. A lot of applications would use this. In fact, I have
much more trouble thinking of those that don't than those that do.
Consider a word processor. What "modes" might there be? Off the top of
my head:
Is the a selection? If not, we want Cut and Copy (at least) to be
disabled.
Is the document empty? If so, we want Find, Replace (at least) to be
disabled.
Are we in a table? If not, disable the table stuff.
I could go on, but there's not much point.
The point here is that I believe it is easier to define within Glade the
condition when the widget is disabled on the widget (where it belongs)
than to try and maintain kludgy lists of widgets which you need to make
sure you update.
And I don't even want to go into the possible situation where a widget's
disable condition depends on a logical combination of more than one
mode.
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.
Yes, and that's what I'm asking Glade to maintain and implement.
(a) if the goal is to disable almost everything, consider modal dialog
boxes,
Not applicable to the typical situations this would be used in.
(b) if chunks of things are disabled, write something that recursively
marks children of a widget as insensitive.
I doubt the widgets and only the widgets would be in a container.
--
Matthew Tuck: Software Developer & All-Round Nice Guy
My experience is that in general, if there's jobs programming
in it, it's not worth programming in.
Ultra Programming Language Project: http://www.box.net.au/~matty/ultra/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]