aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2007-08-28 10:16:00 +0000
committerJan Djärv2007-08-28 10:16:00 +0000
commitdd314751952bd9289a682e9978fe8816539e72c3 (patch)
tree42cdebb9a225edb709572ff415eef8f7774bd381
parent4bc5cb9aee23c81b3df90ea0b09939e3e423184a (diff)
downloademacs-dd314751952bd9289a682e9978fe8816539e72c3.tar.gz
emacs-dd314751952bd9289a682e9978fe8816539e72c3.zip
(x-gtk-stock-map): New variable.
(x-gtk-map-stock): New function.
-rw-r--r--lisp/term/x-win.el37
1 files changed, 37 insertions, 0 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 43fc37c54b8..41b7cfe912d 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -2556,5 +2556,42 @@ order until succeed.")
2556(and (fboundp 'menu-bar-open) 2556(and (fboundp 'menu-bar-open)
2557 (global-set-key [f10] 'x-menu-bar-open)) 2557 (global-set-key [f10] 'x-menu-bar-open))
2558 2558
2559(defcustom x-gtk-stock-map
2560 '(
2561 ("new" . "gtk-new")
2562 ("open" . "gtk-open")
2563 ("diropen" . "gtk-directory")
2564 ("close" . "gtk-close")
2565 ("save" . "gtk-save")
2566 ("saveas" . "gtk-save-as")
2567 ("undo" . "gtk-undo")
2568 ("cut" . "gtk-cut")
2569 ("copy" . "gtk-copy")
2570 ("paste" . "gtk-paste")
2571 ("search" . "gtk-find")
2572 ("print" . "gtk-print")
2573 ("preferences" . "gtk-preferences")
2574 ("help" . "gtk-help")
2575 ("left-arrow" . "gtk-go-back")
2576 ("right-arrow" . "gtk-go-forward")
2577 ("home" . "gtk-home")
2578 ("jump-to" . "gtk-jump-to")
2579 ("index" . "gtk-index")
2580 ("search" . "gtk-find")
2581 ("exit" . "gtk-quit"))
2582 "How icons for tool bars are mapped to Gtk+ stock items.
2583Emacs must be compiled with the Gtk+ toolkit for this to have any effect."
2584 :version "23.0"
2585 :type 'alist
2586 :group 'x)
2587
2588(defun x-gtk-map-stock (file)
2589 "Map icon with file name FILE to a Gtk stock name, using `stock-map-gtk'."
2590 (let ((value (and file
2591 (assoc-string (file-name-sans-extension
2592 (file-name-nondirectory file))
2593 x-gtk-stock-map))))
2594 (and value (cdr value))))
2595
2559;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78 2596;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78
2560;;; x-win.el ends here 2597;;; x-win.el ends here