File: buildlist

package info (click to toggle)
xdialog 2.0.6-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,616 kB
  • ctags: 1,064
  • sloc: ansic: 8,505; sh: 4,202; yacc: 318; makefile: 80
file content (21 lines) | stat: -rwxr-xr-x 505 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

result=`Xdialog --title "XDIALOG BUILDLIST" --backtitle "A user-built list" \
		--stdout --separator "|" \
		--buildlist "hello, this is a --buildlist..." 0 0 0 \
			    "1" "Item n 1" "on" \
			    "2" "Item n 2" "off" \
			    "3" "Item n 3" "on" \
			    "4" "Item n 4" "on" \
			    "5" "Item n 5" "off" \
			    "6" "Item n 6" "on"`

retval=$?
case $retval in
  0)
    echo "The user-built list is '$result'.";;
  1)
    echo "Cancel pressed.";;
  255)
    echo "Box closed.";;
esac