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
|
(comm:make-request :tour-add-link
|
||||||
1
|
1
|
||||||
link-value
|
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 ()
|
(download-background-callback ()
|
||||||
(open-iri link-value main-window nil :status +stream-status-downloading+))
|
(open-iri link-value main-window nil :status +stream-status-downloading+))
|
||||||
(copy-link-callback ()
|
(copy-link-callback ()
|
||||||
|
|
|
@ -39,10 +39,15 @@
|
||||||
|
|
||||||
(defmethod add-tour-link ((object gemini-window) (link gemini-parser:gemini-link))
|
(defmethod add-tour-link ((object gemini-window) (link gemini-parser:gemini-link))
|
||||||
(with-accessors ((links-tour links-tour)) object
|
(with-accessors ((links-tour 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)
|
(a:reversef links-tour)
|
||||||
(push link links-tour)
|
(push link links-tour)
|
||||||
(a:reversef links-tour)
|
(a:reversef links-tour)
|
||||||
object))
|
object)))
|
||||||
|
|
||||||
(defmethod pop-tour-link ((object gemini-window))
|
(defmethod pop-tour-link ((object gemini-window))
|
||||||
(with-accessors ((links-tour links-tour)) object
|
(with-accessors ((links-tour links-tour)) object
|
||||||
|
|
Loading…
Reference in New Issue