Kaydet (Commit) 3b25dca4 authored tarafından Nick Treleaven's avatar Nick Treleaven

Remove symbol tree 'skipped' code, instead sort parents first when

adding tree iters. This should fix missing symbols sometimes.
Use TMTag instead of GeanySymbol so the symbol tree can read the
scope without parsing it (fixes problems with '.' characters in tag
names for e.g. HTML).
Free tag list straight after use, instead of next time the list is
generated.
Use TMTag pointer tree model column instead of line number.
Fix not allowing a leading underscore when using scope name prefix.
Remember parent tree iter for a tag if it is used for a child tag's
scope, rather than just for tags of a certain type. This should be
more flexible for various filetypes.
Various symbol-tree code refactoring.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/symbol-tree@3166 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 2fc2107c
2008-11-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* treeviews.c, treeviews.h, symbols.c:
Remove symbol tree 'skipped' code, instead sort parents first when
adding tree iters. This should fix missing symbols sometimes.
Use TMTag instead of GeanySymbol so the symbol tree can read the
scope without parsing it (fixes problems with '.' characters in tag
names for e.g. HTML).
Free tag list straight after use, instead of next time the list is
generated.
Use TMTag pointer tree model column instead of line number.
Fix not allowing a leading underscore when using scope name prefix.
Remember parent tree iter for a tag if it is used for a child tag's
scope, rather than just for tags of a certain type. This should be
more flexible for various filetypes.
Various symbol-tree code refactoring.
2008-10-02 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* Create symbol-tree branch.
......
This diff is collapsed.
......@@ -188,7 +188,7 @@ void treeviews_update_tag_list(GeanyDocument *doc, gboolean update)
if (doc->priv->tag_tree == NULL)
{
doc->priv->tag_store = gtk_tree_store_new(
SYMBOLS_N_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT);
SYMBOLS_N_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER);
doc->priv->tag_tree = gtk_tree_view_new();
prepare_taglist(doc->priv->tag_tree, doc->priv->tag_store);
gtk_widget_show(doc->priv->tag_tree);
......@@ -637,7 +637,13 @@ static gboolean on_taglist_tree_selection_changed(GtkTreeSelection *selection)
if (gtk_tree_selection_get_selected(selection, &model, &iter))
{
gtk_tree_model_get(model, &iter, SYMBOLS_COLUMN_LINE, &line, -1);
const TMTag *tag;
gtk_tree_model_get(model, &iter, SYMBOLS_COLUMN_TAG, &tag, -1);
if (!tag)
return FALSE;
line = tag->atts.entry.line;
if (line > 0)
{
GeanyDocument *doc = document_get_current();
......
......@@ -41,7 +41,7 @@ enum
{
SYMBOLS_COLUMN_ICON,
SYMBOLS_COLUMN_NAME,
SYMBOLS_COLUMN_LINE,
SYMBOLS_COLUMN_TAG,
SYMBOLS_N_COLUMNS
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment