Commit 58dd7442 authored by David Byers's avatar David Byers
Browse files

Added patch for kom-who-is-present-in-conference from Christer Ekholm

parent 8f67d605
2001-07-11 David Byers <davby@ida.liu.se>
* swedish-strings.el (lyskom-help-strings): Added strings for
kom-who-present-in-conference.
* vars.el.in (lyskom-commands): Added kom-who-is-present-in-conference
(lyskom-help-categories): Added kom-who-is-present-in-conference
2001-07-11 Christer Ekholm <che@init.se>
* english-strings.el, swedish-strings.el (lyskom-command): Added
kom-who-is-present-in-conference.
(lyskom-message): Added strings for
kom-who-is-present-in-conference.
* commands1.el (kom-who-is-present-in-conference): New command.
(lyskom-who-is-on-8): Support kom-who-is-present-in-conference.
(lyskom-who-is-on-9): Same here.
2001-06-27 David Byers <davby@ida.liu.se>
* lyskom-rest.el (lyskom-is-loaded): Bind icon-title-format the
same way we bind frame-icon-title-format so icon title for Gnu
Emacs has a chance of changing when unreads change.
2001-06-05 Johan Sundstrm <jhs@lysator.liu.se>
* swedish-strings.el (lyskom-message): Changed all references to
......
......@@ -2720,16 +2720,42 @@ If the prefix is 0, all visible sessions are shown."
(lyskom-no-users
(lyskom-insert (lyskom-get-string 'null-who-info))))))
(defun lyskom-who-is-on-8 (&optional conf-stat)
;;; ================================================================
;;; Vilka ({r n{rvarande i) möte - Who is present in a conference?
;;; Author: Christer Ekholm
;;; Copied from kom-who-is-on-in-conference by petli
(def-kom-command kom-who-is-present-in-conference (&optional arg)
"Display a list of all connected users currently present in CONF.
The prefix arg controls the idle limit of the sessions showed. If the
prefix is negative, invisible sessions are also shown.
If the prefix is 0, all visible sessions are shown."
(interactive "P")
(let ((conf-stat
(lyskom-read-conf-stat (lyskom-get-string 'who-is-active-in-what-conference)
'(all) nil nil t)))
(condition-case nil
(if (lyskom-have-feature dynamic-session-info)
(lyskom-who-is-on-9 arg conf-stat t)
(lyskom-who-is-on-8 conf-stat t))
(lyskom-no-users
(lyskom-insert (lyskom-get-string 'null-who-info))))))
(defun lyskom-who-is-on-8 (&optional conf-stat show-present-only)
"Display a list of all connected users.
Uses Protocol A version 8 calls"
(let* ((who-info-list (blocking-do 'who-is-on))
(who-list (sort (if conf-stat
(lyskom-who-is-on-check-membership-8 who-info-list conf-stat)
(listify-vector who-info-list))
(function (lambda (who1 who2)
(< (who-info->connection who1)
(who-info->connection who2))))))
(who-list (sort (cond (show-present-only
(lyskom-who-is-present-check-membership-8 who-info-list conf-stat))
(conf-stat
(lyskom-who-is-on-check-membership-8 who-info-list conf-stat))
(t
(listify-vector who-info-list))
(function (lambda (who1 who2)
(< (who-info->connection who1)
(who-info->connection who2)))))))
(total-users (length who-list))
(session-width (1+ (length (int-to-string
(who-info->connection
......@@ -2741,9 +2767,11 @@ Uses Protocol A version 8 calls"
(lyskom-default-conf-string 'not-present-anywhere)
(lyskom-default-pers-string 'unknown-person))
(if conf-stat
(lyskom-format-insert 'who-is-active-and-member conf-stat))
(cond (show-present-only
(lyskom-format-insert 'who-is-active-and-present conf-stat))
(conf-stat
(lyskom-format-insert 'who-is-active-and-member conf-stat)))
(lyskom-format-insert format-string-2
""
(lyskom-get-string 'lyskom-name)
......@@ -2785,7 +2813,7 @@ Uses Protocol A version 8 calls"
'timeformat-day-yyyy-mm-dd-hh-mm-ss)))))
(defun lyskom-who-is-on-9 (arg &optional conf-stat)
(defun lyskom-who-is-on-9 (arg &optional conf-stat show-present-only)
"Display a list of all connected users.
Uses Protocol A version 9 calls"
(let* ((wants-invisibles (or (and (numberp arg) (< arg 0))
......@@ -2797,9 +2825,12 @@ Uses Protocol A version 9 calls"
(t 0))))
(who-info-list (blocking-do 'who-is-on-dynamic
't wants-invisibles (* idle-hide 60)))
(who-list (sort (if conf-stat
(lyskom-who-is-on-check-membership-9 who-info-list conf-stat)
(listify-vector who-info-list))
(who-list (sort (cond (show-present-only
(lyskom-who-is-present-check-membership-9 who-info-list conf-stat))
(conf-stat
(lyskom-who-is-on-check-membership-9 who-info-list conf-stat))
(t
(listify-vector who-info-list)))
(function
(lambda (who1 who2)
(< (dynamic-session-info->session who1)
......@@ -2826,8 +2857,10 @@ Uses Protocol A version 9 calls"
(if wants-invisibles
(lyskom-insert (lyskom-get-string 'showing-invisibles)))
(if conf-stat
(lyskom-format-insert 'who-is-active-and-member conf-stat))
(cond (show-present-only
(lyskom-format-insert 'who-is-active-and-present conf-stat))
(conf-stat
(lyskom-format-insert 'who-is-active-and-member conf-stat)))
(lyskom-format-insert format-string-2
""
......@@ -2968,6 +3001,19 @@ Uses Protocol A version 9 calls"
(setq i (1+ i)))
res))
(defun lyskom-who-is-present-check-membership-8 (who-info-list conf-stat)
"Returns a list of those in WHO-INFO-LIST which is present in CONF-STAT."
(let ((len (length who-info-list))
(i 0)
(res nil))
(while (< i len)
(if (eq (who-info->working-conf (aref who-info-list i))
(conf-stat->conf-no conf-stat))
(setq res (cons (aref who-info-list i) res)))
(setq i (1+ i)))
res))
(defun lyskom-who-is-on-check-membership-9 (who-info-list conf-stat)
"Returns a list of those in WHO-INFO-LIST which is member in CONF-STAT."
(let ((members (blocking-do 'get-members (conf-stat->conf-no conf-stat)
......@@ -2984,6 +3030,19 @@ Uses Protocol A version 9 calls"
(setq i (1+ i)))
res))
(defun lyskom-who-is-present-check-membership-9 (who-info-list conf-stat)
"Returns a list of those in WHO-INFO-LIST which is present in CONF-STAT."
(let ((len (length who-info-list))
(i 0)
(res nil))
(while (< i len)
(if (eq (dynamic-session-info->working-conference (aref who-info-list i))
(conf-stat->conf-no conf-stat))
(setq res (cons (aref who-info-list i) res)))
(setq i (1+ i)))
res))
(defun lyskom-insert-deferred-session-info (session-info defer-info)
(if session-info
(lyskom-replace-deferred defer-info
......
......@@ -525,7 +525,9 @@ Read all about it at http://www.lysator.liu.se/history/")
(no-unread-lyskom . "There is no active LysKOM session with unread texts.")
(who-is-on-in-what-conference . "Who in which conference: ")
(who-is-active-in-what-conference . "Who present in which conference: ")
(who-is-active-and-member . "Only members in %#1M are shown.\n")
(who-is-active-and-present . "Only members present in %#1M are shown.\n")
;; Used for kom-is-person-member-of-conference:
(pers-to-check-mship-for . "Whose membership do you want to check? ") ;-)
......@@ -1626,6 +1628,8 @@ You must become an active member of the conference to enter it.\n")
(kom-who-is-on . "Who is on")
(kom-who-is-on-in-conference
. "Who is on in conference")
(kom-who-is-present-in-conference
. "Who is present in conference")
(kom-who-am-i . "Where (am) i")
(kom-list-clients . "List clients")
(kom-busy-wait . "Wait (for news)")
......@@ -1995,6 +1999,7 @@ You must become an active member of the conference to enter it.\n")
(define-key lyskom-en-mode-map (kbd "l a") 'kom-list-summary)
(define-key lyskom-en-mode-map (kbd "l f") 'kom-list-filters)
(define-key lyskom-en-mode-map (kbd "l w") 'kom-who-is-on-in-conference)
(define-key lyskom-en-mode-map (kbd "l p") 'kom-who-is-present-in-conference)
(define-key lyskom-en-mode-map (kbd "S") 'kom-add-self)
(define-key lyskom-en-mode-map (kbd "M") 'kom-mark-text)
(define-key lyskom-en-mode-map (kbd "U") 'kom-unmark-text)
......
......@@ -3571,10 +3571,10 @@ One parameter - the prompt string."
(define-key lyskom-modeline-keymap [mode-line mouse-3] 'kom-modeline-select-unread-kom))))
(defvar icon-title-format)
(defvar frame-icon-title-format)
(if lyskom-is-loaded
nil
(setq-default lyskom-collate-table lyskom-default-collate-table)
;; We should set lyskom-char-classes to
;; (lyskom-compute-char-classes lyskom-collate-table))
......@@ -3598,6 +3598,10 @@ One parameter - the prompt string."
frame-title-format
'lyskom-unread-title-format)))
(if (boundp 'icon-title-format)
(setq icon-title-format (list ""
icon-title-format
'lyskom-unread-title-format)))
(if (boundp 'frame-icon-title-format)
(setq frame-icon-title-format (list ""
frame-icon-title-format
......
......@@ -514,7 +514,9 @@ i svensk datorhistoria. L
(no-unread-lyskom . "Hittar ingen aktiv LysKOM-session med olsta.")
(who-is-on-in-what-conference . "Vilka i vilket mte: ")
(who-is-active-in-what-conference . "Vilka nrvarande i vilket mte: ")
(who-is-active-and-member . "Visar endast medlemmar i %#1M.\n")
(who-is-active-and-present . "Visar endast medlemmar nrvarande i %#1M.\n")
;; From commands2.el:
......@@ -1624,6 +1626,8 @@ Du m
(kom-who-is-on . "Vilka r inloggade")
(kom-who-is-on-in-conference
. "Vilka r inloggade i mte")
(kom-who-is-present-in-conference
. "Vilka r nrvarande i mte")
(kom-who-am-i . "Var (r) jag")
; (kom-display-who-buffer "Visa vilkalistan")
(kom-list-clients . "Lista klienter")
......@@ -2119,7 +2123,11 @@ Tar reda p
(kom-change-conf-faq . "\
ndra ett befintligt inlgg som innehller ofta stllda frgor som hr
till ett visst mte.")
))
(kom-who-is-present-in-conference . "\
Visar vilka som fr tillfllet r nrvarande i ett visst mte")
))
(lyskom-language-var lyskom-language-codes sv
'((aa . "Afar")
......@@ -2421,6 +2429,7 @@ till ett visst m
(define-key lyskom-sv-mode-map (kbd "l [") 'kom-list-summary)
(define-key lyskom-sv-mode-map (kbd "l f") 'kom-list-filters)
(define-key lyskom-sv-mode-map (kbd "l v") 'kom-who-is-on-in-conference)
(define-key lyskom-sv-mode-map (kbd "l a") 'kom-who-is-present-in-conference)
(define-key lyskom-sv-mode-map (kbd "m") 'kom-add-self)
(define-key lyskom-sv-mode-map (kbd "M") 'kom-mark-text)
(define-key lyskom-sv-mode-map (kbd "A") 'kom-unmark-text)
......
......@@ -1406,6 +1406,7 @@ Users are encouraged to use their best sense of humor."
(conf-commands . (
[command kom-is-person-member-of-conference]
[command kom-who-is-on-in-conference]
[command kom-who-is-present-in-conference]
[command kom-review-presentation]
[command kom-sub-self]
[command kom-add-self]
......@@ -1462,6 +1463,7 @@ Users are encouraged to use their best sense of humor."
[command kom-stop-keep-alive]
[command kom-who-is-on]
[command kom-who-is-on-in-conference]
[command kom-who-is-present-in-conference]
[command kom-who-am-i]
[command kom-get-appreciation]
[command kom-get-abuse]
......@@ -1662,6 +1664,7 @@ is a list of vectors, where each vector specifies an item.
kom-keep-alive
kom-stop-keep-alive
kom-who-is-present-in-conference
kom-is-person-member-of-conference
kom-change-conf-faq
))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment