FSViewer.app
Copyright (c) 1998 George Clernon <clernong@tinet.ie>


Description
===========
FSViewer is a NeXT FileViewer lookalike for Window Maker. Viewing is currently 
supported via browser mode. It has been written in C using the WINGs library.  


Features
========
The one feature that this app has is browser mode. All other features need
to be implemented.


Requirements
============
o Window Maker v0.51.0. If you use an older version of Window Maker I know
FSViewer is broken, mail me if you want to find out how to fix it!
o libProplist. If you have installed Window Maker, you should have it.
o GCC.


Platforms
=========
Version 0.0.2 has been successfully compiled on Redhat 5.1 for Intel, 
Solaris 2.6 and i386 Debian (slink/2.1pre). Version 0.1.0 has been compiled
on Rehat 5.1 for Intel and with a bit of messing I succeed in getting it to 
compile on Solaris 2.6 (FSDisk in FSUtils.c may cause a little trouble).


Installation
============
gunzip and untar FSViewer.app-0.1.1.tar.gz
[prompt]$> tar zxvf FSViewer.app-0.1.1.tar.gz 
or
[prompt]$> gunzip FSViewer.app-0.1.1.tar.gz
[prompt]$> tar -xvf FSViewer.app-0.1.1.tar
then
[prompt]$> cd FSViewer.app-0.1.1.
[prompt]$> ./configure
[prompt]$> make
if the make goes ok su to root and
[prompt]$> make install
or 
[prompt]$> make install-strip
return to normal user mode and
[prompt]$> cp ./FSViewer ~/GNUstep/Defaults/.

The icons are copied to /usr/local/share/FSViewer.app/icons.
The executable fsviewer is installed in /usr/local/bin.

If you can't su to root, then use --prefix=/a/dir/you/can/write/to in the 
args to ./configure. For example:

[prompt]$> ./configure --prefix=/home/users/clernong/local
[prompt]$> make
[prompt]$> make install
or 
[prompt]$> make install-strip
[prompt]$> cp ./FSViewer ~/GNUstep/Defaults/.

fsviewer is now in /home/users/clernong/local/bin
The icons are now in /home/users/clernong/local/share/FSViewer.app/icons.

It may be useful if the icon directory is added to the Window
Maker Icon paths. WPrefs.app can be used todo this.


Documentation
=============
There is only this README. Once everything has been installed, start
fsviewer. You should be able to traverse the directory tree. The interface is
split in to 3 sections. The shelf is an area to place frequently accessed 
directories or files. The scrollview section depicts the current selected
path and the browser columns lists the directory contents of the current 
selected path. Icons/Actions/Events can be set in the Inspector Panel.

Key Bindings
------------
a:      Add an the currently selected dir/file to the shelf.
i:      Open/Update the Inspector Window.
e:      Execute (if applicable) the currently selected file.
w:      Open the currently selected file in its default editor.
r:      Open the currently selected file in its default viewer.
s:      Toggle the sort order of the display.
d:      Toggle the display of dot files.
n:      Open a new FileView window.
c:      Start an xterm at the current working directory.
f:      Popups an input panel, enter the filter to screen the files
	on display. For example "g*" will filter out anything that doesn't
	begin with a 'g'.
Ctrl-c: Copy the currently selected dir/file.
Ctrl-x: Cut the currently selected dir/file.
Ctrl-v: Paste the internal clipboard (i.e. the contents after a ^c or ^x) into
        the currently selected dir/file.
Ctrl-l: Link the currently selected dir/file.
Ctrl-r: Rename the currently selected dir/file.
Ctrl-q: Quit the application.

Mouse Clicks
------------
Clicking on an entry in a browser column will update the scroll view with the
new selection and if the selection is a directory, it will fill the next 
column. It will then scroll the browser/scrollview accordingly.

Double clicking on an entry in the scrollview will execute it if it is 
executable or launch the associated editor. Ctrl-w can be pressed to edit it.

Ctrl-MouseClick over an icon in the shelf will remove it from the shelf.

Inspector
---------
The inspector contains 6 different panels:

	1) Attributes
	2) Icon
	3) Viewer
	4) Editor
	5) Executable
	6) File Extensions

1) The attributes panel displays the file permissions, the last changed date,
file size, owner and group. The link section is not working.

2) The icon panel allows an icon to be selected for the current extension. If 
the file does not have an extension it will be associated with the full
filename. The paths used are read from the Window Maker defaults domain. To add
paths either edit the Window Maker defaults file or use WPrefs.app. 
Click 'OK' to set the new icon. 
 
