diff options
author | Christian Grothoff <christian@grothoff.org> | 2006-12-18 01:56:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2006-12-18 01:56:21 +0000 |
commit | 6b591a7748d7564c856806dcc59d5ebb4a8e5437 (patch) | |
tree | dee49ecf69180f93b40c8b84d14c8237a3752572 | |
parent | d6539107120b7b6a6425a1b6e43925247bb84879 (diff) | |
download | gnunet-gtk-6b591a7748d7564c856806dcc59d5ebb4a8e5437.tar.gz gnunet-gtk-6b591a7748d7564c856806dcc59d5ebb4a8e5437.zip |
bugfix
-rw-r--r-- | src/plugins/fs/download.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c index 08c8efbd..2a197853 100644 --- a/src/plugins/fs/download.c +++ b/src/plugins/fs/download.c | |||
@@ -417,8 +417,11 @@ void fs_download_aborted(DownloadList * downloadContext) { | |||
417 | */ | 417 | */ |
418 | void fs_download_stopped(DownloadList * list) { | 418 | void fs_download_stopped(DownloadList * list) { |
419 | GtkTreeIter iter; | 419 | GtkTreeIter iter; |
420 | GtkTreeIter piter; | ||
420 | GtkTreePath * path; | 421 | GtkTreePath * path; |
421 | DownloadList * prev; | 422 | DownloadList * prev; |
423 | int valid; | ||
424 | GtkTreeModel * model; | ||
422 | 425 | ||
423 | path = gtk_tree_row_reference_get_path(list->summaryViewRowReference); | 426 | path = gtk_tree_row_reference_get_path(list->summaryViewRowReference); |
424 | if (path == NULL) { | 427 | if (path == NULL) { |
@@ -433,16 +436,36 @@ void fs_download_stopped(DownloadList * list) { | |||
433 | gtk_tree_store_remove(download_summary, | 436 | gtk_tree_store_remove(download_summary, |
434 | &iter); | 437 | &iter); |
435 | } | 438 | } |
439 | FREE(list->filename); | ||
440 | ECRS_freeUri(list->uri); | ||
441 | |||
442 | /* if we have child-results in view, remove them! */ | ||
443 | if (list->searchList != NULL) { | ||
444 | path = gtk_tree_row_reference_get_path(list->searchViewRowReference); | ||
445 | if (path == NULL) { | ||
446 | GE_BREAK(ectx, 0); | ||
447 | } else { | ||
448 | model = GTK_TREE_MODEL(list->searchList->tree); | ||
449 | gtk_tree_model_get_iter(model, | ||
450 | &piter, | ||
451 | path); | ||
452 | gtk_tree_path_free(path); | ||
453 | valid = gtk_tree_model_iter_children(model, | ||
454 | &iter, | ||
455 | &piter); | ||
456 | while (TRUE == valid) | ||
457 | valid = gtk_tree_store_remove(GTK_TREE_STORE(model), | ||
458 | &iter); | ||
459 | } | ||
460 | } | ||
436 | if (list->searchViewRowReference != NULL) { | 461 | if (list->searchViewRowReference != NULL) { |
437 | gtk_tree_row_reference_free(list->searchViewRowReference); | 462 | gtk_tree_row_reference_free(list->searchViewRowReference); |
438 | list->searchViewRowReference = NULL; | 463 | list->searchViewRowReference = NULL; |
439 | } | 464 | } |
440 | FREE(list->filename); | ||
441 | ECRS_freeUri(list->uri); | ||
442 | 465 | ||
443 | if (download_head == list) | 466 | if (download_head == list) { |
444 | download_head = list->next; | 467 | download_head = list->next; |
445 | else { | 468 | } else { |
446 | prev = download_head; | 469 | prev = download_head; |
447 | while ( (prev != NULL) && | 470 | while ( (prev != NULL) && |
448 | (prev->next != list) ) | 471 | (prev->next != list) ) |