aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReiner Steib2007-09-30 11:25:08 +0000
committerReiner Steib2007-09-30 11:25:08 +0000
commit2e55c9864d2125afabe16d5052403923f74794cd (patch)
treec25e26562c96d61cd8798566f8d284dd3436e85c
parentef673042dde3f3ba627808c54f5ac2847b9dd752 (diff)
downloademacs-2e55c9864d2125afabe16d5052403923f74794cd.tar.gz
emacs-2e55c9864d2125afabe16d5052403923f74794cd.zip
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
(icon-map-list): Make it customizable. Document how to disable stock icons.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/term/x-win.el56
2 files changed, 58 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8b6d2f32288..1a82d1bd9e4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12007-09-30 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * term/x-win.el (x-gtk-stock-map): Add Gnus and MH-E icons.
4 Improve custom type.
5 (icon-map-list): Make it customizable. Document how to disable
6 stock icons.
7
12007-09-30 Richard Stallman <rms@gnu.org> 82007-09-30 Richard Stallman <rms@gnu.org>
2 9
3 * play/zone.el (zone-hiding-modeline): Use mode-line-format. 10 * play/zone.el (zone-hiding-modeline): Use mode-line-format.
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index eb4eb917fc6..84cdf7083b4 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -2587,16 +2587,53 @@ order until succeed.")
2587 ("etc/images/jump-to" . "gtk-jump-to") 2587 ("etc/images/jump-to" . "gtk-jump-to")
2588 ("etc/images/index" . "gtk-index") 2588 ("etc/images/index" . "gtk-index")
2589 ("etc/images/search" . "gtk-find") 2589 ("etc/images/search" . "gtk-find")
2590 ("etc/images/exit" . "gtk-quit")) 2590 ("etc/images/exit" . "gtk-quit")
2591 ;; Used in Gnus and/or MH-E:
2592 ("etc/images/attach.xpm" . "gtk-attach")
2593 ("etc/images/connect.xpm" . "gtk-connect")
2594 ("etc/images/contact.xpm" . "gtk-contact")
2595 ("etc/images/delete.xpm" . "gtk-delete")
2596 ("etc/images/describe.xpm" . "gtk-properties")
2597 ("etc/images/disconnect.xpm" . "gtk-disconnect")
2598 ;; ("etc/images/exit.xpm" . "gtk-exit")
2599 ("etc/images/lock-broken.xpm" . "gtk-lock_broken")
2600 ("etc/images/lock-ok.xpm" . "gtk-lock_ok")
2601 ("etc/images/lock.xpm" . "gtk-lock")
2602 ("etc/images/next-page.xpm" . "gtk-next-page")
2603 ("etc/images/refresh.xpm" . "gtk-refresh")
2604 ("etc/images/sort-ascending.xpm" . "gtk-sort-ascending")
2605 ("etc/images/sort-column-ascending.xpm" . "gtk-sort-column-ascending")
2606 ("etc/images/sort-criteria.xpm" . "gtk-sort-criteria")
2607 ("etc/images/sort-descending.xpm" . "gtk-sort-descending")
2608 ("etc/images/sort-row-ascending.xpm" . "gtk-sort-row-ascending")
2609 ("images/gnus/toggle-subscription.xpm" . "gtk-task-recurring")
2610 ("images/mail/compose.xpm" . "gtk-mail-compose")
2611 ("images/mail/copy.xpm" . "gtk-mail-copy")
2612 ("images/mail/forward.xpm" . "gtk-mail-forward")
2613 ("images/mail/inbox.xpm" . "gtk-inbox")
2614 ("images/mail/move.xpm" . "gtk-mail-move")
2615 ("images/mail/not-spam.xpm" . "gtk-not-spam")
2616 ("images/mail/outbox.xpm" . "gtk-outbox")
2617 ("images/mail/reply-all.xpm" . "gtk-mail-reply-to-all")
2618 ("images/mail/reply.xpm" . "gtk-mail-reply")
2619 ("images/mail/save-draft.xpm" . "gtk-mail-handling")
2620 ("images/mail/send.xpm" . "gtk-mail-send")
2621 ("images/mail/spam.xpm" . "gtk-spam")
2622 ;; No themed versions available:
2623 ;; mail/preview.xpm (combining stock_mail and stock_zoom)
2624 ;; mail/save.xpm (combining stock_mail, stock_save and stock_convert)
2625 )
2591 "How icons for tool bars are mapped to Gtk+ stock items. 2626 "How icons for tool bars are mapped to Gtk+ stock items.
2592Emacs must be compiled with the Gtk+ toolkit for this to have any effect. 2627Emacs must be compiled with the Gtk+ toolkit for this to have any effect.
2593A value that begins with n: denotes a named icon instead of a stock icon." 2628A value that begins with n: denotes a named icon instead of a stock icon."
2594 :version "22.2" 2629 :version "22.2"
2595 :type 'alist 2630 :type '(choice (repeat (choice symbol
2631 (cons (string :tag "Emacs icon")
2632 (string :tag "Stock/named")))))
2596 :group 'x) 2633 :group 'x)
2597 2634
2598(defvar icon-map-list '(x-gtk-stock-map) 2635(defcustom icon-map-list '(x-gtk-stock-map)
2599 "*A list of alists that maps icon file names to stock/named icons. 2636 "A list of alists that maps icon file names to stock/named icons.
2600The alists are searched in the order they appear. The first match is used. 2637The alists are searched in the order they appear. The first match is used.
2601The keys in the alists are file names without extension and with two directory 2638The keys in the alists are file names without extension and with two directory
2602components. For example, to map /usr/share/emacs/22.1.1/etc/images/open.xpm 2639components. For example, to map /usr/share/emacs/22.1.1/etc/images/open.xpm
@@ -2608,7 +2645,16 @@ Themes also have named icons. To map to one of those, use n: before the name:
2608 2645
2609 (\"etc/images/diropen\" . \"n:system-file-manager\") 2646 (\"etc/images/diropen\" . \"n:system-file-manager\")
2610 2647
2611The list elements are either the symbol name for the alist or the alist itself.") 2648The list elements are either the symbol name for the alist or the
2649alist itself.
2650
2651If you don't want stock icons, set the variable to nil."
2652 :version "22.2"
2653 :type '(choice (const :tag "Don't use stock icons" nil)
2654 (repeat (choice symbol
2655 (cons (string :tag "Emacs icon")
2656 (string :tag "Stock/named")))))
2657 :group 'x)
2612 2658
2613(defun x-gtk-map-stock (file) 2659(defun x-gtk-map-stock (file)
2614 "Map icon with file name FILE to a Gtk+ stock name, using `x-gtk-stock-map'." 2660 "Map icon with file name FILE to a Gtk+ stock name, using `x-gtk-stock-map'."