# @(#)93 1.11 src/cde/cde1/dtmail/libDtMail/Common/dtmail.dt, desktop, cde610 9/15/95 14:35:54 ############################################################################### # # dtmail.dt # # Action and DataType definitions for the Common Desktop Environment # (CDE) Mailer Component. # # (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company # (c) Copyright 1993, 1994, 1995 International Business Machines Corp. # (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc. # (c) Copyright 1993, 1994, 1995 Novell, Inc. # # $Revision: 1.9 $ # @(#)dtmail.dt 1.32 10 Aug 1994 ############################################################################### 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/types and not in this file. # ############################################################################### ################################################################### # # Data Attributes # ################################################################### DATA_ATTRIBUTES DTMAIL_FILE { ACTIONS Open,Compose ICON DtMail MOVE_TO_ACTION MailAppendRm COPY_TO_ACTION MailAppend MIME_TYPE message/rfc822 SUNV3_TYPE mail-message DESCRIPTION This is a folder for the desktop mailer. Its \ data type is named DTMAIL_FILE. DMMAIL_FILE files \ contain the characters \ "CDE-Mail-Application-MailBox-File" or "From". TYPE_LABEL DTMAIL_FILE } DATA_CRITERIA DTMAIL_FILE1 { DATA_ATTRIBUTES_NAME DTMAIL_FILE CONTENT 64 string CDE-Mail-Application-MailBox-File MODE f!x } DATA_CRITERIA DTMAIL_FILE2 { DATA_ATTRIBUTES_NAME DTMAIL_FILE CONTENT 0 string From MODE f&!x } ACTION MailAppend { TYPE COMMAND ARG_COUNT 2 WINDOW_TYPE NO_STDIO EXEC_STRING sh -c ' \ if [ %(File)Arg_2% != %(File)Arg_1% ];\ then \ # check if the source is DTMAIL_FILE ;\ # we only accept DTMAIL_FILE as drag source ;\ IS_DTMAIL=`/usr/dt/bin/dttypes -type %(File)Arg_2%|grep DTMAIL_FILE`;\ if [ -n "\$IS_DTMAIL" ]; then \ ERROR=`cat %(File)Arg_2% >> %(File)Arg_1% \ 2>/tmp/dtmail.\$\$ || cat /tmp/dtmail.\$\$`; \ [ -f /tmp/dtmail.\$\$ ] && /bin/rm -f /tmp/dtmail.\$\$; \ if [ -n "\$ERROR" ]; then \ /usr/dt/bin/dterror.ds \ "\$ERROR" "Information" \ "OK"; \ fi; \ else \ /usr/dt/bin/dterror.ds \ "There are no actions available \\n for this type of file." \ "Information" \ "OK" ; \ fi; \ else \ /usr/dt/bin/dterror.ds \ "There are no actions available \\n for this type of file." \ "Information" \ "OK"; \ fi' } ACTION MailAppendRm { TYPE COMMAND WINDOW_TYPE NO_STDIO EXEC_STRING sh -c '\ TYPE=`/usr/dt/bin/dttypes -type %(File)Arg_2% | \ grep \" is of type \" | sed /".* is of type "/s///`; \ if [ \$TYPE = "DTMAIL_FILE" ]; then \ cat %(File)Arg_2% >> %(File)Arg_1%; \ rm %(File)Arg_2% ; \ else \ /usr/dt/bin/dterror.ds \ "There are no actions available \\n for this type of file." \ "Information" \ "OK" ; \ fi' } ACTION Open { LABEL Open ARG_TYPE DTMAIL_FILE ARG_COUNT * TYPE COMMAND WINDOW_TYPE NO_STDIO EXEC_STRING /usr/dt/bin/dtmail -f %(File)Arg_1% } ACTION Print { LABEL Print ARG_TYPE DTMAIL_FILE TYPE COMMAND WINDOW_TYPE NO_STDIO EXEC_STRING sh -c ' \ /usr/dt/bin/dtmailpr -p -f %(File)Arg_1% | /usr/dt/bin/dtlp' } ACTION Compose { LABEL Compose ARG_TYPE * ARG_COUNT * TYPE COMMAND WINDOW_TYPE NO_STDIO EXEC_STRING /usr/dt/bin/dtmail -a %Args% } ACTION ComposeTextAttach { LABEL ComposeTextAttach ARG_TYPE * ARG_COUNT * TYPE COMMAND WINDOW_TYPE NO_STDIO EXEC_STRING /usr/dt/bin/dtmail -w %Args% } # # Data for dtexternalbody # DATA_ATTRIBUTES DTEXTERNALBODY { ACTIONS Open ICON Dtdata IS_TEXT true NAME_TEMPLATE %s.ext MIME_TYPE message/external-body DESCRIPTION This is a MIME message/external-body file. \ Its data type is named DTEXTERNALBODY. \ DTEXTERNALBODY files have names ending with '.ext'. TYPE_LABEL DTEXTERNALBODY } DATA_CRITERIA DTEXTERNALBODY1 { DATA_ATTRIBUTES_NAME DTEXTERNALBODY MODE f&!x NAME_PATTERN *.ext } ACTION Open { ARG_TYPE DTEXTERNALBODY TYPE COMMAND WINDOW_TYPE NO_STDIO EXEC_STRING /usr/dt/bin/dtexternalbody "Information" \ "Yes" "No" %(File)Arg_1% } ########################### EOF ##############################################