mirror of
https://codeberg.org/cage/tinmop/
synced 2025-06-05 01:09:17 +02:00
- added feature to allow users ro configure symbols rendered for each toot visibility level in main window.
This commit is contained in:
@@ -434,6 +434,17 @@ message-window.account.unlocked.mark.value = " 🔓"
|
|||||||
|
|
||||||
# message-window.attachment-header.value = " attachment "
|
# message-window.attachment-header.value = " attachment "
|
||||||
|
|
||||||
|
# below the text printed for toot's visibility level: public,
|
||||||
|
# unlisted, private or direct
|
||||||
|
|
||||||
|
message-window.visibility.public = "🌐"
|
||||||
|
|
||||||
|
message-window.visibility.unlisted = "🔓"
|
||||||
|
|
||||||
|
message-window.visibility.private = "🔒"
|
||||||
|
|
||||||
|
message-window.visibility.direct = "📧"
|
||||||
|
|
||||||
# this is the window that allow to browse the attachments of a message
|
# this is the window that allow to browse the attachments of a message
|
||||||
|
|
||||||
open-attach-window.background = black
|
open-attach-window.background = black
|
||||||
|
@@ -223,12 +223,19 @@
|
|||||||
as-text))
|
as-text))
|
||||||
as-text)))
|
as-text)))
|
||||||
|
|
||||||
|
(defun visibility->mark (visibility)
|
||||||
|
(let ((mapping (swconf:message-windows-visibility-marks)))
|
||||||
|
(db-getf mapping
|
||||||
|
(make-keyword (string-upcase visibility))
|
||||||
|
:default visibility
|
||||||
|
:only-empty-or-0-are-null t)))
|
||||||
|
|
||||||
(defun message-original->text-header (message-row)
|
(defun message-original->text-header (message-row)
|
||||||
(let* ((date-format (swconf:date-fmt swconf:+key-message-window+))
|
(let* ((date-format (swconf:date-fmt swconf:+key-message-window+))
|
||||||
(username (db:row-message-username message-row))
|
(username (db:row-message-username message-row))
|
||||||
(display-name (db:row-message-user-display-name message-row))
|
(display-name (db:row-message-user-display-name message-row))
|
||||||
(creation-time (db:row-message-creation-time message-row))
|
(creation-time (db:row-message-creation-time message-row))
|
||||||
(visibility (db:row-message-visibility message-row))
|
(visibility (visibility->mark (db:row-message-visibility message-row)))
|
||||||
(lockedp (db-utils:db-not-nil-p (db:row-lockedp message-row)))
|
(lockedp (db-utils:db-not-nil-p (db:row-lockedp message-row)))
|
||||||
(locked-mark (swconf:message-window-account-locking-status-mark lockedp))
|
(locked-mark (swconf:message-window-account-locking-status-mark lockedp))
|
||||||
(encoded-date (db-utils:encode-datetime-string creation-time))
|
(encoded-date (db-utils:encode-datetime-string creation-time))
|
||||||
|
@@ -1125,6 +1125,7 @@
|
|||||||
:message-window-unlocked-account-mark
|
:message-window-unlocked-account-mark
|
||||||
:message-window-account-locking-status-mark
|
:message-window-account-locking-status-mark
|
||||||
:message-window-line-mark-values
|
:message-window-line-mark-values
|
||||||
|
:message-windows-visibility-marks
|
||||||
:message-window-attachments-header
|
:message-window-attachments-header
|
||||||
:form-style
|
:form-style
|
||||||
:background
|
:background
|
||||||
|
@@ -340,6 +340,11 @@
|
|||||||
link
|
link
|
||||||
creation-time
|
creation-time
|
||||||
access-time
|
access-time
|
||||||
|
visibility
|
||||||
|
public
|
||||||
|
unlisted
|
||||||
|
private
|
||||||
|
direct
|
||||||
quote
|
quote
|
||||||
h1
|
h1
|
||||||
h2
|
h2
|
||||||
@@ -956,6 +961,31 @@
|
|||||||
+key-line-position-mark+
|
+key-line-position-mark+
|
||||||
+key-background+)))
|
+key-background+)))
|
||||||
|
|
||||||
|
(defun message-window-visibility-mark (visibility-level)
|
||||||
|
(access:accesses *software-configuration*
|
||||||
|
+key-message-window+
|
||||||
|
+key-visibility+
|
||||||
|
visibility-level))
|
||||||
|
|
||||||
|
|
||||||
|
(defmacro gen-visibility-mapping-marks (visibility-level)
|
||||||
|
`(defun ,(format-fn-symbol t "message-window-visibility-~a-mark" visibility-level) ()
|
||||||
|
(message-window-visibility-mark ,visibility-level)))
|
||||||
|
|
||||||
|
(gen-visibility-mapping-marks "public")
|
||||||
|
|
||||||
|
(gen-visibility-mapping-marks "unlisted")
|
||||||
|
|
||||||
|
(gen-visibility-mapping-marks "private")
|
||||||
|
|
||||||
|
(gen-visibility-mapping-marks "direct")
|
||||||
|
|
||||||
|
(defun message-windows-visibility-marks ()
|
||||||
|
(list :public (message-window-visibility-public-mark)
|
||||||
|
:unlisted (message-window-visibility-unlisted-mark)
|
||||||
|
:private (message-window-visibility-private-mark)
|
||||||
|
:direct (message-window-visibility-direct-mark)))
|
||||||
|
|
||||||
(defun message-window-attachments-header ()
|
(defun message-window-attachments-header ()
|
||||||
(values (access:accesses *software-configuration*
|
(values (access:accesses *software-configuration*
|
||||||
+key-message-window+
|
+key-message-window+
|
||||||
|
Reference in New Issue
Block a user