Wouldn't it be easier to just remove the close button? ex. file transfer, click the cancel button to close. imo, the reason to minimize to tray is to free tray space. If the tray was only icons there would be more room, rendering this feature pointless. Thus returning the close icon to its previous state of actually quiting the app.