Commit 895da31a authored by Ulrik Haugen's avatar Ulrik Haugen
Browse files

Fix bug 447:

	* vars.el.in (lyskom-unread-mode-line)
	(lyskom-unread-title-format): Set langage-force.

	* lyskom-rest.el (lyskom-make-lyskom-unread-mode-line)
	(lyskom-make-lyskom-unread-title-format): New functions. They both
	return what used to be in lyskom-unread-mode-line and
	lyskom-unread-title-format respectively.

	* swedish-strings.el, english-strings.el (lyskom-unread-mode-line)
	(lyskom-unread-title-format): Made these variables language
	dependent.
parent c3ec87eb
2002-04-13 Ulrik Haugen <qha@lysator.liu.se>
Fix bug 447:
* vars.el.in (lyskom-unread-mode-line)
(lyskom-unread-title-format): Set langage-force.
* lyskom-rest.el (lyskom-make-lyskom-unread-mode-line)
(lyskom-make-lyskom-unread-title-format): New functions. They both
return what used to be in lyskom-unread-mode-line and
lyskom-unread-title-format respectively.
* swedish-strings.el, english-strings.el (lyskom-unread-mode-line)
(lyskom-unread-title-format): Made these variables language
dependent.
2002-04-11 David Byers <david.byers@swipnet.se>
* aux-items.el (lyskom-print-faq-for-conf): Show FAQ for server
......
......@@ -3716,8 +3716,12 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(error-54 . "Invalid membership type")
))
(lyskom-language-var lyskom-unread-mode-line en
(lyskom-make-lyskom-unread-mode-line))
(lyskom-language-var lyskom-unread-title-format en
(lyskom-make-lyskom-unread-title-format))
(provide 'lyskom-strings)
;;; english-strings ends here
......@@ -3607,6 +3607,34 @@ One parameter - the prompt string."
(define-key lyskom-modeline-keymap [mode-line mouse-3] 'kom-modeline-select-unread-kom))))
(defun lyskom-make-lyskom-unread-mode-line ()
(lyskom-xemacs-or-gnu
(list (list 'lyskom-sessions-with-unread
(lyskom-get-string 'mode-line-unread))
(list 'lyskom-sessions-with-unread-letters
(lyskom-get-string 'mode-line-letters))
" ")
`((lyskom-sessions-with-unread
,(lyskom-format "%#1@%#2s"
(list 'local-map lyskom-modeline-keymap)
(lyskom-get-string 'mode-line-unread)))
(lyskom-sessions-with-unread-letters
,(lyskom-format "%#1@%#2s"
(list 'local-map lyskom-modeline-keymap)
(lyskom-get-string 'mode-line-letters)))
" ")))
(defun lyskom-make-lyskom-unread-title-format ()
`(kom-show-unread-in-frame-title
(lyskom-session-has-unreads
(" (" ((lyskom-session-has-unreads
,(lyskom-maybe-recode-string (lyskom-get-string 'frame-title-unread)
'iso-8859-1 t))
(lyskom-session-has-unread-letters ,(lyskom-maybe-recode-string
(lyskom-get-string 'frame-title-letters)
'iso-8859-1 t)))
")"))))
(defvar icon-title-format)
(defvar frame-icon-title-format)
(if lyskom-is-loaded
......@@ -3642,50 +3670,7 @@ One parameter - the prompt string."
(setq frame-icon-title-format (list ""
frame-icon-title-format
'lyskom-unread-title-format)))
(lyskom-xemacs-or-gnu
;;; XXX this doesn't allow "Unread" to be changed when the language changes
(setq lyskom-unread-mode-line
(list (list 'lyskom-sessions-with-unread
(lyskom-get-string 'mode-line-unread))
(list 'lyskom-sessions-with-unread-letters
(lyskom-get-string 'mode-line-letters))
" "))
(setq lyskom-unread-mode-line
(list (list 'lyskom-sessions-with-unread
(list ':eval
'(let ((tmp (lyskom-get-string 'mode-line-unread)))
(add-text-properties 0 (length tmp)
(list 'local-map lyskom-modeline-keymap)
tmp)
tmp)))
(list 'lyskom-sessions-with-unread-letters
(list ':eval
'(let ((tmp (lyskom-get-string 'mode-line-letters)))
(add-text-properties 0 (length tmp)
(list 'local-map lyskom-modeline-keymap)
tmp)
tmp)))
" ")))
(lyskom-xemacs-or-gnu
;;; XXX this doesn't allow "Unread" to be changed when the language changes
(setq lyskom-unread-title-format
`(kom-show-unread-in-frame-title
(lyskom-session-has-unreads
(" ("
((lyskom-session-has-unreads ,(lyskom-maybe-recode-string (lyskom-get-string 'frame-title-unread) 'iso-8859-1 t))
(lyskom-session-has-unread-letters ,(lyskom-maybe-recode-string (lyskom-get-string 'frame-title-letters) 'iso-8859-1 t)))
")"))))
(setq lyskom-unread-title-format
'(kom-show-unread-in-frame-title
(lyskom-session-has-unreads
(" ("
((lyskom-session-has-unreads (:eval (lyskom-maybe-recode-string (lyskom-get-string 'frame-title-unread) 'iso-8859-1 t)))
(lyskom-session-has-unread-letters (:eval (lyskom-maybe-recode-string (lyskom-get-string 'frame-title-letters) 'iso-8859-1 t))))
")")))))
(add-hook 'kill-buffer-hook 'lyskom-remove-buffer-from-lists)
......
......@@ -4165,6 +4165,11 @@ i servern. Annars sparas det i din .emacs.")
(error-54 . "Otillten typ p medlemskap")
))
(lyskom-language-var lyskom-unread-mode-line sv
(lyskom-make-lyskom-unread-mode-line))
(lyskom-language-var lyskom-unread-title-format sv
(lyskom-make-lyskom-unread-title-format))
(provide 'lyskom-language-sv)
......
......@@ -1184,6 +1184,14 @@ appear more than once"
server
inherited)
(def-kom-var lyskom-unread-mode-line nil
"This variable will become part of mode-line-format"
language-force)
(def-kom-var lyskom-unread-title-format nil
"This variable will become part of frame-title-format"
language-force)
(def-kom-var lyskom-button-actions
'((text
text-popup-title
......
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