summaryrefslogtreecommitdiff
path: root/src/trg-torrent-tree-view.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-12 10:54:29 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-12 10:54:29 +0000
commit42eddac0e9f0216175fef223fd9b1023ed502a6e (patch)
tree7fd853c8fdabc678bc1df0f4eb5160420347ac8e /src/trg-torrent-tree-view.c
parentf4a194f08d0c48641f5394cd07be61931a432241 (diff)
some quite significant changes to only receive/update recently-active torrents, if enabled. also use a hash table and tree row references for lookup. hopefully performance will be much better for people with large number of torrents.
Diffstat (limited to 'src/trg-torrent-tree-view.c')
-rw-r--r--src/trg-torrent-tree-view.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/trg-torrent-tree-view.c b/src/trg-torrent-tree-view.c
index 196a74d..5c22fd4 100644
--- a/src/trg-torrent-tree-view.c
+++ b/src/trg-torrent-tree-view.c
@@ -65,7 +65,6 @@ static void trg_torrent_tree_view_init(TrgTorrentTreeView * tv)
TORRENT_COLUMN_ADDED, -1);
gtk_tree_view_set_search_column(GTK_TREE_VIEW(tv),
TORRENT_COLUMN_NAME);
-
}
gint get_first_selected(trg_client * client, TrgTorrentTreeView * view,
@@ -76,7 +75,6 @@ gint get_first_selected(trg_client * client, TrgTorrentTreeView * view,
GList *selectionList;
GList *firstNode;
gint64 id = -1;
- gint64 updateSerial = -1;
model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
@@ -87,14 +85,8 @@ gint get_first_selected(trg_client * client, TrgTorrentTreeView * view,
if (gtk_tree_model_get_iter
(model, iter, (GtkTreePath *) firstNode->data)) {
gtk_tree_model_get(model, iter, TORRENT_COLUMN_JSON, json,
- TORRENT_COLUMN_ID, &id,
- TORRENT_COLUMN_UPDATESERIAL, &updateSerial,
- -1);
-
- /* This is about to be removed and won't have valid JSON pointed
- * to by the model. */
- if (updateSerial < client->updateSerial)
- id = -1;
+ TORRENT_COLUMN_ID, &id, -1);
+
}
}