aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/fs/download.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/fs/download.c')
-rw-r--r--src/plugins/fs/download.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c
index 0b3954d8..f627dfb1 100644
--- a/src/plugins/fs/download.c
+++ b/src/plugins/fs/download.c
@@ -497,10 +497,11 @@ void fs_download_start() {
497} 497}
498 498
499 499
500
501void fs_download_stop() { 500void fs_download_stop() {
502 GtkTreeIter iter; 501 GtkTreeIter iter;
503 struct ECRS_URI * u; 502 struct ECRS_URI * u;
503 struct ECRS_MetaData * m;
504 DownloadList * pos;
504 505
505 /* free URIs in summary model */ 506 /* free URIs in summary model */
506 if (! gtk_tree_model_get_iter_first(GTK_TREE_MODEL(summary), 507 if (! gtk_tree_model_get_iter_first(GTK_TREE_MODEL(summary),
@@ -517,10 +518,36 @@ void fs_download_stop() {
517 -1); 518 -1);
518 if (u != NULL) 519 if (u != NULL)
519 ECRS_freeUri(u); 520 ECRS_freeUri(u);
520 /* FIXME:
521 also free DOWNLOAD_TREEPATH! */
522 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary), 521 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
523 &iter)); 522 &iter));
523 while (head != NULL) {
524 pos = head->next;
525 ECRS_freeUri(head->uri);
526 FREE(head->filename);
527 gtk_tree_row_reference_free(head->rr);
528 if (gtk_tree_model_get_iter_first(head->model,
529 &iter)) {
530 do {
531 gtk_tree_model_get(head->model,
532 &iter,
533 SEARCH_URI, &u,
534 SEARCH_META, &m,
535 -1);
536 gtk_tree_store_set(GTK_TREE_STORE(head->model),
537 &iter,
538 SEARCH_URI, NULL,
539 SEARCH_META, NULL,
540 -1);
541 if (u != NULL)
542 ECRS_freeUri(u);
543 if (m != NULL)
544 ECRS_freeMetaData(m);
545 } while (gtk_tree_model_iter_next(head->model,
546 &iter));
547 }
548 FREE(head);
549 head = pos;
550 }
524} 551}
525 552
526 553