#! /usr/bin/wish4.1

#
# $Id: tkgnats,v 1.3 1993/11/16 22:19:33 jason Exp $
#
set TkGnats(lib) /usr/lib/tkgnats; ##TKGNATSLIB##

source $TkGnats(lib)/tkpr_library.tcl

frame  .top

button .top.query \
        -relief raised \
        -text "Query Problem Reports" \
        -command {exec tkquerypr &; schedule_reap}

button .top.send \
        -relief raised \
        -text "Create Problem Report" \
        -command {exec tksendpr &; schedule_reap}

button .top.send_tkgnats \
        -relief raised \
        -text "Report a tkgnats problem" \
        -command "exec tksendpr -categories \"tkgnats\" -address $TkGnats(TKGNATS_GNATS_ADDR) &; schedule_reap"

button .top.quit \
        -relief raised \
        -text "Quit" \
        -command {destroy .}

pack .top
pack .top.send .top.query .top.send_tkgnats -side top -fill x

if {[info exists TkGnats(InfoReader)]} {
    button .top.info \
            -relief raised \
            -text "Info" \
            -command "exec $TkGnats(InfoReader) &; schedule_reap"
    pack .top.info -side top -fill x
}

if {[info exists TkGnats(MailReader)]} {
    button .top.mail \
            -relief raised \
            -text "Mail system" \
            -command "exec $TkGnats(MailReader) &; schedule_reap"
    pack .top.mail -side top -fill x
}

pack .top.quit -side top -fill x -pady 12

wm title      . "TkGnats - Main Menu"
wm iconbitmap . @$TkGnats(lib)/tkgnats.xbm
wm iconname   . "$TkGnats(LogName)'s tkgnats"
