[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emms-help] tool-bar for emms
From: |
joakim |
Subject: |
[emms-help] tool-bar for emms |
Date: |
Fri, 31 Oct 2008 09:16:30 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Heres a patch to enable tool-bars in the emms playlist mode.
It uses icons from the emacs tree, and its only tested on emacs23.
I have FSF papers for emacs.
diff --git a/AUTHORS b/AUTHORS
index 915dabd..559eb9d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -19,6 +19,7 @@ Ulrik Jensen <address@hidden>
William Xu <address@hidden>
Ye Wenbin <address@hidden>
Yoni Rabkin Katzenell <address@hidden>
+Joakim Verona <address@hidden>
;; Local variables:
;; coding: utf-8
diff --git a/lisp/emms-playlist-mode.el b/lisp/emms-playlist-mode.el
index f5daa25..c387eb2 100644
--- a/lisp/emms-playlist-mode.el
+++ b/lisp/emms-playlist-mode.el
@@ -52,6 +52,8 @@
(defvar emms-playlist-mode-popup-enabled nil
"True when the playlist was called as a popup window.")
+(defvar tool-bar-map)
+
(make-variable-buffer-local
'emms-playlist-mode-selected-overlay)
@@ -149,6 +151,22 @@ This is true for every invocation of
`emms-playlist-mode-go'."
map)
"Keymap for `emms-playlist-mode'.")
+
+(defvar emms-playlist-tool-bar-map
+ (let ((map (make-sparse-keymap)))
+ (dolist (x '((emms-previous . "prev-node")
+ (emms-next . "next-node")
+ (emms-seek-backward . "left-arrow")
+ (emms-seek-forward . "right-arrow")
+ (emms-stop . "gud/stop")
+ (emms-playlist-mode-play-smart . "gud/go"))
+ map)
+ (tool-bar-local-item
+ (cdr x) (car x) (car x) map emms-playlist-mode-map))))
+
+
+
+
(defmacro emms-playlist-mode-move-wrapper (name fun)
"Create a function NAME which is an `interactive' version of FUN.
@@ -603,6 +621,7 @@ WINDOW-WIDTH should be a positive integer."
(setq emms-playlist-buffer-p val))
(use-local-map emms-playlist-mode-map)
+ (set (make-local-variable 'tool-bar-map) emms-playlist-tool-bar-map)
(setq major-mode 'emms-playlist-mode
mode-name "EMMS")
--
Joakim Verona
- [emms-help] tool-bar for emms,
joakim <=