2005-08-26 Daiki Ueno <ueno@unixuser.org>
+ * riece.el (riece-command-mode): Set
+ riece-mode-line-buffer-identification.
+ (riece-dialogue-mode): Ditto.
+ (riece-channel-mode): Ditto.
+ (riece-channel-list-mode): Ditto.
+ (riece-user-list-mode): Ditto.
+ * riece-icon.el
+ (riece-icon-update-mode-line-buffer-identification): New function.
+ (riece-icon-insinuate): Use it.
+ (riece-icon-uninstall): Use it.
+ * riece-globals.el (riece-mode-line-buffer-identification): New
+ variable.
+
+2005-08-26 Daiki Ueno <ueno@unixuser.org>
+
* Make add-ons uninstallable.
* riece-xface.el (riece-xface-user-list-mode-hook): New function.
(defvar riece-icon-original-mode-line-buffer-identification nil)
+(defun riece-icon-update-mode-line-buffer-identification ()
+ (let ((buffers riece-buffer-list))
+ (save-excursion
+ (while buffers
+ (set-buffer (car buffers))
+ (if (local-variable-p 'riece-mode-line-buffer-identification
+ (car buffers))
+ (setq mode-line-buffer-identification
+ (riece-mode-line-buffer-identification
+ riece-mode-line-buffer-identification)))
+ (setq buffers (cdr buffers))))))
+
(defun riece-icon-insinuate ()
(setq riece-icon-original-mode-line-buffer-identification
(symbol-function 'riece-mode-line-buffer-identification))
(defalias 'riece-mode-line-buffer-identification
#'riece-icon-modeline-buffer-identification)
+ (riece-icon-update-mode-line-buffer-identification)
(add-hook 'riece-user-list-mode-hook
'riece-icon-user-list-mode-hook)
(add-hook 'riece-channel-list-mode-hook
(defun riece-icon-uninstall ()
(fset 'riece-mode-line-buffer-identification
riece-icon-original-mode-line-buffer-identification)
+ (riece-icon-update-mode-line-buffer-identification)
(save-excursion
(set-buffer riece-user-list-buffer)
(remove-hook 'riece-update-buffer-functions
(make-local-variable 'truncate-partial-width-windows)
(setq truncate-partial-width-windows nil)
+ (make-local-variable 'riece-mode-line-buffer-identification)
(setq riece-away-indicator "-"
riece-operator-indicator "-"
riece-channel-status-indicator "-"
major-mode 'riece-command-mode
mode-name "Command"
+ riece-mode-line-buffer-identification
+ '("Riece: "
+ riece-away-indicator
+ riece-operator-indicator
+ riece-channel-status-indicator
+ " "
+ riece-user-indicator
+ " "
+ riece-channel-indicator)
mode-line-buffer-identification
(riece-mode-line-buffer-identification
- '("Riece: "
- riece-away-indicator
- riece-operator-indicator
- riece-channel-status-indicator
- " "
- riece-user-indicator
- " "
- riece-channel-indicator))
+ riece-mode-line-buffer-identification)
truncate-lines nil)
(riece-simplify-mode-line-format)
(use-local-map riece-command-mode-map)
(make-local-variable 'truncate-partial-width-windows)
(setq truncate-partial-width-windows nil)
+ (make-local-variable 'riece-mode-line-buffer-identification)
(setq riece-freeze riece-default-freeze
riece-away-indicator "-"
riece-operator-indicator "-"
riece-channel-status-indicator "-"
major-mode 'riece-dialogue-mode
mode-name "Dialogue"
+ riece-mode-line-buffer-identification
+ '("Riece: "
+ riece-away-indicator
+ riece-operator-indicator
+ riece-freeze-indicator
+ riece-channel-status-indicator
+ " "
+ riece-channel-list-indicator " ")
mode-line-buffer-identification
(riece-mode-line-buffer-identification
- '("Riece: "
- riece-away-indicator
- riece-operator-indicator
- riece-freeze-indicator
- riece-channel-status-indicator
- " "
- riece-channel-list-indicator " "))
+ riece-mode-line-buffer-identification)
truncate-lines nil
buffer-read-only t)
(riece-simplify-mode-line-format)
Instead, these commands are available:
\\{riece-channel-mode-map}"
(make-local-variable 'riece-channel-buffer-window-point)
- (setq mode-line-buffer-identification
+ (make-local-variable 'riece-mode-line-buffer-identification)
+ (setq riece-mode-line-buffer-identification
+ '("Riece: "
+ riece-away-indicator
+ riece-operator-indicator
+ riece-freeze-indicator
+ riece-channel-status-indicator
+ " "
+ riece-long-channel-indicator)
+ mode-line-buffer-identification
(riece-mode-line-buffer-identification
- '("Riece: "
- riece-away-indicator
- riece-operator-indicator
- riece-freeze-indicator
- riece-channel-status-indicator
- " "
- riece-long-channel-indicator))))
+ riece-mode-line-buffer-identification)))
(defun riece-channel-list-mode ()
"Major mode for displaying channel list.
(make-local-variable 'truncate-partial-width-windows)
(setq truncate-partial-width-windows nil)
+ (make-local-variable 'riece-mode-line-buffer-identification)
(setq major-mode 'riece-channel-list-mode
mode-name "Channels"
+ riece-mode-line-buffer-identification '("Riece: ")
mode-line-buffer-identification
- (riece-mode-line-buffer-identification '("Riece: "))
+ (riece-mode-line-buffer-identification
+ riece-mode-line-buffer-identification)
truncate-lines t
buffer-read-only t)
(make-local-hook 'riece-update-buffer-functions)
(make-local-variable 'truncate-partial-width-windows)
(setq truncate-partial-width-windows nil)
+ (make-local-variable 'riece-mode-line-buffer-identification)
(setq major-mode 'riece-user-list-mode
mode-name "Users"
+ riece-mode-line-buffer-identification
+ '("Riece: " riece-long-channel-indicator " ")
mode-line-buffer-identification
(riece-mode-line-buffer-identification
- '("Riece: " riece-long-channel-indicator " "))
+ riece-mode-line-buffer-identification)
truncate-lines t
buffer-read-only t)
(if (boundp 'transient-mark-mode)