<br><br><div class="gmail_quote">On 21 May 2010 20:06, Dimitar Zhekov <span dir="ltr"><<a href="mailto:hamster@mbox.contact.bg">hamster@mbox.contact.bg</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, 21 May 2010 16:53:56 +1000<br>
<div class="im">Lex Trotman <<a href="mailto:elextr@gmail.com">elextr@gmail.com</a>> wrote:<br>
<br>
</div><div class="im">> On 21 May 2010 15:13, Eugene Arshinov <<a href="mailto:earshinov@gmail.com">earshinov@gmail.com</a>> wrote:<br>
><br>
</div><div class="im">> > But now there is a suggestion from Dimitar to also support changing<br>
> > preferences in secondary instances.  The last solution I wrote in "the<br>
> > large thread" is to change automatic saving when closing.  It should<br>
> > save only things that are not related to Preferences dialog (window<br>
> > position, opened files if needed etc.), and only in the main instance,<br>
> > of course.  Changed preferences are saved immediately after applying<br>
> > changes user made in the Preferences dialog, either in a main instance<br>
> > or a secondary instance.<br>
> ><br>
<br>
</div>The way it can be implemented in detail (since I fubmled with the<br>
respective files in the last few days):<br>
<br>
save_dialog_prefs(GKeyFile *config) becomes global<br>
configuration_save_dialog_prefs(void).<br>
<br>
on_prefs_button_clicked() invokes configuration_save_dialog_prefs()<br>
instead of configuration_save().<br>
<br></blockquote><div><br>Yeah, save_dialog_prefs would need the parts of configuration_save() that opens and closes the file of course :-)<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

configuration_save() does not invoke save_dialog_prefs().<br>
<br>
quit_app() checks cl_options.new_instance to see if<br>
configuration_save() should be called.<br>
<br>
There are no other calls of configuration_save(), so that should<br>
suffice.<br>
<div class="im"><br></div></blockquote><div><br>Yes.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
> ><br>
> Have to think carefully about which things are in which category, maybe it<br>
> could be ok, and could be applied to the project files as well.  Reload<br>
> would be good as well so that settings can be transferred between instances.<br>
<br>
</div>If this is applied to the projects, it would be something like:<br>
<br>
1. Project -> Properties always saves the project dialog properties,<br>
but not the file list.<br>
<br>
Of course, as Lex wrote out, it'll have to check if the project file<br>
was modified, and ask to save / save as / throw away (apply without<br>
saving?) the changes.<br>
<br></blockquote><div><br>I'm afraid I didn't think this through enough, any change to a setting will update the project file and get it a new timestamp so you would be getting the message all the time.<br><br>I guess that if we allow multiple openings of the same project (and I can't see how we can prevent it) then when a setting is changed it will change the project file.  Its probably not really a problem, it was the race when multiple instances closed that was the problem.  <br>
<br>ATM the project saves the session files in the project each time a setting is changed, that would need fixing.<br><br>As I said post 0.19 a reload dialog could be nice so instances could be resynced.<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

2. Closing a project or quitting Geany saves only the file list, and<br>
only if that's a main instance.<br></blockquote><div><br>Yes this will remove the race for the project file on closing multiple instances.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
I rarely open a project 2+ times, so RFC how useful would that be?<br>
<font color="#888888"><br></font></blockquote><div>Well as I said its to get two windows on two screens both with the same configuration, its not about the session files in the project but the other config eg build.<br><br>
Also I've just discovered that if I close a new_instance with files open when the main instance has a project open, on closing the project, the main instance's session matches the session files that were open in the new_instance.<br>
<br>Clearly the main instance is re-reading the conf file and getting the session files written by the new_instance.  Saving session files only in the main instance will fix this too.<br><br>Cheers<br>Lex<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888">
--<br>
E-gards: Jimmy<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Geany-devel mailing list<br>
<a href="mailto:Geany-devel@uvena.de">Geany-devel@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel</a><br>
</div></div></blockquote></div><br>