+2000-08-23 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-xemacs.el (liece-xemacs-channel-balloon): New function.
+ Show balloon icon to `liece-cahnnel-list-buffer' as XEmacs glyphs
+ when non-current channel message is received.
+ (liece-xemacs-channel-balloon-kill): New function.
+ Kill the balloon icon.
+
2000-08-17 Daiki Ueno <ueno@unixuser.org>
* liece.el (liece-server-keyword-map): Bind connection type.
(eval-when-compile
(require 'liece-inlines)
+ (require 'liece-misc)
(require 'liece-crypt)
(require 'liece-commands))
:type 'liece-toolbar-icon
:group 'liece-toolbar-icons)
+(defcustom liece-xemacs-channel-balloon-icon "balloon.xpm"
+ "Balloon icon."
+ :type 'file
+ :group 'liece-look)
+
;;; @ internal variables
;;;
(defvar liece-glyph-cache nil)
(or (eq 'stream (device-type))
(liece-xemacs-splash))
+;;; @ channel balloon
+;;;
+;;; To use:
+;;; (and (featurep 'xpm)
+;;; (memq (console-type) '(x mswindows))
+;;; (add-hook 'liece-privmsg-cleartext-hook
+;;; 'liece-xemacs-channel-balloon)
+;;; (add-hook 'liece-redisplay-buffer-functions
+;;; 'liece-xemacs-channel-balloon-kill))
+;;;
+(defun liece-xemacs-channel-balloon (prefix rest)
+ (with-current-buffer liece-channel-list-buffer
+ (let* ((buffer-read-only nil)
+ (file (liece-xemacs-icon-path
+ liece-xemacs-channel-balloon-icon))
+ (glyph (make-glyph (vector 'xpm ':file file)))
+ chnl ext)
+ (multiple-value-bind (chnl) (liece-split-line rest)
+ (setq chnl (liece-channel-virtual chnl))
+ (goto-char (point-min))
+ (and (liece-channel-p (liece-channel-real chnl))
+ (not (string= liece-current-channel chnl))
+ (re-search-forward (concat "^ ?[0-9]+: " chnl "$") nil t)
+ (progn
+ (goto-char (match-end 0))
+ (insert " ")
+ (setq ext (make-extent (match-end 0) (1+ (match-end 0))))
+ (set-extent-end-glyph ext glyph))))
+ nil)))
+
+(defun liece-xemacs-channel-balloon-kill (chnl)
+ (with-current-buffer liece-channel-list-buffer
+ (let ((buffer-read-only nil))
+ (goto-char (point-min))
+ (and (liece-channel-p (liece-channel-real chnl))
+ (re-search-forward (concat "^ ?[0-9]+: " chnl " $") nil t)
+ (progn
+ (goto-char (1- (match-end 0)))
+ (delete-char 1))))))
+
\f
;;; @ emulation functions
;;;