Icon bar file drags


Contents


Introduction

For RISC OS 4 the behaviour of the iconbar device icons was updated to allow files dropped on them to be saed to a specified directory for the device. Usually this would be the root of the device, but is configurable. This avoids the user opening a save box but being unable to drop the file anywhere.


Technical details

File drags from save boxes to icon bar Filer icons will cause the file to be saved in a specified directory of the device, most sensibly the root. The Filer will then open the directory viewer. In combination with the autofronting icon bar in the new window manager, the user will now never face the situation of having a save box open, but nowhere to drag the file to.

For consistency, drags from Filer windows to icon bar icons will cause files to be copied/moved to the directory. As with saves, the Filer will open the directory viewer.

The directory which a file is saved/copied to will be specified by a system variable and will default to the root directory. The system variable will be of the form <FSName>Filer$DefaultPath. For example ADFSFiler$DefaultPath or NetFiler$DefaultPath.

Icon bar save protocol

In order for files to be saved to icon bar device icons, the FS Filers will now be required to receive the WIMP message Message_DataSave. They will reply with Message_DataSaveAck specifying a pathname for the saved file. They will also receive Message_DataLoad on completion of the save and use this as the trigger for opening the Filer window of the directory the file has been saved in.

Icon bar copy protocol

For file copies to work, a different system is necessary. Without modification, when a file is dragged from a Filer viewer to a device icon, the Filer will send a Message_DataLoad to the FS Filer responsible for the device. All the FS filers will be changed to receive this message and then to reply with a new message, Message_FilerDevicePath.


System variables


FSFiler$DefaultPath

Default path for files dropped on the filer icon
Use

The iconbar device filers should use these variables - substituting their own filing system name in the name - to decide where to save files when the user drops a file on their iconbar icon.

Related messages
Message_FilerDevicePath

Wimp messages


Message_FilerDevicePath
(&408)

Request to Filer to copy a file to a location
Message
OffsetContents
R1+20zero-terminated path name to copy to
Source
Icon bar Filer tasks
Destination
Filer
Delivery
Message must be sent directly to task
Message may only be sent normally (reason code 17)
Use

This message is sent by icon bar filer tasks to the Filer in response to a Message_DataLoad to request that it copy the file to a new location.

The path that should be copied to is formed as <DevicePath>.<path>.

Where <DevicePath> is the root directory of the device eg. ADFS::HardDisc4.$, and <path> is the expansion of FSFiler$DefaultPath. If the variable is unset, the root of the device should be used. By default, these system variables will be unset but will be left to more experienced users to set, as needed.

An example may help to clarify. If the user has set ADFSFiler$DefaultPath to be Files.Junk and they drag a file from a Filer viewer to the HardDisc4 icon, then the ADFS Filer should return a Message_FilerDevicePath, with the path name ADFS::HardDisc4.$.Files.Junk and the Filer will copy the file into that directory (if it exists).

The FS Filer will also prompt the Filer to open the directory viewer for the directory who's path it has just specified, using Message_FilerOpenDir.

If the path name consists of no characters and then the terminator, it is assumed that the root directory is read only. FIXME: What does this mean? Does it mean that the variable can be set to an empty string to not perform the save ?

Related system variables
FSFiler$DefaultPath
Related messages
Message_FilerOpenDir

Document information

Maintainer(s):
History:
RevisionDateAuthorChanges
A-H28 Jan 1988RMLInitial version
224 Jan 2022GerphConversion to PRM-in-XML
  • Created from original RISC OS 4 documentation
Related:None
Disclaimer:

© Gerph, 2022.