diff options
Diffstat (limited to 'src/fs/gnunet-fs-gtk-event_handler.c')
-rw-r--r-- | src/fs/gnunet-fs-gtk-event_handler.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fs/gnunet-fs-gtk-event_handler.c b/src/fs/gnunet-fs-gtk-event_handler.c index f9d17799..bae6a632 100644 --- a/src/fs/gnunet-fs-gtk-event_handler.c +++ b/src/fs/gnunet-fs-gtk-event_handler.c | |||
@@ -332,7 +332,7 @@ mark_download_completed (struct DownloadEntry *de, uint64_t size, | |||
332 | const char *filename) | 332 | const char *filename) |
333 | { | 333 | { |
334 | struct AddDirectoryEntryContext ade; | 334 | struct AddDirectoryEntryContext ade; |
335 | 335 | ||
336 | de->is_done = GNUNET_YES; | 336 | de->is_done = GNUNET_YES; |
337 | (void) mark_download_progress (de, size, size, NULL, 0, 0, 0); | 337 | (void) mark_download_progress (de, size, size, NULL, 0, 0, 0); |
338 | if ((GNUNET_YES == GNUNET_FS_meta_data_test_for_directory (de->meta)) && | 338 | if ((GNUNET_YES == GNUNET_FS_meta_data_test_for_directory (de->meta)) && |
@@ -537,6 +537,7 @@ setup_download (struct DownloadEntry *de, struct DownloadEntry *pde, | |||
537 | { | 537 | { |
538 | GtkTreeIter iter; | 538 | GtkTreeIter iter; |
539 | GtkTreePath *path; | 539 | GtkTreePath *path; |
540 | struct SearchResult *srp; | ||
540 | 541 | ||
541 | if (de == NULL) | 542 | if (de == NULL) |
542 | { | 543 | { |
@@ -561,11 +562,12 @@ setup_download (struct DownloadEntry *de, struct DownloadEntry *pde, | |||
561 | } | 562 | } |
562 | else if (de->rr == NULL) | 563 | else if (de->rr == NULL) |
563 | { | 564 | { |
564 | de->tab = GNUNET_GTK_add_to_uri_tab (&iter, NULL, meta, uri); | 565 | de->tab = GNUNET_GTK_add_to_uri_tab (&iter, &srp, meta, uri); |
565 | de->ts = de->tab->ts; | 566 | de->ts = de->tab->ts; |
566 | path = gtk_tree_model_get_path (GTK_TREE_MODEL (de->ts), &iter); | 567 | path = gtk_tree_model_get_path (GTK_TREE_MODEL (de->ts), &iter); |
567 | de->rr = gtk_tree_row_reference_new (GTK_TREE_MODEL (de->ts), path); | 568 | de->rr = gtk_tree_row_reference_new (GTK_TREE_MODEL (de->ts), path); |
568 | gtk_tree_path_free (path); | 569 | gtk_tree_path_free (path); |
570 | srp->download = de; | ||
569 | } | 571 | } |
570 | path = gtk_tree_row_reference_get_path (de->rr); | 572 | path = gtk_tree_row_reference_get_path (de->rr); |
571 | if (TRUE != gtk_tree_model_get_iter (GTK_TREE_MODEL (de->ts), &iter, path)) | 573 | if (TRUE != gtk_tree_model_get_iter (GTK_TREE_MODEL (de->ts), &iter, path)) |
@@ -1026,7 +1028,7 @@ clear_downloads (GtkButton * button, gpointer user_data) | |||
1026 | do | 1028 | do |
1027 | { | 1029 | { |
1028 | gtk_tree_model_get (tm, &iter, 9, &sr, -1); | 1030 | gtk_tree_model_get (tm, &iter, 9, &sr, -1); |
1029 | if ((sr->download != NULL) && (sr->download->is_done == GNUNET_YES)) | 1031 | if ((sr->download != NULL) && (sr->download->is_done == GNUNET_YES)) |
1030 | GNUNET_FS_download_stop (sr->download->dc, GNUNET_YES); | 1032 | GNUNET_FS_download_stop (sr->download->dc, GNUNET_YES); |
1031 | } | 1033 | } |
1032 | while (TRUE == gtk_tree_model_iter_next (tm, &iter)); | 1034 | while (TRUE == gtk_tree_model_iter_next (tm, &iter)); |