Revision: 1461 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1461&view=re... Author: colombanw Date: 2010-06-14 19:57:15 +0000 (Mon, 14 Jun 2010)
Log Message: ----------- GeanyGenDoc: Make use of Geany API 185
Use Geany's symbols_get_context_separator() and not a copied version since it is now exported to the plugin API.
Modified Paths: -------------- trunk/geany-plugins/geanygendoc/ChangeLog trunk/geany-plugins/geanygendoc/src/ggd-tag-utils.c
Modified: trunk/geany-plugins/geanygendoc/ChangeLog =================================================================== --- trunk/geany-plugins/geanygendoc/ChangeLog 2010-06-14 19:56:49 UTC (rev 1460) +++ trunk/geany-plugins/geanygendoc/ChangeLog 2010-06-14 19:57:15 UTC (rev 1461) @@ -4,6 +4,9 @@ Post-release version bump. * src/ggd.c: Update a string. + * src/ggd-tag-utils.c: + Use Geany's symbols_get_context_separator() and not a copied version since + it is now exported to the plugin API since 185.
2010-06-12 Colomban Wendling <ban(at)herbesfolles(dot)org>
Modified: trunk/geany-plugins/geanygendoc/src/ggd-tag-utils.c =================================================================== --- trunk/geany-plugins/geanygendoc/src/ggd-tag-utils.c 2010-06-14 19:56:49 UTC (rev 1460) +++ trunk/geany-plugins/geanygendoc/src/ggd-tag-utils.c 2010-06-14 19:57:15 UTC (rev 1461) @@ -28,29 +28,6 @@ #include "ggd-plugin.h" /* to access Geany data/funcs */
-/* symbols_get_context_separator() borrowed from Geany since it isn't in the - * plugin API yet (API v183) */ -/* FIXME: replace calls to this function with Geany's - * symbols_get_context_separator() when it gets into the plugin API */ -static const gchar * -ggd_tag_utils_get_context_separator (filetype_id geany_ft) -{ - switch (geany_ft) { - case GEANY_FILETYPES_C: /* for C++ .h headers or C structs */ - case GEANY_FILETYPES_CPP: - case GEANY_FILETYPES_GLSL: /* for structs */ - return "::"; - - /* avoid confusion with other possible separators in group/section name */ - case GEANY_FILETYPES_CONF: - case GEANY_FILETYPES_REST: - return ":::"; - - default: - return "."; - } -} - /* * tag_cmp_by_line: * @a: A #TMTag @@ -243,7 +220,7 @@
/* scope is of the form a<sep>b<sep>c */ parent_name = child->atts.entry.scope; - separator = ggd_tag_utils_get_context_separator (geany_ft); + separator = symbols_get_context_separator (geany_ft); separator_len = strlen (separator); while ((tmp = strstr (parent_name, separator)) != NULL) { parent_name = &tmp[separator_len]; @@ -471,7 +448,7 @@ if (! *a /* we're at the end of the prefix and it matched */) { const gchar *separator;
- separator = ggd_tag_utils_get_context_separator (geany_ft); + separator = symbols_get_context_separator (geany_ft); if (maxdepth < 0) { if (! *b || strncmp (b, separator, strlen (separator)) == 0) { matches = TRUE; @@ -531,7 +508,7 @@
/*if (parent->atts.entry.scope) { fake_scope = g_strconcat (parent->atts.entry.scope, - ggd_tag_utils_get_context_separator (geany_ft), + symbols_get_context_separator (geany_ft), parent->name, NULL); } else { fake_scope = g_strdup (parent->name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org