I did some testing with the Newest MultiView 68k for the Export Menu Item.
I suspected that we merely have to change the Icon ToolType for EDITPIC.
I set the path for EDITPIC=Sys:Tools/MysticView/MysticView %s
In MultiView function GetOptions I changed the code slightly to look for it.
Of course this is just a test. I will make a new variable "cmdedit" & leave
"cmdexport" the way it was so that Project > Export continues to work.
mvIcon = LoadProgIcon(startup, &mvDirLock, mvIconName);
if (mvIcon)
{
const STRPTR *toolarray = (const STRPTR *)mvIcon->do_ToolTypes;
char *s;
//if (s = (char *)FindToolType(toolarray,"EXPORT"))
if (s = (char *)FindToolType(toolarray,"EDITPIC"))
{
cmdexport = StrDup(s);
D(bug("[MultiView] EXPORT = '%s'\n", cmdexport)
}
}
And guess what? It sent the current filename & opened MysticView!
On AROS x86_64 I set the ToolType as EDITPIC=Sys:Tools/Zunepaint %s.
So now I can simply add a new "Edit File" menu item to the Edit Menu.
Depending on the GroupID of the current datatype it will find the ToolType.
So Edit File will open the file in the editor of your choice.
If you have a text file loaded in MultiView & select Edit File it will look for EDITTXT.
Then it will open the selected text editor maybe Annotate or something similar.
The framework is already in place so why not use it? As an end user all you
must do to use Edit > Edit File in MultiView will be to set EDITPIC ToolType.
So there will be four ToolTypes to set as follows:
EXPORT=? EDITPIC=? EDITSND=? EDITTXT=?
You replace '?' with the path to your selected editor for each class.
If such as in my case you don't have a sound editor & you omit EDITSND
ToolType no worries! If it doesn't find the ToolText is will display a message.
"Editor Not Found!" when you select Edit File if you have a sound file loaded.