summaryrefslogtreecommitdiff
path: root/src/trg-torrent-model.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-16 07:22:52 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-16 07:22:52 +0000
commit1d03f2cb43dfafbf42b6beb1f7d0335a9448afbd (patch)
treea9c36d8ec783aca3be5d71c3d1c9b28e9ecc0ab4 /src/trg-torrent-model.c
parent56f42405eb79a21a068414913ea705a5c7ea0d18 (diff)
issue 104
Diffstat (limited to 'src/trg-torrent-model.c')
-rw-r--r--src/trg-torrent-model.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/trg-torrent-model.c b/src/trg-torrent-model.c
index a40f2b0..39aa65d 100644
--- a/src/trg-torrent-model.c
+++ b/src/trg-torrent-model.c
@@ -220,6 +220,13 @@ trg_torrent_model_stats_scan_foreachfunc(GtkTreeModel * model,
return FALSE;
}
+void trg_torrent_model_remove_all(TrgTorrentModel *model)
+{
+ TrgTorrentModelPrivate *priv = TRG_TORRENT_MODEL_GET_PRIVATE(model);
+ g_hash_table_remove_all(priv->ht);
+ gtk_list_store_clear(GTK_LIST_STORE(model));
+}
+
static void
update_torrent_iter(TrgTorrentModel * model, gint64 rpcv, gint64 serial,
GtkTreeIter * iter, JsonObject * t,