Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sat, 08 Nov 2014 19:09:09 UTC Commit: b6c068f56b65d16670836127e1524c4c960b923f https://github.com/geany/geany-plugins/commit/b6c068f56b65d16670836127e1524c...
Log Message: ----------- geanygendoc: Update to the latest Geany tagmanager API
Modified Paths: -------------- geanygendoc/src/ggd-plugin.c geanygendoc/src/ggd-tag-utils.c geanygendoc/src/ggd.c
Modified: geanygendoc/src/ggd-plugin.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -50,7 +50,7 @@ GeanyData *geany_data; GeanyFunctions *geany_functions;
/* TODO check minimum requierment */ -PLUGIN_VERSION_CHECK (188) +PLUGIN_VERSION_CHECK (221)
PLUGIN_SET_TRANSLATABLE_INFO ( LOCALEDIR, GETTEXT_PACKAGE, @@ -114,7 +114,7 @@ ggd_plugin_get_doctype (filetype_id id) /* FIXME: tm_source_file_buffer_update() is not found in symbols table */ /* (tries to) refresh the tag list to the file's current state */ static void -refresh_tag_list (TMWorkObject *tm_wo, +refresh_tag_list (TMSourceFile *tm_wo, ScintillaObject *sci, GeanyDocument *doc) {
Modified: geanygendoc/src/ggd-tag-utils.c 22 lines changed, 11 insertions(+), 11 deletions(-) =================================================================== @@ -59,9 +59,9 @@ tag_cmp_by_line (gconstpointer a, if (t1->type & tm_tag_file_t || t2->type & tm_tag_file_t) { rv = 0; } else { - if (t1->atts.entry.line > t2->atts.entry.line) { + if (t1->line > t2->line) { rv = +direction; - } else if (t1->atts.entry.line < t2->atts.entry.line) { + } else if (t1->line < t2->line) { rv = -direction; } else { rv = 0; @@ -159,8 +159,8 @@ ggd_tag_find_from_line (const GPtrArray *tags,
GGD_PTR_ARRAY_FOR (tags, i, el) { if (! (el->type & tm_tag_file_t)) { - if (el->atts.entry.line <= line && - (! tag || el->atts.entry.line > tag->atts.entry.line)) { + if (el->line <= line && + (! tag || el->line > tag->line)) { tag = el; } } @@ -211,7 +211,7 @@ ggd_tag_find_parent (const GPtrArray *tags, g_return_val_if_fail (tags != NULL, NULL); g_return_val_if_fail (child != NULL, NULL);
- if (! child->atts.entry.scope) { + if (! child->scope) { /* tag has no parent, we're done */ } else { gchar *parent_scope = NULL; @@ -223,17 +223,17 @@ ggd_tag_find_parent (const GPtrArray *tags, gsize separator_len;
/* scope is of the form a<sep>b<sep>c */ - parent_name = child->atts.entry.scope; + parent_name = child->scope; separator = symbols_get_context_separator (geany_ft); separator_len = strlen (separator); while ((tmp = strstr (parent_name, separator)) != NULL) { parent_name = &tmp[separator_len]; } /* if parent have scope */ - if (parent_name != child->atts.entry.scope) { + if (parent_name != child->scope) { /* the parent scope is the "dirname" of the child's scope */ - parent_scope = g_strndup (child->atts.entry.scope, - parent_name - child->atts.entry.scope - + parent_scope = g_strndup (child->scope, + parent_name - child->scope - separator_len); } /*g_debug ("%s: parent_name = %s", G_STRFUNC, parent_name); @@ -241,8 +241,8 @@ ggd_tag_find_parent (const GPtrArray *tags, GGD_PTR_ARRAY_FOR (tags, i, el) { if (! (el->type & tm_tag_file_t) && (utils_str_equal (el->name, parent_name) && - utils_str_equal (el->atts.entry.scope, parent_scope) && - el->atts.entry.line <= child->atts.entry.line)) { + utils_str_equal (el->scope, parent_scope) && + el->line <= child->line)) { tag = el; } }
Modified: geanygendoc/src/ggd.c 14 lines changed, 7 insertions(+), 7 deletions(-) =================================================================== @@ -162,10 +162,10 @@ get_env_for_tag (GgdFileType *ft, ctpl_environ_push_string (env, "cursor", GGD_CURSOR_IDENTIFIER); ctpl_environ_push_string (env, "symbol", tag->name); /* get argument list it it exists */ - if (tag->atts.entry.arglist) { + if (tag->arglist) { CtplValue *v;
- v = get_arg_list_from_string (ft, tag->atts.entry.arglist); + v = get_arg_list_from_string (ft, tag->arglist); if (v) { ctpl_environ_push (env, "argument_list", v); ctpl_value_free (v); @@ -173,9 +173,9 @@ get_env_for_tag (GgdFileType *ft, } /* get return type -- no matter if the return concept is pointless for that * particular tag, it's up to the rule to use it when it makes sense */ - returns = ! (tag->atts.entry.var_type != NULL && + returns = ! (tag->var_type != NULL && /* C-style none return type hack */ - strcmp ("void", tag->atts.entry.var_type) == 0); + strcmp ("void", tag->var_type) == 0); ctpl_environ_push_int (env, "returns", returns); /* get direct children tags */ children = ggd_tag_find_children (tag_array, tag, @@ -344,13 +344,13 @@ do_insert_comment (GeanyDocument *doc,
switch (setting->position) { case GGD_POS_AFTER: - pos = sci_get_line_end_position (sci, tag->atts.entry.line - 1); + pos = sci_get_line_end_position (sci, tag->line - 1); break;
case GGD_POS_BEFORE: { gint line;
- line = tag->atts.entry.line - 1; + line = tag->line - 1; line = adjust_start_line (sci, tag_array, tag, line); pos = sci_get_position_from_line (sci, line); if (GGD_OPT_indent) { @@ -487,7 +487,7 @@ insert_multiple_comments (GeanyDocument *doc, msgwin_status_add (_("No setting applies to symbol "%s" of type "%s" " "at line %lu."), tag->name, ggd_tag_get_type_name (tag), - tag->atts.entry.line); + tag->line); } } sci_end_undo_action (sci);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org