SF.net SVN: geany:[4416] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue Nov 10 18:37:23 UTC 2009
Revision: 4416
http://geany.svn.sourceforge.net/geany/?rev=4416&view=rev
Author: ntrel
Date: 2009-11-10 18:37:23 +0000 (Tue, 10 Nov 2009)
Log Message:
-----------
Fix invalid tree iter access when using tv_iters.tag_other but not
using tv_iters.tag_variable.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/symbols.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-11-10 17:49:24 UTC (rev 4415)
+++ trunk/ChangeLog 2009-11-10 18:37:23 UTC (rev 4416)
@@ -2,6 +2,9 @@
* tagmanager/perl.c:
Fix Geany segfault with constant tags (#2895168).
+ * src/symbols.c:
+ Fix invalid tree iter access when using tv_iters.tag_other but not
+ using tv_iters.tag_variable.
2009-11-09 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/symbols.c
===================================================================
--- trunk/src/symbols.c 2009-11-10 17:49:24 UTC (rev 4415)
+++ trunk/src/symbols.c 2009-11-10 18:37:23 UTC (rev 4416)
@@ -657,7 +657,7 @@
&(tv_iters.tag_function), _("Functions"), "classviewer-method",
&(tv_iters.tag_macro), _("Labels"), NULL,
&(tv_iters.tag_type), _("Constants"), NULL,
- &(tv_iters.tag_other), _("Other"), NULL,
+ &(tv_iters.tag_other), _("Other"), "classviewer-other",
NULL);
break;
}
@@ -1061,6 +1061,21 @@
}
+static GdkPixbuf *get_child_icon(GtkTreeStore *tree_store, GtkTreeIter *parent)
+{
+ GdkPixbuf *icon = NULL;
+
+ if (parent == &tv_iters.tag_other)
+ {
+ return get_tag_icon("classviewer-var");
+ }
+ /* copy parent icon */
+ gtk_tree_model_get(GTK_TREE_MODEL(tree_store), parent,
+ SYMBOLS_COLUMN_ICON, &icon, -1);
+ return icon;
+}
+
+
static void add_tree_tag(GeanyDocument *doc, const TMTag *tag, GHashTable *parent_hash)
{
filetype_id ft_id = FILETYPE_ID(doc->file_type);
@@ -1074,15 +1089,12 @@
const gchar *name;
const gchar *parent_name = get_parent_name(tag, ft_id);
GtkTreeIter iter;
- GtkTreeIter *icon_iter = NULL, *child = NULL;
- GdkPixbuf *icon = NULL;
+ GtkTreeIter *child = NULL;
+ GdkPixbuf *icon = NULL;
- child = &iter;
- icon_iter = (parent != &tv_iters.tag_other) ? parent : &tv_iters.tag_variable;
+ child = &iter;
+ icon = get_child_icon(tree_store, parent);
- gtk_tree_model_get(GTK_TREE_MODEL(tree_store), icon_iter,
- SYMBOLS_COLUMN_ICON, &icon, -1);
-
if (parent_name)
{
GtkTreeIter *parent_search =
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list