Most importantly IMO, add a prefix (C "namespace") to functions from that lib. Let's not do the same mistake as Geany there.
2 additional things that could be nice: 1. install header files so it can be used by 3rd parties as well 2. build some developer documentation (I kind of hate Doxygen for its total lack of automated main page, but we could use that nonetheless like Geany does) You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/631
-- Commit Summary --
* Only automatically enable the utils library if a plugin uses it * Fix building the utils library on Windows * utils: Put public functions in the "gp" namespace * utils: Small code style cleanup * utils: Add C++ guards
-- File Changes --
M Makefile.am (3) M build/utils.m4 (39) M build/workbench.m4 (1) M configure.ac (3) M utils/src/Makefile.am (2) M utils/src/filelist.c (17) M utils/src/filelist.h (12) M workbench/src/wb_project.c (2)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/631.patch https://github.com/geany/geany-plugins/pull/631.diff
But your namespace starts with `g`, you know Gnome/GTK claims ALL `g` namespaces ;-P
Overall looks good to me. Not tested.
- install header files so it can be used by 3rd parties as well
I was going to do that, but then I thought that no 3rd party plugin is going to depend on all of Geany-Plugins just to get some helper functions. In any case, it's super easy to install the header(s), as you know.
install header files so it can be used by 3rd parties as well
Don't plugin writers count as third parties? Or is it required that plugin devs (at least C/C++ ones) must install a git version of Geany?
build some developer documentation (I kind of hate Doxygen for its total lack of automated main page, but we could use that nonetheless like Geany does)
I assume the _"Geany Plugin API Documentation"_ is part of Geany and not of Geany Plugins, right? So we need to start a completely new main page/doxygen structure?
Currently I don't think we should offer this outside the g-p project. There are a bunch of plugins not even known to me having their own little helper functions. We might could think about migrating some of the functions later to Geany's plugin interface
Merged #631.
github-comments@lists.geany.org