Wassily Kondratiev <wk@xxxxxxxxxxx> writes:
> Hi!
>
> Let's imagine someone wants to change time digits. But they are constant
> objects,
> so he should rewrite xwem-time.el file in its entirety and maintain all future
> changes. I'm sure there is an easier way.
Hmm, you are the second who noticed this :). What about having digits
pixmaps in corresponded .xpm files with symboled colors, and instead of
`xwem-time-time-color' use `X:xpm-color-symbols'.
The thing is why xwem-time is written this way is: xwem-time
originnaly was the first dockapp for xwem. There was no way to
customize digits colors, except of changing pixmaps itself
dynamically. So all pixmaps was defined as variables. Then xwem-time
was rewritten (to use less resources and increase drawing speed), but
pixmaps in variables was ramained.
BTW: do you have candy bunch of digits pixmaps to display time?
>
> Btw, several time icons are defined as defvar (xwem-time-xpm-empty-digit,
> xwem-time-xpm-time0, xwem-time-xpm-time1), but others as defconstant.
> What deep sense it has?
It does not actually makes any sense :). They all must be defvar.
The only difference between defvar and defconst is that defconst
overrides value (if user set one) at load time.
--
XWEM - The (S)XEmacs Window Manager.
|