###############################################################################
#
#   sdthotjava.dt
#
#   Action definitions for HotJava Browser
#
#   Copyright (c) 1996 Sun Microsystems, Inc.
#
#   @(#)sdthotjava.dt	1.1 96/11/07
#
###############################################################################

set DtDbVersion=1.0

###############################################################################
#
# WARNING:  This file may be overwritten in subsequent installations of
#     the Common Desktop Environment (CDE).  Consequently, any system wide
#     changes should be made to an equivalent database file in
#     /etc/dt/apconfig/types and not in this file.
#
###############################################################################

set hotjava_patherr=dterror.ds "HotJava Browser unavailable.\\n\\nNo sdthotjava command found in your PATH" "HotJava: Path Error" "OK"

ACTION SDtHotJava
{
        LABEL		HotJava
        ICON            SDthjava
        ARG_COUNT	0
        TYPE            COMMAND
        WINDOW_TYPE     NO_STDIO
        EXEC_STRING     sh -c '\
			sdtwebclient -b sdthotjava || \{ \
			    $hotjava_patherr ; \
			\}'
	DESCRIPTION	The SDtHotJava action invokes the HotJava Browser. \
			The `sdthotjava' command must be in your PATH.
}

ACTION SDtHotJava
{
	LABEL		HotJava
	ICON		SDthjava
	ARG_TYPE	WEB_URL,FILE_URL,MAILTO_URL,RLOGIN_URL
	ARG_COUNT	1
	TYPE		COMMAND
	WINDOW_TYPE	NO_STDIO
        EXEC_STRING     sh -c '\
			URL=`/bin/head -1 "%Arg_1%"` ; \
			sdtwebclient -b sdthotjava "\$URL" || \{ \
			    $hotjava_patherr ; \
			\}'
	DESCRIPTION	The SDtHotJava action starts the HotJava Browser \
			on a Uniform Resource Location (URL) file. \
			The `sdthotjava' command must be in your PATH.
}

ACTION SDtHotJava
{
	LABEL		HotJava
	ICON		SDthjava
	ARG_TYPE	HTML
	ARG_COUNT	1
	TYPE		COMMAND
	WINDOW_TYPE	NO_STDIO
        EXEC_STRING     sh -c '\
			URL=file:"%Arg_1%" ; \
			sdtwebclient -b sdthotjava "\$URL" || \{ \
			    $hotjava_patherr ; \
			\}'
	DESCRIPTION	The SDtHotJava action starts the HotJava Browser\
			on a HyperText Markup Language (HTML) document. \
			The `sdthotjava' command must be in your PATH.
}

ACTION SDtHotJava_Open
{
	LABEL		HotJava
	ICON		SDthjava
	ARG_TYPE	WEB_URL,FILE_URL,MAILTO_URL,RLOGIN_URL,HTML
	ARG_COUNT	1
	TYPE		MAP
	MAP_ACTION	SDtHotJava
	DESCRIPTION	The SDtHotJava_Open action invokes the HotJava Browser.\
			The `sdthotjava' command must be in your PATH.
}

ACTION SDtHotJava_Print
{
	LABEL		HotJava
	ICON		SDthjava
	ARG_TYPE	WEB_URL,FILE_URL,MAILTO_URL,RLOGIN_URL,HTML
	ARG_COUNT	1
	TYPE		COMMAND
	EXEC_STRING	dterror.ds \
			  "Not Yet Implemented" "HotJava Printing" "OK"
	DESCRIPTION	The SDtHotJava_Print action prints using HotJava. \
			The `sdthotjava' command must be in your PATH.
}
