From: alkibiades@gmx.de
Cc: emacs-devel@gnu.org
Subject: Re: XPM via Lisp in the toolbar
Date: Fri, 15 Nov 2002 04:31:55 +0100 [thread overview]
Message-ID: <u4rajbj9w.fsf@ID-87814.user.dfncis.de> (raw)
In-Reply-To: <E18CWLK-0002xW-00@fencepost.gnu.org> (Richard Stallman's message of "Thu, 14 Nov 2002 21:36:26 -0500")
Richard Stallman <rms@gnu.org> writes:
> Or I could hook `xpm-create-image' into the appropriate functions in
> image.el.
>
> This seems like the cleanest result. If Emacs does not support XPM
> format internally, it can use your package. So XPM will always "just
> work" as far as the user is concerned.
O.k.
> But what to do with
> the tool bar? On MS Windows this breaks the tool bar totally.
>
> Could you explain why it has that effect? That is not obvious. It is
> surprising that adding XPM support via conversion should break
> anything that worked previously.
Unfortunately Emacs' internals are just a big black box for me (and
this won't change for a long time). All I can say is: if I try to put
an icon on the toolbar on MS Windows XP via an image descriptor that
contains PPM data *and* sets the :mask attribute to gain transparency,
then the according button does not appear on the toolbar at all. Since
this is what happens to all images in the tool bar, the tool bar stays
empty.
However: If I apply the same image descriptor *without* the mask
attribute, the image appears on the tool bar as expected. But this "as
expected" is very ugly, because the background is not transparent in
that case.
Actually I doubt that it worked previously (for certain values of
`worked'). AFAICS the :mask attribute does not have any effect on MS
Windows at all. The tool bar seems to be special, because the image
does not show up -- while in a normal buffer the image appears, albeit
without any visible difference to the same image without the :mask
attribute. Currently the tool bar on MS Windows shows the PBM
(black&white) versions of the icons. "Transparency" works different
for PBM and does not involve the :mask property.
> Or I could add a caching mechanism to toolbar.el so that the
> conversion happens only once.
>
> Why not add the caching feature in your conversion library?
> Then it would apply to anything that tries to display XPM
> and works via conversion.
Hmm. I would do it. I hesitate only, because this would mean that
*every* XPM image viewed within an Emacs buffer would be stored as a
PBM/PGN/PPM file on the disk. So if a user, say, uses
`auto-image-file-mode' and dired to review a directory with 100 XPM
icons, she would have additional 100 PPM files on her hard disk after
that.
Or do you mean to do caching without storing the image data on the
disk? So that only in a single instance of Emacs no image file is
converted twice? I think this would only be useful in very few cases;
for example if the user from my example above decided to review the
directory a second time. I doubt that this is worth the trouble.
WDYT?
Oliver
--
Oliver Scholz 25 Brumaire an 211 de la Révolution
Taunusstr. 25 Liberté, Egalité, Fraternité!
60329 Frankfurt a. M. http://www.jungdemokratenhessen.de
Tel. (069) 97 40 99 42 http://www.jdjl.org
next prev parent reply other threads:[~2002-11-15 3:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-12 17:32 XPM via Lisp in the toolbar Oliver Scholz
2002-11-13 17:15 ` Oliver Scholz
2002-11-15 2:36 ` Richard Stallman
2002-11-15 3:31 ` alkibiades [this message]
2002-11-15 14:08 ` Stefan Monnier
2002-11-16 14:51 ` Richard Stallman
2002-11-16 14:51 ` Richard Stallman
2002-11-16 18:44 ` alkibiades
2002-11-17 7:15 ` Richard Stallman
2002-11-17 12:30 ` alkibiades
2002-11-17 12:49 ` Oliver Scholz
2002-11-15 15:06 ` Jason Rumney
2002-11-15 18:06 ` Jason Rumney
2002-11-18 14:08 ` Oliver Scholz
2002-11-18 16:59 ` mushroom icon [was: Re: XPM via Lisp in the toolbar] John Paul Wallington
2002-11-18 19:38 ` XPM via Lisp in the toolbar Jason Rumney
2002-11-14 4:10 ` Richard Stallman
2002-11-15 17:47 ` W32 image patch (was Re: XPM via Lisp in the toolbar) Jason Rumney
2002-11-19 8:51 ` bootstrap fails with current CVS on MS Windows XP Oliver Scholz
2002-11-19 9:30 ` Juanma Barranquero
2002-11-20 21:13 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u4rajbj9w.fsf@ID-87814.user.dfncis.de \
--to=alkibiades@gmx.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.