Hi,
I am assuming that you are talking about file templates.
On 19 February 2010 06:58, Tony Rick tonyr@hevanet.com wrote:
Hi. I'm Tony Rick, and I hit the wrong list for requesting the 'help' response the first time.
I'm in Portland Oregon, where a lot of programmers like me are 'at liberty' and looking for things to do. I'm currently helping teach a Beginning C Programming class at a local computer hardware recycling non-profit organization, FreeGeek. (Maybe you've heard of it, http://www.freegeek.org if not). The class is using Geany v0.14 on Debian Lenny, which will update to 0.17 with a backports repository enabled. One of the questions that came up in class was about the GPL license in the header being a visual irritant. I explained briefly about editing templates,
Hope you mentioned about not removing them from existing code :-)
but having them updated requires a Geany restart in that version. I scanned the mailing list archives and features list and template management issues have been raised before.
AFAIK the directories are only scanned & the menu created at startup, so thats why restart is needed. Because its only needed if you add or remove a template, not when editing an existing one, no one has been irritated enough to do anything about it :-)
One of the features requests (2925273, from arquebus), requested a templates file selection item in the Tools menu. I thought I might start there. I haven't figured out yet what the criteria are for deciding what should be psrt of the core and what should be a plugin. I also discovered that custom templates do not appear automatically when saved. The Documentation indicates that this requires a Geany restart also, but the 'Reload Configuration' tool does indeed add them. I'm not sure whether this is a bug (templates and related menus should be updated when files are modified, like configuration files), or a serendipitous feature that simply 'came along with' Reload Configuration, or should be mentioned in the Templates section of the documentation (which it currently does not, IIRC).
I suggest that the simplest start point would be to add a re-scan menu item to the templates menu itself. It would just need to destroy and re-create the menu. As I said its not needed very often so the effort for automatic update probably isn't worth it.
My original thought was to use GIO and monitor the templates directory for changes, but I saw several posts about problems with GIO and detecting remote file changes and the use of the GIO compiler conditional, and so assumed that the Reload Configuration method had been chosen as an interrim solution, and that GIO file change detection was on hold until the remote file issue had been resolved.
- tony
Cheers Lex
Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel