diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2021-02-26 09:05:35 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2021-02-26 09:05:35 +0000 |
commit | 01b7bcd408fd9e9dc9088b1df5761fcc0971d7e1 (patch) | |
tree | 593f2e62b1846058a020ffcecb0ef93eb7ac2153 /samples/form1-both | |
parent | 4dccdce4191d6e2bc3ba9f782b0fe1aa46b743e3 (diff) | |
download | src-01b7bcd408fd9e9dc9088b1df5761fcc0971d7e1.tar.gz src-01b7bcd408fd9e9dc9088b1df5761fcc0971d7e1.zip |
dialog: vendor import version 1.3-20210117vendor/dialog/1.3-20210117vendor/dialog
Diffstat (limited to 'samples/form1-both')
-rwxr-xr-x | samples/form1-both | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/samples/form1-both b/samples/form1-both index f571830fc454..36aa560e36bb 100755 --- a/samples/form1-both +++ b/samples/form1-both @@ -1,5 +1,5 @@ #! /bin/sh -# $Id: form1-both,v 1.5 2010/01/13 10:47:35 tom Exp $ +# $Id: form1-both,v 1.8 2020/11/26 00:34:22 tom Exp $ . ./setup-vars @@ -16,7 +16,7 @@ returncode=0 while test $returncode != 1 && test $returncode != 250 do exec 3>&1 -value=`$DIALOG --ok-label "Submit" \ +returntext=`$DIALOG --ok-label "Submit" \ --extra-button --help-button \ --backtitle "$backtitle" "$@" \ --form "Here is a possible piece of a configuration program." \ @@ -29,7 +29,7 @@ value=`$DIALOG --ok-label "Submit" \ returncode=$? exec 3>&- -show=`echo "$value" |sed -e 's/^/ /'` +show=`echo "$returntext" |sed -e 's/^/ /'` case $returncode in $DIALOG_CANCEL) @@ -53,16 +53,8 @@ show=`echo "$value" |sed -e 's/^/ /'` --msgbox "Resulting data:\n\ $show" 10 40 ;; - $DIALOG_HELP) - echo "Button 2 (Help) pressed." - exit - ;; - $DIALOG_EXTRA) - echo "Button 3 (Extra) pressed." - exit - ;; *) - echo "Return code was $returncode" + . ./report-button exit ;; esac |