;; emchat-xwem.el --- Activity indicator for XWEM tray
-;; Copyright (C) 2005 - 2007 Steve Youngs
+;; Copyright (C) 2005 - 2011 Steve Youngs
;; Author: Steve Youngs <steve@emchat.org>
;; Maintainer: Steve Youngs <steve@emchat.org>
;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;; Commentary:
-;;
+;;
;; Puts a spiffy activity indicator into the XWEM systray.
;; To use this, add...
;;
"*Default color for OSD messages."
:group 'emchat-xwem
:type 'color)
-
+
(defcustom emchat-xwem-osd-group-colors
'((:girls . "deeppink")
(:vip . "gold")
(concat "/* XPM */\n"
"static char *noname[] = {\n"
"\"16 16 7 1\",\n"
-"\" c None\",\n"
+"\" c None\",\n"
"\". c #000100 s foreground\",\n"
"\"+ c #013200\",\n"
"\"@ c #2C2C00\",\n"
(defun emchat-xwem-osd-create ()
"Create OSD for emchat messages."
(setq emchat-xwem-osd
- (xwem-osd-create (xwem-dpy) (car emchat-xwem-osd-coordinates)
- (cdr emchat-xwem-osd-coordinates)
- 2048 1024))
+ (xwem-osd-create (xwem-dpy) (car emchat-xwem-osd-coordinates)
+ (cdr emchat-xwem-osd-coordinates)
+ 2048 1024))
(xwem-osd-set-font emchat-xwem-osd emchat-xwem-osd-font))
(defun emchat-xwem-osd-destroy ()
"Return OSD color to use for NICK."
(let ((groups (plist-get (assoc nick emchat-world) 'group)))
(or (cdr (find groups emchat-xwem-osd-group-colors
- :key #'car :test #'(lambda (g i)
- (member i g))))
- emchat-xwem-osd-color)))
+ :key #'car :test #'(lambda (g i)
+ (member i g))))
+ emchat-xwem-osd-color)))
(defun emchat-xwem-osd-show-message (nick message)
"Display NICK and MESSAGE in emchat OSD."
(xwem-osd-text-add
emchat-xwem-osd
(if emchat-xwem-osd-show-icon
- (glyph-width (make-glyph (vector 'xpm :data emchat-xwem-osd-icon)))
+ (glyph-width (make-glyph (vector 'xpm :data emchat-xwem-osd-icon)))
0) 0
(encode-coding-string
(format "%s: %s" nick message)
(and (string-match font-x-registry-and-encoding-regexp
- emchat-xwem-osd-font)
- (intern (downcase (format "%s-%s"
- (match-string 1 emchat-xwem-osd-font)
- (match-string 2 emchat-xwem-osd-font)))))
+ emchat-xwem-osd-font)
+ (intern (downcase (format "%s-%s"
+ (match-string 1 emchat-xwem-osd-font)
+ (match-string 2 emchat-xwem-osd-font)))))
))
(xwem-osd-show emchat-xwem-osd)
(delete-itimer (xwem-osd-get-prop emchat-xwem-osd 'timer)))
(xwem-osd-put-prop emchat-xwem-osd 'timer
(start-itimer "emchat-osd" #'emchat-xwem-osd-hide
- emchat-xwem-osd-display-time))))
+ emchat-xwem-osd-display-time))))
(defun emchat-xwem-osd-hide ()
"Hide emchat OSD."
(defun emchat-xwem-dock-create ()
"Create emchat dock."
(setq emchat-xwem-dock
- (xwem-osd-create-dock (xwem-dpy) 16 16
- (list 'keymap emchat-xwem-keymap)))
+ (xwem-osd-create-dock (xwem-dpy) 16 16
+ (list 'keymap emchat-xwem-keymap)))
(xwem-osd-show emchat-xwem-dock))
(defun emchat-xwem-dock-destroy ()
(provide 'emchat-xwem)
;;; emchat-xwem.el ends here
-