aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk_publish-dialog.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-15 20:00:02 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-15 20:00:02 +0000
commitb5290908f7ee34c85d197c5382a194f18f06f0f2 (patch)
treef5c10246c4b55204fc12dc921507d35d281e8a87 /src/fs/gnunet-fs-gtk_publish-dialog.c
parentdbbf5c6f679877488dfb6c84b5ce15784c02f15d (diff)
downloadgnunet-gtk-b5290908f7ee34c85d197c5382a194f18f06f0f2.tar.gz
gnunet-gtk-b5290908f7ee34c85d197c5382a194f18f06f0f2.zip
-remove tailing whitespaces
Diffstat (limited to 'src/fs/gnunet-fs-gtk_publish-dialog.c')
-rw-r--r--src/fs/gnunet-fs-gtk_publish-dialog.c210
1 files changed, 105 insertions, 105 deletions
diff --git a/src/fs/gnunet-fs-gtk_publish-dialog.c b/src/fs/gnunet-fs-gtk_publish-dialog.c
index d97ddb4e..f9994a1b 100644
--- a/src/fs/gnunet-fs-gtk_publish-dialog.c
+++ b/src/fs/gnunet-fs-gtk_publish-dialog.c
@@ -124,9 +124,9 @@ enum IDENTIFIERS_ModelColumns
124enum EGO_ModelColumns 124enum EGO_ModelColumns
125 { 125 {
126 126
127 /** 127 /**
128 * A gchararray. 128 * A gchararray.
129 */ 129 */
130 EGO_MC_NAME = 0, 130 EGO_MC_NAME = 0,
131 131
132 /** 132 /**
@@ -156,9 +156,9 @@ struct MainPublishingDialogContext
156 156
157 /** 157 /**
158 * Connection to the identity service. 158 * Connection to the identity service.
159 */ 159 */
160 struct GNUNET_IDENTITY_Handle *identity; 160 struct GNUNET_IDENTITY_Handle *identity;
161 161
162 /** 162 /**
163 * Handle to the main window of the publishing dialog. 163 * Handle to the main window of the publishing dialog.
164 */ 164 */
@@ -177,7 +177,7 @@ struct MainPublishingDialogContext
177 /** 177 /**
178 * Model with the list of files to be shared. 178 * Model with the list of files to be shared.
179 */ 179 */
180 GtkTreeModel *file_info_treemodel; 180 GtkTreeModel *file_info_treemodel;
181 181
182 /** 182 /**
183 * Button to move selected file upwards 183 * Button to move selected file upwards
@@ -411,7 +411,7 @@ struct AddDirClientContext
411}; 411};
412 412
413 413
414static void 414static void
415clear_keywords_from_tm (struct MainPublishingDialogContext *ctx); 415clear_keywords_from_tm (struct MainPublishingDialogContext *ctx);
416 416
417 417
@@ -428,7 +428,7 @@ clear_keywords_from_tm (struct MainPublishingDialogContext *ctx);
428 */ 428 */
429static int 429static int
430gtk_tree_iter_equals (GtkTreeModel *tm, 430gtk_tree_iter_equals (GtkTreeModel *tm,
431 GtkTreeIter *i1, 431 GtkTreeIter *i1,
432 GtkTreeIter *i2) 432 GtkTreeIter *i2)
433{ 433{
434 GtkTreePath *p1; 434 GtkTreePath *p1;
@@ -468,9 +468,9 @@ update_selectivity_execute_cancel (struct MainPublishingDialogContext *ctx)
468 468
469 /* Don't let the user close the dialog until all scanners are finished and 469 /* Don't let the user close the dialog until all scanners are finished and
470 their windows are closed */ 470 their windows are closed */
471 if ( (gtk_tree_model_get_iter_first (ctx->file_info_treemodel, &iter)) && 471 if ( (gtk_tree_model_get_iter_first (ctx->file_info_treemodel, &iter)) &&
472 (pub_in_global || pub_in_own) && 472 (pub_in_global || pub_in_own) &&
473 ((!pub_in_own) || ( (NULL != ctx->ns) && 473 ((!pub_in_own) || ( (NULL != ctx->ns) &&
474 (NULL != ns_id) && 474 (NULL != ns_id) &&
475 ('\0' != ns_id[0])) ) && 475 ('\0' != ns_id[0])) ) &&
476 (NULL == ctx->adddir_head) ) 476 (NULL == ctx->adddir_head) )
@@ -515,9 +515,9 @@ update_selectivity_edit (struct MainPublishingDialogContext *ctx)
515 515
516 /* figure out which move operations are currently legal */ 516 /* figure out which move operations are currently legal */
517 GNUNET_assert (gtk_tree_selection_get_selected (ctx->file_info_selection, NULL, &iter)); 517 GNUNET_assert (gtk_tree_selection_get_selected (ctx->file_info_selection, NULL, &iter));
518 if (gtk_tree_model_iter_next (ctx->file_info_treemodel, &iter)) 518 if (gtk_tree_model_iter_next (ctx->file_info_treemodel, &iter))
519 gtk_widget_set_sensitive (ctx->down_button, TRUE); 519 gtk_widget_set_sensitive (ctx->down_button, TRUE);
520 else 520 else
521 gtk_widget_set_sensitive (ctx->down_button, FALSE); 521 gtk_widget_set_sensitive (ctx->down_button, FALSE);
522 GNUNET_assert (gtk_tree_selection_get_selected (ctx->file_info_selection, NULL, &iter)); 522 GNUNET_assert (gtk_tree_selection_get_selected (ctx->file_info_selection, NULL, &iter));
523 if (gtk_tree_model_iter_parent (ctx->file_info_treemodel, &parent, &iter)) 523 if (gtk_tree_model_iter_parent (ctx->file_info_treemodel, &parent, &iter))
@@ -540,14 +540,14 @@ update_selectivity_edit (struct MainPublishingDialogContext *ctx)
540 is_dir = GNUNET_FS_file_information_is_directory (fip); 540 is_dir = GNUNET_FS_file_information_is_directory (fip);
541 GNUNET_assert (gtk_tree_model_iter_next (ctx->file_info_treemodel, &pred)); 541 GNUNET_assert (gtk_tree_model_iter_next (ctx->file_info_treemodel, &pred));
542 } 542 }
543 if (GNUNET_YES == is_dir) 543 if (GNUNET_YES == is_dir)
544 gtk_widget_set_sensitive (ctx->right_button, TRUE); 544 gtk_widget_set_sensitive (ctx->right_button, TRUE);
545 else 545 else
546 gtk_widget_set_sensitive (ctx->right_button, FALSE); 546 gtk_widget_set_sensitive (ctx->right_button, FALSE);
547 if (GNUNET_SYSERR != is_dir) 547 if (GNUNET_SYSERR != is_dir)
548 gtk_widget_set_sensitive (ctx->up_button, TRUE); 548 gtk_widget_set_sensitive (ctx->up_button, TRUE);
549 else 549 else
550 gtk_widget_set_sensitive (ctx->up_button, FALSE); 550 gtk_widget_set_sensitive (ctx->up_button, FALSE);
551} 551}
552 552
553 553
@@ -558,7 +558,7 @@ update_selectivity_edit (struct MainPublishingDialogContext *ctx)
558 * @param user_data master publishing dialog context of our window 558 * @param user_data master publishing dialog context of our window
559 */ 559 */
560static void 560static void
561selection_changed_cb (GtkTreeSelection * ts, 561selection_changed_cb (GtkTreeSelection * ts,
562 gpointer user_data) 562 gpointer user_data)
563{ 563{
564 struct MainPublishingDialogContext *ctx = user_data; 564 struct MainPublishingDialogContext *ctx = user_data;
@@ -577,9 +577,9 @@ selection_changed_cb (GtkTreeSelection * ts,
577 * @param pos iterator to set to the location of the new element 577 * @param pos iterator to set to the location of the new element
578 */ 578 */
579static void 579static void
580create_dir_at_iter (struct MainPublishingDialogContext *ctx, 580create_dir_at_iter (struct MainPublishingDialogContext *ctx,
581 const char *name, 581 const char *name,
582 const struct GNUNET_FS_BlockOptions *bo, 582 const struct GNUNET_FS_BlockOptions *bo,
583 GtkTreeIter * iter, 583 GtkTreeIter * iter,
584 GtkTreeIter * pos) 584 GtkTreeIter * pos)
585{ 585{
@@ -601,12 +601,12 @@ create_dir_at_iter (struct MainPublishingDialogContext *ctx,
601 fi = GNUNET_FS_file_information_create_empty_directory 601 fi = GNUNET_FS_file_information_create_empty_directory
602 (GNUNET_FS_GTK_get_fs_handle (), row_reference, NULL, meta, bo, name); 602 (GNUNET_FS_GTK_get_fs_handle (), row_reference, NULL, meta, bo, name);
603 GNUNET_CONTAINER_meta_data_destroy (meta); 603 GNUNET_CONTAINER_meta_data_destroy (meta);
604 gtk_tree_store_set (GTK_TREE_STORE (ctx->file_info_treemodel), pos, 604 gtk_tree_store_set (GTK_TREE_STORE (ctx->file_info_treemodel), pos,
605 PUBLISH_MC_FILESIZE, MARKER_DIR_FILE_SIZE, 605 PUBLISH_MC_FILESIZE, MARKER_DIR_FILE_SIZE,
606 PUBLISH_MC_DO_INDEX, (gboolean) GNUNET_NO, 606 PUBLISH_MC_DO_INDEX, (gboolean) GNUNET_NO,
607 PUBLISH_MC_FILENAME, name, 607 PUBLISH_MC_FILENAME, name,
608 PUBLISH_MC_ANONYMITY_LEVEL, (guint) bo->anonymity_level, 608 PUBLISH_MC_ANONYMITY_LEVEL, (guint) bo->anonymity_level,
609 PUBLISH_MC_PRIORITY, (guint) bo->content_priority, 609 PUBLISH_MC_PRIORITY, (guint) bo->content_priority,
610 PUBLISH_MC_FILE_INFORMATION_STRUCT, fi, 610 PUBLISH_MC_FILE_INFORMATION_STRUCT, fi,
611 PUBLISH_MC_EXPIRATION_TIME_ABSOLUTE, 611 PUBLISH_MC_EXPIRATION_TIME_ABSOLUTE,
612 (guint64) bo->expiration_time.abs_value_us, 612 (guint64) bo->expiration_time.abs_value_us,
@@ -653,7 +653,7 @@ copy_entry (struct MainPublishingDialogContext *ctx, GtkTreeModel * tm, GtkTreeI
653 char *fsf; 653 char *fsf;
654 654
655 gtk_tree_model_get (tm, old, 655 gtk_tree_model_get (tm, old,
656 PUBLISH_MC_FILESIZE, &fsf, 656 PUBLISH_MC_FILESIZE, &fsf,
657 PUBLISH_MC_DO_INDEX, &do_index, 657 PUBLISH_MC_DO_INDEX, &do_index,
658 PUBLISH_MC_FILENAME, &short_fn, 658 PUBLISH_MC_FILENAME, &short_fn,
659 PUBLISH_MC_ANONYMITY_LEVEL, &anonymity_level, 659 PUBLISH_MC_ANONYMITY_LEVEL, &anonymity_level,
@@ -820,7 +820,7 @@ generate_update_id (const gchar *new_text)
820 * FALSE otherwise 820 * FALSE otherwise
821 */ 821 */
822static gboolean 822static gboolean
823update_id_is_autofilled (const gchar *existing_update_id, 823update_id_is_autofilled (const gchar *existing_update_id,
824 const gchar *previous_id) 824 const gchar *previous_id)
825{ 825{
826 gboolean result; 826 gboolean result;
@@ -852,10 +852,10 @@ maybe_change_update_id (struct MainPublishingDialogContext *ctx,
852 new_update_id = NULL; 852 new_update_id = NULL;
853 existing_update_id = gtk_entry_get_text (GTK_ENTRY (ctx->update_id_entry)); 853 existing_update_id = gtk_entry_get_text (GTK_ENTRY (ctx->update_id_entry));
854 854
855 if ( ( (NULL == ctx->previous_id) && 855 if ( ( (NULL == ctx->previous_id) &&
856 ('\0' == existing_update_id[0]) ) || 856 ('\0' == existing_update_id[0]) ) ||
857 ( (NULL != ctx->previous_id) && 857 ( (NULL != ctx->previous_id) &&
858 update_id_is_autofilled (existing_update_id, 858 update_id_is_autofilled (existing_update_id,
859 ctx->previous_id) ) ) 859 ctx->previous_id) ) )
860 new_update_id = generate_update_id (new_text); 860 new_update_id = generate_update_id (new_text);
861 if (NULL != new_update_id) 861 if (NULL != new_update_id)
@@ -877,7 +877,7 @@ maybe_change_update_id (struct MainPublishingDialogContext *ctx,
877 * @param user_data our `struct MainPublishingDialogContext` 877 * @param user_data our `struct MainPublishingDialogContext`
878 */ 878 */
879void 879void
880GNUNET_GTK_master_publish_dialog_identifier_entry_changed_cb (GtkWidget *widget, 880GNUNET_GTK_master_publish_dialog_identifier_entry_changed_cb (GtkWidget *widget,
881 gpointer user_data) 881 gpointer user_data)
882{ 882{
883 struct MainPublishingDialogContext *ctx = user_data; 883 struct MainPublishingDialogContext *ctx = user_data;
@@ -1042,12 +1042,12 @@ GNUNET_GTK_master_publish_dialog_up_button_clicked_cb (GtkWidget * dummy,
1042 GNUNET_assert (TRUE == gtk_tree_model_iter_children (ctx->file_info_treemodel, &pred, &parent)); 1042 GNUNET_assert (TRUE == gtk_tree_model_iter_children (ctx->file_info_treemodel, &pred, &parent));
1043 pprev = &parent; 1043 pprev = &parent;
1044 } 1044 }
1045 else if (! gtk_tree_model_get_iter_first (ctx->file_info_treemodel, &pred)) 1045 else if (! gtk_tree_model_get_iter_first (ctx->file_info_treemodel, &pred))
1046 { 1046 {
1047 GNUNET_break (0); 1047 GNUNET_break (0);
1048 return; 1048 return;
1049 } 1049 }
1050 pprev = NULL; 1050 pprev = NULL;
1051 /* iterate over 'next' of pred to find out who our predecessor is! */ 1051 /* iterate over 'next' of pred to find out who our predecessor is! */
1052 while (GNUNET_YES != gtk_tree_iter_equals (ctx->file_info_treemodel, &pred, &iter)) 1052 while (GNUNET_YES != gtk_tree_iter_equals (ctx->file_info_treemodel, &pred, &iter))
1053 { 1053 {
@@ -1147,7 +1147,7 @@ GNUNET_GTK_master_publish_dialog_new_button_clicked_cb (GtkWidget * dummy,
1147 * @param bo publishing options, unused 1147 * @param bo publishing options, unused
1148 * @param do_index indexing option, unused 1148 * @param do_index indexing option, unused
1149 * @param client_info pointer to the GtkTreeRowReference, freed 1149 * @param client_info pointer to the GtkTreeRowReference, freed
1150 * @return GNUNET_OK to traverse entire subtree 1150 * @return GNUNET_OK to traverse entire subtree
1151 */ 1151 */
1152static int 1152static int
1153free_fi_row_reference (void *cls, struct GNUNET_FS_FileInformation *fi, 1153free_fi_row_reference (void *cls, struct GNUNET_FS_FileInformation *fi,
@@ -1216,7 +1216,7 @@ GNUNET_GTK_master_publish_dialog_delete_button_clicked_cb (GtkWidget * dummy,
1216 { 1216 {
1217 rr = gtk_tree_row_reference_new (ctx->file_info_treemodel, path); 1217 rr = gtk_tree_row_reference_new (ctx->file_info_treemodel, path);
1218 gtk_tree_path_free (path); 1218 gtk_tree_path_free (path);
1219 } 1219 }
1220 1220
1221 /* 'iter' might have again been clobbered, get it one more time... */ 1221 /* 'iter' might have again been clobbered, get it one more time... */
1222 GNUNET_assert (gtk_tree_selection_get_selected (ctx->file_info_selection, NULL, &iter)); 1222 GNUNET_assert (gtk_tree_selection_get_selected (ctx->file_info_selection, NULL, &iter));
@@ -1225,7 +1225,7 @@ GNUNET_GTK_master_publish_dialog_delete_button_clicked_cb (GtkWidget * dummy,
1225 gtk_tree_model_get (ctx->file_info_treemodel, &iter, 1225 gtk_tree_model_get (ctx->file_info_treemodel, &iter,
1226 PUBLISH_MC_FILE_INFORMATION_STRUCT, &fip, -1); 1226 PUBLISH_MC_FILE_INFORMATION_STRUCT, &fip, -1);
1227 GNUNET_FS_file_information_destroy (fip, &free_fi_row_reference, NULL); 1227 GNUNET_FS_file_information_destroy (fip, &free_fi_row_reference, NULL);
1228 GNUNET_FS_GTK_remove_treestore_subtree (GTK_TREE_STORE (ctx->file_info_treemodel), 1228 GNUNET_FS_GTK_remove_treestore_subtree (GTK_TREE_STORE (ctx->file_info_treemodel),
1229 &iter); 1229 &iter);
1230 1230
1231 /* finally, select the item from 'rr' (if any) */ 1231 /* finally, select the item from 'rr' (if any) */
@@ -1263,9 +1263,9 @@ destroy_progress_dialog (struct AddDirClientContext *adcc)
1263 adcc->kill_task = GNUNET_SCHEDULER_NO_TASK; 1263 adcc->kill_task = GNUNET_SCHEDULER_NO_TASK;
1264 } 1264 }
1265 gtk_widget_destroy (adcc->progress_dialog); 1265 gtk_widget_destroy (adcc->progress_dialog);
1266 g_object_unref (G_OBJECT (adcc->progress_dialog_builder)); 1266 g_object_unref (G_OBJECT (adcc->progress_dialog_builder));
1267 GNUNET_CONTAINER_DLL_remove (adcc->ctx->adddir_head, 1267 GNUNET_CONTAINER_DLL_remove (adcc->ctx->adddir_head,
1268 adcc->ctx->adddir_tail, 1268 adcc->ctx->adddir_tail,
1269 adcc); 1269 adcc);
1270 update_selectivity_execute_cancel (adcc->ctx); 1270 update_selectivity_execute_cancel (adcc->ctx);
1271 update_selectivity_edit (adcc->ctx); 1271 update_selectivity_edit (adcc->ctx);
@@ -1315,7 +1315,7 @@ GNUNET_FS_GTK_progress_dialog_delete_event_cb (GtkWidget *widget,
1315 1315
1316 1316
1317/** 1317/**
1318 * Display some additional information in the text area of the 1318 * Display some additional information in the text area of the
1319 * progress dialog. 1319 * progress dialog.
1320 * 1320 *
1321 * @param adcc progress dialog context of our window 1321 * @param adcc progress dialog context of our window
@@ -1344,10 +1344,10 @@ insert_progress_dialog_text (struct AddDirClientContext *adcc,
1344 * @param item_iter entry to set to the added item (OUT) 1344 * @param item_iter entry to set to the added item (OUT)
1345 */ 1345 */
1346static void 1346static void
1347add_item (struct AddDirClientContext *adcc, 1347add_item (struct AddDirClientContext *adcc,
1348 GtkTreeStore *ts, 1348 GtkTreeStore *ts,
1349 struct GNUNET_FS_ShareTreeItem *item, 1349 struct GNUNET_FS_ShareTreeItem *item,
1350 GtkTreeIter *parent, 1350 GtkTreeIter *parent,
1351 GtkTreeIter *sibling, 1351 GtkTreeIter *sibling,
1352 GtkTreeIter *item_iter) 1352 GtkTreeIter *item_iter)
1353{ 1353{
@@ -1357,7 +1357,7 @@ add_item (struct AddDirClientContext *adcc,
1357 GtkTreePath *path; 1357 GtkTreePath *path;
1358 struct stat sbuf; 1358 struct stat sbuf;
1359 uint64_t fsize; 1359 uint64_t fsize;
1360 1360
1361 if (0 != STAT (item->filename, 1361 if (0 != STAT (item->filename,
1362 &sbuf)) 1362 &sbuf))
1363 { 1363 {
@@ -1382,26 +1382,26 @@ add_item (struct AddDirClientContext *adcc,
1382 item->meta = GNUNET_CONTAINER_meta_data_create (); 1382 item->meta = GNUNET_CONTAINER_meta_data_create ();
1383 GNUNET_FS_meta_data_make_directory (item->meta); 1383 GNUNET_FS_meta_data_make_directory (item->meta);
1384 1384
1385 fi = GNUNET_FS_file_information_create_empty_directory (GNUNET_FS_GTK_get_fs_handle (), 1385 fi = GNUNET_FS_file_information_create_empty_directory (GNUNET_FS_GTK_get_fs_handle (),
1386 row_reference, 1386 row_reference,
1387 item->ksk_uri, 1387 item->ksk_uri,
1388 item->meta, 1388 item->meta,
1389 &adcc->directory_scan_bo, 1389 &adcc->directory_scan_bo,
1390 item->filename); 1390 item->filename);
1391 file_size_fancy = GNUNET_strdup (MARKER_DIR_FILE_SIZE); 1391 file_size_fancy = GNUNET_strdup (MARKER_DIR_FILE_SIZE);
1392 } 1392 }
1393 else 1393 else
1394 { 1394 {
1395 fi = GNUNET_FS_file_information_create_from_file (GNUNET_FS_GTK_get_fs_handle (), 1395 fi = GNUNET_FS_file_information_create_from_file (GNUNET_FS_GTK_get_fs_handle (),
1396 row_reference, 1396 row_reference,
1397 item->filename, 1397 item->filename,
1398 item->ksk_uri, 1398 item->ksk_uri,
1399 item->meta, 1399 item->meta,
1400 adcc->directory_scan_do_index, 1400 adcc->directory_scan_do_index,
1401 &adcc->directory_scan_bo); 1401 &adcc->directory_scan_bo);
1402 file_size_fancy = GNUNET_STRINGS_byte_size_fancy (fsize); 1402 file_size_fancy = GNUNET_STRINGS_byte_size_fancy (fsize);
1403 } 1403 }
1404 gtk_tree_store_set (ts, item_iter, 1404 gtk_tree_store_set (ts, item_iter,
1405 PUBLISH_MC_FILESIZE, file_size_fancy, 1405 PUBLISH_MC_FILESIZE, file_size_fancy,
1406 PUBLISH_MC_DO_INDEX, 1406 PUBLISH_MC_DO_INDEX,
1407 (gboolean) adcc->directory_scan_do_index, 1407 (gboolean) adcc->directory_scan_do_index,
@@ -1437,12 +1437,12 @@ add_share_items_to_treestore (struct AddDirClientContext *adcc,
1437 GtkTreeIter last_added; 1437 GtkTreeIter last_added;
1438 struct GNUNET_FS_ShareTreeItem *item; 1438 struct GNUNET_FS_ShareTreeItem *item;
1439 1439
1440 sibling_iter = NULL; 1440 sibling_iter = NULL;
1441 for (item = toplevel; NULL != item; item = item->next) 1441 for (item = toplevel; NULL != item; item = item->next)
1442 { 1442 {
1443 add_item (adcc, ts, item, parent_iter, sibling_iter, &last_added); 1443 add_item (adcc, ts, item, parent_iter, sibling_iter, &last_added);
1444 sibling_iter = &last_added; 1444 sibling_iter = &last_added;
1445 if (item->is_directory == GNUNET_YES) 1445 if (item->is_directory == GNUNET_YES)
1446 add_share_items_to_treestore (adcc, 1446 add_share_items_to_treestore (adcc,
1447 item->children_head, 1447 item->children_head,
1448 sibling_iter); 1448 sibling_iter);
@@ -1452,7 +1452,7 @@ add_share_items_to_treestore (struct AddDirClientContext *adcc,
1452 1452
1453/** 1453/**
1454 * Function called when the scanner had some trouble and we 1454 * Function called when the scanner had some trouble and we
1455 * need to abort the scanning process (which we need to do 1455 * need to abort the scanning process (which we need to do
1456 * in a separate task). 1456 * in a separate task).
1457 * 1457 *
1458 * @param cls progress dialog context of our window 1458 * @param cls progress dialog context of our window
@@ -1463,7 +1463,7 @@ stop_scanner_task (void *cls,
1463 const struct GNUNET_SCHEDULER_TaskContext *tc) 1463 const struct GNUNET_SCHEDULER_TaskContext *tc)
1464{ 1464{
1465 struct AddDirClientContext *adcc = cls; 1465 struct AddDirClientContext *adcc = cls;
1466 1466
1467 adcc->kill_task = GNUNET_SCHEDULER_NO_TASK; 1467 adcc->kill_task = GNUNET_SCHEDULER_NO_TASK;
1468 if (NULL != adcc->ds) 1468 if (NULL != adcc->ds)
1469 { 1469 {
@@ -1483,7 +1483,7 @@ stop_scanner_task (void *cls,
1483 * @param reason kind of progress that was made 1483 * @param reason kind of progress that was made
1484 */ 1484 */
1485static void 1485static void
1486directory_scan_cb (void *cls, 1486directory_scan_cb (void *cls,
1487 const char *filename, int is_directory, 1487 const char *filename, int is_directory,
1488 enum GNUNET_FS_DirScannerProgressUpdateReason reason) 1488 enum GNUNET_FS_DirScannerProgressUpdateReason reason)
1489{ 1489{
@@ -1525,16 +1525,16 @@ directory_scan_cb (void *cls,
1525 "GNUNET_FS_GTK_progress_dialog_scrolled_window"))); 1525 "GNUNET_FS_GTK_progress_dialog_scrolled_window")));
1526#endif 1526#endif
1527 insert_progress_dialog_text (adcc, s); 1527 insert_progress_dialog_text (adcc, s);
1528 GNUNET_free (s); 1528 GNUNET_free (s);
1529 break; 1529 break;
1530 case GNUNET_FS_DIRSCANNER_ALL_COUNTED: 1530 case GNUNET_FS_DIRSCANNER_ALL_COUNTED:
1531 fraction = (adcc->total == 0) ? 1.0 : (1.0 * adcc->done) / adcc->total; 1531 fraction = (adcc->total == 0) ? 1.0 : (1.0 * adcc->done) / adcc->total;
1532 GNUNET_asprintf (&s, "%u/%u (%3f%%)", 1532 GNUNET_asprintf (&s, "%u/%u (%3f%%)",
1533 adcc->done, 1533 adcc->done,
1534 adcc->total, 1534 adcc->total,
1535 100.0 * fraction); 1535 100.0 * fraction);
1536 gtk_progress_bar_set_text (adcc->progress_dialog_bar, 1536 gtk_progress_bar_set_text (adcc->progress_dialog_bar,
1537 s); 1537 s);
1538 GNUNET_free (s); 1538 GNUNET_free (s);
1539 gtk_progress_bar_set_fraction (adcc->progress_dialog_bar, 1539 gtk_progress_bar_set_fraction (adcc->progress_dialog_bar,
1540 fraction); 1540 fraction);
@@ -1549,12 +1549,12 @@ directory_scan_cb (void *cls,
1549 adcc->done++; 1549 adcc->done++;
1550 GNUNET_assert (adcc->done <= adcc->total); 1550 GNUNET_assert (adcc->done <= adcc->total);
1551 fraction = (adcc->total == 0) ? 1.0 : (1.0 * adcc->done) / adcc->total; 1551 fraction = (adcc->total == 0) ? 1.0 : (1.0 * adcc->done) / adcc->total;
1552 GNUNET_asprintf (&s, "%u/%u (%3f%%)", 1552 GNUNET_asprintf (&s, "%u/%u (%3f%%)",
1553 adcc->done, 1553 adcc->done,
1554 adcc->total, 1554 adcc->total,
1555 100.0 * fraction); 1555 100.0 * fraction);
1556 gtk_progress_bar_set_text (adcc->progress_dialog_bar, 1556 gtk_progress_bar_set_text (adcc->progress_dialog_bar,
1557 s); 1557 s);
1558 GNUNET_free (s); 1558 GNUNET_free (s);
1559 gtk_progress_bar_set_fraction (adcc->progress_dialog_bar, 1559 gtk_progress_bar_set_fraction (adcc->progress_dialog_bar,
1560 fraction); 1560 fraction);
@@ -1575,7 +1575,7 @@ directory_scan_cb (void *cls,
1575 directory_scan_result = GNUNET_FS_directory_scan_get_result (adcc->ds); 1575 directory_scan_result = GNUNET_FS_directory_scan_get_result (adcc->ds);
1576 adcc->ds = NULL; 1576 adcc->ds = NULL;
1577 GNUNET_FS_share_tree_trim (directory_scan_result); 1577 GNUNET_FS_share_tree_trim (directory_scan_result);
1578 add_share_items_to_treestore (adcc, 1578 add_share_items_to_treestore (adcc,
1579 directory_scan_result, 1579 directory_scan_result,
1580 NULL); 1580 NULL);
1581 GNUNET_FS_share_tree_free (directory_scan_result); 1581 GNUNET_FS_share_tree_free (directory_scan_result);
@@ -1600,9 +1600,9 @@ directory_scan_cb (void *cls,
1600 * @param do_index should we index or insert files (by default) 1600 * @param do_index should we index or insert files (by default)
1601 */ 1601 */
1602static void 1602static void
1603scan_file_or_directory (struct MainPublishingDialogContext *ctx, 1603scan_file_or_directory (struct MainPublishingDialogContext *ctx,
1604 gchar *filename, 1604 gchar *filename,
1605 struct GNUNET_FS_BlockOptions *bo, 1605 struct GNUNET_FS_BlockOptions *bo,
1606 int do_index) 1606 int do_index)
1607{ 1607{
1608 struct AddDirClientContext *adcc; 1608 struct AddDirClientContext *adcc;
@@ -1633,7 +1633,7 @@ scan_file_or_directory (struct MainPublishingDialogContext *ctx,
1633 1633
1634 /* actually start the scan */ 1634 /* actually start the scan */
1635 adcc->ds = GNUNET_FS_directory_scan_start (filename, 1635 adcc->ds = GNUNET_FS_directory_scan_start (filename,
1636 GNUNET_NO, NULL, 1636 GNUNET_NO, NULL,
1637 &directory_scan_cb, adcc); 1637 &directory_scan_cb, adcc);
1638 1638
1639 /* disables 'cancel' button of the master dialog */ 1639 /* disables 'cancel' button of the master dialog */
@@ -1663,7 +1663,7 @@ GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog * dialog,
1663 1663
1664 filename = GNUNET_GTK_filechooser_get_filename_utf8 (GTK_FILE_CHOOSER (dialog)); 1664 filename = GNUNET_GTK_filechooser_get_filename_utf8 (GTK_FILE_CHOOSER (dialog));
1665 if (! GNUNET_GTK_get_selected_anonymity_level 1665 if (! GNUNET_GTK_get_selected_anonymity_level
1666 (ctx->open_directory_builder, 1666 (ctx->open_directory_builder,
1667 "GNUNET_GTK_publish_directory_dialog_anonymity_combobox", 1667 "GNUNET_GTK_publish_directory_dialog_anonymity_combobox",
1668 &bo.anonymity_level)) 1668 &bo.anonymity_level))
1669 { 1669 {
@@ -1675,7 +1675,7 @@ GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog * dialog,
1675 (gtk_builder_get_object 1675 (gtk_builder_get_object
1676 (ctx->open_directory_builder, 1676 (ctx->open_directory_builder,
1677 "GNUNET_GTK_publish_directory_dialog_priority_spin_button"))); 1677 "GNUNET_GTK_publish_directory_dialog_priority_spin_button")));
1678 bo.replication_level = 1678 bo.replication_level =
1679 gtk_spin_button_get_value (GTK_SPIN_BUTTON 1679 gtk_spin_button_get_value (GTK_SPIN_BUTTON
1680 (gtk_builder_get_object 1680 (gtk_builder_get_object
1681 (ctx->open_directory_builder, 1681 (ctx->open_directory_builder,
@@ -1740,7 +1740,7 @@ GNUNET_GTK_publish_file_dialog_response_cb (GtkDialog * dialog,
1740 1740
1741 sb = GTK_SPIN_BUTTON (gtk_builder_get_object 1741 sb = GTK_SPIN_BUTTON (gtk_builder_get_object
1742 (ctx->open_file_builder, 1742 (ctx->open_file_builder,
1743 "GNUNET_GTK_publish_file_dialog_expiration_year_spin_button")); 1743 "GNUNET_GTK_publish_file_dialog_expiration_year_spin_button"));
1744 bo.expiration_time = GNUNET_GTK_get_expiration_time (sb); 1744 bo.expiration_time = GNUNET_GTK_get_expiration_time (sb);
1745 } 1745 }
1746 bo.replication_level = 1746 bo.replication_level =
@@ -1766,7 +1766,7 @@ GNUNET_GTK_publish_file_dialog_response_cb (GtkDialog * dialog,
1766/** 1766/**
1767 * User clicked on the 'add' button in the master publish dialog. 1767 * User clicked on the 'add' button in the master publish dialog.
1768 * Create the dialog to allow the user to select a file to add. 1768 * Create the dialog to allow the user to select a file to add.
1769 * 1769 *
1770 * FIXME-UGLY: lots of code duplication between files & directories here... 1770 * FIXME-UGLY: lots of code duplication between files & directories here...
1771 * 1771 *
1772 * @param dummy the button that was pressed 1772 * @param dummy the button that was pressed
@@ -1791,10 +1791,10 @@ GNUNET_GTK_master_publish_dialog_add_button_clicked_cb (GtkWidget * dummy,
1791 1791
1792 { 1792 {
1793 GtkComboBox *combo; 1793 GtkComboBox *combo;
1794 1794
1795 combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_file_builder, 1795 combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_file_builder,
1796 "GNUNET_GTK_publish_file_dialog_anonymity_combobox")); 1796 "GNUNET_GTK_publish_file_dialog_anonymity_combobox"));
1797 gtk_combo_box_set_model (combo, 1797 gtk_combo_box_set_model (combo,
1798 GNUNET_FS_GTK_get_anonymity_level_list_store ()); 1798 GNUNET_FS_GTK_get_anonymity_level_list_store ());
1799 } 1799 }
1800 1800
@@ -1908,12 +1908,12 @@ update_treeview_after_edit (void *cls, struct GNUNET_FS_FileInformation *fi,
1908{ 1908{
1909 struct EditPublishContext *epc = cls; 1909 struct EditPublishContext *epc = cls;
1910 char *name; 1910 char *name;
1911 1911
1912 name = GNUNET_CONTAINER_meta_data_get_by_type (meta, 1912 name = GNUNET_CONTAINER_meta_data_get_by_type (meta,
1913 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME); 1913 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME);
1914 gtk_tree_store_set (GTK_TREE_STORE (epc->tm), &epc->iter, 1914 gtk_tree_store_set (GTK_TREE_STORE (epc->tm), &epc->iter,
1915 PUBLISH_MC_DO_INDEX, *do_index, 1915 PUBLISH_MC_DO_INDEX, *do_index,
1916 PUBLISH_MC_FILENAME, name, 1916 PUBLISH_MC_FILENAME, name,
1917 PUBLISH_MC_ANONYMITY_LEVEL, (guint) bo->anonymity_level, 1917 PUBLISH_MC_ANONYMITY_LEVEL, (guint) bo->anonymity_level,
1918 PUBLISH_MC_PRIORITY, (guint) bo->content_priority, 1918 PUBLISH_MC_PRIORITY, (guint) bo->content_priority,
1919 PUBLISH_MC_EXPIRATION_TIME_ABSOLUTE, 1919 PUBLISH_MC_EXPIRATION_TIME_ABSOLUTE,
@@ -1972,9 +1972,9 @@ GNUNET_GTK_master_publish_dialog_edit_button_clicked_cb (GtkWidget * dummy,
1972 &epc->iter, 1972 &epc->iter,
1973 PUBLISH_MC_FILE_INFORMATION_STRUCT, &epc->fip, 1973 PUBLISH_MC_FILE_INFORMATION_STRUCT, &epc->fip,
1974 -1); 1974 -1);
1975 GNUNET_FS_GTK_edit_publish_dialog (ctx->master_pubdialog, 1975 GNUNET_FS_GTK_edit_publish_dialog (ctx->master_pubdialog,
1976 epc->fip, 1976 epc->fip,
1977 GNUNET_NO, 1977 GNUNET_NO,
1978 &master_publish_edit_publish_dialog_cb, 1978 &master_publish_edit_publish_dialog_cb,
1979 epc); 1979 epc);
1980} 1980}
@@ -2100,10 +2100,10 @@ close_master_publish_dialog (struct MainPublishingDialogContext *ctx)
2100 */ 2100 */
2101static int 2101static int
2102insert_advertisement (void *cls, struct GNUNET_FS_FileInformation *fi, 2102insert_advertisement (void *cls, struct GNUNET_FS_FileInformation *fi,
2103 uint64_t length, 2103 uint64_t length,
2104 struct GNUNET_CONTAINER_MetaData *meta, 2104 struct GNUNET_CONTAINER_MetaData *meta,
2105 struct GNUNET_FS_Uri **uri, 2105 struct GNUNET_FS_Uri **uri,
2106 struct GNUNET_FS_BlockOptions *bo, 2106 struct GNUNET_FS_BlockOptions *bo,
2107 int *do_index, 2107 int *do_index,
2108 void **client_info) 2108 void **client_info)
2109{ 2109{
@@ -2123,7 +2123,7 @@ insert_advertisement (void *cls, struct GNUNET_FS_FileInformation *fi,
2123 2123
2124 GNUNET_CONTAINER_meta_data_insert (meta, "<gnunet>", 2124 GNUNET_CONTAINER_meta_data_insert (meta, "<gnunet>",
2125 EXTRACTOR_METATYPE_URI, EXTRACTOR_METAFORMAT_UTF8, 2125 EXTRACTOR_METATYPE_URI, EXTRACTOR_METAFORMAT_UTF8,
2126 "text/plain", 2126 "text/plain",
2127 sks_uri_string, 2127 sks_uri_string,
2128 strlen (sks_uri_string) + 1); 2128 strlen (sks_uri_string) + 1);
2129 GNUNET_free (sks_uri_string); 2129 GNUNET_free (sks_uri_string);
@@ -2178,7 +2178,7 @@ GNUNET_GTK_master_publish_dialog_execute_button_clicked_cb (GtkButton * button,
2178 if (NULL != (id_entry_text = gtk_entry_get_text (GTK_ENTRY (ctx->identifier_entry)))) 2178 if (NULL != (id_entry_text = gtk_entry_get_text (GTK_ENTRY (ctx->identifier_entry))))
2179 namespace_id = g_strdup (id_entry_text); 2179 namespace_id = g_strdup (id_entry_text);
2180 else if (!do_global) 2180 else if (!do_global)
2181 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 2181 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
2182 "Global publication is disabled, but namespace_id is not available\n"); 2182 "Global publication is disabled, but namespace_id is not available\n");
2183 if ((NULL != namespace_id) && ('\0' == namespace_id[0])) 2183 if ((NULL != namespace_id) && ('\0' == namespace_id[0]))
2184 { 2184 {
@@ -2214,10 +2214,10 @@ GNUNET_GTK_master_publish_dialog_execute_button_clicked_cb (GtkButton * button,
2214 fi = get_file_information (ctx->file_info_treemodel, &iter); 2214 fi = get_file_information (ctx->file_info_treemodel, &iter);
2215 if (do_global && do_own && !disable_ads_insertion) 2215 if (do_global && do_own && !disable_ads_insertion)
2216 GNUNET_FS_file_information_inspect (fi, insert_advertisement, ctx); 2216 GNUNET_FS_file_information_inspect (fi, insert_advertisement, ctx);
2217 GNUNET_FS_publish_start (GNUNET_FS_GTK_get_fs_handle (), 2217 GNUNET_FS_publish_start (GNUNET_FS_GTK_get_fs_handle (),
2218 fi, 2218 fi,
2219 (NULL == ns) 2219 (NULL == ns)
2220 ? NULL 2220 ? NULL
2221 : GNUNET_IDENTITY_ego_get_private_key (ns), 2221 : GNUNET_IDENTITY_ego_get_private_key (ns),
2222 namespace_id, namespace_uid, 2222 namespace_id, namespace_uid,
2223 GNUNET_FS_PUBLISH_OPTION_NONE); 2223 GNUNET_FS_PUBLISH_OPTION_NONE);
@@ -2278,7 +2278,7 @@ clear_keywords_from_file_information_in_tree_store (GtkTreeModel * tm,
2278{ 2278{
2279 GtkTreeIter child; 2279 GtkTreeIter child;
2280 struct GNUNET_FS_FileInformation *fip; 2280 struct GNUNET_FS_FileInformation *fip;
2281 2281
2282 gtk_tree_model_get (tm, iter, PUBLISH_MC_FILE_INFORMATION_STRUCT, &fip, -1); 2282 gtk_tree_model_get (tm, iter, PUBLISH_MC_FILE_INFORMATION_STRUCT, &fip, -1);
2283 if (NULL != fip) 2283 if (NULL != fip)
2284 { 2284 {
@@ -2398,7 +2398,7 @@ expander_callback (GObject *object,
2398 g_value_init (&gv, G_TYPE_BOOLEAN); 2398 g_value_init (&gv, G_TYPE_BOOLEAN);
2399 g_value_set_boolean (&gv, expanded); 2399 g_value_set_boolean (&gv, expanded);
2400 gtk_container_child_set_property (GTK_CONTAINER (ctx->vpaned), 2400 gtk_container_child_set_property (GTK_CONTAINER (ctx->vpaned),
2401 ctx->bottom_frame, 2401 ctx->bottom_frame,
2402 "resize", &gv); 2402 "resize", &gv);
2403 paned_pos = gtk_paned_get_position (GTK_PANED (ctx->vpaned)); 2403 paned_pos = gtk_paned_get_position (GTK_PANED (ctx->vpaned));
2404 paned_pos = paned_pos + (scrolled_allocation.height * (expanded ? -1 : 1)); 2404 paned_pos = paned_pos + (scrolled_allocation.height * (expanded ? -1 : 1));
@@ -2492,7 +2492,7 @@ add_updateable_to_ts (void *cls, const char *last_id,
2492 urilen = 0; 2492 urilen = 0;
2493 2493
2494 mdbuf = NULL; 2494 mdbuf = NULL;
2495 mdsize = GNUNET_CONTAINER_meta_data_serialize (last_meta, 2495 mdsize = GNUNET_CONTAINER_meta_data_serialize (last_meta,
2496 &mdbuf, 64*1024, 2496 &mdbuf, 64*1024,
2497 GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL); 2497 GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL);
2498 if (0 > mdsize) 2498 if (0 > mdsize)
@@ -2575,12 +2575,12 @@ add_updateable_to_ts (void *cls, const char *last_id,
2575 sc.ns = uc->ns; 2575 sc.ns = uc->ns;
2576 sc.seen = uc->seen; 2576 sc.seen = uc->seen;
2577 sc.update_called = GNUNET_NO; 2577 sc.update_called = GNUNET_NO;
2578 GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (), 2578 GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (),
2579 GNUNET_IDENTITY_ego_get_private_key (uc->ns), 2579 GNUNET_IDENTITY_ego_get_private_key (uc->ns),
2580 next_id, 2580 next_id,
2581 &add_updateable_to_ts, 2581 &add_updateable_to_ts,
2582 &sc); 2582 &sc);
2583 if ((sc.update_called == GNUNET_NO) && 2583 if ((sc.update_called == GNUNET_NO) &&
2584 (NULL != next_id) && 2584 (NULL != next_id) &&
2585 (strlen (next_id) > 0)) 2585 (strlen (next_id) > 0))
2586 { 2586 {
@@ -2608,8 +2608,8 @@ add_updateable_to_ts (void *cls, const char *last_id,
2608 * @return #GNUNET_YES, always. 2608 * @return #GNUNET_YES, always.
2609 */ 2609 */
2610static int 2610static int
2611free_seen_paths (void *cls, 2611free_seen_paths (void *cls,
2612 const struct GNUNET_HashCode *key, 2612 const struct GNUNET_HashCode *key,
2613 void *value) 2613 void *value)
2614{ 2614{
2615 GNUNET_free_non_null (value); 2615 GNUNET_free_non_null (value);
@@ -2669,7 +2669,7 @@ GNUNET_GTK_master_publish_dialog_ego_combobox_changed_cb (GtkComboBox *combo,
2669 uc.update_called = GNUNET_NO; 2669 uc.update_called = GNUNET_NO;
2670 uc.seen = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_NO); 2670 uc.seen = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_NO);
2671 2671
2672 GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (), 2672 GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (),
2673 GNUNET_IDENTITY_ego_get_private_key (ego), 2673 GNUNET_IDENTITY_ego_get_private_key (ego),
2674 NULL, 2674 NULL,
2675 &add_updateable_to_ts, 2675 &add_updateable_to_ts,
@@ -2689,7 +2689,7 @@ GNUNET_GTK_master_publish_dialog_ego_combobox_changed_cb (GtkComboBox *combo,
2689 * 2689 *
2690 * @param cls our `struct MainPublishingDialogContext` 2690 * @param cls our `struct MainPublishingDialogContext`
2691 * @param ego identity of the namespace to add 2691 * @param ego identity of the namespace to add
2692 * @param ego_ctx where to store context data 2692 * @param ego_ctx where to store context data
2693 * @param name name of the namespace to add 2693 * @param name name of the namespace to add
2694 */ 2694 */
2695static void 2695static void
@@ -2714,14 +2714,14 @@ add_namespace_to_ts (void *cls,
2714 { 2714 {
2715 /* insert operation */ 2715 /* insert operation */
2716 GNUNET_assert (NULL != name); 2716 GNUNET_assert (NULL != name);
2717 gtk_list_store_insert_with_values (ls, 2717 gtk_list_store_insert_with_values (ls,
2718 &iter, G_MAXINT, 2718 &iter, G_MAXINT,
2719 EGO_MC_NAME, name, 2719 EGO_MC_NAME, name,
2720 EGO_MC_EGO, ego, 2720 EGO_MC_EGO, ego,
2721 -1); 2721 -1);
2722 path = gtk_tree_model_get_path (GTK_TREE_MODEL (ls), 2722 path = gtk_tree_model_get_path (GTK_TREE_MODEL (ls),
2723 &iter); 2723 &iter);
2724 rr = gtk_tree_row_reference_new (GTK_TREE_MODEL (ls), 2724 rr = gtk_tree_row_reference_new (GTK_TREE_MODEL (ls),
2725 path); 2725 path);
2726 gtk_tree_path_free (path); 2726 gtk_tree_path_free (path);
2727 *ego_ctx = rr; 2727 *ego_ctx = rr;
@@ -2741,13 +2741,13 @@ add_namespace_to_ts (void *cls,
2741 { 2741 {
2742 /* rename operation */ 2742 /* rename operation */
2743 path = gtk_tree_row_reference_get_path (rr); 2743 path = gtk_tree_row_reference_get_path (rr);
2744 GNUNET_assert (gtk_tree_model_get_iter (GTK_TREE_MODEL (ls), 2744 GNUNET_assert (gtk_tree_model_get_iter (GTK_TREE_MODEL (ls),
2745 &iter, path)); 2745 &iter, path));
2746 gtk_list_store_set (ls, 2746 gtk_list_store_set (ls,
2747 &iter, G_MAXINT, 2747 &iter, G_MAXINT,
2748 EGO_MC_NAME, name, 2748 EGO_MC_NAME, name,
2749 -1); 2749 -1);
2750 gtk_tree_path_free (path); 2750 gtk_tree_path_free (path);
2751 } 2751 }
2752 have_ns = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ls), &iter); 2752 have_ns = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ls), &iter);
2753 gtk_widget_set_sensitive (ctx->own_checkbox, have_ns); 2753 gtk_widget_set_sensitive (ctx->own_checkbox, have_ns);
@@ -2759,12 +2759,12 @@ add_namespace_to_ts (void *cls,
2759 2759
2760/** 2760/**
2761 * Run the file-publishing operation (by opening the master publishing dialog). 2761 * Run the file-publishing operation (by opening the master publishing dialog).
2762 * 2762 *
2763 * @param dummy widget that triggered the action 2763 * @param dummy widget that triggered the action
2764 * @param user_data builder of the main window 2764 * @param user_data builder of the main window
2765 */ 2765 */
2766void 2766void
2767GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget * dummy, 2767GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget * dummy,
2768 gpointer user_data) 2768 gpointer user_data)
2769{ 2769{
2770 struct MainPublishingDialogContext *ctx; 2770 struct MainPublishingDialogContext *ctx;
@@ -2873,7 +2873,7 @@ GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget * dummy,
2873 /* show dialog */ 2873 /* show dialog */
2874 toplevel = gtk_widget_get_toplevel (dummy); 2874 toplevel = gtk_widget_get_toplevel (dummy);
2875 if (GTK_IS_WINDOW (toplevel)) 2875 if (GTK_IS_WINDOW (toplevel))
2876 gtk_window_set_transient_for (GTK_WINDOW (ctx->master_pubdialog), 2876 gtk_window_set_transient_for (GTK_WINDOW (ctx->master_pubdialog),
2877 GTK_WINDOW (toplevel)); 2877 GTK_WINDOW (toplevel));
2878 gtk_window_present (GTK_WINDOW (ctx->master_pubdialog)); 2878 gtk_window_present (GTK_WINDOW (ctx->master_pubdialog));
2879} 2879}