1
0
Fork 0

- added a configuration directive to close the link window after a link has been selected.

This commit is contained in:
cage 2021-07-31 14:09:10 +02:00
parent a0c25ee8fe
commit e6cd7b9ab4
4 changed files with 25 additions and 10 deletions

View File

@ -1,11 +1,11 @@
# a line starting with a '#' is a comment # a line starting with a '#' is a comment
# The server instance name # The server instance name
# add this entry to your file (the one in your home) # add this entry to your file (the one in your home)
# server = test.server.org # server = test.server.org
# your username # your username
# add this entry to your file (the one in your home) # add this entry to your file (the one in your home)
# username = username # username = username
# theme # theme
@ -13,33 +13,37 @@ use "default-theme.conf"
# maximum number of attachments allowed for a single toot # maximum number of attachments allowed for a single toot
# default is 4 # default is 4
#max-numbers-allowed-attachments = 4 #max-numbers-allowed-attachments = 4
# maximum number of characters allowed for a single toot # maximum number of characters allowed for a single toot
# default is 500 # default is 500
#max-message-length = 500 #max-message-length = 500
# maximum number of characters allowed for reporting an user to # maximum number of characters allowed for reporting an user to
# instance's admin # instance's admin
#default is 100 #default is 100
#max-report-comment-length = 100 #max-report-comment-length = 100
# Character to use when replying to a message # Character to use when replying to a message
reply-quoted-character = "> " reply-quoted-character = "> "
# delete the command history entries that are older than this number # delete the command history entries that are older than this number
# of days # of days
purge-history-days-offset = -30 purge-history-days-offset = -30
# delete the cache entries that are older than this number of days # delete the cache entries that are older than this number of days
purge-cache-days-offset = -7 purge-cache-days-offset = -7
# chosen editor (as shell command line) for compose a message # chosen editor (as shell command line) for compose a message
editor = "nano --locking" editor = "nano --locking"
# update gemlog subscriptions when program starts # update gemlog subscriptions when program starts
# (default 'no', change to 'yes' if desired) # (default 'no', change to 'yes' if desired)
start.update.gemlog = no start.update.gemlog = no
# close links window when opening the selected link
open-message-link-window.close-after-select = yes
# color parts of a displayed message according to a regular expression # color parts of a displayed message according to a regular expression
# syntax is regular expression color attribute # syntax is regular expression color attribute

View File

@ -75,6 +75,9 @@
(let* ((parsed (iri:iri-parse url)) (let* ((parsed (iri:iri-parse url))
(scheme (uri:scheme parsed)) (scheme (uri:scheme parsed))
(decoded-path (percent-decode url))) (decoded-path (percent-decode url)))
(when (and (not enqueue)
(swconf:close-link-window-after-select-p))
(ui:close-open-message-link-window))
(cond (cond
((string= gemini-constants:+gemini-scheme+ scheme) ((string= gemini-constants:+gemini-scheme+ scheme)
(db:insert-in-history (ui:gemini-open-url-prompt) url) (db:insert-in-history (ui:gemini-open-url-prompt) url)

View File

@ -1113,6 +1113,7 @@
:load-config-file :load-config-file
:external-editor :external-editor
:gemini-downloading-animation :gemini-downloading-animation
:close-link-window-after-select-p
:suggestion-window-selected-item-colors :suggestion-window-selected-item-colors
:gemini-default-favicon :gemini-default-favicon
:gemini-update-gemlog-at-start-p :gemini-update-gemlog-at-start-p

View File

@ -527,6 +527,7 @@
directory-symbol directory-symbol
fetch fetch
update update
close-after-select
password-echo-character password-echo-character
color-re color-re
ignore-user-re ignore-user-re
@ -595,6 +596,12 @@
(access-key->user-directive keys)))) (access-key->user-directive keys))))
value))) value)))
(defun close-link-window-after-select-p ()
(let ((value (access:accesses *software-configuration*
+key-open-message-link-window+
+key-close-after-select+)))
(not (false-value-p value))))
(defun suggestion-window-selected-item-colors () (defun suggestion-window-selected-item-colors ()
(values (access-non-null-conf-value *software-configuration* (values (access-non-null-conf-value *software-configuration*
+key-suggestions-window+ +key-suggestions-window+