#! /usr/dt/bin/dtksh # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # cde720 src/cde/cde1/dtmail/dtexternalbody/dtexternalbody 1.1 # # Licensed Materials - Property of IBM # # Restricted Materials of IBM # # COPYRIGHT International Business Machines Corp. 1995 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # # COMPONENT_NAME: desktop # # FUNCTIONS: none # # ORIGINS: 27 # # # (C) COPYRIGHT International Business Machines Corp. 1995 # All Rights Reserved # Licensed Materials - Property of IBM # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # This is not realy dtexternalbody. The mail type -- message/external-body # is not supported by the current version of dtmail. This script will # pup up a dialog window and ask the user if he would like to view # it as text or quit. # # Usage: dtexternalbody dilog-title-label ok-button-label cancel-button-label file-name # # When the OK button is pressed, calls dtpad to open it and # then lets exit out OpenCB() { XtSetSensitive $CANCEL_BUTTON False XtSetSensitive $OK_BUTTON False XmUpdateDisplay $MYDIALOG /usr/dt/bin/dtpad $TMP_FILE_NAME exit 0 } # When the Cancel button is pressed, lets exit out. CancelCB() { exit 0; } ################## Create the Main UI ################################# XtInitialize TOPLEVEL ps_external PSEXTERN TMP_FILE_NAME=$4 MSGSTRING="Mail type -- message/external-body is not supported. Open as Text?" XmCreateQuestionDialog MYDIALOG $TOPLEVEL mydialog messageString:"$MSGSTRING" XtSetValues $MYDIALOG dialogTitle:"$(print $1)" okLabelString:"$(print $2)" \ cancelLabelString:"$(print $3)" XmMessageBoxGetChild CANCEL_BUTTON $MYDIALOG DIALOG_CANCEL_BUTTON XmMessageBoxGetChild HELP_BUTTON $MYDIALOG DIALOG_HELP_BUTTON XmMessageBoxGetChild OK_BUTTON $MYDIALOG DIALOG_OK_BUTTON XtAddCallback $MYDIALOG okCallback OpenCB XtAddCallback $MYDIALOG cancelCallback CancelCB XtUnmanageChild $HELP_BUTTON XtManageChild $MYDIALOG XtMainLoop