Le 17/03/2013 14:30, Nick Treleaven a écrit :
Branch: refs/heads/master Author: Nick Treleaven nick.treleaven@btinternet.com Committer: Nick Treleaven nick.treleaven@btinternet.com Date: Sun, 17 Mar 2013 13:30:59 UTC Commit: 7150c63f224e7fdcd74870dee13a659c4472553b https://github.com/geany/geany/commit/7150c63f224e7fdcd74870dee13a659c447255...
Log Message:
Add Find Usage popup menu items for symbol list tags (#3608278)
[...]
+static void on_find_usage(GtkWidget *widget, gboolean in_session) +{
- GtkTreeIter iter;
- GtkTreeSelection *selection;
- GtkTreeModel *model;
- GeanyDocument *doc;
- const TMTag *tag = NULL;
- doc = document_get_current();
- if (!doc)
return;
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(doc->priv->tag_tree));
- if (gtk_tree_selection_get_selected(selection, &model, &iter))
gtk_tree_model_get(model, &iter, SYMBOLS_COLUMN_TAG, &tag, -1);
When retrieving the TMTag from the tree model, it gets a reference (since it's inserted as a GBoxed type with ref/unref as copy/free funcs), so you need to unref it.
I fixed this with a few other reffing issues.
Cheers, Colomban
On 17/03/2013 16:45, Colomban Wendling wrote:
gtk_tree_model_get(model, &iter, SYMBOLS_COLUMN_TAG, &tag, -1);
When retrieving the TMTag from the tree model, it gets a reference (since it's inserted as a GBoxed type with ref/unref as copy/free funcs), so you need to unref it.
I fixed this with a few other reffing issues.
Oops, thanks.