[Geany-devel] project-before-save signal

Dimitar Zhekov dimitar.zhekov at xxxxx
Thu Feb 23 18:29:37 UTC 2012


I want to request a $subject, executed unconditionally on project
save after config is loaded but before the actual save (similar to
"configuration-save"). It'll serve the following purposes:

1. Let a plugin undo any temporary project / file setting changes it
possibly did, before the save takes place.

2. Allow saving project settings which are not part of the project
dialog. The current signal, "project-save", is executed only on
Project Dialog -> OK / Apply, but not when a project is closed, and
consequently not on Geany quit.

3. Allow saving plugin project settings on project close (and Geany
quit) to an empty file, for example project-<x11-session-id>.geany -
same problem as #2.

The code is attached, courtesy of Jiří Techet, and works fine.


Now, #2 and #3 may be solved by making "project-save" unconditional,
but that will break compatibility. #1 can be done by g_key_file_get/
set with the config argument of "project-save", provided it's
unconditional, but I'd prefer to use a documented plugin interface
instead of opening the bag of tricks.

E-gards: Jimmy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-project-before-save-signal.patch
Type: text/x-diff
Size: 2916 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20120223/6d2a3415/attachment.patch>

More information about the Devel mailing list