3) The viewer panel allows for the selection of the default viewer to be 
associated with the file extension. The list all the executables registered 
with FSViewer.

4) The editor is the same as (3). This becomes useful when a file requires a
separate editor e.g. HTML files.

5) The executable panel allows a command to be associated with the file. 
This panel is only accessible when the file is executable. Three shortcuts 
have been provided. %p for the current path, %f for the current filename and 
%s for the filename to be passed as an arg to the program. For example if 
/usr/bin/xemacs was selected:

	%p = /usr/bin/
	%f = xemacs

And a possible command could be:
	%p%f %s
which translates to
	/usr/bin/xemacs %s

Any file that has xemacs as it's default viewer/editor will use this command
where %s is replaced with the full path and filename.

6) The file extension panel provides a method for associating file extensions
with an app. An extension MUST start with a '.'. If a new extn is entered it's
icon may be set from this panel.

Currently there is no quick way to enter the exe's/extn's/icons etc. One 
way to start would be to scan through the various bin dirs and enter the
associated exe's. Then scan through your home dir and add the various file
extensions.

File Operations
---------------
Copy: 	To copy a file/directory, select it in the file browser and type
	^c. The selected file is placed in an internal clipboard. Browse to
	the destination and type ^v to finish the operation. If a folder is 
      	selected the whole directory is copied.

Move: 	To move a file/directory, select it in the file browser and type
	^x. The selected file is placed in an internal clipboard. Browse to
	the destination and type ^v to finish the operation. If a folder is 
	selected the whole directory is moved.

Rename: To rename a file/directory, select it in the file browser and type
	^r. You will be prompted to enter the new name.

Link: 	To link a file/directory, select it in the file browser and type
	^l. You will be prompted to enter the new name for the link. A sym
	link is created.

Delete: To delete a file/directory, select it in the file browser and select
	the delete option from the Edit menu. You will be asked if you are
	sure you want to delete it. The files are NOT moved to a temporary
	directory or recycle bin for safe keeping. They are deleted.

New File/Directory: To create a new file or directory, select the parent
	directory in the file browser and then select the appropriate menu 
	option from the File menu. You will be prompted to name the file.

Magic Files
-----------
I've added rudimentary magic file support i.e. the app will try to 
figure out what type the file is if it is unknown. It will then do something
based on the file type. There are 3 cases:
	1) If it is ascii, xedit is started.
	2) If it is an image, xv is started.
	3) If it is a ps file, ghostview is started.

To change these settings, edit the defaults file in ~/GNUstep/Defaults.


TODO
====
There are many things to do. The following is a condensed version of the TODO
list from my scratch pad.

o Revert in the Inspector Panel (partially supported).
o DND.
o Recycler Support.
o Implement a locate/find dialog.
o Use the userdefault functions provided by WINGs.
o Improve the feel of the app.
o Add a panel to allow for 'quick' registering of apps.
o Change cursor during busy periods.
o Add in support for file completion for navigating the columns.
o Support for double and triple extensions e.g. .tar.gz.
o Provide an interface to PGP to allow for file encryption via FSViewer.
o Implement other viewing modes.
o Implement a preferences dialog.


Copyright
=========
FSViewer is copyrighted by George Clernon 1998/1999 and is licensed through the
GNU General Public License. Read the COPYING file for the complete license.

The Panel code, libProplist code, filebrowser and lots more are based on
WPrefs.app and the WINGs library which is Copyright (c) 1998 Alfredo K. Kojima
<kojima@windowmaker.org> and licensed through the GNU General Public License.

A lot of the X related code and general structure is based on code copyrighted
by Redback Development Pty Ltd licensed through the GNU General Public License.

The file operation and magic files code is based on and taken from Files-2.4f 
licensed through the GNU General Public License.

The regexp library included in the distribution for use with the magicfiles
code is copyrighted by University of Toronto. See the README in src/regexp
for more details on the licensing agreement.

The timestampWidget code is available from the widget bazaar at 
http://rive.boxybutgood.com. Author is Charles Gamble 
<gambcl@cogamble.demon.co.uk> and the original code is by Michael J. Mitchell 
<mitch@gw2.redback.com.au>.

The original artwork created for FSViewer.app cannot be redistributed without
the FSViewer.app distribution. The artwork includes the folders, my-computer 
icon and the FSViewer.app icon. Many thanks to Marco van Hylckama Vlieg 
<fatal@global.uibk.ac.at> for providing FSViewer.app with the original artwork.


Contact
=======
Send comments and bug reports to clernong@tinet.ie
