Commit 2f595aa8 authored by Linus Tolke's avatar Linus Tolke
Browse files

We can now turn the who-info-buffer off.

parent 2ac407cb
No preview for this file type
......@@ -149,7 +149,8 @@ this function shall be with current-buffer the BUFFER."
pers-no))
; (if (not (zerop lyskom-pers-no))
; (initiate-who-is-on 'who-buffer 'cache-set-who-info-list))
(if (not (zerop lyskom-pers-no))
(if (and (not (zerop lyskom-pers-no))
lyskom-who-info-buffer-is-on)
(initiate-get-session-info 'who-buffer 'cache-add-session-info
session-no))
)))
......
......@@ -197,9 +197,6 @@ otherwise return nil"
(defun cache-set-who-info-list (who-info-arr)
"Sets the cache of who-info items."
(setq lyskom-who-info-cache (list 'WHO-INFO-LIST))
;+++ Detta {r fel:
; (setq lyskom-session-no (who-info->connection
; (elt who-info-arr 0)))
(lyskom-save-excursion
(set-buffer lyskom-who-info-buffer)
(erase-buffer))
......@@ -212,13 +209,15 @@ otherwise return nil"
(defun cache-add-who-info (who-info)
"Adds another entry to the lyskom-who-info-cache. Updating the buffer."
(lyskom-collect 'who-buffer)
(initiate-get-conf-stat
'who-buffer nil (who-info->pers-no who-info))
(initiate-get-conf-stat
'who-buffer nil (who-info->working-conf who-info))
(lyskom-use 'who-buffer 'lyskom-set-who-info-buffer-2
who-info))
(if lyskom-who-info-buffer-is-on
(progn
(lyskom-collect 'who-buffer)
(initiate-get-conf-stat
'who-buffer nil (who-info->pers-no who-info))
(initiate-get-conf-stat
'who-buffer nil (who-info->working-conf who-info))
(lyskom-use 'who-buffer 'lyskom-set-who-info-buffer-2
who-info))))
(defun cache-add-session-info (session-info)
......@@ -237,18 +236,19 @@ ARG: session-info"
(defun cache-del-who-info (session-no)
"Delete the session SESSION-NO from the lyskom-who-info-cache. Updating buffer."
(let ((where (cache-assoc session-no lyskom-who-info-cache)))
(if where
(progn
(lyskom-save-excursion
(set-buffer lyskom-who-info-buffer)
(delete-region (marker-position
(who-buffer-info->start-marker where))
(marker-position
(who-buffer-info->end-marker where))))
(set-marker (who-buffer-info->start-marker where) nil)
(set-marker (who-buffer-info->end-marker where) nil)
(cache-del session-no 'lyskom-who-info-cache)))))
(if lyskom-who-info-buffer-is-on
(let ((where (cache-assoc session-no lyskom-who-info-cache)))
(if where
(progn
(lyskom-save-excursion
(set-buffer lyskom-who-info-buffer)
(delete-region (marker-position
(who-buffer-info->start-marker where))
(marker-position
(who-buffer-info->end-marker where))))
(set-marker (who-buffer-info->start-marker where) nil)
(set-marker (who-buffer-info->end-marker where) nil)
(cache-del session-no 'lyskom-who-info-cache))))))
(defun lyskom-set-who-info-buffer-2 (pers-conf-stat conf-conf-stat who-info)
......
......@@ -299,6 +299,9 @@ different packets.")
(defvar lyskom-who-info-buffer nil
"Buffer for the who info presentation.")
(defvar lyskom-who-info-buffer-is-on nil
"Says wether we are collecting who-information or not.")
(defvar lyskom-is-parsing t
"True when parsing a result.
......
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