* riece-display.el: Rename some signals.
authorueno <ueno>
Sun, 7 Mar 2004 21:38:50 +0000 (21:38 +0000)
committerueno <ueno>
Sun, 7 Mar 2004 21:38:50 +0000 (21:38 +0000)
* riece-commands.el (riece-command-set-operators): Reverse user-list.
(riece-command-set-speakers): Ditto.

lisp/ChangeLog
lisp/riece-300.el
lisp/riece-commands.el
lisp/riece-display.el
lisp/riece-handle.el
lisp/riece-message.el
lisp/riece-naming.el
lisp/riece-unread.el

index e37f53e..fa5b7dc 100644 (file)
@@ -1,5 +1,12 @@
 2004-03-07  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-display.el: Rename some signals.
+
+       * riece-commands.el (riece-command-set-operators): Reverse user-list.
+       (riece-command-set-speakers): Ditto.
+
+2004-03-07  Daiki Ueno  <ueno@unixuser.org>
+
        * riece-unread.el
        (riece-unread-format-identity-for-channel-list-indicator): Escape
        % -> %%; use riece-propertize-modeline-string.
index 9eb0965..034e9c0 100644 (file)
            (if operator
                (setq status (cons "operator" status)))
            (riece-user-toggle-away user away)
-           (riece-emit-signal 'riece-user-toggle-away
+           (riece-emit-signal 'user-away-changed
                               (riece-make-identity user riece-server-name)
                               away)
            (riece-user-toggle-operator user operator)
-           (riece-emit-signal 'riece-user-toggle-operator
+           (riece-emit-signal 'user-operator-changed
                               (riece-make-identity user riece-server-name)
                               operator)
            (riece-insert-info
@@ -93,7 +93,7 @@
       (let ((user (match-string 1 string))
            (message (substring string (match-end 0))))
        (riece-user-toggle-away user t)
-       (riece-emit-signal 'riece-user-toggle-away
+       (riece-emit-signal 'user-away-changed
                           (riece-make-identity user riece-server-name)
                           t)
        (riece-insert-info
 
 (defun riece-handle-305-message (prefix number name string)
   (riece-user-toggle-away riece-real-nickname nil)
-  (riece-emit-signal 'riece-user-toggle-away
+  (riece-emit-signal 'user-away-changed
                      (riece-make-identity riece-real-nickname
                                           riece-server-name)
                      nil))
 
 (defun riece-handle-306-message (prefix number name string)
   (riece-user-toggle-away riece-real-nickname t)
-  (riece-emit-signal 'riece-user-toggle-away
+  (riece-emit-signal 'user-away-changed
                     (riece-make-identity riece-real-nickname
                                          riece-server-name)
                     t))
        (while modes
          (riece-channel-toggle-mode channel (car modes) (eq toggle ?+))
          (setq modes (cdr modes)))
-       (riece-emit-signal 'riece-channel-toggle-modes
+       (riece-emit-signal 'channel-modes-changed
                           (riece-make-identity channel riece-server-name)
                           modes (eq toggle ?+))
        (let* ((channel-identity (riece-make-identity channel
                     (riece-format-identity channel-identity t)
                     message))
            "\n")))
-       (riece-emit-signal 'riece-channel-set-topic
+       (riece-emit-signal 'channel-topic-changed
                            channel-identity
                            (unless remove
                              message)))))
            (setq status (nreverse status)))
        (riece-naming-assert-join nick channel)
        (riece-user-toggle-away user away)
-       (riece-emit-signal 'riece-user-toggle-away
+       (riece-emit-signal 'user-away-changed
                           (riece-make-identity user riece-server-name)
                           away)
        (riece-user-toggle-operator user operator)
-       (riece-emit-signal 'riece-user-toggle-operator
+       (riece-emit-signal 'user-operator-changed
                           (riece-make-identity user riece-server-name)
                           operator)
        (riece-insert-info buffer (concat (riece-concat-user-status
index 6ff9561..214ac1c 100644 (file)
@@ -302,7 +302,7 @@ the layout to the selected layout-name."
                     ?-
                   ?+)
                 (make-string (length group) ?o)
-                (mapconcat #'identity group " ")))
+                (mapconcat #'identity (nreverse group) " ")))
        (setq group nil)))))
 
 (defun riece-command-set-speakers (users &optional arg)
@@ -335,7 +335,7 @@ the layout to the selected layout-name."
                     ?-
                   ?+)
                 (make-string (length group) ?v)
-                (mapconcat #'identity group " ")))
+                (mapconcat #'identity (nreverse group) " ")))
        (setq group nil)))))
 
 (defun riece-command-send-message (message notice)
@@ -559,7 +559,7 @@ If prefix argument ARG is non-nil, toggle frozen status."
     (setq riece-freeze (if arg
                           (< 0 (prefix-numeric-value arg))
                         (not riece-freeze)))
-    (riece-emit-signal 'riece-buffer-toggle-freeze
+    (riece-emit-signal 'buffer-freeze-changed
                       (current-buffer) riece-freeze)))
 
 (defun riece-command-toggle-own-freeze (&optional arg)
@@ -576,7 +576,7 @@ If prefix argument ARG is non-nil, toggle frozen status."
          (not (eq riece-freeze 'own)))
        (setq riece-freeze 'own)
       (setq riece-freeze nil)))
-  (riece-emit-signal 'riece-buffer-toggle-freeze
+  (riece-emit-signal 'buffer-freeze-changed
                     (current-buffer) riece-freeze))
 
 (eval-when-compile
index 19e6c8a..3ecbab0 100644 (file)
@@ -48,31 +48,33 @@ Local to the buffer in `riece-buffer-list'.")
 
 (defun riece-display-connect-signals ()
   (riece-connect-signal
-   'riece-update-buffer
+   'channel-list-changed
    (lambda (signal handback)
      (save-excursion
-       (set-buffer (car (riece-signal-args signal)))
+       (set-buffer riece-channel-list-buffer)
+       (run-hooks 'riece-update-buffer-functions))
+     (riece-update-channel-list-indicator)))
+  (riece-connect-signal
+   'user-list-changed
+   (lambda (signal handback)
+     (save-excursion
+       (set-buffer riece-user-list-buffer)
        (run-hooks 'riece-update-buffer-functions))))
   (riece-connect-signal
-   'riece-switch-to-channel
+   'channel-switched
    (lambda (signal handback)
      (riece-update-status-indicators)
      (riece-update-channel-indicator)
      (riece-update-long-channel-indicator)
-     (riece-update-channel-list-indicator)
      (force-mode-line-update t)
-     (riece-emit-signal 'riece-update-buffer riece-user-list-buffer)
-     (riece-emit-signal 'riece-update-buffer riece-channel-list-buffer)
+     (riece-emit-signal 'channel-list-changed)
+     (riece-emit-signal 'user-list-changed)
      (save-excursion
        (riece-redraw-layout))))
   (riece-connect-signal
-   'riece-naming-assert-channel-users
-   (lambda (signal handback)
-     (riece-emit-signal 'riece-update-buffer riece-user-list-buffer)))
-  (riece-connect-signal
-   'riece-naming-assert-join
+   'user-joined-channel
    (lambda (signal handback)
-     (riece-emit-signal 'riece-update-buffer riece-user-list-buffer))
+     (riece-emit-signal 'user-list-changed))
    (lambda (signal)
      (and riece-current-channel
          (riece-identity-equal (nth 1 (riece-signal-args signal))
@@ -80,7 +82,7 @@ Local to the buffer in `riece-buffer-list'.")
          (not (riece-identity-equal (car (riece-signal-args signal))
                                     (riece-current-nickname))))))
   (riece-connect-signal
-   'riece-naming-assert-join
+   'user-joined-channel
    (lambda (signal handback)
      (riece-join-channel (nth 1 (riece-signal-args signal)))
      (riece-switch-to-channel (nth 1 (riece-signal-args signal)))
@@ -89,9 +91,9 @@ Local to the buffer in `riece-buffer-list'.")
      (riece-identity-equal (car (riece-signal-args signal))
                           (riece-current-nickname))))
   (riece-connect-signal
-   'riece-naming-assert-part
+   'user-left-channel
    (lambda (signal handback)
-     (riece-emit-signal 'riece-update-buffer riece-user-list-buffer))
+     (riece-emit-signal 'user-list-changed))
    (lambda (signal)
      (and riece-current-channel
          (riece-identity-equal (nth 1 (riece-signal-args signal))
@@ -99,16 +101,16 @@ Local to the buffer in `riece-buffer-list'.")
          (not (riece-identity-equal (car (riece-signal-args signal))
                                     (riece-current-nickname))))))
   (riece-connect-signal
-   'riece-naming-assert-part
+   'user-left-channel
    (lambda (signal handback)
      (riece-part-channel (nth 1 (riece-signal-args signal))))
    (lambda (signal)
      (riece-identity-equal (car (riece-signal-args signal))
                           (riece-current-nickname))))
   (riece-connect-signal
-   'riece-naming-assert-rename
+   'user-renamed
    (lambda (signal handback)
-     (riece-emit-signal 'riece-update-buffer riece-user-list-buffer))
+     (riece-emit-signal 'user-list-changed))
    (lambda (signal)
      (and riece-current-channel
          (equal (riece-identity-server (nth 1 (riece-signal-args signal)))
@@ -121,7 +123,7 @@ Local to the buffer in `riece-buffer-list'.")
                                       riece-current-channel))
             t)))))
   (riece-connect-signal
-   'riece-naming-assert-rename
+   'user-renamed
    (lambda (signal handback)
      (riece-update-status-indicators)
      (riece-update-channel-indicator)
@@ -130,7 +132,7 @@ Local to the buffer in `riece-buffer-list'.")
      (riece-identity-equal (nth 1 (riece-signal-args signal))
                           (riece-current-nickname))))
   (riece-connect-signal
-   'riece-naming-assert-rename
+   'user-renamed
    (lambda (signal handback)
      (riece-switch-to-channel (nth 1 (riece-signal-args signal))))
    (lambda (signal)
@@ -138,7 +140,7 @@ Local to the buffer in `riece-buffer-list'.")
          (riece-identity-equal (car (riece-signal-args signal))
                                riece-current-channel))))
   (riece-connect-signal
-   'riece-naming-assert-rename
+   'user-renamed
    (lambda (signal handback)
      (let* ((old-identity (car (riece-signal-args signal)))
            (new-identity (nth 1 (riece-signal-args signal)))
@@ -155,7 +157,7 @@ Local to the buffer in `riece-buffer-list'.")
                                                   riece-channel-buffer-alist)
                             riece-channel-buffer-alist))))))))
   (riece-connect-signal
-   'riece-user-toggle-away
+   'user-away-changed
    (lambda (signal handback)
      (riece-update-status-indicators)
      (force-mode-line-update t))
@@ -163,7 +165,7 @@ Local to the buffer in `riece-buffer-list'.")
      (riece-identity-equal (car (riece-signal-args signal))
                           (riece-current-nickname))))
   (riece-connect-signal
-   'riece-user-toggle-operator
+   'user-operator-changed
    (lambda (signal handback)
      (riece-update-status-indicators)
      (force-mode-line-update t))
@@ -171,7 +173,7 @@ Local to the buffer in `riece-buffer-list'.")
      (riece-identity-equal (car (riece-signal-args signal))
                           (riece-current-nickname))))
   (riece-connect-signal
-   'riece-channel-set-topic
+   'channel-topic-changed
    (lambda (signal handback)
      (riece-update-long-channel-indicator)
      (force-mode-line-update t))
@@ -180,7 +182,7 @@ Local to the buffer in `riece-buffer-list'.")
          (riece-identity-equal (car (riece-signal-args signal))
                                riece-current-channel))))
   (riece-connect-signal
-   'riece-channel-set-modes
+   'channel-modes-changed
    (lambda (signal handback)
      (riece-update-status-indicators)
      (force-mode-line-update t))
@@ -189,23 +191,23 @@ Local to the buffer in `riece-buffer-list'.")
          (riece-identity-equal (car (riece-signal-args signal))
                                riece-current-channel))))
   (riece-connect-signal
-   'riece-channel-toggle-operator
+   'channel-operators-changed
    (lambda (signal handback)
-     (riece-emit-signal 'riece-update-buffer riece-user-list-buffer))
+     (riece-emit-signal 'user-list-changed))
    (lambda (signal)
      (and riece-current-channel
          (riece-identity-equal (car (riece-signal-args signal))
                                riece-current-channel))))
   (riece-connect-signal
-   'riece-channel-toggle-speaker
+   'channel-speakers-changed
    (lambda (signal handback)
-     (riece-emit-signal 'riece-update-buffer riece-user-list-buffer))
+     (riece-emit-signal 'user-list-changed))
    (lambda (signal)
      (and riece-current-channel
          (riece-identity-equal (car (riece-signal-args signal))
                                riece-current-channel))))
   (riece-connect-signal
-   'riece-buffer-toggle-freeze
+   'buffer-freeze-changed
    (lambda (signal handback)
      (riece-update-status-indicators)
      (force-mode-line-update t))))
@@ -390,7 +392,7 @@ Local to the buffer in `riece-buffer-list'.")
     (setq riece-current-channel identity
          riece-channel-buffer (riece-channel-buffer riece-current-channel))
     (run-hook-with-args 'riece-after-switch-to-channel-functions last)
-    (riece-emit-signal 'riece-switch-to-channel)))
+    (riece-emit-signal 'channel-switched)))
 
 (defun riece-join-channel (identity)
   (unless (riece-identity-member identity riece-current-channels)
@@ -421,7 +423,7 @@ Local to the buffer in `riece-buffer-list'.")
       (let ((last riece-current-channel))
        (run-hook-with-args 'riece-after-switch-to-channel-functions last)
        (setq riece-current-channel nil)
-       (riece-emit-signal 'riece-switch-to-channel)))))
+       (riece-emit-signal 'channel-switched)))))
 
 (defun riece-part-channel (identity)
   (let ((pointer (riece-identity-member identity riece-current-channels)))
index 47f5f2a..e83fbe5 100644 (file)
         (user-identity (riece-make-identity user riece-server-name))
         (channel-identity (riece-make-identity channel riece-server-name)))
     (riece-channel-set-topic (riece-get-channel channel) topic)
-    (riece-emit-signal 'riece-channel-set-topic
+    (riece-emit-signal 'channel-topic-changed
                       channel-identity topic)
     (let ((buffer (riece-channel-buffer channel-identity)))
       (riece-insert-change
       (riece-channel-toggle-operator channel
                                     (nth 2 (car modes))
                                     (nth 1 (car modes)))
-      (riece-emit-signal 'riece-channel-toggle-operator
+      (riece-emit-signal 'channel-operators-changed
                         (riece-make-identity channel
                                              riece-server-name)
                         (riece-make-identity (nth 2 (car modes))
       (riece-channel-toggle-speaker channel
                                    (nth 2 (car modes))
                                    (nth 1 (car modes)))
-      (riece-emit-signal 'riece-channel-toggle-speaker
+      (riece-emit-signal 'channel-speakers-changed
                         (riece-make-identity channel
                                              riece-server-name)
                         (riece-make-identity (nth 2 (car modes))
      (t
       (apply #'riece-channel-toggle-mode channel (car modes))))
     (setq modes (cdr modes)))
-  (riece-emit-signal 'riece-channel-set-modes
+  (riece-emit-signal 'channel-modes-changed
                     (riece-make-identity channel
                                          riece-server-name)))
 
index 768d781..8db0334 100644 (file)
@@ -159,7 +159,7 @@ Normally they are *Dialogue* and/or *Others*."
               (riece-own-frozen buffer))
       (with-current-buffer buffer
        (setq riece-freeze nil))
-      (riece-emit-signal 'riece-buffer-toggle-freeze buffer nil))
+      (riece-emit-signal 'buffer-freeze-changed buffer nil))
     (setq parent-buffers (riece-message-parent-buffers message buffer))
     (riece-insert buffer
                  (concat open-bracket name close-bracket
index ab5a357..e82fc91 100644 (file)
@@ -32,7 +32,7 @@
 (defun riece-naming-assert-join (user-name channel-name)
   (riece-user-toggle-channel user-name channel-name t)
   (riece-channel-toggle-user channel-name user-name t)
-  (riece-emit-signal 'riece-naming-assert-join
+  (riece-emit-signal 'user-joined-channel
                     (riece-make-identity user-name
                                          riece-server-name)
                     (riece-make-identity channel-name
@@ -43,7 +43,7 @@
   (riece-channel-toggle-user channel-name user-name nil)
   (riece-channel-toggle-operator channel-name user-name nil)
   (riece-channel-toggle-speaker channel-name user-name nil)
-  (riece-emit-signal 'riece-naming-assert-part
+  (riece-emit-signal 'user-left-channel
                     (riece-make-identity user-name
                                          riece-server-name)
                     (riece-make-identity channel-name
@@ -63,7 +63,7 @@
          (setcar user new-name))
       (setq channels (cdr channels)))
     (riece-rename-user old-name new-name))
-  (riece-emit-signal 'riece-naming-assert-rename
+  (riece-emit-signal 'user-renamed
                     (riece-make-identity old-name riece-server-name)
                     (riece-make-identity new-name riece-server-name)))
 
@@ -86,8 +86,7 @@
                        (cdr (car users)))
                  user-identity-list)
            users (cdr users)))
-    (riece-emit-signal 'riece-naming-assert-channel-users
-                      (nreverse user-identity-list) channel-identity)))
+    (riece-emit-signal 'user-list-changed)))
 
 (provide 'riece-naming)
 
index 4f874f5..b2b2a28 100644 (file)
@@ -69,7 +69,7 @@
                                     riece-unread-channels))
     (setq riece-unread-channels
          (cons (riece-message-target message) riece-unread-channels))
-    (riece-emit-signal 'riece-update-buffer riece-channel-list-buffer)))
+    (riece-emit-signal 'channel-list-changed)))
 
 (defun riece-unread-after-switch-to-channel-function (last)
   (setq riece-unread-channels