What about:
- If no project is loaded, and the previous save-as path is valid, use it instead of the home folder. Otherwise, use the home folder.
If I understood you right, this is what I originally implemented. The project path has precedence over the last save-as path.
- If a project is loaded, don't use the previous save-as path unless it is a subdir of the project folder or the project folder is invalid. If the previous save-as path is also invalid, fallback to the home folder.
I think that this is more behavior than a simple checkbox should allow.
IMO if a user creates and opens a project, he wants to work inside the scope of that project, including its options. In the worst case, the users are already used to how the project path option works. That is why I think we should not change the behavior of something that is already in production for so long (even considering that the user would intentionally check de option). I don't mind fixing the precedence so the last save path is used before anything else, I just think that the behavior should be as simple and assertive as possible. Finally, the option could be a select box (I don't know how you guys call it... drop down box?) and let the user choose the behavior: always the last path: override project project path: project path first, last path second home: user home folder default (current): project, that option to set a default path or where geany is running from (as it is today).