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.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c
index 778829d4..8607fe88 100644
--- a/src/plugins/fs/upload.c
+++ b/src/plugins/fs/upload.c
@@ -44,7 +44,7 @@ static GtkTreeStore * summary;
44 44
45/** 45/**
46 * XML tree for the meta-data dialog of upload. 46 * XML tree for the meta-data dialog of upload.
47 * (there can only be one at a time; 47 * (there can only be one at a time;
48 * maybe NULL at times where there is no dialog) 48 * maybe NULL at times where there is no dialog)
49 */ 49 */
50static GladeXML * metaXML; 50static GladeXML * metaXML;
@@ -77,7 +77,7 @@ void displayUploadUpdate(const char * mainName,
77 &iter, 77 &iter,
78 UPLOAD_PROGRESS, progress, 78 UPLOAD_PROGRESS, progress,
79 -1); 79 -1);
80 return; 80 return;
81 } 81 }
82 if (0 == strcmp(name, mainName)) { 82 if (0 == strcmp(name, mainName)) {
83 if (gtk_tree_model_iter_children(GTK_TREE_MODEL(summary), 83 if (gtk_tree_model_iter_children(GTK_TREE_MODEL(summary),
@@ -96,7 +96,7 @@ void displayUploadUpdate(const char * mainName,
96 return; 96 return;
97 } 97 }
98 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary), 98 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
99 &child)); 99 &child));
100 } 100 }
101 gtk_tree_store_append(GTK_TREE_STORE(summary), 101 gtk_tree_store_append(GTK_TREE_STORE(summary),
102 &child, 102 &child,
@@ -108,7 +108,7 @@ void displayUploadUpdate(const char * mainName,
108 UPLOAD_URISTRING, NULL, 108 UPLOAD_URISTRING, NULL,
109 -1); 109 -1);
110 return; 110 return;
111 } 111 }
112 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary), 112 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
113 &iter)); 113 &iter));
114 } 114 }
@@ -171,7 +171,7 @@ void displayUploadComplete(const char * mainName,
171 UPLOAD_URISTRING, us, 171 UPLOAD_URISTRING, us,
172 -1); 172 -1);
173 FREE(us); 173 FREE(us);
174 return; 174 return;
175 } 175 }
176 if (0 == strcmp(name, mainName)) { 176 if (0 == strcmp(name, mainName)) {
177 if (gtk_tree_model_iter_children(GTK_TREE_MODEL(summary), 177 if (gtk_tree_model_iter_children(GTK_TREE_MODEL(summary),
@@ -192,7 +192,7 @@ void displayUploadComplete(const char * mainName,
192 return; 192 return;
193 } 193 }
194 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary), 194 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
195 &child)); 195 &child));
196 } 196 }
197 gtk_tree_store_append(GTK_TREE_STORE(summary), 197 gtk_tree_store_append(GTK_TREE_STORE(summary),
198 &child, 198 &child,
@@ -205,7 +205,7 @@ void displayUploadComplete(const char * mainName,
205 -1); 205 -1);
206 FREE(us); 206 FREE(us);
207 return; 207 return;
208 } 208 }
209 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary), 209 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
210 &iter)); 210 &iter));
211 } 211 }
@@ -303,12 +303,12 @@ void on_fsinsertuploadbutton_clicked(gpointer dummy,
303 config); 303 config);
304 FREE(config); 304 FREE(config);
305 } 305 }
306 306
307 uploadLine = glade_xml_get_widget(getMainXML(), 307 uploadLine = glade_xml_get_widget(getMainXML(),
308 "uploadFilenameComboBoxEntry"); 308 "uploadFilenameComboBoxEntry");
309 entry = gtk_bin_get_child(GTK_BIN(uploadLine)); 309 entry = gtk_bin_get_child(GTK_BIN(uploadLine));
310 filename = gtk_entry_get_text(GTK_ENTRY(entry)); 310 filename = gtk_entry_get_text(GTK_ENTRY(entry));
311 311
312 metaXML 312 metaXML
313 = glade_xml_new(getGladeFileName(), 313 = glade_xml_new(getGladeFileName(),
314 "metaDataDialog", 314 "metaDataDialog",
@@ -345,7 +345,7 @@ void on_fsinsertuploadbutton_clicked(gpointer dummy,
345 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) { 345 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) {
346 int doIndex; 346 int doIndex;
347 int doRec; 347 int doRec;
348 348
349 addLogEntry(_("Uploading `%s'"), filenamerest); 349 addLogEntry(_("Uploading `%s'"), filenamerest);
350 350
351 recBut = glade_xml_get_widget(getMainXML(), 351 recBut = glade_xml_get_widget(getMainXML(),
@@ -363,18 +363,18 @@ void on_fsinsertuploadbutton_clicked(gpointer dummy,
363 363
364 meta = getMetaDataFromList(metaXML, 364 meta = getMetaDataFromList(metaXML,
365 "metaDataDialogMetaDataList", 365 "metaDataDialogMetaDataList",
366 "previewImage"); 366 "previewImage");
367 keywordURI = getKeywordURIFromList(metaXML, 367 keywordURI = getKeywordURIFromList(metaXML,
368 "metaDataDialogKeywordList"); 368 "metaDataDialogKeywordList");
369 if (doRec) { 369 if (doRec) {
370 deepIndex = glade_xml_get_widget(getMainXML(), 370 deepIndex = glade_xml_get_widget(getMainXML(),
371 "deepIndexCheckButton"); 371 "deepIndexCheckButton");
372 gkeywordURI = ECRS_stringToUri(ECRS_URI_PREFIX 372 gkeywordURI = ECRS_stringToUri(ECRS_URI_PREFIX
373 ECRS_SEARCH_INFIX); 373 ECRS_SEARCH_INFIX);
374 FSUI_uploadAll(ctx, 374 FSUI_uploadAll(ctx,
375 filename, 375 filename,
376 getAnonymityLevel(getMainXML(), 376 getAnonymityLevel(getMainXML(),
377 "uploadAnonymityLevelSpinButton"), 377 "uploadAnonymityLevelSpinButton"),
378 doIndex, 378 doIndex,
379 (TRUE == gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(deepIndex))) 379 (TRUE == gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(deepIndex)))
380 ? YES : NO, 380 ? YES : NO,
@@ -385,7 +385,7 @@ void on_fsinsertuploadbutton_clicked(gpointer dummy,
385 FSUI_upload(ctx, 385 FSUI_upload(ctx,
386 filename, 386 filename,
387 getAnonymityLevel(getMainXML(), 387 getAnonymityLevel(getMainXML(),
388 "uploadAnonymityLevelSpinButton"), 388 "uploadAnonymityLevelSpinButton"),
389 doIndex, 389 doIndex,
390 NO, 390 NO,
391 meta, 391 meta,
@@ -416,14 +416,14 @@ static char * selectFile() {
416 416
417 recBut = glade_xml_get_widget(getMainXML(), 417 recBut = glade_xml_get_widget(getMainXML(),
418 "scopeRecursiveButton"); 418 "scopeRecursiveButton");
419 419
420 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(recBut))) 420 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(recBut)))
421 gtk_file_chooser_set_action(GTK_FILE_CHOOSER(dialog), 421 gtk_file_chooser_set_action(GTK_FILE_CHOOSER(dialog),
422 GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); 422 GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
423 423
424 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) { 424 if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) {
425 char * filename; 425 char * filename;
426 426
427 filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); 427 filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
428 ret = STRDUP(filename); 428 ret = STRDUP(filename);
429 g_free(filename); 429 g_free(filename);
@@ -445,7 +445,7 @@ static char * selectFile() {
445 else 445 else
446 fn = plibc_ChooseDir(_("Choose the directory you want to publish."), 446 fn = plibc_ChooseDir(_("Choose the directory you want to publish."),
447 BIF_USENEWUI | BIF_SHAREABLE | BIF_NONEWFOLDERBUTTON); 447 BIF_USENEWUI | BIF_SHAREABLE | BIF_NONEWFOLDERBUTTON);
448 448
449 return fn; 449 return fn;
450#endif /* MINGW */ 450#endif /* MINGW */
451} 451}
@@ -457,7 +457,7 @@ void on_mainFileSharingInsertBrowseButton_clicked(GtkWidget * browseButton,
457 GtkWidget * entry; 457 GtkWidget * entry;
458 GtkListStore * model; 458 GtkListStore * model;
459 GtkTreeIter iter; 459 GtkTreeIter iter;
460 460
461 if ((filename = selectFile())) { 461 if ((filename = selectFile())) {
462 uploadLine = glade_xml_get_widget(getMainXML(), 462 uploadLine = glade_xml_get_widget(getMainXML(),
463 "uploadFilenameComboBoxEntry"); 463 "uploadFilenameComboBoxEntry");
@@ -492,7 +492,7 @@ void fs_upload_start() {
492 G_TYPE_STRING); /* URI (as string) - after completion */ 492 G_TYPE_STRING); /* URI (as string) - after completion */
493 gtk_tree_view_set_model(GTK_TREE_VIEW(uploadList), 493 gtk_tree_view_set_model(GTK_TREE_VIEW(uploadList),
494 GTK_TREE_MODEL(summary)); 494 GTK_TREE_MODEL(summary));
495 renderer = gtk_cell_renderer_progress_new(); 495 renderer = gtk_cell_renderer_progress_new();
496 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(uploadList), 496 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(uploadList),
497 -1, 497 -1,
498 _("Filename"), 498 _("Filename"),