[Github-comments] [geany] License Templates (#749)

elextr notifications at xxxxx
Wed Nov 11 03:12:03 UTC 2015


@DevynCJohnson the big red message below "all checks have failed" is a giveaway :)

As @codebrainz said, just adding the template to the directory won't do anything, the associated menu items need to be created.

The template area of Geany has grown rather than being designed, so maybe its confusing.  Let me summarise.

There are two sorts of [templates](http://www.geany.org/manual/current/index.html#templates), those that paste into comments using `Menu->Edit->Insert Comments` and those that are a template for creating new files (usually called file templates).

The comment templates include a couple of licenses and are "hard coded" because they need menu entries to be added inside `Menu->Edit->Insert Comments` to copy and manipulate the appropriate template file in `data/templates`.  Just adding files to `data/templates` will not do anything unless the menu items are added.  The user can customise the template file in their config, but cannot add new ones.  This is not very extendible, and as @codebrainz said would be better if it picked up files and added them to the menu automagically like file templates below (pull requests are welcome).

The file templates are used to create new files and show in the `Menu->File->New (with template)` list, and in this case the elements in the list are the files in `data/templates/files`.  Adding new files will automatically show up in the list (Geany restart may be needed). The user can customise the template file in their user config and can add new ones.  The filetype and extension of the newly created file is taken from the extension of the template file.

So it doesn't make adding new licenses easy the way it works at the moment.  Which is why the list is so limited.  The best solution is to make the `Insert Comment` list extensible and allow those to be included in the file templates, just needs "somebody" to do it.

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/749#issuecomment-155648768
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151110/efd9943a/attachment.html>


More information about the Github-comments mailing list