I had a crazy idea that i don't think any other Icon Exchange App does!
Because IconClone holds both the srcedobj (source disk object) & destdobj (destination disk object) in memory we can do something cool.
if(reverse == TRUE)
{
reverse = FALSE; //reverse was true
srcedobj = destdobj; //switch disk objects, source is old destination
destfile = RemoveFileExtension(destname);
destdobj = GetDiskObject(destfile); //current destination icon
Exchange_Icon(destdobj, srcedobj, destname, deltasize, win);
}
else
{
reverse = TRUE; //reverse was false
Exchange_Icon(destdobj, srcedobj, destname, deltasize, win);
}
If you aren't satisfied after you have made the icon exchange and you would like to "Undo" simply double-click the Exchange Button and the Old Icon Reappears - magically.
The Exchange Button becomes a "Toggle" and you can change back and forth as much as you want. I got the idea by looking at the double arrow on the Exchange Button [ <-> ].
So with that in mind I thought "Shouldn't the exchange go in both directions according to the button?" So I changed a few things and tried it. And I was surprised that it worked.
This works great with AROS One x86 v1.6 to toggle the icon exchange. Remember to double-click the Exchange Button to Reverse the Icon Images. Have fun!
Each time Wanderer takes about one second to regenerate and refresh the icons in the window so be a little patient after pressing the Exchange Button.