Skip to content
Snippets Groups Projects
Commit ba5c0f47 authored by intrigeri's avatar intrigeri
Browse files

r3550@krups: intrigeri | 2005-11-15 00:47:09 +0100

 Fix listBegin/listItem/listDisplay to work with checklist boxes, as advertized.
parent 70bf59bb
No related branches found
No related tags found
No related merge requests found
...@@ -157,11 +157,13 @@ listBegin() { ...@@ -157,11 +157,13 @@ listBegin() {
_menu_items=0 _menu_items=0
_menu_text= _menu_text=
_menu_labels= _menu_labels=
_menu_status=
} }
listItem() { listItem() {
_menu_labels[$_menu_items]=$1 _menu_labels[$_menu_items]=$1
_menu_text[$_menu_items]=$2 _menu_text[$_menu_items]=$2
_menu_status[$_menu_items]=$3 # available only for checklist
let "_menu_items += 1" let "_menu_items += 1"
} }
...@@ -175,6 +177,9 @@ listDisplay() { ...@@ -175,6 +177,9 @@ listDisplay() {
local temp=$(mktemp -t) || exit 1 local temp=$(mktemp -t) || exit 1
trap "rm -f $temp" 0 trap "rm -f $temp" 0
local label
local text
local status
( (
echo -ne " $HELP $_DEFAULT " echo -ne " $HELP $_DEFAULT "
echo -ne " --backtitle '$BACKTITLE' " echo -ne " --backtitle '$BACKTITLE' "
...@@ -184,7 +189,8 @@ listDisplay() { ...@@ -184,7 +189,8 @@ listDisplay() {
for ((i=0; i < $_menu_items ; i++)); do for ((i=0; i < $_menu_items ; i++)); do
label=${_menu_labels[$i]} label=${_menu_labels[$i]}
text=${_menu_text[$i]} text=${_menu_text[$i]}
echo -ne " $label '$text' " status=${_menu_status[$i]}
echo -ne " $label '$text' $status "
done done
) | xargs $DIALOG 2> $temp ) | xargs $DIALOG 2> $temp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment