From: Reiner Steib <reinersteib+gmane@imap.cc>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: ding@gnus.org, emacs-devel@gnu.org
Subject: Re: Gtk+ stock tool bar icons
Date: Sat, 29 Sep 2007 21:55:08 +0200 [thread overview]
Message-ID: <v94phdjlgj.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <46FE7D84.4000503@swipnet.se> ("Jan =?iso-8859-1?Q?Dj=E4rv=22?= =?iso-8859-1?Q?'s?= message of "Sat, 29 Sep 2007 18:29:56 +0200")
On Sat, Sep 29 2007, Jan Djärv wrote:
> Reiner Steib skrev:
>> - Is (setq x-gtk-stock-map nil) the recommended way to disable themed
>> icons? Shouldn't we provide this as a custom option (also in Emacs
>> trunk) and mention it in NEWS? (BTW, the custom version should read
>> 22.2 if we keep it in EMACS_22_BASE, shouldn't it?)
>
> The custom version should indeed be 22.2, I've fixed that. If you think we
> need another customize option to disable this, please feel free to add it.
On a second thought: Maybe `icon-map-list' seems more suitable to
disable it. How about making it `icon-map-list' customizable and
improving the custom type of `x-gtk-stock-map' as follows?
--8<---------------cut here---------------start------------->8---
--- x-win.el 29 Sep 2007 16:23:59 -0000 1.211
+++ x-win.el 29 Sep 2007 19:48:04 -0000
@@ -2592,11 +2592,14 @@
Emacs must be compiled with the Gtk+ toolkit for this to have any effect.
A value that begins with n: denotes a named icon instead of a stock icon."
:version "22.2"
- :type 'alist
+ :type '(choice (repeat (choice symbol
+ (cons (string :tag "Emacs icon")
+ (regexp :tag "Stock/named")))))
+
:group 'x)
-(defvar icon-map-list '(x-gtk-stock-map)
- "*A list of alists that maps icon file names to stock/named icons.
+(defcustom icon-map-list '(x-gtk-stock-map)
+ "A list of alists that maps icon file names to stock/named icons.
The alists are searched in the order they appear. The first match is used.
The keys in the alists are file names without extension and with two directory
components. For example, to map /usr/share/emacs/22.1.1/etc/images/open.xpm
@@ -2608,7 +2611,14 @@
(\"etc/images/diropen\" . \"n:system-file-manager\")
-The list elements are either the symbol name for the alist or the alist itself.")
+The list elements are either the symbol name for the alist or the
+alist itself."
+ :version "22.2"
+ :type '(choice (const :tag "Don't use stock icons" nil)
+ (repeat (choice symbol
+ (cons (string :tag "Emacs icon")
+ (regexp :tag "Stock/named")))))
+ :group 'x)
(defun x-gtk-map-stock (file)
"Map icon with file name FILE to a Gtk+ stock name, using `x-gtk-stock-map'."
--8<---------------cut here---------------end--------------->8---
>> - Is my patch [3] correct?
>
> No, the files should be "images/mail/...".
Are you saying without "etc/"? I did it exactly like the present
elements:
("etc/images/search" . "gtk-find")
- ("etc/images/exit" . "gtk-quit"))
+ ("etc/images/exit" . "gtk-quit")
+ ;; Used in MH-E and/or Gnus:
+ ("etc/images/attach.xpm" . "gtk-attach")
+ ("etc/images/connect.xpm" . "gtk-connect")
BTW, wouldn't it be better to strip "etc/images/" in the icon names
for consistency with the specification of the icons e.g. in
`tool-bar-add-item-from-menu' (cf. `image-load-path')?
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
next prev parent reply other threads:[~2007-09-29 19:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-29 13:45 Reiner Steib
2007-09-29 16:29 ` Jan Djärv
2007-09-29 19:55 ` Reiner Steib [this message]
2007-09-30 9:40 ` Jan Djärv
2007-09-30 11:25 ` Reiner Steib
2007-09-30 3:04 ` Richard Stallman
2007-09-30 9:41 ` Jan Djärv
2007-09-30 10:48 ` Reiner Steib
2007-10-01 1:36 ` 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=v94phdjlgj.fsf@marauder.physik.uni-ulm.de \
--to=reinersteib+gmane@imap.cc \
--cc=Reiner.Steib@gmx.de \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=jan.h.d@swipnet.se \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).