Commit badd689a authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Print the conference type when entering a conference.

	* swedish-strings.el (status-record): Removed a space.

	* english-strings.el (status-record): Removed a space.

	* lyskom-rest.el (lyskom-enter-conf-print-unread): Fixed broken
	indentation.  Print the type of the conference.

	* commands2.el (lyskom-conf-status-marker): New function,
	extracted from kom-status-conf.
	(kom-status-conf): Simplified by using lyskom-conf-status-marker.
parent 15de5423
2003-03-03 Per Cederqvist <ceder@ceder.dyndns.org>
Print the conference type when entering a conference.
* swedish-strings.el (status-record): Removed a space.
* english-strings.el (status-record): Removed a space.
* lyskom-rest.el (lyskom-enter-conf-print-unread): Fixed broken
indentation. Print the type of the conference.
* commands2.el (lyskom-conf-status-marker): New function,
extracted from kom-status-conf.
(kom-status-conf): Simplified by using lyskom-conf-status-marker.
2003-02-13 Per Cederqvist <ceder@ingate.com>
Fix kom-postpone, which has been broken a while.
......
......@@ -158,6 +158,29 @@ MAP may be nil if there are no new texts."
;;; much enhanced by Inge Wallin (lyskom-status-conf-2 and beyond)
(defun lyskom-conf-type-marker (conf-stat)
"Return a pretty string describing the type of CONF-STAT."
(let* ((type (conf-stat->conf-type conf-stat))
(box (conf-type->letterbox type))
(ori (conf-type->original type))
(pro (conf-type->rd_prot type))
(sec (conf-type->secret type)))
(cond
((or box ori pro sec)
(concat
" ("
(if box (lyskom-get-string 'Mailbox) "")
(if (and box (or sec ori pro)) ", " "")
(if sec (lyskom-get-string
'Protected) "")
(if (and sec (or ori pro)) ", " "")
(if ori (lyskom-get-string
'no-comments) "")
(if (and ori pro) ", " "")
(if pro (lyskom-get-string 'closed) "")
")"))
(t ""))))
(def-kom-command kom-status-conf (&optional conf-no)
"Print information about a conference.
The information listed may be taken from the client's cache and
......@@ -180,28 +203,10 @@ otherwise: the conference is read with lyskom-completing-read."
(uconf-stat (get-uconf-stat conf-no)))
(if (null conf-stat)
(lyskom-insert-string 'no-such-conf)
(let* ((type (uconf-stat->conf-type uconf-stat))
(box (conf-type->letterbox type))
(ori (conf-type->original type))
(pro (conf-type->rd_prot type))
(sec (conf-type->secret type)))
(lyskom-format-insert 'status-record
conf-stat
(cond
((or box ori pro sec)
(concat
"("
(if box (lyskom-get-string 'Mailbox) "")
(if (and box (or sec ori pro)) ", " "")
(if sec (lyskom-get-string
'Protected) "")
(if (and sec (or ori pro)) ", " "")
(if ori (lyskom-get-string
'no-comments) "")
(if (and ori pro) ", " "")
(if pro (lyskom-get-string 'closed) "")
")"))
(t ""))))
(lyskom-format-insert 'status-record
conf-stat
(lyskom-conf-type-marker conf-stat))
(let ((creator (conf-stat->creator conf-stat)))
(lyskom-format-insert 'created-by
creator
......
......@@ -585,7 +585,7 @@ Read all about it at http://www.lysator.liu.se/history/")
(conf-for-status . "Get status of which conference? ")
(no-such-conf . "The conference doesn't exist.\n")
(status-record . "Status of conference %#1M (%#1m) %#2s\n\n")
(status-record . "Status of conference %#1M (%#1m)%#2s\n\n")
(change-type-prompt . "Change conference type for %#1M (%#1m) (%#2s)...")
(Mailbox . "Mailbox")
(Protected . "Protected")
......
......@@ -834,18 +834,19 @@ CONF is the conference and NUM is the number of unread in the conference."
(when (or (eq num 0) kom-print-number-of-unread-on-entrance faq-list)
(lyskom-insert " - "))
(cond ((eq num 0)
(lyskom-format-insert 'conf-all-read conf))
(kom-print-number-of-unread-on-entrance
(lyskom-format-insert 'enter-conf-unread num)))
(when faq-list
(when (or (eq num 0) kom-print-number-of-unread-on-entrance)
(lyskom-insert ", "))
(lyskom-format-insert 'enter-conf-unread-faq (length faq-list)))
(lyskom-format-insert ".\n")
(lyskom-present-unread-faqs conf faq-list)))
(cond ((eq num 0)
(lyskom-format-insert 'conf-all-read conf))
(kom-print-number-of-unread-on-entrance
(lyskom-format-insert 'enter-conf-unread num)))
(when faq-list
(when (or (eq num 0) kom-print-number-of-unread-on-entrance)
(lyskom-insert ", "))
(lyskom-format-insert 'enter-conf-unread-faq (length faq-list)))
(lyskom-insert (lyskom-conf-type-marker conf))
(lyskom-format-insert ".\n")
(lyskom-present-unread-faqs conf faq-list)))
(defun lyskom-leave-current-conf ()
......
......@@ -591,7 +591,7 @@ i svensk datorhistoria. L
(memberships-line . "%16#1s %#2d\t%#3d\t%#4M\n")
(conf-for-status . "Vilket mte vill du se statusen fr? ")
(no-such-conf . "Mtet finns ej.\n")
(status-record . "Status fr mte %#1M (%#1m) %#2s\n\n")
(status-record . "Status fr mte %#1M (%#1m)%#2s\n\n")
(change-type-prompt . "ndra mtestyp fr mte %#1M (%#1m) (%#2s)...")
(Mailbox . "Brevlda")
(Protected . "Hemligt")
......
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