unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
Cc: ding@gnus.org, emacs-devel@gnu.org
Subject: Re: Using GNOME stock icons
Date: Wed, 28 Sep 2005 23:24:50 +0200	[thread overview]
Message-ID: <v9ek78zxzx.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <E1EKfSB-0001vb-PF@fencepost.gnu.org> (Richard M. Stallman's message of "Wed, 28 Sep 2005 13:10:47 -0400")

On Wed, Sep 28 2005, Richard M. Stallman wrote:

>     is it possible to use GNOME icons in Emacs or do we need a copyright
>     assignment?  I ask because I'd like to replace[1] the current Gnus
>     tool bar icons with some nicer icons from the default GNOME icon
>     theme.
>
>     [1] Or at least make it customizable.  
>
> We could use the icons, on the same basis that we use some free
> libraries that are not copyright FSF.  However, that is not the
> only possibility.  Another is to use them if GNOME is installed.

The GMOME icons are in PNG format.  Is it possible to use PNG in
Emacs' tool bar?  My tests didn't display the PNG images; I had to
convert them to XPM.

> Could you say more specifically what "customizable" means?  

Currently, the icons and corresponding functions are hard-coded (see
e.g. `gnus-summary-make-tool-bar').  With my code, the user can choose
between a few pre-defined set of icons and functions.  Or he can add
or remove icons/functions.

One pre-defined set could be the "GNOME style":

--8<---------------cut here---------------start------------->8---
(defcustom rs-gnus-summary-tool-bar-gnome
  '((gnus-summary-post-news "stock_mail-compose" t)
    (gnus-summary-reply-with-original "stock_mail-reply" t)
    (gnus-summary-mail-forward "stock_mail-forward" t)
    ;;[...]
    (gnus-info-find-node "help" t))
  "List of functions for the summary tool bar (GNOME style).

See `rs-gnus-summary-tool-bar' for details on the format of the list."
  :type '(repeat (list (function :tag "Menu Command")
		       (string   :tag "Icon file")
		       (choice :tag "Visibility"
			       (const :tag "Always" t)
			       (const :tag "Never" nil)
			       (function :tag "Test function"))))
  :group 'gnus-summary)
--8<---------------cut here---------------end--------------->8---

The variable `rs-gnus-summary-tool-bar' controls which set of
icons/functions is used.  In the following example, it defaults to the
GNOME style, but the user can easily switch between pre-defined sets
or define his own:

--8<---------------cut here---------------start------------->8---
(defcustom rs-gnus-summary-tool-bar 'rs-gnus-summary-tool-bar-gnome
  "Specifies the Gnus summary tool bar.

It can be either a list or a symbol refering to a list.

If it is a list, each element must be a list.  The first element
is a menu command, the second element is an icon file name and
the third element is a test function.

You can use \\[describe-key] <menu-entry> to find out the name of
a menu command.

Pre-defined symbols include `rs-gnus-summary-tool-bar-gnome' and
`rs-gnus-summary-tool-bar-retro'."
  :type '(choice (const :tag "Gnome style" rs-gnus-summary-tool-bar-gnome)
		 (const :tag "Retro look"  rs-gnus-summary-tool-bar-retro)
		 (symbol)
		 (repeat :tag "User defined list"
			 (list (function :tag "Menu Command")
			       (string   :tag "Icon file")
			       (choice :tag "Visibility"
				       (const :tag "Always" t)
				       (const :tag "Never" nil)
				       (function :tag "Test function")))))
  :group 'gnus-summary)
--8<---------------cut here---------------end--------------->8---

(The doc string should probably be improved.  Of course I'll remove
the "rs-" prefix when I install it in Gnus.)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



  reply	other threads:[~2005-09-28 21:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-26 17:55 Using GNOME stock icons Reiner Steib
2005-09-28 17:10 ` Richard M. Stallman
2005-09-28 21:24   ` Reiner Steib [this message]
2005-09-30 17:33     ` Richard M. Stallman
2005-09-30 17:33     ` Richard M. 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=v9ek78zxzx.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 \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).