Angus Leeming wrote: > Georg Baum wrote: > >> >> I think this is a clean solution. However, I don't like the way how >> the file overwriting prevention works: >> >> - The "cancel" button is mislabelled: It does not cancel the export, >> but does not copy the file. Any idea for a better name? >> - There should be a fourth button that really cancels the export. > > Because so many different files are 'exorted' but the dialog assumes > that only the buffer lyx file in appropriate format is important? I
In terms of overwriting, the dialog assumes that no file at all is important ;-( > think that the dialog should have a browser listing all the files > that will be overwritten... Good idea, but this list can be large. > Why not keep the buttons but prevent export on Cancel? Too difficult > with the current design? Not at all, just moving some lines of code. Of course this makes it impossible to export the document if you don't want to overwrite a file, but I think this is rarely needed. I am going to do that. >> Apart from that, we need to check before overwriting files at other >> places, too, and I don't see at the moment how this should be done. > > Clearly the checking code should be encapsulated as a CheckExport > class or such. The problem is that the converter may generate immediate files that the exporter does not know of, but I now have an idea how that could be handled: If the converter acts on a copies of the converted files in the temp dir, then the exporter can do all the checking. Georg