aboutsummaryrefslogtreecommitdiff
path: root/handlers/easydialog.sh
diff options
context:
space:
mode:
Diffstat (limited to 'handlers/easydialog.sh')
-rw-r--r--handlers/easydialog.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/handlers/easydialog.sh b/handlers/easydialog.sh
index 1ae3c83..b96a5c1 100644
--- a/handlers/easydialog.sh
+++ b/handlers/easydialog.sh
@@ -81,15 +81,20 @@ _genericListBox() {
local temp=$(mktemp -t) || exit 1
trap "rm -f $temp" 0
REPLY=
- $DIALOG $HELP --backtitle "$BACKTITLE" --title "$title" \
+ $DIALOG $HELP $_DEFAULT --backtitle "$BACKTITLE" --title "$title" \
$box "$text" $HEIGHT $WIDTH 10 \
"$@" 2> $temp
local status=$?
[ $status = 0 ] && REPLY=$(_listReplyHook $temp $box)
rm -f $temp
+ _DEFAULT=
return $status
}
+setDefault() {
+ _DEFAULT="--default-item $1"
+}
+
menuBox() {
_genericListBox --menu "$@"
}
@@ -169,9 +174,9 @@ displayForm() {
for ((i=0; i < $_form_items ; i++)); do
label=${_form_labels[$i]}
text=${_form_text[$i]}
- if [ "$text" == "" ]; then
- text='_empty_'
- fi
+# if [ "$text" == "" ]; then
+# text='_empty_'
+# fi
echo -n -e "$form $label $xpos 1 '$text' $xpos $max_length 30 30"
let "xpos += _form_gap"
done