On Tue, 12 Jan 2010 22:19:33 +0300, Eugene wrote:
First, when geany instance is closed, the project is overwritten. Instead of the files which were previously there, there would be no files in the project. Is it a desired behaviour? Is it a desired way to clear a project?
By no means. I consider this a bug. Thanks for pointing this out.
Second, it is not intuitive. From my point of view, "-s" is there to not load the default session. When user tries to open a project and specify "-s", he should wish to open the project's files and not load the default session. Currently opening a project forbids loading the default session, so "-s" is not necessary. But I think the behaviour I described ("-s" is ignored) is more logical than opening a blank document instead of project's files.
I agree to this one. I'd also expect the project files to be opened.
Me too.
Thank you, Dominic and Enrico, for your opinions. I have a little patch to fix this issue (attached).
As an alternative, I have a completely rewritten `load_startup_files' function. I wrote it to understand all the conditions which were in the original implementation. My function is *MUCH* more verbose, but I think it can be easier to understand and modify. I *DID NOT TEST* it, so consider it to be a sketch. Enrico, if you like this implementation, I can test and update it, so it can be safely committed.
Cool!
I need to know which way (the little patch or the rewritten function) is accepted as my future questions may require further modifications of `load_startup_files'.
I do like your rewritten function more as it is more clear and more structured. I didn't test it as well yet but I think we should use it. If you don't have more changes it for now, I'll test and commit it then.Thanks!!
Regards, Enrico