On Wed, 24 Feb 2010 12:04:20 +0300 Eugene Arshinov earshinov@gmail.com wrote:
When several instances of Geany quit in the same time, there is a high possibility of a conflict. [...]
I can see two solutions for this problem. [...]
On Wed, 24 Feb 2010 22:02:55 +1100 Lex Trotman elextr@gmail.com wrote:
You see, I'm forgetful, if I had more than one Geany running (and I can see good reasons to do that) then I may forget which one is the "master" and change a preference in a different instance, so what happens to the conf file?
Perhaps a third solution is possible.
On Save Yourself:
1. Temporarily clear Project Based Session Files. 2. Save the configuration as smclientid.conf instead of geany.conf. 3. Don't save the project - all it's settings are saved when the project is configmed, and the .conf file will take care of the filelist.
On startup, with an smclientid argument present:
1. Temporarily clear Project Based Session Files. 2. Load the configuration from smclientid.conf instead of geany.conf. 3. Don't load anything else. That should happen more or less automatically, once you don't load geany.conf.
The smclientid.conf file may be removed after loading, or with the XSM DiscardCommand.
As far as I can tell, that will avoid any conf/project races, save the file list and all per-file Geany options (Read Only, Wrap, ...) no matter if they are part of a project or not, and even save the main options per-instance. Plus, it doesn't seem very hard to write, at least to me.
-- E-gards: Jimmy