Commit 679620cf authored by Pontus Freyhult's avatar Pontus Freyhult

Fix bug 1091:

* vars.el.in (kom-lost-session-notification): New variable.

* option-edit.el (lyskom-custom-variables): Added
kom-lost-session-notification.
(lyskom-customize-buffer-format): Dito.

* english-strings.el, swedish-strings.el (lyskom-custom-strings):
Added kom-lost-session-notification-tag and
kom-lost-session-notification-doc.

* englist-strings.el, swedish-strings.el (local): Added
closed-connection-other-buf, session-lost-beep and
session-lost-all-buffers.

* lyskom-rest.el (lyskom-sentinel): Do notification in other buffers
if desired.
parent 0598666e
2005-02-24 Pontus Freyhult <pont@soua.net>
Fix bug 1091:
* vars.el.in (kom-lost-session-notification): New variable.
* option-edit.el (lyskom-custom-variables): Added
kom-lost-session-notification.
(lyskom-customize-buffer-format): Dito.
* english-strings.el, swedish-strings.el (lyskom-custom-strings):
Added kom-lost-session-notification-tag and
kom-lost-session-notification-doc.
* englist-strings.el, swedish-strings.el (local): Added
closed-connection-other-buf, session-lost-beep and
session-lost-all-buffers.
* lyskom-rest.el (lyskom-sentinel): Do notification in other buffers
if desired.
Fix bug 1536:
* command.el (lyskom-start-of-command): Pass port if non-standard.
Also explicitly send current password (if available).
......
......@@ -1295,6 +1295,11 @@ You should set it to a better value.\n")
%#2s
LysKOM session killed abnormally
Error message: %#1s**************************************************")
(closed-connection-other-buf . "
**************************************************
The LysKOM session %#1s was killed abnormally.
**************************************************
")
(error-not-found . "Error code %#1d. No explanation available.")
; Useful in more places than one:
......@@ -3055,6 +3060,9 @@ Select whether to execute command or keyboard macro.")
(autowrap-timeout . "Timeout in seconds: ")
(no-timeout . "No timeout")
(session-lost-all-buffers . "Show notification in all active LysKOM buffers")
(session-lost-beep . "Beep")
(friends . "Friends and other special people")
(turned-off . "Turned off ")
......@@ -4116,6 +4124,13 @@ up menus.")
network connection to the LysKOM server active. If your network connection
shuts down after a period of inactivity, set this to approximately half
that period and use the command `Keep connection alive'.")
(kom-lost-session-notification-doc . "\
This setting determines how notification of abnormally terminated
sessions is done. A message is always displayed in the buffer of
the terminated session. In addition, if this is set to \"Beep\",
the client will beep. If it is instead set to \"Show notification
in all active LysKOM buffers\", the client will beep and insert a
short notice in all active LysKOM buffers.")
(kom-text-no-prompts-doc . "\
Specifies which commands will always prompt for text numbers and which
will not. Commands that are not listed here will use default behavior.")
......@@ -4509,6 +4524,7 @@ up menus.")
(kom-server-priority-breaks-tag . "Prompt to go to next LysKOM:")
(kom-complete-numbers-before-names-tag . "Read conference numbers before names:")
(kom-keep-alive-interval-tag . "Keep connection alive interval:")
(kom-lost-session-notification-tag . "Notification of lost sessions:")
(kom-text-no-prompts-tag . "How commands prompt for text numbers:")
(kom-saved-file-name-tag . "File to archive texts in:")
(kom-follow-attachments-tag . "Read imported attachments as texts:")
......
......@@ -3943,7 +3943,19 @@ If MEMBERSHIPs prioriy is 0, it always returns nil."
(lyskom-format-time
'timeformat-day-yyyy-mm-dd-hh-mm-ss))
(setq mode-line-process (lyskom-get-string 'mode-line-down))
(beep)
; Notify?
(when kom-lost-session-notification
(if (eq 'all-buffers kom-lost-session-notification)
(let ((session-nick (lyskom-session-nickname)))
(save-excursion
(lyskom-traverse buf lyskom-buffer-list
(when (lyskom-buffer-p buf)
(set-buffer buf)
(lyskom-insert-before-prompt
(lyskom-format 'closed-connection-other-buf
session-nick)))))))
(beep)
)
(lyskom-scroll))
......
......@@ -97,6 +97,7 @@
[kom-trim-buffer-minimum]
[kom-bury-buffers]
[kom-keep-alive-interval]
[kom-lost-session-notification]
[kom-show-sync-messages]
"\n"
[kom-agree-text]
......@@ -867,6 +868,9 @@ All key bindings:
(kom-ansaphone-replies (ansaphone))
(kom-complete-numbers-before-names (toggle (on off)))
(kom-keep-alive-interval (number))
(kom-lost-session-notification (choice ((const (off nil))
(const (session-lost-all-buffers all-buffers))
(const (session-lost-beep beep)))))
(kom-text-no-prompts (repeat (cons ((command nil :tag command :format "%[%t%]: %v")
(toggle (yes no) :tag prompt-for-text-no :format "%[%t%]: %v")
))))
......
......@@ -1341,6 +1341,11 @@ Du b
%#2s
LysKOM-sessionen onormalt stngd.
Felmeddelande: %#1s**************************************************")
(closed-connection-other-buf . "
**************************************************
LysKOM-sessionen %#1s stngdes onormalt.
**************************************************
")
(dead-session . "LysKOM-sessionen r inte aktiv.")
(resurrect-session . "LysKOM-sessionen har kopplats ner, vill du ansluta igen? ")
(not-lyskom-buffer . "Detta r inte en aktiv LysKOM-session.")
......@@ -3203,7 +3208,10 @@ Nuvarande r
(max-text-length . "Fr inlgg kortare n: ")
(autowrap-timeout . "Antal sekunder: ")
(no-timeout . "Ingen tidsbegrnsning")
(session-lost-all-buffers . "Visa notifiering i alla aktiva LysKOM buffrar")
(session-lost-beep . "Pip")
(friends . "Vnner och bekanta")
(turned-off . "Avslaget ")
......@@ -4269,6 +4277,12 @@ ta fram menyer.")
hlla ntverkskopplingen till LysKOM-servern aktiv. Om din frbindelse
kopplar ned efter en stunds inaktivitet s kan du stta detta till ungefr
hlften och sedan ge kommandot \"Hll frbindelsen aktiv\".")
(kom-lost-session-notification-doc . "\
Hur notifiering av onormalt avslutade session sker. Ett meddelande skrivs
alltid ut i den avslutade sessionens LysKOM-buffert. Om denna instllning
r satt till \"Pip\" kommer klienten dessutom att pipa. Om du har valt \"Visa
notifiering i alla aktiva LysKOM-buffrar\" kommer klienten att pipa och
skriva ut ett kort meddelande i alla aktiva LysKOM-buffrar.")
(kom-text-no-prompts-doc . "\
Den hr instllningen styr vilka kommandon som alltid frgar efter
textnummer (om man inte anger ett explicit som prefixargument). Fr
......@@ -4666,6 +4680,7 @@ ta fram menyer.")
(kom-server-priority-breaks-tag . "Byt till LysKOM med olsta:")
(kom-complete-numbers-before-names-tag . "Ls mtesnummer fre mtesnamn:")
(kom-keep-alive-interval-tag . "Intervall fr hll frbindelsen igng:")
(kom-lost-session-notification-tag . "Notifiering av onormalt avslutade sessioner:")
(kom-text-no-prompts-tag . "Hur kommandon frgar efter textnummer:")
(kom-saved-file-name-tag . "Fil att arkivera inlgg i:")
(kom-follow-attachments-tag . "Ls importerade bilagor som vanligt:")
......
......@@ -2019,6 +2019,18 @@ frames will not be uniconified.
Values other than `t' and `nil' are reserved for future use."
server)
(def-kom-var kom-lost-session-notification 'all-buffers
"**How (and if) notification of lost sessions will be handled.
Lost (abnormally terminated) sessions are always notified in the
session buffer. If this parameter is set to `beep', the client will
also beep. If it is set to `all-buffers', the client will beep and
insert a notification message in any active LysKOM buffer.
Values other than `all-buffers', `beep' and `nil' are reserved for
future use."
server)
(def-kom-var kom-ding-pause-amount 0.1
"**Number of seconds to wait between successive beeps.
......
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