diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-12-27 18:35:13 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-12-27 18:35:13 +0000 |
commit | 97830623478379916c723854e8cbb9473f8acd1f (patch) | |
tree | eb9d1a1a81928a315cbac171ed5dd49aee4a84f2 /src/trg-peers-model.c | |
parent | 42f593e062f1e444339edda7ea4e30f689b303ae (diff) |
filter items (not trackers+dirs for now) show counts next to them. while doing this, I made the stats update loop something that happens only if something changes, which avoids a full iteration over all torrents (even in active only).
Diffstat (limited to 'src/trg-peers-model.c')
-rw-r--r-- | src/trg-peers-model.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/trg-peers-model.c b/src/trg-peers-model.c index 86574fd..17df900 100644 --- a/src/trg-peers-model.c +++ b/src/trg-peers-model.c @@ -64,14 +64,17 @@ gboolean find_existing_peer_item_foreachfunc(GtkTreeModel * model, gpointer data) { struct peerAndIter *pi = (struct peerAndIter *) data; - gchar *ip; + gtk_tree_model_get(model, iter, PEERSCOL_IP, &ip, -1); + if (g_strcmp0(ip, pi->ip) == 0) { pi->iter = *iter; pi->found = TRUE; } + g_free(ip); + return pi->found; } |