Found OpenExternally.cpp in Misc. The problem is it uses Qt signals on watched files to know when to update (ie that the application you used with openwith has written something) and uses QProcess startDetached so that the appliction just opened can work in parallel with Sigil allowing full use of the Sigil gui simultaneously.
Since the new process starts in a detached state, no process are done queries or status calls are easily available. We would have to create a new thread to watch a copy of the file being operated on in its new temp location and then write that file back into the correct place where Sigil wants it.
Thus having openwith work directly on the files inside Sigil is much easier/simpler than having to create an additional thread. So the proposed change is not easy unless we create a new watched file pool and figure out how to translate changes in the new temp location to changes in the corresponding internal Sigil file.
It would probably be easier to replace IrFanView with a script that launches IrFanView on the true Sigil location and then cleans up after itself after IrFanView completes.
I still need to check if remove unused images and/or the reports can be used to detect the unwanted files and remove them. Altenatively, a "Remove Unmanifested Files" tool might be generally more useful.
|