[Geany-devel] Multiple instances of Geany issues

Eugene Arshinov earshinov at xxxxx
Mon Jun 14 04:46:42 UTC 2010

On Sat, 5 Jun 2010 12:10:01 +0300%
Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:

> Hi,
> > - Limit Project -> Properties to saving the preferences only, and
> > limit project_close() to saving the file list only.
> Here it is, combined with the other save-* patches. BTW, when creating
> a new project, it's immediately saved, both the settings and the file
> list. So to avoid function cloning, and since it's unclear what save
> behaviour will be approved, I decided to declare an enum save {dialog,
> non-dialog, all} and use such argument for configuration_save() and
> project's write_config().

I ported this patch to SM branch and will commit it soon, after I'm
confident enough that I didn't break anything.

Here are some changes I made to your original patch:

* Renamed your GeanySaveSettingsType enum to GeanySettingsTypes and
  converted simple constants in it to flags, which is more natural.

* AFAIK in Geany doc-comments (/**) are used only for symbols exported
  for plugins.  I modified the comment before GeanySettingsTypes

* Created a separate GeanyProjectSettingsTypes for
  project.c:write_config(): with my implementation of recent file lists
  I have additional _RECENT_FILES and _RECENT_PROJECTS flags in
  GeanySettingsTypes, which are not applicable to

In case it's interesting for someone, I attach the combined patch,
modified to apply cleanly to SM.  It also includes the patch from Lex
to add locking and my changes to recent files handling (probably the
latter takes the largest part of the patch).

> What remains:
> Decide on "Save settings?" prompts, or make it an option - see below.
> Decide whether to merge the recent files in geany.conf in real time,
> or have separate geany.conf and per-project recent file lists (since
> we have per-project open file lists).
> On Thu, 3 Jun 2010 16:38:57 +1000
> Lex Trotman <elextr at gmail.com> wrote:
> > Something like "This is a secondary instance of Geany, saving your
> > settings will overwrite the settings from your main instance,
> > Save/Cancel".  They should still be applied locally of course,
> > otherwise why allow the prefs dialog at all.
> The more I think about that, the less I like it. Not only will be such
> a prompt irritating, especially for Apply, but how many times before
> the user chooses the wrong button and overrides the settings, or
> loses them after exiting geany?
> Why not make it an option, default=on for compatibility, disabled for
> the secondary instances (since they depend on it). Personally I'll
> just leave it on and be done, while you will probably turn it off.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: applied.diff
Type: text/x-patch
Size: 35318 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100614/9f72ba85/attachment.bin>

More information about the Devel mailing list