#! /usr/dt/bin/dtksh
AcceptEventHandler()
{
   exit 0
}

RejectEventHandler()
{
   exit 1
}

XtInitialize TOPLEVEL licensePopup LicensePopup "Netscape: License Agreement" "$@"

XtCreateManagedWidget FORM form XmForm $TOPLEVEL


XtCreateManagedWidget SEP sep XmSeparator $FORM \
    topAttachment:ATTACH_WIDGET \
    topWidget:$FORM2 \
    leftAttachment:ATTACH_FORM \
    rightAttachment:ATTACH_FORM


XmCreateScrolledText DESCRIPTION $FORM description \
    width:500 \
    topAttachment:ATTACH_WIDGET \
    topWidget:$SEP \
    topOffset:5 \
    leftAttachment:ATTACH_FORM \
    leftOffset:40 \
    rightAttachment:ATTACH_FORM \
    rightOffset:10 \
    editable:False \
    editMode:MULTI_LINE_EDIT \
    rows:20 \
    navigationType:EXCLUSIVE_TAB_GROUP

full_name=$0
dir_name=`/usr/bin/dirname $full_name`

License=`/bin/cat $dir_name/LICENSE.txt`

XmTextSetString $DESCRIPTION \
"$License"

XtManageChildren $DESCRIPTION

XtCreateManagedWidget PB1 pb XmPushButton $FORM \
    labelString:"Accept" \
    topAttachment:ATTACH_WIDGET \
    topWidget:$DESCRIPTION \
    topOffset:10 \
    leftAttachment:ATTACH_POSITION \
    leftPosition:10 \
    rightAttachment:ATTACH_POSITION \
    rightPosition:40
XtAddCallback $PB1 activateCallback AcceptEventHandler

XtCreateManagedWidget PB2 pb2 XmPushButton $FORM \
    labelString:"Do Not Accept" \
    topAttachment:ATTACH_WIDGET \
    topWidget:$DESCRIPTION \
    topOffset:10 \
    leftAttachment:ATTACH_POSITION \
    leftPosition:60 \
    rightAttachment:ATTACH_POSITION \
    rightPosition:90
XtAddCallback $PB2 activateCallback RejectEventHandler

XtRealizeWidget $TOPLEVEL

XtMainLoop
