#! /bin/ksh
#
# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#pragma ident	"@(#)wdwmsg.sh	1.1	07/10/17 SMI"
#

################## Check parameters #################################

if [ $# -lt 3 -o $# -gt 4 ]; then
	echo "Usage: `basename $0` TITLE OKBUTTONTEXT [CANCELBUTTONTEXT]"
	exit 127
fi

################## Create the Main UI #################################

messageString="$1"
dialogTitle="$2"

if [ $# -eq 4 -a "$4" != "" ];then
	type="--question"
else
	type="--info"
fi

reply=$(/usr/bin/zenity $type \
	--title="$dialogTitle" \
	--height=100 \
	--width=200 \
	--text="$messageString")
exit $reply
