From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65292 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: Gtk+ stock tool bar icons Date: Sat, 29 Sep 2007 21:55:08 +0200 Message-ID: References: <46FE7D84.4000503@swipnet.se> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1191095839 9234 80.91.229.12 (29 Sep 2007 19:57:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 29 Sep 2007 19:57:19 +0000 (UTC) Cc: ding@gnus.org, emacs-devel@gnu.org To: Jan =?iso-8859-1?Q?Dj=E4rv?= Original-X-From: ding-owner+M13804@lists.math.uh.edu Sat Sep 29 21:57:14 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1IbiR2-0005pV-U1 for ding-account@gmane.org; Sat, 29 Sep 2007 21:57:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1IbiQG-0000Gy-Ng; Sat, 29 Sep 2007 14:56:20 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1IbiQD-0000Gc-NE for ding@lists.math.uh.edu; Sat, 29 Sep 2007 14:56:17 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1IbiQ7-000815-Be for ding@lists.math.uh.edu; Sat, 29 Sep 2007 14:56:17 -0500 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1IbiPy-00084u-00 for ; Sat, 29 Sep 2007 21:56:02 +0200 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by mail.uni-ulm.de (8.14.1/8.14.1) with ESMTP id l8TJu7DV017273; Sat, 29 Sep 2007 21:56:07 +0200 (MEST) Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id 50CAA12C67; Sat, 29 Sep 2007 21:56:07 +0200 (CEST) X-Face: 1;h7XMU[7l}$T@J.D}5z*w8Tg'}B5ArAWc8>2X~otB;kOjKs8X%|hTC#dG:%Vpx")x7S/`v :VXU#fZW$X$zdhEU.RfVQ@<-m9IuN{Hm"fW{,5]6kR'M*vEs+{5Cj!L(JTRzA$(},?5J=sm;%Od, ding@gnus.org, emacs-devel@gnu.org 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") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) X-DCC-INFN-TO-Metrics: poseidon 1233; Body=3 Fuz1=3 Fuz2=3 X-Virus-Scanned: by amavisd-new X-MIME-Autoconverted: from 8bit to quoted-printable by mail.uni-ulm.de id l8TJu7DV017273 X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:65292 gmane.emacs.devel:80024 Archived-At: On Sat, Sep 29 2007, Jan Dj=E4rv 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 thin= k 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) =20 -(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 us= ed. The keys in the alists are file names without extension and with two dir= ectory components. For example, to map /usr/share/emacs/22.1.1/etc/images/open= .xpm @@ -2608,7 +2611,14 @@ =20 (\"etc/images/diropen\" . \"n:system-file-manager\") =20 -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) =20 (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. --=20 ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/