home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 3
/
CDPDIII.bin
/
fish
/
871-880
/
ff871
/
trashicon
/
trashicon.doc
< prev
next >
Wrap
Text File
|
1993-05-12
|
7KB
|
150 lines
TrashIcon V1.4 © Mark McPherson, 13-May-93
--------------------------------------------
TrashIcon - A Workbench 2.04+ application icon to delete files.
DESCRIPTION
The workbench has a standard trashcan, but unfortunately, each disk
must have its own, and it cannot be 'Left Out'. TrashIcon basically
puts an icon at a (possibly user-defined) position on the workbench
screen, and deletes all files that are dragged onto it.
OPTIONS
The icon used for the appicon is just the program's icon, which can
of course be changed, if the user wants (which is quite likely - I'm
a Software Engineer, not an artist!)
The default options are taken from the icon's tooltypes. These are as
follows:
FORCE - If set then this sets the behaviour when a file is protected
from deletion. If set to NO, then if a file is protected,
it is not deleted. If set to YES then the protect file is
deleted. If set to ASK then a requester is brought up asking
the user to choose whether they want to override the protection
on that file.
RECURSIVE - If set, then if a directory is dragged to the icon,
it, and all its contents are deleted. If not set,
then a directory will only be deleted if it is empty.
CONFIRM - If set, then a requestor will pop up asking the user to
confirm the action of deleting files. It will display
the number of files and directories in a manner similar
to that of the workbench menu item 'Delete...'
FORMAT - If set, then is the path and filename of the SYSTEM
format program. If not supplied then looks for
SYS:System/Format.
XPOS=xxx - If set, then this is the x-coordinate that the appicon
will be set at when placed on the workbench screen. If
there is something else already there, or it is off the
boundaries of the screen, then it will be placed by
Workbench.
YPOS=xxx - Same as XPOS=xxx, but for the y-coordinate.
If the icon is double clicked on, then an options window will appear.
This gives the user the ability to overide the default flags in the
tooltypes. It also contains an 'About' requester. Please look at this -
after all, I did take the effort to put it there! To quit the program,
just click on the 'Quit' gadget.
FEATURES
Confirm
If this option is set then when the user drags one or more files/dirs to
the TrashIcon, an initial confirm requestor is brought up. This has three
options - OK, CONFIRM EACH, or CANCEL. OK will go ahead and delete
all the objects requested. CANCEL will cancel the operation, and CONFIRM
EACH will bring up a further requestor for each individual file. This
requestor has four options - YES, ALL, CANCEL, and NO. YES will delete
that file, and go on to the next. ALL will delete the rest of the files
originally specified, CANCEL will abort the operation from this point, and
NO will just skip that file and go on to the next.
Format
When a disk icon is dragged on to the TrashIcon, a format requestor is
used. If the user selects YES, then that disk is formatted with the same
name and DosType as the disk originally was. If the user wants more control
over the format, then they should use the format option from the workbench
menu!
FILES
TrashIcon - the program
TrashIcon.info - The program's icon file, including example tooltypes.
TrashIcon.Doc - This documentation file
Format - This program should be present for the format disk
facility to work.
HISTORY
V0.1 - Internal release. Inital program. No Options window.
V0.5 - Internal release. Added options window.
V0.6 - Public release. Handles XPOS,YPOS positioning.
V1.0 - Internal release. Added purge option for completely deleting a file.
V1.1 - Internal release. Made purge option even more secure! + bug fix.
V1.2 - Public release. Added extra confirmation handling, and the format disk
option. Removed purge option due to it being found to be unreliable.
I will add this again if I find a good way of implementing it.
V1.3 - Semi-public release. Changed code significantly, fixed bugs.
V1.4 - Public release. Removed ALL enforcer hits and fixed a bug introduced
with V1.3.
TESTING
This version has been tested under V37.175, V39.106 and V40.003, on both
accelerated and unaccelerated machines. It worked as expected on all of
these, though I have yet to test it on an '040 machine (anybody want to 'lend'
me one? ;-). For some reason, when deleting files from the RAM disk on an
A3000, the window is not always updated. I have no idea as to why, and it
only seems to happen on A3000's. It works fine on my A2000 with or without
acceleration, and on the A4000/030.
Several people mentioned that the program had enforcer hits. These have now
GONE... I hope nobody finds anymore!
THANKS
Thanks go to Matt Jennings for testing, ideas, and allowing me to use his
A3000. Thanks also to all those who Emailed me with ideas as to how to
improve the program, and to tell me they like it!
AUTHOR
I am currently a student at the University of Kent at Canterbury,
where I am studying for a degree in Computer Science. This is my second
public release of one of my programs. The other being MmDir which
made multiple, nested, directories in one go. I have no current
projects planned or on the go as I have to study for my degree - BUT, look out
for something big after the Summer!!!
I can be contacted on the Internet and JANET at "msm@ukc.ac.uk". If you can,
please send me some E-Mail to say you use this program, along with comments
on what else is necessary. I got a fairly good response from previous
releases, but still keep telling me you use my program, and what you want
from it.
For others without access to E-Mail, I can be reached at:
54 Wrestwood Road
Bexhill-On-Sea
East Sussex
TN40 2LL
England
It MAY take a couple of weeks for letters to reach me as I am currently at
University, not at home!
DISTRIBUTION
All code is copyright (C) 1993 Mark McPherson. It is freely
distributable and can be copied so long as no charge is made. It
may not be modified, sold or included in any commercial distribution
without my written permission. I also ask that this documentation
file accompanies the main program. The author takes no responsibility
for any loss or damage that may arise from using this program.