mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-17 08:10:36 +01:00
- used correct function when ignoring an account;
- changed button label when asking for opening authorization url: from 'OK' to 'Cancel'.
This commit is contained in:
parent
a746aef322
commit
9f6adf02c4
@ -186,10 +186,14 @@ authorizations was performed with success."
|
||||
(tooter:authorize *client*)
|
||||
(declare (ignore a))
|
||||
(let* ((dialog-msg (authorize-dialog-message))
|
||||
(save-item (_ "Save address"))
|
||||
(open-item (_ "Open address"))
|
||||
(save-item (_ "Save address"))
|
||||
(open-item (_ "Open address"))
|
||||
(cancel-item (_ "Cancel"))
|
||||
(choosen (ui:info-dialog-immediate (format nil "~a~%~a" dialog-msg url)
|
||||
:buttons (list save-item open-item))))
|
||||
:buttons (list save-item
|
||||
open-item
|
||||
cancel-item)
|
||||
:append-ok-button nil)))
|
||||
(labels ((on-got-authorization-code (value)
|
||||
(handler-case
|
||||
(progn
|
||||
|
@ -1881,7 +1881,7 @@ to `timeline' , `folder' and possibly `account-id', older than
|
||||
"Ignore or unignore the future statuses authored by the user
|
||||
identified by the account that wrote the status identified by
|
||||
`status-id'"
|
||||
(when-let* ((status (fetch-from-id :status status-id))
|
||||
(when-let* ((status (find-status-id status-id))
|
||||
(account-id (db-getf status :account-id)))
|
||||
(query (make-update :account
|
||||
(:ignoredp)
|
||||
|
@ -85,18 +85,28 @@
|
||||
:payload message)))
|
||||
(push-event event)))
|
||||
|
||||
(defun info-dialog-immediate (message &key (buttons nil) (title (_ "Information")))
|
||||
(defun info-dialog-immediate (message
|
||||
&key
|
||||
(buttons nil)
|
||||
(title (_ "Information"))
|
||||
(append-ok-button t))
|
||||
(let ((dialog-window (windows:make-info-message-dialog specials:*main-window*
|
||||
title
|
||||
message
|
||||
buttons)))
|
||||
buttons
|
||||
append-ok-button)))
|
||||
(windows:menu-select dialog-window)))
|
||||
|
||||
(defun error-dialog-immediate (message &key (buttons nil) (title (_ "Error")))
|
||||
(defun error-dialog-immediate (message
|
||||
&key
|
||||
(buttons nil)
|
||||
(title (_ "Error"))
|
||||
(append-ok-button t))
|
||||
(let ((dialog-window (windows:make-error-message-dialog specials:*main-window*
|
||||
title
|
||||
message
|
||||
buttons)))
|
||||
buttons
|
||||
append-ok-button)))
|
||||
(windows:menu-select dialog-window)))
|
||||
|
||||
(defun input-dialog-immediate (message)
|
||||
|
@ -436,11 +436,15 @@ list of strings (the text lines)."
|
||||
(get-char low-level-window)
|
||||
(win-close window)))
|
||||
|
||||
(defun make-dialog (parent title message color-pair &optional (buttons nil))
|
||||
(defun make-dialog (parent title message color-pair
|
||||
&optional (buttons nil)
|
||||
(append-ok-button t))
|
||||
(let* ((lines (text-utils:split-lines message))
|
||||
(max-line-size (text-utils:find-max-line-length lines))
|
||||
(actual-buttons (append (list +menu-button-ok+)
|
||||
buttons))
|
||||
(actual-buttons (if append-ok-button
|
||||
(append (list +menu-button-ok+)
|
||||
buttons)
|
||||
buttons))
|
||||
(max-button-size (text-utils:find-max-line-length actual-buttons))
|
||||
(max-message-height (- (win-height-no-border parent)
|
||||
4))
|
||||
@ -468,15 +472,21 @@ list of strings (the text lines)."
|
||||
(make-instance 'wrapper-window
|
||||
:croatoan-window dialog-window)))
|
||||
|
||||
(defun make-error-message-dialog (parent title message &optional (buttons nil))
|
||||
(defun make-error-message-dialog (parent title message
|
||||
&optional
|
||||
(buttons nil)
|
||||
(append-ok-button t))
|
||||
(let ((bg (swconf:win-bg swconf:+key-error-dialog+))
|
||||
(fg (swconf:win-fg swconf:+key-error-dialog+)))
|
||||
(make-dialog parent title message (list fg bg) buttons)))
|
||||
(make-dialog parent title message (list fg bg) buttons append-ok-button)))
|
||||
|
||||
(defun make-info-message-dialog (parent title message &optional (buttons nil))
|
||||
(defun make-info-message-dialog (parent title message
|
||||
&optional
|
||||
(buttons nil)
|
||||
(append-ok-button t))
|
||||
(let ((bg (swconf:win-bg swconf:+key-info-dialog+))
|
||||
(fg (swconf:win-fg swconf:+key-info-dialog+)))
|
||||
(make-dialog parent title message (list fg bg) buttons)))
|
||||
(make-dialog parent title message (list fg bg) buttons append-ok-button)))
|
||||
|
||||
(defun make-simple-style (foreground background
|
||||
selected-foreground selected-background)
|
||||
|
Loading…
x
Reference in New Issue
Block a user