slitaz-tools rev 207
tazdialog: more utf8->ascii convertions
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun May 25 14:53:28 2008 +0000 (2008-05-25) |
parents | 7f10b236e5a3 |
children | 97f8751d0751 |
files | tinyutils/tazdialog |
line diff
1.1 --- a/tinyutils/tazdialog Thu May 22 20:39:46 2008 +0000 1.2 +++ b/tinyutils/tazdialog Sun May 25 14:53:28 2008 +0000 1.3 @@ -31,7 +31,6 @@ 1.4 gauge="" 1.5 inputbox="" 1.6 default="" 1.7 - 1.8 buttonhelp="" 1.9 checklist="" 1.10 menu="" 1.11 @@ -54,11 +53,8 @@ 1.12 buttonok="1"; buttoncancel="1"; break;; 1.13 --gauge) msgbox="$2"; lines="$3"; cols="$4" 1.14 percent="$5"; gauge="1"; break;; 1.15 - --inputbox) msgbox="$2"; lines="$3"; cols="$4" 1.16 - default="$5" 1.17 - buttonok="1"; buttoncancel="1" 1.18 - inputbox="1"; break;; 1.19 - 1.20 + --inputbox) msgbox="$2"; lines="$3"; cols="$4"; default="$5" 1.21 + buttonok="1"; buttoncancel="1"; inputbox="1"; break;; 1.22 --checklist) msgbox="$2"; lines="$3"; cols="$4"; inlines="$5" 1.23 buttonok="1"; checklist="1"; shift 5; break;; 1.24 --menu) msgbox="$2"; lines="$3"; cols="$4"; inlines="$5" 1.25 @@ -77,6 +73,12 @@ 1.26 fi 1.27 msgbox="$(toutf8 "$msgbox")" 1.28 textbox="$(toutf8 "$textbox")" 1.29 +title="$(toutf8 "$title")" 1.30 +backtitle="$(toutf8 "$backtitle")" 1.31 +yeslabel="$(toutf8 "$yeslabel")" 1.32 +nolabel="$(toutf8 "$nolabel")" 1.33 +extralabel="$(toutf8 "$extralabel")" 1.34 +default="$(toutf8 "$default")" 1.35 BOX="<window" 1.36 [ -n "$backtitle" ] && BOX="$BOX title=\"$backtitle\"" 1.37 [ -n "$ICON" ] && BOX="$BOX icon-name=\"$ICON\"" 1.38 @@ -179,7 +181,8 @@ 1.39 " 1.40 export BOX 1.41 status=$(if [ -n "$gauge" ]; then 1.42 - ( while read line; do 1.43 + ([ -n "$percent" ] && echo $percent 1.44 + while read line; do 1.45 case "$line" in 1.46 [0-9]*) echo $line;; 1.47 *);;