Hi all.
Preface
-------
Recently I realized that I completely forgot to integrate project
support into my XSMP support (which would reside in "sm" branch after
some of my patches are committed). Currently my code stores open
files, but it does not remember the project, if any was opened when
Geany terminated.
I was looking through the code to understand how the integration could
be implemented and testing how Geany behaves on opening and closing
projects. I discovered some issues, and there are also some questions
I'd like to ask. After all problems are solved and questions are answered,
I'll prepare some more patches for "sm" branch.
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?
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.
What do you think?
Best regards,
Eugene.