1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-18 15:30:21 +00:00

Add nonInteractive support to f_dialog_yesno/noyes().

This commit is contained in:
Devin Teske 2013-01-07 00:15:52 +00:00
parent 4fd5efe79e
commit 3da75d2e7b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245116

View File

@ -32,6 +32,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
f_dprintf "%s: loading includes..." dialog.subr
f_include $BSDCFG_SHARE/strings.subr
f_include $BSDCFG_SHARE/variable.subr
BSDCFG_LIBE="/usr/libexec/bsdconfig"
f_include_lang $BSDCFG_LIBE/include/messages.subr
@ -1058,6 +1059,9 @@ f_dialog_yesno()
{
local msg_text="$*"
local hline="$hline_arrows_tab_enter"
f_interactive || return 0 # If non-interactive, return YES all the time
local size="$( f_dialog_buttonbox_size \
"$DIALOG_TITLE" \
"$DIALOG_BACKTITLE" \
@ -1098,6 +1102,9 @@ f_dialog_noyes()
{
local msg_text="$*"
local hline="$hline_arrows_tab_enter"
f_interactive || return 1 # If non-interactive, return NO all the time
local size="$( f_dialog_buttonbox_size \
"$DIALOG_TITLE" \
"$DIALOG_BACKTITLE" \