[Geany-devel] Multiple instances of Geany issues

Dimitar Zhekov hamster at xxxxx
Fri May 21 10:06:36 UTC 2010


On Fri, 21 May 2010 16:53:56 +1000
Lex Trotman <elextr at gmail.com> wrote:

> On 21 May 2010 15:13, Eugene Arshinov <earshinov at gmail.com> wrote:
> 
> > But now there is a suggestion from Dimitar to also support changing
> > preferences in secondary instances.  The last solution I wrote in "the
> > large thread" is to change automatic saving when closing.  It should
> > save only things that are not related to Preferences dialog (window
> > position, opened files if needed etc.), and only in the main instance,
> > of course.  Changed preferences are saved immediately after applying
> > changes user made in the Preferences dialog, either in a main instance
> > or a secondary instance.
> >

The way it can be implemented in detail (since I fubmled with the
respective files in the last few days):

save_dialog_prefs(GKeyFile *config) becomes global 
configuration_save_dialog_prefs(void).

on_prefs_button_clicked() invokes configuration_save_dialog_prefs()
instead of configuration_save().

configuration_save() does not invoke save_dialog_prefs().

quit_app() checks cl_options.new_instance to see if
configuration_save() should be called.

There are no other calls of configuration_save(), so that should
suffice.

> >
> Have to think carefully about which things are in which category, maybe it
> could be ok, and could be applied to the project files as well.  Reload
> would be good as well so that settings can be transferred between instances.

If this is applied to the projects, it would be something like:

1. Project -> Properties always saves the project dialog properties,
but not the file list.

Of course, as Lex wrote out, it'll have to check if the project file
was modified, and ask to save / save as / throw away (apply without
saving?) the changes.

2. Closing a project or quitting Geany saves only the file list, and
only if that's a main instance.

I rarely open a project 2+ times, so RFC how useful would that be?

-- 
E-gards: Jimmy



More information about the Devel mailing list