On Mon, 11 Jan 2010 21:31:01 +0100% Enrico Tröger enrico.troeger@uvena.de wrote:
On Sun, 10 Jan 2010 19:59:15 +0100, Dominic wrote:
Am Sonntag, den 10.01.2010, 18:38 +0300 schrieb Eugene Arshinov:
Hi all.
<...>
Question #1
`load_startup_files' function within main.c (formatting is wrong):
/* when we want a new instance, we still load project session files unless -s was passed */ if (!cl_options.load_session || (!load_project_from_cl && cl_options.new_instance)) return;
Specifying "-s" while opening a projects causes Geany to open a blank document.
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.
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'.
Best regards, Eugene.