diff options
author | intrigeri <intrigeri@boum.org> | 2005-11-29 10:07:49 +0000 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2005-11-29 10:07:49 +0000 |
commit | ba5c0f47d1827689a83c14c868de86c554cce567 (patch) | |
tree | a84db422a9297c49ffa84f9c15cd94513fe5fcf5 /handlers/easydialog.sh | |
parent | 70bf59bbce64db0bd70eddd1d43d6e3168f22060 (diff) | |
download | backupninja-ba5c0f47d1827689a83c14c868de86c554cce567.tar.gz backupninja-ba5c0f47d1827689a83c14c868de86c554cce567.tar.bz2 |
r3550@krups: intrigeri | 2005-11-15 00:47:09 +0100
Fix listBegin/listItem/listDisplay to work with checklist boxes, as advertized.
Diffstat (limited to 'handlers/easydialog.sh')
-rw-r--r-- | handlers/easydialog.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/handlers/easydialog.sh b/handlers/easydialog.sh index 18cb7c3..ff3659f 100644 --- a/handlers/easydialog.sh +++ b/handlers/easydialog.sh @@ -157,11 +157,13 @@ listBegin() { _menu_items=0 _menu_text= _menu_labels= + _menu_status= } listItem() { _menu_labels[$_menu_items]=$1 _menu_text[$_menu_items]=$2 + _menu_status[$_menu_items]=$3 # available only for checklist let "_menu_items += 1" } @@ -175,6 +177,9 @@ listDisplay() { local temp=$(mktemp -t) || exit 1 trap "rm -f $temp" 0 + local label + local text + local status ( echo -ne " $HELP $_DEFAULT " echo -ne " --backtitle '$BACKTITLE' " @@ -184,7 +189,8 @@ listDisplay() { for ((i=0; i < $_menu_items ; i++)); do label=${_menu_labels[$i]} text=${_menu_text[$i]} - echo -ne " $label '$text' " + status=${_menu_status[$i]} + echo -ne " $label '$text' $status " done ) | xargs $DIALOG 2> $temp |