home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 2
/
FFMCD02.bin
/
new
/
amigalibdisks
/
disk946
/
trashicon
/
trashicon.doc
< prev
next >
Wrap
Text File
|
1993-12-21
|
14KB
|
323 lines
TrashIcon V2.2 © 1993 Mark McPherson
=======================================
Overview
========
TrashIcon is a program which places an icon on the WorkBench, and will
delete any files dragged to that icon by the user - ie it uses the WB2
feature of AppIcons. Because of this it will only work under WB2.04 and
above.
The standard trashcan in use on the Amiga has several difficulties. It
can only delete files on the disk containing the trashcan, and also doesn't
delete files immediately. TrashIcon overcomes these difficulties.
TrashIcon is highly configurable and gives the user great flexibility
over what is deleted. It will, unlike some other similar programs, keep
the WorkBench in step with what you are deleting. You can also format disks
either quickly or fully.
Distribution
============
All code is Copyright © 1993 Mark McPherson. It may be copied and
distributed so long as no commercial profit is made out of it. it may not
be modified, sold, or included in any commercial distribution without my
written permission. Public Domain vendors are not allowed to sell this
program for more than the price of a regular disk, which should be no
more than the equivalent of 5 Dollars. The author takes no responsibility
for any loss or damage resulting from the use of this program.
This distribution should contain the following files:
TrashIcon
TrashIcon.info
TrashIcon.doc
TrashIcon.doc.info
though they may of course be archived with a program such as LhA.
Installation
============
TrashIcon works best when started from the WBStartup drawer of your
boot disk. It can also be started simply by double clicking on the
TrashIcon program icon. It should not be started from the CLI.
To automatically run, simply copy the program and its icon to the
WBStartup drawer. Otherwise just copy them to where you want the program
to reside. Make sure that the program and its icon stay together else
TrashIcon will most likely fail to work. You can copy the documentation
to anywhere you like, or simply deleted if you never want to use it again.
Usage
=====
TrashIcon has many different features available making it flexible
and configurable to how you want to use it.
The icon that is placed on the WorkBench is simple the program icon,
and may be changed if you don't like the icon supplied. All of the
program options are set by the icon's ToolTypes, but can be changed and
set completely from within the program. The position of this icon can be
set on the WorkBench if you want.
The main use of TrashIcon is obviously to delete files. This is done
by dragging an icon (or selection of icons) of the objects to delete, to
the icon on the WorkBench. If you drag a disk icon to TrashIcon, then
you will be given the option of formatting that disk. You can choose, if
the confirm option is set, to delete some or all of the files you have
dragged. If you drag a drawer, you can choose to delete both the drawer
and all its contents or only delete it if it is empty. Some files may be
protected from deletion and you can choose whether you want to delete
these automatically, not delete them, or be asked whether you want to
delete them.
By double clicking on the TrashIcon icon, you will bring up an options
window where you can change the current settings of the program. You can
also make these changes permanent or simply temporary, or even forget them.
Repeatedly double clicking on the icon will close and reopen this window.
Note that while this window is open you can still drag icons to be deleted
to the TrashIcon on the WorkBench, or even drag them into the window itself.
It is this feature which is one of the major differences between this version
of TrashIcon and earlier versions, or other similar programs.
Options
=======
TrashIcon has many different options, all of which may be changed from
its options window. Each option is detailed below.
The window itself is controlled by clicking on the buttons marked:
QUIT - this will cause TrashIcon to finish all deletion of files
and then close the window, remove the icon, and quit.
ABOUT - this will bring up an "about" requestor with details about
the version of the program etc.
USE - this will close the options window, retaining any changes
to the current options that you have set.
SAVE - this will cause the current options to be saved, so that the
next time TrashIcon is run, those will be the default options.
It also saves the current position of the options window. This
is all done by setting the ToolTypes of the program icon. You
should never have to set these manually, except to add those
such as DONOTWAIT which are used by the WorkBench and
not TrashIcon. Clicking on this button will also close the
options window.
CANCEL - this will close the options window and revert to the original
settings before the window was opened.
Icon X Position - this is the horizontal coordinate on the WorkBench
of TrashIcon's icon. If something else occupies
this position then the WorkBench will decide where
to put the icon.
Icon Y Position - same as above, but for the vertical coordinate.
Icon text - this is the text that appears below the icon on
the WorkBench. It defaults to the program name,
but can be changed to anything else, including
a blank name.
Open Window - if this is set, then when the program is started,
the options window will open immediately.
Ignore Protection - this is set to what should happen if you try to
delete a file that is protected from deletion.
if set to ASK, then you will be given the option
of deleting the file. If set to YES, then such
files will always be deleted. If set to NO, then
such files will never be deleted.
Recursive Delete - if this is set, then when you drag a drawer to
TrashIcon, both it and its contents will be
deleted. If not, then the drawer will only
be deleted if it is empty.
Confirm Deletion - if this is set, then before any deletion takes
place, you will be given the choice of either
continuing (OK) in which case the deletion will
take place as normal, stopping (CANCEL) and not
deleting anything, or CONFIRM EACH where you
will be asked before deleting every file. If
CONFIRM EACH is selected, then for every file you
will be asked if you want to delete that file and
continuing (YES), deleting that file and every one
after it without any more prompting (ALL), not
deleting that file and continuing (NO), or stopping
at that point (NONE).
Technical Notes
===============
To delete a particular file, TrashIcon goes through the following steps:
- it will first check if the file has an icon.
- if so then it will delete the file and its icon.
- if it is a drawer, and WorkBench has its window open, then TrashIcon will
first delete the icon in order to get WorkBench to close the window. It
will then try to delete the drawer. If it still can't delete the drawer,
then it will put the icon back.
- if the file has no icon or if it is an icon with no associated file then
it will delete this.
- if the object is a drawer icon but there is no associated drawer, then
TrashIcon will open its options window. This isn't a bug in TrashIcon,
but an unfortunate side-effect of the way WorkBench tells TrashIcon what
to de