aboutsummaryrefslogtreecommitdiff
path: root/handlers/easydialog.sh
diff options
context:
space:
mode:
authorElijah Saxon <elijah@riseup.net>2005-07-07 21:14:19 +0000
committerElijah Saxon <elijah@riseup.net>2005-07-07 21:14:19 +0000
commit91f3eb464817461dea895b180f7f79d67289ff21 (patch)
treeace1eb23c8fe27b2a6caf8c164234024043a77fb /handlers/easydialog.sh
parent06566455cf8262233d4ebf243002132326c66504 (diff)
downloadbackupninja-91f3eb464817461dea895b180f7f79d67289ff21.tar.gz
backupninja-91f3eb464817461dea895b180f7f79d67289ff21.tar.bz2
greatly improved the rdiff wizard. added default option to menu in easydialog.
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