### Copyright (C) 1996 Rasmus Ingemann Hansen
### This program is free software; you can redistribute it and/or modify
### it under the terms of the GNU General Public License as published by
### the Free Software Foundation; either version 2 of the License, or
### (at your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
### GNU General Public License for more details.
###
### You should have received a copy of the GNU General Public License
### along with this program; if not, write to the Free Software
### Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

proc aliasmenu {} {
    # Menues / Alias menu
    Desc "Layout of Alias-menu and message indexes."
    ShortDesc "AliasMenu options"

### Layout of Alias Menu ####
    Header head1 -text "Layout of AliasMenu + alias configurations" \
	-background gray\
	-help "...."

##########
    CheckBox aliasCheckBox2 \
	-text "When sending a message and expanding aliases, display the full names only." \
	-default 1 \
	-help "When you send a message, by not selecting this, Elm will display the primary recipients' addresses on the screen (WHICH?) with their full names. Select the box to display the full names only."

    Line line0

##########
    CheckBox aliasCheckBox1 \
	-text "Get a copy of mail, you send to an Alias you are on" \
	-default 0 \
	-help "Select this box to get a copy of messages you send to a mailing list (alias) you are on. Otherwise you do not get a copy."

    Line line1

##########
    Menu aliasMenu2 \
	-text "Sort Aliases by " \
	-textafter "method" \
	-entryhelp {
		"User-name" "Higest priority to alfanum. least User-name, ie. the one you see next to the alias number on your left on the alias menu." \
		"Alias-name" "Higest priority to alfanum. least Alias-name, ie. the one you see on your far right on the alias menu." \
		"\"aliases.text\"" "Presents the aliases in the order found in the \"aliases.text\" file."
	} \
	-help "How aliases should be sorted (visually) on the alias page. This doesn't imply anything about the order of the message in the \"alias.text\" file itself." \
        -button:width 11

    Menu aliasMenu3 \
	-text "with highest priority at" \
	-entryhelp {
		"top" "Highest priority on top of screen at alias menu"\
		"bottom" "Highest priority on bottom of screen at alias menu"\
	} \
	-help "Highest priority shown with index 1 growing towards index with least priority." \
	-button:width 6

    Frame frame1 -entries {aliasMenu2 aliasMenu3}\
        -packFrame:fill x

  ############################## Init / Save ##############################

    Init {
    }

    Save {
	print "\n# just show the names when expanding aliases?"
	if {$aliasCheckBox2==0} {
		print "names = OFF"
	} else {
		print "##names = ON"
	}

	print "\n# would you like a copy of a message you send to an alias you are on?"
	if {$aliasCheckBox1==0} {
		print "##metoo = OFF"
	} else {
		print "metoo = ON"
	}

	print "\n# how to sort the alias list, \"Name\" by default"
	set temp ""
	if {$aliasMenu3(index)==0} {
		append temp "aliassortby = Reverse-"
	} else { append temp "aliassortby = " }
        if {$aliasMenu2(index)==0} {
		append temp "Name"
		print $temp
	} elseif {$aliasMenu2(index)==1} {
		append temp "Alias"
		print $temp
	} elseif {$aliasMenu2(index)==2} {
		append temp "text"
		print $temp
	}

   }
}



