Stephen J. Turnbull wrote:
If you start under X, won't you get X resources globally for that
kind
of thing (menubar strings), regardless of which platform the frame is
on?
It depends on how you use the resources. Basically, you have two
alternativces: widgets based on Xt benefit automatically from their X
resources settings. But you can also define your own set of resources, not
related to any kind of widget, and retreive them manually. In the former case,
for instance specifying LabelString resources for a Motif menubar, the
resources will apply only to Motif menubars. In the latter case, the resources
are yours so you do what you want with them. However, you have to be connected
to an X display in order to get them.
The X resources mechanism is attractive because it does already a
fairly important ammount of things for you, a bit like specifiers: you can
have different locales on different displays, display/locale/machine specific
resources etc. However, using them as the primary method for setting things
not related to X only (like colors, faces...) is wrong because it's the lazy
way, and it's not as general as what we really need.
Even for X-only stuff, using the X resources is arguable. Here's an
example that just comes to my mind: take the background pixmap attribute of
the default face[2]. This is typically a very-X-related feature that people
most probably set in their resources file. But, look, now that Eterm exists,
we could perfectly make this attribute work on (some) tty's, by changing
Eterm's background. I don't think this would be difficult to implement, but
I'm not sure how it would currently behave with respect to X resources and
frames opened on both X and Eterm. This shows that even stuff that is
traditionally X related would be better thought of in an abstract way.
Footnotes:
[2] BTW, this attribute annoys me: it's not, or should not be an attribute of
the default face. It should be an attribute of the XEmacs frames. Faces should
have a 'transparent background property instead.
--
/ / _ _ Didier Verna
http://www.inf.enst.fr/~verna/
- / / - / / /_/ / EPITA / LRDE mailto:didier@epita.fr
/_/ / /_/ / /__ / 14-16 rue Voltaire Tel. +33 (1) 44 08 01 77
94276 Kremlin-Bicêtre cedex Fax. +33 (1) 44 08 01 99