The jconfirm application is just a wrapper around the j:confirm procedure in the jconfirm.tcl library. It's intended to make it easy to ask the user to confirm an action from shell scripts, windowmanager menus, etc.
This document describes jconfirm version 4.0/4.0.
Copyright and contact information is available in the jstools documentation.
jconfirm [-text text] [-title title] [other options]
Invoking jconfirm brings up a panel displaying text with two buttons marked OK and Cancel. The panel's windowmanager title will be title. If the user clicks OK, jconfirm will exit with zero status (i.e., true, in shellscript terms); if sie clicks Cancel, it will exit with nonzero (false) status.
There are a few other options; see j:confirm in the jconfirm.tcl library for full details. In particular, you can specify the text on the OK and Cancel buttons.
Note, however, j:confirm's -priority option is not available; the confirmation panel created by jconfirm will appear regardless of the user's jstools preferences. (The jstools applications generally use j:confirm to ask the user to confirm actions sie has presumably requested, but I can imagine jconfirm being used in shell scripts to ask questions, and I didn't want to make you remember to add `-priority 100' all the time.)
Both prompt and title are localisable.
if jconfirm -text "Delete your home directory?" \
-yesbutton Yes -nobutton No
then
exec /bin/rm -rf $HOME
else
jalert -text "Oh, where's your sense of adventure?"
fi
Feel free to report bugs (and feature requests) to me,
<js@calumet.org>, and I will try to deal with them. Also, feel free to fix
bugs or add features on your own and let me know how you did it.