Commit 9400a94c authored by Per Cederqvist's avatar Per Cederqvist

Make the kom-status-session more readable when multiple sessions are found.

(kom-status-session, lyskom-status-session-9): Print a separator
between the sessions.
parent 41167d17
2013-03-23 Per Cederqvist <ceder@lysator.liu.se>
Make the kom-status-session output easier to read when multiple
sessions are found.
* commands1.el (kom-status-session, lyskom-status-session-9):
Print a separator between the sessions.
2012-10-27 David Byers <david.byers@liu.se>
* lyskom-rest.el (lyskom-unity-text): Rewrote without "some"
......
......@@ -3278,10 +3278,15 @@ argument is used to find a text whose author's status is shown."
(progn
(setq who-info (listify-vector
(blocking-do 'who-is-on-dynamic t t 0)))
(mapcar (function
(lambda (x) (lyskom-status-session-9 x
who-info)))
sessions))
(let (need-separator)
(while sessions
(setq need-separator
(or (lyskom-status-session-9 (car sessions)
who-info
need-separator)
need-separator))
(setq sessions (cdr sessions)))))
(setq who-info (listify-vector (blocking-do 'who-is-on)))
(mapcar (function
(lambda (x) (lyskom-status-session-8 x who-info)))
......@@ -3330,10 +3335,11 @@ WHO-INFOS that are potential sessions."
(setq who-info-list (cdr who-info-list))))
(defun lyskom-status-session-9 (sid who-info-list)
(defun lyskom-status-session-9 (sid who-info-list need-separator)
"Show session status for session SID. WHO-INFO is a list of
WHO-INFOS that are potential sessions."
(let ((static (blocking-do 'get-static-session-info sid)))
(let ((static (blocking-do 'get-static-session-info sid))
(found nil))
(while who-info-list
(if (eq sid (dynamic-session-info->session (car who-info-list)))
(let* ((info (car who-info-list))
......@@ -3351,6 +3357,9 @@ WHO-INFOS that are potential sessions."
(get-client-version
(dynamic-session-info->session info))))
(concat name " " version)))))
(setq found t)
(if need-separator
(lyskom-insert "---\n"))
(lyskom-format-insert
(lyskom-get-string 'session-status-9)
(dynamic-session-info->session info)
......@@ -3389,7 +3398,8 @@ WHO-INFOS that are potential sessions."
(dynamic-session-info->idle-time info))))))
(if (session-flags->invisible (dynamic-session-info->flags info))
(lyskom-insert (lyskom-get-string 'session-is-invisible)))))
(setq who-info-list (cdr who-info-list)))))
(setq who-info-list (cdr who-info-list)))
found))
(defun lyskom-format-secs-aux (string num x1 x2 one many)
......
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