aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/fs/upload.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/fs/upload.c')
-rw-r--r--src/plugins/fs/upload.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c
index d25e7d94..5ab6d75a 100644
--- a/src/plugins/fs/upload.c
+++ b/src/plugins/fs/upload.c
@@ -141,7 +141,8 @@ fs_upload_started(struct FSUI_UploadList * fsui,
141 GtkTreeIter iter; 141 GtkTreeIter iter;
142 GtkTreePath * path; 142 GtkTreePath * path;
143 int progress; 143 int progress;
144 144 GtkTreeIter par;
145
145 ret = MALLOC(sizeof(UploadList)); 146 ret = MALLOC(sizeof(UploadList));
146 memset(ret, 147 memset(ret,
147 0, 148 0,
@@ -149,14 +150,8 @@ fs_upload_started(struct FSUI_UploadList * fsui,
149 ret->filename = STRDUP(filename); 150 ret->filename = STRDUP(filename);
150 ret->fsui_list = fsui; 151 ret->fsui_list = fsui;
151 ret->total = total; 152 ret->total = total;
152 if (parent == NULL) { 153 if ( (parent != NULL) &&
153 gtk_tree_store_append(upload_summary, 154 (NULL != (path = gtk_tree_row_reference_get_path(parent->summaryViewRowReference))) ) {
154 &iter,
155 NULL);
156 } else {
157 GtkTreeIter par;
158
159 path = gtk_tree_row_reference_get_path(parent->summaryViewRowReference);
160 gtk_tree_model_get_iter(GTK_TREE_MODEL(upload_summary), 155 gtk_tree_model_get_iter(GTK_TREE_MODEL(upload_summary),
161 &par, 156 &par,
162 path); 157 path);
@@ -164,8 +159,11 @@ fs_upload_started(struct FSUI_UploadList * fsui,
164 gtk_tree_store_append(upload_summary, 159 gtk_tree_store_append(upload_summary,
165 &iter, 160 &iter,
166 &par); 161 &par);
167 } 162 } else {
168 163 gtk_tree_store_append(upload_summary,
164 &iter,
165 NULL);
166 }
169 if (total != 0) 167 if (total != 0)
170 progress = 100 * completed / total; 168 progress = 100 * completed / total;
171 else 169 else