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.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c
index b77615d6..d7ac628e 100644
--- a/src/plugins/fs/download.c
+++ b/src/plugins/fs/download.c
@@ -213,12 +213,18 @@ fs_download_started(struct FSUI_DownloadList * fsui_dl,
213 list->searchList = sl_parent; 213 list->searchList = sl_parent;
214 if (sl_parent != NULL) { 214 if (sl_parent != NULL) {
215 if (dl_parent != NULL) { 215 if (dl_parent != NULL) {
216 GtkTreeIter piter;
217
216 /* have parent, must be download from 218 /* have parent, must be download from
217 directory inside of search */ 219 directory inside of search */
218 path = gtk_tree_row_reference_get_path(dl_parent->searchViewRowReference); 220 path = gtk_tree_row_reference_get_path(dl_parent->searchViewRowReference);
219 valid = gtk_tree_model_get_iter(GTK_TREE_MODEL(sl_parent->tree), 221 valid = gtk_tree_model_get_iter(GTK_TREE_MODEL(sl_parent->tree),
220 &iter, 222 &piter,
221 path); 223 path);
224 if (valid == TRUE)
225 valid = gtk_tree_model_iter_children(GTK_TREE_MODEL(sl_parent->tree),
226 &iter,
227 &piter);
222 } else { 228 } else {
223 /* must be top-level entry in search */ 229 /* must be top-level entry in search */
224 valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(sl_parent->tree), 230 valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(sl_parent->tree),
@@ -563,7 +569,7 @@ void on_downloadButton_clicked_fs(GtkWidget * treeview,
563 GtkTreeSelection * selection; 569 GtkTreeSelection * selection;
564 570
565 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); 571 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
566 gtk_tree_selection_selected_foreach 572 ggc_tree_selection_selected_foreach
567 (selection, 573 (selection,
568 &initiateDownload, 574 &initiateDownload,
569 NULL); 575 NULL);
@@ -682,7 +688,8 @@ void on_clearCompletedDownloadsButton_clicked_fs(void * unused,
682 downloadList = glade_xml_get_widget(getMainXML(), 688 downloadList = glade_xml_get_widget(getMainXML(),
683 "activeDownloadsList"); 689 "activeDownloadsList");
684 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(downloadList)); 690 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(downloadList));
685 gtk_tree_selection_selected_foreach 691
692 ggc_tree_selection_selected_foreach
686 (selection, 693 (selection,
687 &clearCompletedDownloadCallback, 694 &clearCompletedDownloadCallback,
688 NULL); 695 NULL);
@@ -716,7 +723,7 @@ void on_abortDownloadButton_clicked_fs(void * unused,
716 downloadList = glade_xml_get_widget(getMainXML(), 723 downloadList = glade_xml_get_widget(getMainXML(),
717 "activeDownloadsList"); 724 "activeDownloadsList");
718 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(downloadList)); 725 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(downloadList));
719 gtk_tree_selection_selected_foreach 726 ggc_tree_selection_selected_foreach
720 (selection, 727 (selection,
721 &fsuiCallDownloadCallback, 728 &fsuiCallDownloadCallback,
722 &FSUI_abortDownload); 729 &FSUI_abortDownload);
@@ -730,7 +737,7 @@ void on_stopDownloadButton_clicked_fs(void * unused,
730 downloadList = glade_xml_get_widget(getMainXML(), 737 downloadList = glade_xml_get_widget(getMainXML(),
731 "activeDownloadsList"); 738 "activeDownloadsList");
732 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(downloadList)); 739 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(downloadList));
733 gtk_tree_selection_selected_foreach 740 ggc_tree_selection_selected_foreach
734 (selection, 741 (selection,
735 &fsuiCallDownloadCallback, 742 &fsuiCallDownloadCallback,
736 &FSUI_stopDownload); 743 &FSUI_stopDownload);