#ident	"@(#)face:OBJECTS/Form.org	1.8"

form="Organize `pathconv -t -v $ARG1`"
framemsg="Press CHOICES to select, then press SAVE when you complete the form."

help=OPEN TEXT OBJECTS/Text.h "$TITLE" T.horg"$ITEM"

#close=`message "Organization has been updated.";sleep 3`

done=`indicator -w;
if [ ${F1} = no ];
then
	regex -v "$F2" 
		'^name only$' '0' 
		'^long form$' '8' 
		'^wastebasket$' '10' 
		'^name and marks$' '2000' 
		'.*' '4' | set -f$ARG1/.pref DISPMODE; 
	regex -v "$F3" 
		'^most recent first$' '2' 
		'^least recent first$' '1002' 
		'^alphabetical by description$' '800' 
		'.*' '1' | set -f$ARG1/.pref SORTMODE; 
else
	unset -f$ARG1/.pref DISPMODE -f$ARG1/.pref SORTMODE;
	if [ "$ARG1" = "$HOME/WASTEBASKET" ];
	then
		set -f$ARG1/.pref DISPMODE=10;
	fi;
fi;
touch $ARG1; 
test -w $ARG1 || message -f "You don't have permission to organize ${ARG1}";`

name=Default Organization:
nrow=1
ncol=1
rows=1
columns=3
frow=1
fcol=24
rmenu={ yes no }
menuonly=true
value=const no
lininfo=`set -l TITLE="Default Organization" -l ITEM=3`

name=Folder Display Format: 
inactive=`regex -v "${F1}" 'no' false 'yes' true`
nrow=3
ncol=1
rows=1
columns=21
frow=3
fcol=24
`if regex -v "${ARG1}" '^.*WASTEBASKET$';
then
	echo 'rmenu={ "long form" "name and description" "name and marks" "name only" "wastebasket" }';
else
	echo 'rmenu={ "long form" "name and description" "name and marks" "name only" }';
fi`
lininfo=`set -l TITLE="Folder Display Format" -l ITEM=1`
menuonly=true
value=const `regex -v "${($ARG1/.pref)DISPMODE:-$DISPLAYMODE}" 
		'^0$' 'name only' 
		'^8$' 'long form' 
		'^10$' 'wastebasket' 
		'^2000$' 'name and marks' 
		'.*' 'name and description'`

name=Folder Display Order: 
inactive=`regex -v "${F1}" 'no' false 'yes' true`
nrow=5
ncol=1
rows=1
columns=27
frow=5
fcol=24
rmenu={ "alphabetical" "alphabetical by description" "least recent first" "most recent first" }
lininfo=`set -l TITLE="Folder Display Order" -l ITEM=2`
menuonly=true
value=const `regex -v "${($ARG1/.pref)SORTMODE:-$SORTMODE}" 
		'^2$'  'most recent first' 
		'^1002$' 'least recent first' 
		'^800$'  'alphabetical by description' 
		'.*'  'alphabetical'`

name=RESET
button=8
action=reset
