### 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 behavior {} {
    # Menues / Main menu / Behavior
    Desc "Generel behavior of Main menu"
    ShortDesc "Behavior of Main menu"

### Layout of Indexes ###
    Header head2 -text "Behavior of message pointer" \
	-background gray\
	-help "The indexed list of messages found on the main page"

###		If possible, start up by pointing to first new message received" 
    CheckBox actionMenuCheckBox2 \
	-text "Start up by pointing to first new message (in incoming mailbox), instead of #1 index." \
	-help "Also you might try out the \"nfrm\" command which will only show new mail." \
	-default 1

    CheckBox actionMenuCheckBox23 \
	-text "Only move pointer after something has been 'done', forwarded, deleted." \
	-help "Default is ON." \
	-default 1

#################
    Line line4

    Int actionMenuInt1 \
	-text "While reading a new mailbox, a value of" \
	-textafter " by which message count is incremented" \
	-help "Setting this value to a number larger than one will speed up the time it takes to read a large mailbox when using a slow terminal" \
	-default 1

    Line line5

    Int actionMenuInt2 \
	-text "Resynching after" \
	-textafter "seconds, for messages that are deleted, etc" \
	-help "Time interval in seconds between automatical resynching. The default is 10 minutes. Remember, manually it can be done with \"$\". " \
	-default 600


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

    }

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

    Init {
    }

    Save {
	print "\n# start up by pointing to first new message received?"
        if {$actionMenuCheckBox2==1} {
		print "pointnew = ON"
        } else {
		print "pointnew = OFF"
	}

	print "\n# only move pointer after something has been 'done', saved, deleted."
	if {$actionMenuCheckBox23==0} {
		print "resolve = OFF"
	} else {
		print "resolve = ON"
	}

	print "\n# value by which message count is incremented while reading a new mailbox.\n#Setting this value to a number >1 will speed up time when reading mailbox."
        if {$actionMenuInt1==1} {
		print "###readmsginc = 1"
        } else {
		print "readmsginc = $actionMenuInt1"
	}

	print "\n# main prompt timeout for resynching"
        if {$actionMenuInt2==300} {
		print "###timeout = 300"
        } else {
		print "timeout = $actionMenuInt2"
	}
   }
}



