Allow user to specify location for ColorSchemes folder (and only create it if needed)
This PR is responsible for creating a WinMerge subfolder in the user's documents folder, as well as a ColorSchemes subfolder within it.
It will be better to allow the user to specify the location of the ColorSchemes folder, and only create it if it is actually needed. Doing so will prevent clutter in the user's documents folder.
The file filters are also created in the user’s Documents folder, so if we make the location configurable, we may need to allow specifying the parent folder instead. Also, as far as I know, the WinMerge\ColorSchemes folder in the user’s Documents folder is not created automatically. Are you sure it is actually created? I couldn’t reproduce this behavior.
The file filters are also created in the user’s Documents folder, so if we make the location configurable, we may need to allow specifying the parent folder instead.
That's a great idea. And the UI to allow the user to specify that folder can include 2 radio buttons:
- Use the WinMerge executable's folder
- Specify a custom path
Also, as far as I know, the WinMerge\ColorSchemes folder in the user’s Documents folder is not created automatically. Are you sure it is actually created? I couldn’t reproduce this behavior.
I just checked, and was surprised by the result. I deleted the folder again, and WinMerge didn't re-create it. So now, I must wonder what action was re-creating it before?
I tried changing a WinMerge setting to see if that would trigger it, but it did not. I also tried exporting settings, but that didn't trigger it either.
There is one big difference in my WinMerge configuration now: I use a custom dark colour scheme that I hard-coded into the WinMerge .ini settings file. Thus, in the WinMerge settings UI, the Dark mode scheme dropdown shows no value (I can still click the dropdown to see valid options). I wonder if that tweak is somehow confusing WinMerge, and thus the ColorScheme is no longer created (which is actually what I want). On the other hand, you mentioned that you aren't experiencing this issue, and it's unlikely you've made a similar tweak.
I'll definitely keep an eye on things to see if that folder gets re-created (and its parent WinMerge folder, of course).