Don't show warning message if config file is found
Synfig version & platform: Synfig master branch
Issue description:
When you run the synfig binary to render, it shows a warning on startup.
synfig(13472) [19:19:06] warning: Cannot open ./synfig_modules.cfg
synfig(13472) [19:19:06] warning: Cannot open C:\msys64\home\user/.local/share/synfig/synfig_modules.cfg
but this warning is incorrect because the synfig_modules.cfg file still can be found in the ../etc/ folder.
So we need to display warning only if synfig_modules.cfg file is not found in any known locations.
Known locations is:
.(Current directory)../etc(relative fromsynfigbinary location directory)%USER_PROFILE%/.local/share/(for Windows)INSTALL_PREFIX(for example /usr/local/...) for Linux
If file is found when we need to show message with location where it is found. For example:
Using settings from `c:\synfig\etc\synfig_modules.cfg`
If file is not found then display message like this:
The configuration file `synfig_modules.cfg` was not found. Searched in the following directories (<list of directories>)
I would like to work on this , Please assign it to me.
Please can you review for any comments or merge the PR
@warlockz yes, it doesn't build :( You can check CI status in your PR (https://github.com/synfig/synfig/pull/1716)
I think if you are interesting in this issue (https://github.com/synfig/synfig/issues/1661) maybe pass this issue to @tamerharsh? So that everyone could participate.
@tamerharsh we also have issue here ^___^
Since there is no answer here by @warlockz, so @tamerharsh you can work on this issue if you want.
@ice0 Hey, it looks like this is being caused by main.cpp line 176. Removing that line should fix the extra warnings. As it looks like this issue is inactive, can I make a PR for this one? Do I need to modify the other warning at line 360? Thanks :)
@AnshitaVishwa can you post with link to code, please? Anyway, you can a PR.
@ice0 I have made a PR. Is it okay? thanks!
Yes. Already merged. Thank you!