
namespace eval ::splash:: {
    set percent 0
}

# splash::add --
#    Adds message to the splash screen
#
# text  text to display
# args  optional icon argumnet

proc ::splash::init {} {
    variable text
    set text "Welcome to the Comanche \nOpen-source Management Console\n"
    append text "Visit us on the web at \nhttp://www.comanche.org\n"
    append text "\nWarning: Comanche is still a work in progress"
    append text "\nand you may encounter bugs ahead.\nPlease report "
    append text "them to info@comanche.org.\n Thanks!"



    ProgressDlg .pd -title Comanche -parent .  \
    -textvariable ::splash::text -variable ::splash::percent -width 40 -height 12
    wm withdraw .
    centerScreen .pd
    update idletasks
}

proc ::splash::add { newtext args } {
    variable text
    variable percent
    incr percent 5
    #set text "Welcome to the Comanche open source management console\n"
    #append text "Visit us on the web at http://comanche.org\n"
    #append text "Comanche is sponsored by Covalent http://covalent.net\n\n"
    #append text $newtext
    update idletasks
}

proc ::splash::end {} {
    Dialog::enddialog .pd 0
    destroy .pd
    #grab release .pd
    #grab set .
    wm deiconify .
}
