Closed snoopy closed 2 years ago
Having a save-as dialog which has no surprising behaviour (which might lead to accidental overwriting) is difficult, as this opens a custom GUI dialog box i think it's safer to have the default GUI dialog.
I'm happy to include this in the examples directory however.
I don't get this reasoning. Admittedly I did not test every possibility for this but it seems rather fool proof with the dialog asking the user and the default being "no". The default save dialog really doesn't feel nice when you're used to the fancy text interfaces.
Besides I am fairly certain the target audience for an editor made for programmers is smart enough to read and react appropriately to a popup don't you think? ;)
The problem is that there are always edge cases (like file "foo", folder "foo1") which don't work (see previous issues/PRs), and every time i thought there might be no problems, i have later found some. The built-in save dialog works, and it is easy enough to extend Textredux with a custom save-as Textredux/GUI hybrid. I'd rather prefer people extend Textredux than have something that doesn't work for everyone (including me).
edge cases (like file "foo", folder "foo1")
Can you explain a bit? Maybe this can be worked out.
I made some changes so the updated version is no longer used by default. It can be enabled by changing 3 lines. This way the old way is still default but the new way can easily be enabled for testing.
@rgieseke would you be willing to merge it in this state? That way it can be enabled on demand while still keeping the default functionality.
Salvaged from an old PR. Seems to work fine?