Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add per project option to set a custom screenshots path #35

Merged
merged 2 commits into from Oct 12, 2020

Conversation

DamnWidget
Copy link
Contributor

Hi @SolarLune

This PR adds a per-project option to setup a custom screenshot output directory (if set). It also includes a fallback so in case that the directory does not exists it uses the application path directory as usual.

Regards

@SolarLune
Copy link
Owner

Hello! Thanks for the PR submission - this is an interesting feature.

The ProgramSettings variable is for global program settings, not for per-project settings. That should be stored in with the rest of the project information when saving the project (in Project.Save()).

I'm also not sure about the use of a ValidatePath() function that only is used once in the codebase - that could be done in the place where you're using it.

@DamnWidget
Copy link
Contributor Author

I am not sure why but in my mind programSettings made a really good "per project" settings, will fix it as soon as I have a gap, will also inline the validation.

@DamnWidget
Copy link
Contributor Author

Moved the setting to the project configuration and added a line to persist it on the project .plan file, also inlined the validation into main.go and removed the Validation function from common.go

Let me know if you want any more changes

@SolarLune
Copy link
Owner

OK, this looks good now. Thanks for the assistance!

@SolarLune SolarLune merged commit 8608011 into SolarLune:master Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants