123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- #! /usr/dt/bin/dtksh
- #####################################################################
- ### File: dthelpgen.dtsh
- ###
- ### Default Location: /usr/dt/bin/dthelpgen.dtsh
- ###
- ### Purpose: Display a 'working' dialog for dthelpgen.
- ###
- ### Description: This shell script provides a graphical interface
- ### to notify the user that the help browser is
- ### being (re)generated.
- ###
- ### Invoked by: The the dthelpgen application.
- ###
- ### Product: @(#)Common Desktop Environment 1.0
- ###
- ### Note: Please do not modify this file.
- ### Later product updates will overwrite this file.
- ###
- ### Revision: $XConsortium: dthelpgen.dtsh /main/3 1995/11/07 13:13:18 rswiston $
- ###
- ### Defect(s):
- ###
- #####################################################################
- set -u
- ##################################################################
- ### Internal Globals
- ###
- ### Actually, most variables in this script are global.
- ###
- ### Most are defined in the Initialize() routine.
- ###
- ##################################################################
- COMMAND_NAME=dthelpgen
- #
- # Exit/Return codes
- #
- SUCCESS=0
- USAGE_EXIT=2
- NO_INIT_FILE_ERR=5
- failure_flag=$SUCCESS
- ##################################################################
- ### Initialize()
- ###
- ### Initialize the tile, msg and cat id.
- ###
- ##################################################################
- Initialize()
- {
- CAT_MESG_TITLE=""
- CAT_MESG_MSG=""
- catopen CAT_ID $COMMAND_NAME
- }
- ##################################################################
- ### Exit()
- ###
- ### All exits should go through this routine.
- ###
- ##################################################################
- Exit() {
- exit $1
- }
- ################## GUI Callbacks ####################
- #
- # This is the callback for the 'OK' button. It will exit the program
- #
- OkButton()
- {
- XtUnmanageChild $_DT_WORKING_DIALOG_HANDLE
-
- XSync $DISPLAY True
- Exit 0
- }
- #
- # This is the callback if the timer goes off
- #
- # TimerCB()
- # {
- #
- # CAT_MESG_MSG=${CAT_MESG_MSG}"."
- # XtSetValues $_DT_WORKING_DIALOG_HANDLE \
- # messageString:"${CAT_MESG_MSG}"
- #
- # XtAppAddTimeOut TIMER_ID $TIMER_CONTEXT $TIMER_TIME "TimerCB" ""
- #
- # }
- ##################################################################
- ### Main()
- ###
- ### Display a 'working' dialog for dthelpgen.
- ###
- ##################################################################
- Initialize
- if [[ -r /usr/dt/lib/dtksh/DtFuncs.dtsh ]]
- then
- . /usr/dt/lib/dtksh/DtFuncs.dtsh
- else
- echo Sorry--cannot find initialization file.
- Exit $NO_INIT_FILE_ERR
- fi
- XtInitialize TOPLEVEL dthelpgenDialog Dthelpgen ""
- XtDisplay DISPLAY $TOPLEVEL
- catgets CAT_MESG_TITLE $CAT_ID 2 6 "${COMMAND_NAME}"
- catgets CAT_MESG_MSG $CAT_ID 2 7 \
- "Generating browser information. Please wait."
- DtkshDisplayWorkingDialog "${CAT_MESG_TITLE}" \
- "${CAT_MESG_MSG}" \
- "OkButton" "" "" \
- DIALOG_PRIMARY_APPLICATION_MODAL
- XtManageChild $_DT_WORKING_DIALOG_HANDLE
- # XtWidgetToApplicationContext TIMER_CONTEXT $_DT_WORKING_DIALOG_HANDLE
- # XtGetMultiClickTime TIMER_TIME $DISPLAY
- # XtAppAddTimeOut TIMER_ID $TIMER_CONTEXT $TIMER_TIME "TimerCB" ""
- XtMainLoop
- #
- # Never reached.
- #
- ##################### eof ##############################
|