### 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 folderdecision {} {
    # Folders / Decision
    Desc "Folder decisions, like if/how to save messages."
    ShortDesc "Folder decisions"

#######
    Header head1 \
	-text "Keeping messages" \
	-background gray\
	-help "A \"folder\" is a file which contains mails."

    CheckBox folderCheckBox2 \
	-text "When exiting, keep unread messages in incoming mailbox" \
	-help "A folder set up to receive new mail by default. Incoming mail may be filtered away to other folders, though. Everytime when exiting you will be asked to move read messages to \"received\" folder with the printed answer \"no\". Default is selected."

    CheckBox folderCheckBox1 \
	-text "When exiting, delete messages you have marked for deletion?" \
	-help "Default is to delete messages marked for that. If often storing to folders and not actually want to remove it from the incoming mailbox, you might want to leave it checked. Remember that you could C)opy it to a folder instead of s)aving!. Default is selected."

    CheckBox folderCheckBox3 \
	-text "Store messages by default to the \"received\" folder" \
	-help "Default is not to store messages to the \"received\" folder."

######
    Header head11 \
	-text "Keep log of every outbound messages" \
	-background gray\
	-help ""

    CheckBox folderCheckBox8 \
	-text "Save a copy of all outbound messages" \
	-help "Default is unselected."

    CheckBox folderCheckBox9 \
	-text "Save outbound messages by login name of sender even if folder not exist" \
	-help "Default is selected."

    Header head2 \
	-text "Keeping folders" \
	-background gray \
	-help ""

    CheckBox folderCheckBox10 \
	-text "Keep folders from which all messages are deleted" \
	-help "Default is unselected."

    CheckBox folderCheckBox11 \
	-help "Default is unselected." \
	-text "Save messages, incoming and outbound, by login of sender"

  ################################ Change #################################
    Change {

    }

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

    Init {
    }

    Save {
	print "\n# should the default be to keep unread messages in the incoming mailbox?"
	if {$folderCheckBox2==0} {
		print "alwayskeep = OFF"
	} else {
		print "alwayskeep = ON"
	}
	
	print "\n# should the default be to delete messages we've marked for deletion?"
	if {$folderCheckBox1==0} {
		print "alwaysdelete = OFF"
	} else {
		print "alwaysdelete = ON"
	}
	
	print "\n# should the default be to store read messages to the \"received\" folder?"
	if {$folderCheckBox3==0} {
		print "alwaysstore = OFF"
	} else {
		print "alwaysstore = ON"
	}
	
	print "\n# save a copy of all outbound messages?"
	if {$folderCheckBox8==0} {
		print "copy = OFF"
	} else {
		print "copy = ON"
	}
	
	print "\n# save outbound messages by login name of sender/recipient even if the\n# associated folder doesn't already exist?"
	if {$folderCheckBox9==0} {
		print "forcename = OFF"
	} else {
		print "forcename = ON"
	}
	
	print "\n# should we keep folders from which all messages are deleted?"
	if {$folderCheckBox10==0} {
		print "keepempty = OFF"
	} else {
		print "keepempty = ON"
	}
	
	print "\n# save messages, incoming and outbound, by login name of sender/recipient?"
	if {$folderCheckBox11==0} {
		print "savename = OFF"
	} else {
		print "savename = ON"
	}


    }
}



