window:
	res:
		windowType	wstandard
	endres:
endwindow:
close:
	res:
		bitmapPath	$(bitmaps)
		bitmapFile	CLOSE::CBM
	endres:
endclose:
title:
	res:
		leftLabel	'Setting Mail Configuration(mailconf)'
		leftKanjiFont	$(kanjiFont)
		leftFont	$(kanaFont)
		switch $(COLOR)
			case MONO:
				bitmapPath	$(bitmaps)
				backgroundFile	GRAY3
				transparent	false
				break
		endswitch
	endres:
endtitle:
dialog: dialogs
	res:
		defaultDistance		#(fWidth)
		dialogType		modeless
	endres:
	ditem: desc_label
		res:
			itemType	button
			label		'DESCF'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
		endres:
		act:
			$(getdir) = getdir
			trap $(getdir) getdir_desc
		endact:
	endditem:
	ditem: desc
		res:
			itemType	text
			fromHoriz	desc_label
			vertDistance	#(fWidth)
			horizDistance	4
			length		48
			height		#(fHeight)
			width		#(fWidth)*48+4
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			shadowWidth	0
			borderWidth	2
			focus
		endres:
		act:
			put $(tmp)
			put $(tmp)@0 $(desc)
		endact:
	endditem:
	ditem: mst_label
		res:
			itemType	button
			fromVert	desc_label
			label		'MST F'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
		endres:
		act:
			$(getdir) = getdir
			trap $(getdir) getdir_mst
		endact:
	endditem:
	ditem: mst
		res:
			itemType	text
			fromVert	desc_label
			fromHoriz	desc_label
			vertDistance	#(fWidth)
			horizDistance	4
			length		48
			height		#(fHeight)
			width		#(fWidth)*48+4
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			shadowWidth	0
			borderWidth	2
			focus
		endres:
		act:
			put $(tmp)
			put $(tmp)@0 $(mst)
		endact:
	endditem:
	ditem: desc_note
		res:
			itemType	bitmap
			fromVert	mst_label
			label		'DESC : directory which has Description file'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)
		endres:
	endditem:
	ditem: mst_note
		res:
			itemType	bitmap
			fromVert	desc_note
			label		'MST : directory which has Master file'
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	0
			horizDistance	#(fWidth)
		endres:
	endditem:
	ditem: set
		res:
			itemType	button
			fromHoriz	desc
			label		' Set '
			kanjiFont	$(kanjiFont)
			font		$(kanaFont)
			vertDistance	#(fWidth)
			horizDistance	#(fWidth)*2
		endres:
		act:
			switch $(desc)
				case '':
					put 1 $(err_no)
					job err
					quit
				case /\*:
					$(etc)/Common/Smkdir.sh -e $(desc) /
					switch #(status)
						case 0:
							break
						default:
							put 3 $(err_no)
							job err
							quit
					endswitch
					break
				default:
					put 2 $(err_no)
					job err
					quit
			endswitch
			switch $(mst)
				case '':
					put 4 $(err_no)
					job err
					quit
				case /\*:
					$(etc)/Common/Smkdir.sh -e $(mst) /
					switch #(status)
						case 0:
							break
						default:
							put 6 $(err_no)
							job err
							quit
					endswitch
					break
				default:
					put 5 $(err_no)
					job err
					quit
			endswitch
			close
		endact:
	endditem:
enddialog:
proc: pre
	put 0 $(menu_no)
	put on $(mailconf)
endproc:
proc: close
	put 10 $(menu_no)
	put 'Cancel to execute mailconf.' $(confirm_msg1)
	$(err) = sub $(commonPath)/confirm1 ++48++48
	buzzer
	trap $(err) confirm
endproc:
proc: confirm
	switch $(answer)
		case ok:
			put off $(mailconf)
			close
			break
		default:
			put 0 $(menu_no)
			break
	endswitch
endproc:
proc: open
	setval mst string /usr/pds/lib/mailconf/MST
endproc:
proc: getdir_desc
	switch #(pg_stat)
		case 0:
			setval desc string $(pg_path)
			break
	endswitch
endproc:
proc: getdir_mst
	switch #(pg_stat)
		case 0:
			setval mst string $(pg_path)
			break
	endswitch
endproc:
proc: err
	put 10 $(menu_no)
	switch #(err_no)
		case 1:
			put 'Specify DESC directory !!' $(confirm_msg1)
			$(err) = sub $(commonPath)/error1 ++48++48
			break
		case 2:
			put 'DESC directory must the pass name which start with / !!' $(confirm_msg1)
			$(err) = sub $(commonPath)/error1 ++48++48
			break
		case 3:
			put 'DESC directory "$(desc)" does not exist !!' $(confirm_msg1)
			$(err) = sub $(commonPath)/error1 ++48++48
			break
		case 4:
			put 'Specify MST directory !!' $(confirm_msg1)
			$(err) = sub $(commonPath)/error1 ++48++48
			break
		case 5:
			put 'MST directory must the pass name which start with / !!' $(confirm_msg1)
			$(err) = sub $(commonPath)/error1 ++48++48
			break
		case 6:
			put 'MST directory "$(desc)" does not exist !!' $(confirm_msg1)
			$(err) = sub $(commonPath)/error1 ++48++48
			break
	endswitch
	buzzer
	trap $(err) err_end
endproc:
proc: err_end
	put 0 $(menu_no)
endproc:
proc: unmap
	switch #(menu_no)
		case 10:
			unmap $(err)
			break
	endswitch
endproc:
proc: map
	switch #(menu_no)
		case 10:
			move $(err)
			raise $(err)
			map $(err)
			break
	endswitch
endproc:
proc: title
	job move
	job up
endproc:
proc: raise
	job up
endproc:
proc: move
	switch #(menu_no)
		case 10:
			move $(err)
			break
	endswitch
endproc:
proc: up
	switch #(menu_no)
		case 10:
			raise $(err)
			break
	endswitch
endproc:
