Commit be3918c2 authored by David Byers's avatar David Byers
Browse files

Changes:

    Ask for priority when adding someone else to a conference.
    Allow priority 0 in kom-membership-default-priority
    kom-review-noconversion disables smileys
    Default membership priority is 'ask

Internal:
    Menu and button support for new prioritize mode.
    Can add arbitrary title to any popup menu.

Bug fixes:
    Printing the footer in kom-list-clients
    Aux-item-edit-menu in English strings
    Prefetching unreads is more stable.
    initiate-set-membership-type does not invalidate caches
parent 0b057c19
1999-06-27 David Byers <davby@ida.liu.se>
* services.el (initiate-set-membership-type): Don't delete the
conference and person from the cache.
* startup.el (lyskom-refetch): Stop the prefetch while loading it
with stuff to do. Otherwise we'll get things in the wrong order.
* commands1.el (lyskom-try-add-member): Ask for priority when
adding new members.
1999-06-26 David Byers <davby@ida.liu.se>
* Release 0.46-EBTA-4
......
......@@ -36,7 +36,7 @@
# makefile too!
#
CLIENTVERSION = 0.46-BETA-4
CLIENTVERSION = 0.46-BETA-5
DOCFILES=NEWS-0.46
FTPDIR=/home/davby/www-pub
......
......@@ -7,6 +7,50 @@ Att g
listan, glöm inte att ta bort det från listan!
PRIORITERA
Funktioner:
Endast läsa senaste i alla markerade möten.
Läs från ett visst datum i alla markerade.
Samma som i förra prioritera.
Uppdatera all information.
Ändra namn på möte.
VIKTIGT!!!!
Medlemskapen kan komma från servern i godtycklig ordning. Det vore
trevligt att sortera om dem när de kommer, men det blir för svårt. Det
finns för många sätt för medlemskapen att hamna fel.
Prioritera möten måste sortera om mötena.
När man går med i ett möte borde det läggas in i någorlunda sorterad
ordning.
Klienten borde kunna upptäcka att medlemskapslistan är osorterad och
sortera den automatiskt, till exempel vis inloggning (efter prefetchen
är klar.)
När man accepterar en inbjudan borde man automatiskt prioritera om den
enligt ens defaultprioritet och defaultposition.
Addera medlem måste se till att ens membership-cache inte blir
felordnad.
Addera medlems defaultposition (first/last) måste se till att det är
inom en prioritet.
Kommandon: begär bekräftelse, endast personliga kommentarer, inga
kommentarer. Se inlägg 4089678.
......
......@@ -380,13 +380,14 @@ Returns t if it was possible, otherwise nil."
nil ; We have some problem here.
(let ((priority
(if (/= lyskom-pers-no (conf-stat->conf-no pers-conf-stat))
100 ; When adding someone else
(lyskom-read-num-range 0 255
(lyskom-get-string 'priority-q)
nil 100)
(if (and (numberp kom-membership-default-priority)
(< kom-membership-default-priority 256)
(> kom-membership-default-priority 0))
(>= kom-membership-default-priority 0))
kom-membership-default-priority
(lyskom-read-num-range
0 255 (lyskom-get-string 'priority-q)))))
(lyskom-read-num-range 0 255 (lyskom-get-string 'priority-q)))))
(where
(if (/= lyskom-pers-no (conf-stat->conf-no pers-conf-stat))
1 ; When adding someone else
......@@ -2505,7 +2506,9 @@ Uses Protocol A version 9 calls"
"\n"))
(lyskom-insert (lyskom-format (if want-invisible
'total-users
'total-visible-users) total-users))))
'total-visible-users) total-users
(lyskom-client-date-string
'time-format-exact)))))
(defun lyskom-deferred-client-1 (name defer-info)
......
......@@ -2771,9 +2771,28 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(email
email-text
lyskom-button-open-email
(("Skicka mail" . lyskom-button-open-email)
("Kopiera" . lyskom-button-copy-email))
nil)))
(("Send mail" . lyskom-button-open-email)
("Copy" . lyskom-button-copy-email))
nil)
(aux
aux-text
lyskom-button-info-aux
(("Information" . lyskom-button-info-aux)
("Delete" . lyskom-button-delete-aux)))
(aux-edit-menu
nil
nil
(("Toggle \"secret\"" . lyskom-edit-toggle-secret-aux)
("Toggle \"anonymous\"" . lyskom-edit-toggle-anonymous-aux)
("Toggle \"inherited\"" . lyskom-edit-toggle-inherit-aux)
("Delete" . lyskom-edit-delete-aux)))
(prioritize-flag-menu
nil
lyskom-prioritize-flag-toggle
(("Toggle" . lyskom-prioritize-flag-toggle)
("Set" . lyskom-prioritize-flag-set)
("Clear" . lyskom-prioritize-flag-clear)))
))
;;;; ================================================================
......
......@@ -216,12 +216,15 @@ If there is no active area, then do something else."
(text (get-text-property pos 'lyskom-button-text))
(buf (get-text-property pos 'lyskom-buffer))
(data (assq type lyskom-button-actions))
(title (lyskom-format
(lyskom-get-string
(or (intern-soft (concat (symbol-name type)
"-popup-title"))
'generic-popup-title))
text))
(title (if (get-text-property pos 'lyskom-button-menu-title)
(apply 'lyskom-format
(get-text-property pos 'lyskom-button-menu-title))
(lyskom-format
(lyskom-get-string
(or (intern-soft (concat (symbol-name type)
"-popup-title"))
'generic-popup-title))
text)))
(actl (or (and data (elt data 3)) nil)))
(cond ((null data) (goto-char pos))
((null actl) (goto-char pos))
......@@ -409,10 +412,12 @@ the current match-data."
(defun lyskom-generate-button (type arg &optional text face)
(defun lyskom-generate-button (type arg &optional text face menu-title)
"Generate the properties for a button of type TYPE with argument ARG.
Optional argument TEXT is the button text to be saved as a property and
FACE is the default text face for the button."
FACE is the default text face for the button. Optional argument MENU-TITLE
defines the title for the popup menu. See lyskom-default-button for more
information."
(let* ((persno (cond ((boundp 'lyskom-pers-no) lyskom-pers-no)
((and (boundp 'lyskom-buffer) lyskom-buffer)
(save-excursion
......@@ -438,6 +443,7 @@ FACE is the default text face for the button."
'lyskom-button-text text
'lyskom-button-type type
'lyskom-button-arg numarg
'lyskom-button-menu-title menu-title
'lyskom-buffer lyskom-buffer))
((and (eq type 'text) numarg)
(list 'face (or face 'kom-text-no-face)
......@@ -445,6 +451,7 @@ FACE is the default text face for the button."
'lyskom-button-text text
'lyskom-button-type type
'lyskom-button-arg numarg
'lyskom-button-menu-title menu-title
'lyskom-buffer lyskom-buffer))
((eq type 'url)
(list 'face (or face 'kom-active-face)
......@@ -452,6 +459,7 @@ FACE is the default text face for the button."
'lyskom-button-text text
'lyskom-button-type type
'lyskom-button-arg arg
'lyskom-button-menu-title menu-title
'lyskom-buffer lyskom-buffer))
(t
(list 'face (or face 'kom-active-face)
......@@ -459,6 +467,7 @@ FACE is the default text face for the button."
'lyskom-button-text text
'lyskom-button-type type
'lyskom-button-arg arg
'lyskom-button-menu-title menu-title
'lyskom-buffer lyskom-buffer)))))
(append (list 'rear-nonsticky t)
......@@ -470,10 +479,13 @@ FACE is the default text face for the button."
(defun lyskom-default-button (type arg)
(defun lyskom-default-button (type arg &optional menu-title)
"Generate a button of type TYPE from data in ARG. ARG can be almost any
type of data and is converted to the proper argument type for buttons of
type TYPE before being send to lyskom-generate-button."
type TYPE before being send to lyskom-generate-button. Optional argument
MENU-TITLE is a list consisting of a format string or symbol and arguments
for the format string. The arguments are not when the menu is popped
up."
(and kom-text-properties
(let (xarg text)
(cond ((eq type 'conf)
......@@ -531,7 +543,7 @@ type TYPE before being send to lyskom-generate-button."
(cond ((stringp arg) (setq xarg nil text arg))
(t (setq xarg nil text ""))))
(t (setq xarg arg text "")))
(lyskom-generate-button type xarg text nil))))
(lyskom-generate-button type xarg text nil menu-title))))
......
......@@ -637,6 +637,7 @@ Put the requests on QUEUE."
(lyskom-prefetch-map (membership->conf-no membership)
membership
queue)))))
(lyskom-queue-enter queue 'FINISHED)
(lyskom-start-prefetch))
......@@ -650,7 +651,7 @@ Put the requests on QUEUE."
(membership->conf-no mship))
(membership->conf-no mship)))
memberships)))
(lyskom-add-memberships-to-membership memberships)
(lyskom-insert-memberships-in-membership memberships)
(while (< i size)
(let ((membership (aref memberships i)))
;;; Commented out 1999-06-26 byers
......
......@@ -864,7 +864,7 @@ only tell server about that entry."
(set-membership->priority
(lyskom-get-membership conf-no t)
(prioritize-entry->priority entry))
(lyskom-ignoring-async (18)
(lyskom-ignoring-async (18 lyskom-pers-no conf-no)
(initiate-add-member 'priority
'lyskom-prioritize-handler
conf-no
......
......@@ -69,6 +69,17 @@ lyskom-membership list then this item is not entered."
(setq lyskom-membership (append lyskom-membership (list (car list)))))
(setq list (cdr list)))))
(defun lyskom-insert-memberships-in-membership (memberships)
(let ((list (listify-vector memberships)))
(while list
;; If membership is already added or passive, don't add it
(if (memq (membership->conf-no (car list))
(mapcar (function membership->conf-no) lyskom-membership))
nil
(setq lyskom-membership (cons (car list) lyskom-membership)))
(setq list (cdr list))))
(setq lyskom-membership (sort lyskom-membership 'lyskom-membership-<)))
(defun lyskom-insert-membership (membership membership-list)
"Add MEMBERSHIP into MEMBERSHIP-LIST, sorted by priority."
......
......@@ -1301,6 +1301,7 @@ text is shown and a REVIEW list is built to shown the other ones."
(lyskom-start-of-command 'kom-review-noconversion)
(let ((kom-emacs-knows-iso-8859-1 t)
(lyskom-format-special nil)
(kom-smileys nil)
(kom-autowrap nil))
(ignore kom-emacs-knows-iso-8859-1)
(lyskom-view-text text-no))
......
......@@ -1213,9 +1213,7 @@ Args: KOM-QUEUE HANDLER SESSION-NO &rest DATA"
(lyskom-server-call
(lyskom-call kom-queue lyskom-ref-no handler data 'lyskom-parse-void)
(lyskom-send-packet kom-queue
(lyskom-format-objects 102 pers-no conf-no type))
(cache-del-conf-stat conf-no)
(cache-del-pers-stat pers-no)))
(lyskom-format-objects 102 pers-no conf-no type))))
(defun initiate-local-to-global (kom-queue handler
conf-no
......
......@@ -538,10 +538,11 @@ This is called at login and after prioritize and set-unread."
(lyskom-reset-prefetch)
(let ((unreads (blocking-do 'get-unread-confs lyskom-pers-no)))
(lyskom-traverse conf-no (conf-no-list->conf-nos unreads)
(lyskom-prefetch-one-membership conf-no lyskom-pers-no)))
(lyskom-prefetch-membership lyskom-pers-no)
(let ((lyskom-inhibit-prefetch t))
(lyskom-prefetch-membership lyskom-pers-no)
(let ((unreads (blocking-do 'get-unread-confs lyskom-pers-no)))
(lyskom-traverse conf-no (nreverse (conf-no-list->conf-nos unreads))
(lyskom-prefetch-one-membership conf-no lyskom-pers-no))))
(lyskom-start-prefetch)
)
......
......@@ -82,7 +82,7 @@
(define-key lyskom-sv-edit-prefix (kbd "C-") 'lyskom-sv-edit-review-prefix)
(define-key lyskom-sv-edit-prefix (kbd "C-") 'lyskom-sv-edit-review-prefix)
(define-key lyskom-sv-edit-prefix (kbd "*") 'kom-button-press)
(define-key lyskom-sv-edit-prefix (kbd "+") 'kom-menu-button-press)
(define-key lyskom-sv-edit-prefix (kbd "=") 'kom-menu-button-press)
(define-key lyskom-sv-edit-prefix (kbd "C-i") 'lyskom-sv-edit-insert-prefix)
(define-key lyskom-sv-edit-prefix (kbd "C-c") 'kom-edit-send)
(define-key lyskom-sv-edit-prefix (kbd "C-s") 'kom-ispell-message)
......@@ -1704,7 +1704,7 @@ Du m
(define-key lyskom-sv-mode-map (kbd (lyskom-keys 'button3)) 'kom-popup-menu)
(define-key lyskom-sv-mode-map (kbd (lyskom-keys 'button3up)) 'kom-mouse-null)
(define-key lyskom-sv-mode-map (kbd "*") 'kom-button-press)
(define-key lyskom-sv-mode-map (kbd "+") 'kom-menu-button-press)
(define-key lyskom-sv-mode-map (kbd "=") 'kom-menu-button-press)
(define-key lyskom-sv-mode-map (kbd "TAB") 'kom-next-link)
(define-key lyskom-sv-mode-map (kbd "M-TAB") 'kom-previous-link)
(define-key lyskom-sv-mode-map (kbd "C-i") 'kom-next-link)
......@@ -1902,7 +1902,7 @@ Du m
(define-key lyskom-sv-prioritize-mode-map (kbd (lyskom-keys 'button3)) 'kom-popup-menu)
(define-key lyskom-sv-prioritize-mode-map (kbd (lyskom-keys 'button3up)) 'kom-mouse-null)
(define-key lyskom-sv-prioritize-mode-map (kbd "*") 'kom-button-press)
(define-key lyskom-sv-prioritize-mode-map (kbd "+") 'kom-menu-button-press)
(define-key lyskom-sv-prioritize-mode-map (kbd "=") 'kom-menu-button-press)
(define-key lyskom-sv-prioritize-mode-map (kbd "?") 'kom-prioritize-help)
(define-key lyskom-sv-prioritize-mode-map (kbd "C-k") 'kom-prioritize-select)
(define-key lyskom-sv-prioritize-mode-map (kbd "C-y") 'kom-prioritize-yank)
......@@ -2838,6 +2838,12 @@ i servern. Annars sparas det i din .emacs.")
("Vxla \"anonym\"" . lyskom-edit-toggle-anonymous-aux)
("Vxla \"rvd\"" . lyskom-edit-toggle-inherit-aux)
("Ta bort" . lyskom-edit-delete-aux)))
(prioritize-flag-menu
nil
lyskom-prioritize-flag-toggle
(("Vxla" . lyskom-prioritize-flag-toggle)
("Stt p" . lyskom-prioritize-flag-set)
("Stng av" . lyskom-prioritize-flag-clear)))
))
......
......@@ -456,7 +456,7 @@ for future use."
passive. A second leave will actually remove the membership."
server)
(def-kom-var kom-membership-default-priority 100
(def-kom-var kom-membership-default-priority 'ask
"*Default priority when joining a new conference.
If a valid priority then new conferences are read with this priority.
Otherwise ask the user for a priority.
......@@ -985,7 +985,8 @@ hint for a new default action. The user has the option to ignore or used the
hint.
Also see the function \"lyskom-add-button-action\"."
local)
local
inherited)
(put 'lyskom-button-actions 'lyskom-language-force t)
......
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