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.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c
index 1fd31bfb..9f123578 100644
--- a/src/plugins/fs/download.c
+++ b/src/plugins/fs/download.c
@@ -189,6 +189,7 @@ fs_download_started(struct FSUI_DownloadList * fsui_dl,
189 FSUI_State state) { 189 FSUI_State state) {
190 DownloadList * list; 190 DownloadList * list;
191 GtkTreeIter iter; 191 GtkTreeIter iter;
192 GtkTreeIter piter;
192 GtkTreePath * path; 193 GtkTreePath * path;
193 unsigned long long size; 194 unsigned long long size;
194 char * size_h; 195 char * size_h;
@@ -205,11 +206,26 @@ fs_download_started(struct FSUI_DownloadList * fsui_dl,
205 sizeof(DownloadList)); 206 sizeof(DownloadList));
206 list->uri = ECRS_dupUri(fi->uri); 207 list->uri = ECRS_dupUri(fi->uri);
207 list->filename = STRDUP(filename); 208 list->filename = STRDUP(filename);
208 /* FIXME: if we have dl_parent, 209 if ( (dl_parent != NULL) &&
209 we may not want to just append! */ 210 (NULL != (path = gtk_tree_row_reference_get_path(dl_parent->summaryViewRowReference) ) ) ) {
210 gtk_tree_store_append(download_summary, 211 valid = gtk_tree_model_get_iter(GTK_TREE_MODEL(download_summary),
211 &iter, 212 &piter,
212 NULL); 213 path);
214 if (valid) {
215 gtk_tree_store_append(download_summary,
216 &iter,
217 &piter);
218 } else {
219 gtk_tree_store_append(download_summary,
220 &iter,
221 NULL);
222 }
223 gtk_tree_path_free(path);
224 } else {
225 gtk_tree_store_append(download_summary,
226 &iter,
227 NULL);
228 }
213 size = ECRS_fileSize(fi->uri); 229 size = ECRS_fileSize(fi->uri);
214 size_h = string_get_fancy_byte_size(size); 230 size_h = string_get_fancy_byte_size(size);
215 sname = &filename[strlen(filename)-1]; 231 sname = &filename[strlen(filename)-1];
@@ -244,7 +260,6 @@ fs_download_started(struct FSUI_DownloadList * fsui_dl,
244 list->searchViewRowReference = NULL; 260 list->searchViewRowReference = NULL;
245 if (sl_parent != NULL) { 261 if (sl_parent != NULL) {
246 if (dl_parent != NULL) { 262 if (dl_parent != NULL) {
247 GtkTreeIter piter;
248 263
249 /* have parent, must be download from 264 /* have parent, must be download from
250 directory inside of search */ 265 directory inside of search */