mirror of https://codeberg.org/cage/tinmop/
- [GUI] prevented adding the same link to tour more than once.
This commit is contained in:
parent
ec507a0235
commit
b237e4bd91
|
@ -447,7 +447,12 @@
|
|||
(comm:make-request :tour-add-link
|
||||
1
|
||||
link-value
|
||||
link-name)))
|
||||
link-name)
|
||||
(print-info-message (format nil
|
||||
(_ "~a added to tour")
|
||||
(if (string-not-empty-p link-name)
|
||||
link-name
|
||||
link-value)))))
|
||||
(download-background-callback ()
|
||||
(open-iri link-value main-window nil :status +stream-status-downloading+))
|
||||
(copy-link-callback ()
|
||||
|
|
|
@ -39,10 +39,15 @@
|
|||
|
||||
(defmethod add-tour-link ((object gemini-window) (link gemini-parser:gemini-link))
|
||||
(with-accessors ((links-tour links-tour)) object
|
||||
(a:reversef links-tour)
|
||||
(push link links-tour)
|
||||
(a:reversef links-tour)
|
||||
object))
|
||||
(when (not (find link
|
||||
links-tour
|
||||
:test (lambda (a b)
|
||||
(string= (gemini-parser:target a)
|
||||
(gemini-parser:target b)))))
|
||||
(a:reversef links-tour)
|
||||
(push link links-tour)
|
||||
(a:reversef links-tour)
|
||||
object)))
|
||||
|
||||
(defmethod pop-tour-link ((object gemini-window))
|
||||
(with-accessors ((links-tour links-tour)) object
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
(defun tour-add-link (link-value link-label)
|
||||
(progn
|
||||
(add-tour-link *gemini-window*
|
||||
(make-instance 'gemini-parser:gemini-link
|
||||
:name link-label
|
||||
:target link-value))
|
||||
(make-instance 'gemini-parser:gemini-link
|
||||
:name link-label
|
||||
:target link-value))
|
||||
t))
|
||||
|
||||
(defclass popped-tour-link (box) ())
|
||||
|
|
Loading…
Reference in New Issue