From b5290908f7ee34c85d197c5382a194f18f06f0f2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 15 Sep 2013 20:00:02 +0000 Subject: -remove tailing whitespaces --- src/fs/gnunet-fs-gtk_publish-dialog.c | 210 +++++++++++++++++----------------- 1 file changed, 105 insertions(+), 105 deletions(-) (limited to 'src/fs/gnunet-fs-gtk_publish-dialog.c') 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 enum EGO_ModelColumns { - /** + /** * A gchararray. - */ + */ EGO_MC_NAME = 0, /** @@ -156,9 +156,9 @@ struct MainPublishingDialogContext /** * Connection to the identity service. - */ + */ struct GNUNET_IDENTITY_Handle *identity; - + /** * Handle to the main window of the publishing dialog. */ @@ -177,7 +177,7 @@ struct MainPublishingDialogContext /** * Model with the list of files to be shared. */ - GtkTreeModel *file_info_treemodel; + GtkTreeModel *file_info_treemodel; /** * Button to move selected file upwards @@ -411,7 +411,7 @@ struct AddDirClientContext }; -static void +static void clear_keywords_from_tm (struct MainPublishingDialogContext *ctx); @@ -428,7 +428,7 @@ clear_keywords_from_tm (struct MainPublishingDialogContext *ctx); */ static int gtk_tree_iter_equals (GtkTreeModel *tm, - GtkTreeIter *i1, + GtkTreeIter *i1, GtkTreeIter *i2) { GtkTreePath *p1; @@ -468,9 +468,9 @@ update_selectivity_execute_cancel (struct MainPublishingDialogContext *ctx) /* Don't let the user close the dialog until all scanners are finished and their windows are closed */ - if ( (gtk_tree_model_get_iter_first (ctx->file_info_treemodel, &iter)) && + if ( (gtk_tree_model_get_iter_first (ctx->file_info_treemodel, &iter)) && (pub_in_global || pub_in_own) && - ((!pub_in_own) || ( (NULL != ctx->ns) && + ((!pub_in_own) || ( (NULL != ctx->ns) && (NULL != ns_id) && ('\0' != ns_id[0])) ) && (NULL == ctx->adddir_head) ) @@ -515,9 +515,9 @@ update_selectivity_edit (struct MainPublishingDialogContext *ctx) /* figure out which move operations are currently legal */ GNUNET_assert (gtk_tree_selection_get_selected (ctx->file_info_selection, NULL, &iter)); - if (gtk_tree_model_iter_next (ctx->file_info_treemodel, &iter)) - gtk_widget_set_sensitive (ctx->down_button, TRUE); - else + if (gtk_tree_model_iter_next (ctx->file_info_treemodel, &iter)) + gtk_widget_set_sensitive (ctx->down_button, TRUE); + else gtk_widget_set_sensitive (ctx->down_button, FALSE); GNUNET_assert (gtk_tree_selection_get_selected (ctx->file_info_selection, NULL, &iter)); if (gtk_tree_model_iter_parent (ctx->file_info_treemodel, &parent, &iter)) @@ -540,14 +540,14 @@ update_selectivity_edit (struct MainPublishingDialogContext *ctx) is_dir = GNUNET_FS_file_information_is_directory (fip); GNUNET_assert (gtk_tree_model_iter_next (ctx->file_info_treemodel, &pred)); } - if (GNUNET_YES == is_dir) - gtk_widget_set_sensitive (ctx->right_button, TRUE); - else - gtk_widget_set_sensitive (ctx->right_button, FALSE); - if (GNUNET_SYSERR != is_dir) - gtk_widget_set_sensitive (ctx->up_button, TRUE); - else - gtk_widget_set_sensitive (ctx->up_button, FALSE); + if (GNUNET_YES == is_dir) + gtk_widget_set_sensitive (ctx->right_button, TRUE); + else + gtk_widget_set_sensitive (ctx->right_button, FALSE); + if (GNUNET_SYSERR != is_dir) + gtk_widget_set_sensitive (ctx->up_button, TRUE); + else + gtk_widget_set_sensitive (ctx->up_button, FALSE); } @@ -558,7 +558,7 @@ update_selectivity_edit (struct MainPublishingDialogContext *ctx) * @param user_data master publishing dialog context of our window */ static void -selection_changed_cb (GtkTreeSelection * ts, +selection_changed_cb (GtkTreeSelection * ts, gpointer user_data) { struct MainPublishingDialogContext *ctx = user_data; @@ -577,9 +577,9 @@ selection_changed_cb (GtkTreeSelection * ts, * @param pos iterator to set to the location of the new element */ static void -create_dir_at_iter (struct MainPublishingDialogContext *ctx, +create_dir_at_iter (struct MainPublishingDialogContext *ctx, const char *name, - const struct GNUNET_FS_BlockOptions *bo, + const struct GNUNET_FS_BlockOptions *bo, GtkTreeIter * iter, GtkTreeIter * pos) { @@ -601,12 +601,12 @@ create_dir_at_iter (struct MainPublishingDialogContext *ctx, fi = GNUNET_FS_file_information_create_empty_directory (GNUNET_FS_GTK_get_fs_handle (), row_reference, NULL, meta, bo, name); GNUNET_CONTAINER_meta_data_destroy (meta); - gtk_tree_store_set (GTK_TREE_STORE (ctx->file_info_treemodel), pos, - PUBLISH_MC_FILESIZE, MARKER_DIR_FILE_SIZE, + gtk_tree_store_set (GTK_TREE_STORE (ctx->file_info_treemodel), pos, + PUBLISH_MC_FILESIZE, MARKER_DIR_FILE_SIZE, PUBLISH_MC_DO_INDEX, (gboolean) GNUNET_NO, - PUBLISH_MC_FILENAME, name, - PUBLISH_MC_ANONYMITY_LEVEL, (guint) bo->anonymity_level, - PUBLISH_MC_PRIORITY, (guint) bo->content_priority, + PUBLISH_MC_FILENAME, name, + PUBLISH_MC_ANONYMITY_LEVEL, (guint) bo->anonymity_level, + PUBLISH_MC_PRIORITY, (guint) bo->content_priority, PUBLISH_MC_FILE_INFORMATION_STRUCT, fi, PUBLISH_MC_EXPIRATION_TIME_ABSOLUTE, (guint64) bo->expiration_time.abs_value_us, @@ -653,7 +653,7 @@ copy_entry (struct MainPublishingDialogContext *ctx, GtkTreeModel * tm, GtkTreeI char *fsf; gtk_tree_model_get (tm, old, - PUBLISH_MC_FILESIZE, &fsf, + PUBLISH_MC_FILESIZE, &fsf, PUBLISH_MC_DO_INDEX, &do_index, PUBLISH_MC_FILENAME, &short_fn, PUBLISH_MC_ANONYMITY_LEVEL, &anonymity_level, @@ -820,7 +820,7 @@ generate_update_id (const gchar *new_text) * FALSE otherwise */ static gboolean -update_id_is_autofilled (const gchar *existing_update_id, +update_id_is_autofilled (const gchar *existing_update_id, const gchar *previous_id) { gboolean result; @@ -852,10 +852,10 @@ maybe_change_update_id (struct MainPublishingDialogContext *ctx, new_update_id = NULL; existing_update_id = gtk_entry_get_text (GTK_ENTRY (ctx->update_id_entry)); - if ( ( (NULL == ctx->previous_id) && - ('\0' == existing_update_id[0]) ) || + if ( ( (NULL == ctx->previous_id) && + ('\0' == existing_update_id[0]) ) || ( (NULL != ctx->previous_id) && - update_id_is_autofilled (existing_update_id, + update_id_is_autofilled (existing_update_id, ctx->previous_id) ) ) new_update_id = generate_update_id (new_text); if (NULL != new_update_id) @@ -877,7 +877,7 @@ maybe_change_update_id (struct MainPublishingDialogContext *ctx, * @param user_data our `struct MainPublishingDialogContext` */ void -GNUNET_GTK_master_publish_dialog_identifier_entry_changed_cb (GtkWidget *widget, +GNUNET_GTK_master_publish_dialog_identifier_entry_changed_cb (GtkWidget *widget, gpointer user_data) { struct MainPublishingDialogContext *ctx = user_data; @@ -1042,12 +1042,12 @@ GNUNET_GTK_master_publish_dialog_up_button_clicked_cb (GtkWidget * dummy, GNUNET_assert (TRUE == gtk_tree_model_iter_children (ctx->file_info_treemodel, &pred, &parent)); pprev = &parent; } - else if (! gtk_tree_model_get_iter_first (ctx->file_info_treemodel, &pred)) + else if (! gtk_tree_model_get_iter_first (ctx->file_info_treemodel, &pred)) { GNUNET_break (0); return; - } - pprev = NULL; + } + pprev = NULL; /* iterate over 'next' of pred to find out who our predecessor is! */ while (GNUNET_YES != gtk_tree_iter_equals (ctx->file_info_treemodel, &pred, &iter)) { @@ -1147,7 +1147,7 @@ GNUNET_GTK_master_publish_dialog_new_button_clicked_cb (GtkWidget * dummy, * @param bo publishing options, unused * @param do_index indexing option, unused * @param client_info pointer to the GtkTreeRowReference, freed - * @return GNUNET_OK to traverse entire subtree + * @return GNUNET_OK to traverse entire subtree */ static int free_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, { rr = gtk_tree_row_reference_new (ctx->file_info_treemodel, path); gtk_tree_path_free (path); - } + } /* 'iter' might have again been clobbered, get it one more time... */ 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, gtk_tree_model_get (ctx->file_info_treemodel, &iter, PUBLISH_MC_FILE_INFORMATION_STRUCT, &fip, -1); GNUNET_FS_file_information_destroy (fip, &free_fi_row_reference, NULL); - GNUNET_FS_GTK_remove_treestore_subtree (GTK_TREE_STORE (ctx->file_info_treemodel), + GNUNET_FS_GTK_remove_treestore_subtree (GTK_TREE_STORE (ctx->file_info_treemodel), &iter); /* finally, select the item from 'rr' (if any) */ @@ -1263,9 +1263,9 @@ destroy_progress_dialog (struct AddDirClientContext *adcc) adcc->kill_task = GNUNET_SCHEDULER_NO_TASK; } gtk_widget_destroy (adcc->progress_dialog); - g_object_unref (G_OBJECT (adcc->progress_dialog_builder)); + g_object_unref (G_OBJECT (adcc->progress_dialog_builder)); GNUNET_CONTAINER_DLL_remove (adcc->ctx->adddir_head, - adcc->ctx->adddir_tail, + adcc->ctx->adddir_tail, adcc); update_selectivity_execute_cancel (adcc->ctx); update_selectivity_edit (adcc->ctx); @@ -1315,7 +1315,7 @@ GNUNET_FS_GTK_progress_dialog_delete_event_cb (GtkWidget *widget, /** - * Display some additional information in the text area of the + * Display some additional information in the text area of the * progress dialog. * * @param adcc progress dialog context of our window @@ -1344,10 +1344,10 @@ insert_progress_dialog_text (struct AddDirClientContext *adcc, * @param item_iter entry to set to the added item (OUT) */ static void -add_item (struct AddDirClientContext *adcc, +add_item (struct AddDirClientContext *adcc, GtkTreeStore *ts, - struct GNUNET_FS_ShareTreeItem *item, - GtkTreeIter *parent, + struct GNUNET_FS_ShareTreeItem *item, + GtkTreeIter *parent, GtkTreeIter *sibling, GtkTreeIter *item_iter) { @@ -1357,7 +1357,7 @@ add_item (struct AddDirClientContext *adcc, GtkTreePath *path; struct stat sbuf; uint64_t fsize; - + if (0 != STAT (item->filename, &sbuf)) { @@ -1382,26 +1382,26 @@ add_item (struct AddDirClientContext *adcc, item->meta = GNUNET_CONTAINER_meta_data_create (); GNUNET_FS_meta_data_make_directory (item->meta); - fi = GNUNET_FS_file_information_create_empty_directory (GNUNET_FS_GTK_get_fs_handle (), - row_reference, + fi = GNUNET_FS_file_information_create_empty_directory (GNUNET_FS_GTK_get_fs_handle (), + row_reference, item->ksk_uri, - item->meta, - &adcc->directory_scan_bo, + item->meta, + &adcc->directory_scan_bo, item->filename); file_size_fancy = GNUNET_strdup (MARKER_DIR_FILE_SIZE); } else { - fi = GNUNET_FS_file_information_create_from_file (GNUNET_FS_GTK_get_fs_handle (), - row_reference, + fi = GNUNET_FS_file_information_create_from_file (GNUNET_FS_GTK_get_fs_handle (), + row_reference, item->filename, - item->ksk_uri, - item->meta, + item->ksk_uri, + item->meta, adcc->directory_scan_do_index, &adcc->directory_scan_bo); file_size_fancy = GNUNET_STRINGS_byte_size_fancy (fsize); } - gtk_tree_store_set (ts, item_iter, + gtk_tree_store_set (ts, item_iter, PUBLISH_MC_FILESIZE, file_size_fancy, PUBLISH_MC_DO_INDEX, (gboolean) adcc->directory_scan_do_index, @@ -1437,12 +1437,12 @@ add_share_items_to_treestore (struct AddDirClientContext *adcc, GtkTreeIter last_added; struct GNUNET_FS_ShareTreeItem *item; - sibling_iter = NULL; + sibling_iter = NULL; for (item = toplevel; NULL != item; item = item->next) { add_item (adcc, ts, item, parent_iter, sibling_iter, &last_added); sibling_iter = &last_added; - if (item->is_directory == GNUNET_YES) + if (item->is_directory == GNUNET_YES) add_share_items_to_treestore (adcc, item->children_head, sibling_iter); @@ -1452,7 +1452,7 @@ add_share_items_to_treestore (struct AddDirClientContext *adcc, /** * Function called when the scanner had some trouble and we - * need to abort the scanning process (which we need to do + * need to abort the scanning process (which we need to do * in a separate task). * * @param cls progress dialog context of our window @@ -1463,7 +1463,7 @@ stop_scanner_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { struct AddDirClientContext *adcc = cls; - + adcc->kill_task = GNUNET_SCHEDULER_NO_TASK; if (NULL != adcc->ds) { @@ -1483,7 +1483,7 @@ stop_scanner_task (void *cls, * @param reason kind of progress that was made */ static void -directory_scan_cb (void *cls, +directory_scan_cb (void *cls, const char *filename, int is_directory, enum GNUNET_FS_DirScannerProgressUpdateReason reason) { @@ -1525,16 +1525,16 @@ directory_scan_cb (void *cls, "GNUNET_FS_GTK_progress_dialog_scrolled_window"))); #endif insert_progress_dialog_text (adcc, s); - GNUNET_free (s); + GNUNET_free (s); break; case GNUNET_FS_DIRSCANNER_ALL_COUNTED: fraction = (adcc->total == 0) ? 1.0 : (1.0 * adcc->done) / adcc->total; - GNUNET_asprintf (&s, "%u/%u (%3f%%)", + GNUNET_asprintf (&s, "%u/%u (%3f%%)", adcc->done, adcc->total, 100.0 * fraction); gtk_progress_bar_set_text (adcc->progress_dialog_bar, - s); + s); GNUNET_free (s); gtk_progress_bar_set_fraction (adcc->progress_dialog_bar, fraction); @@ -1549,12 +1549,12 @@ directory_scan_cb (void *cls, adcc->done++; GNUNET_assert (adcc->done <= adcc->total); fraction = (adcc->total == 0) ? 1.0 : (1.0 * adcc->done) / adcc->total; - GNUNET_asprintf (&s, "%u/%u (%3f%%)", + GNUNET_asprintf (&s, "%u/%u (%3f%%)", adcc->done, adcc->total, 100.0 * fraction); gtk_progress_bar_set_text (adcc->progress_dialog_bar, - s); + s); GNUNET_free (s); gtk_progress_bar_set_fraction (adcc->progress_dialog_bar, fraction); @@ -1575,7 +1575,7 @@ directory_scan_cb (void *cls, directory_scan_result = GNUNET_FS_directory_scan_get_result (adcc->ds); adcc->ds = NULL; GNUNET_FS_share_tree_trim (directory_scan_result); - add_share_items_to_treestore (adcc, + add_share_items_to_treestore (adcc, directory_scan_result, NULL); GNUNET_FS_share_tree_free (directory_scan_result); @@ -1600,9 +1600,9 @@ directory_scan_cb (void *cls, * @param do_index should we index or insert files (by default) */ static void -scan_file_or_directory (struct MainPublishingDialogContext *ctx, +scan_file_or_directory (struct MainPublishingDialogContext *ctx, gchar *filename, - struct GNUNET_FS_BlockOptions *bo, + struct GNUNET_FS_BlockOptions *bo, int do_index) { struct AddDirClientContext *adcc; @@ -1633,7 +1633,7 @@ scan_file_or_directory (struct MainPublishingDialogContext *ctx, /* actually start the scan */ adcc->ds = GNUNET_FS_directory_scan_start (filename, - GNUNET_NO, NULL, + GNUNET_NO, NULL, &directory_scan_cb, adcc); /* disables 'cancel' button of the master dialog */ @@ -1663,7 +1663,7 @@ GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog * dialog, filename = GNUNET_GTK_filechooser_get_filename_utf8 (GTK_FILE_CHOOSER (dialog)); if (! GNUNET_GTK_get_selected_anonymity_level - (ctx->open_directory_builder, + (ctx->open_directory_builder, "GNUNET_GTK_publish_directory_dialog_anonymity_combobox", &bo.anonymity_level)) { @@ -1675,7 +1675,7 @@ GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog * dialog, (gtk_builder_get_object (ctx->open_directory_builder, "GNUNET_GTK_publish_directory_dialog_priority_spin_button"))); - bo.replication_level = + bo.replication_level = gtk_spin_button_get_value (GTK_SPIN_BUTTON (gtk_builder_get_object (ctx->open_directory_builder, @@ -1740,7 +1740,7 @@ GNUNET_GTK_publish_file_dialog_response_cb (GtkDialog * dialog, sb = GTK_SPIN_BUTTON (gtk_builder_get_object (ctx->open_file_builder, - "GNUNET_GTK_publish_file_dialog_expiration_year_spin_button")); + "GNUNET_GTK_publish_file_dialog_expiration_year_spin_button")); bo.expiration_time = GNUNET_GTK_get_expiration_time (sb); } bo.replication_level = @@ -1766,7 +1766,7 @@ GNUNET_GTK_publish_file_dialog_response_cb (GtkDialog * dialog, /** * User clicked on the 'add' button in the master publish dialog. * Create the dialog to allow the user to select a file to add. - * + * * FIXME-UGLY: lots of code duplication between files & directories here... * * @param dummy the button that was pressed @@ -1791,10 +1791,10 @@ GNUNET_GTK_master_publish_dialog_add_button_clicked_cb (GtkWidget * dummy, { GtkComboBox *combo; - + combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_file_builder, "GNUNET_GTK_publish_file_dialog_anonymity_combobox")); - gtk_combo_box_set_model (combo, + gtk_combo_box_set_model (combo, GNUNET_FS_GTK_get_anonymity_level_list_store ()); } @@ -1908,12 +1908,12 @@ update_treeview_after_edit (void *cls, struct GNUNET_FS_FileInformation *fi, { struct EditPublishContext *epc = cls; char *name; - + name = GNUNET_CONTAINER_meta_data_get_by_type (meta, EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME); gtk_tree_store_set (GTK_TREE_STORE (epc->tm), &epc->iter, PUBLISH_MC_DO_INDEX, *do_index, - PUBLISH_MC_FILENAME, name, + PUBLISH_MC_FILENAME, name, PUBLISH_MC_ANONYMITY_LEVEL, (guint) bo->anonymity_level, PUBLISH_MC_PRIORITY, (guint) bo->content_priority, PUBLISH_MC_EXPIRATION_TIME_ABSOLUTE, @@ -1972,9 +1972,9 @@ GNUNET_GTK_master_publish_dialog_edit_button_clicked_cb (GtkWidget * dummy, &epc->iter, PUBLISH_MC_FILE_INFORMATION_STRUCT, &epc->fip, -1); - GNUNET_FS_GTK_edit_publish_dialog (ctx->master_pubdialog, - epc->fip, - GNUNET_NO, + GNUNET_FS_GTK_edit_publish_dialog (ctx->master_pubdialog, + epc->fip, + GNUNET_NO, &master_publish_edit_publish_dialog_cb, epc); } @@ -2100,10 +2100,10 @@ close_master_publish_dialog (struct MainPublishingDialogContext *ctx) */ static int insert_advertisement (void *cls, struct GNUNET_FS_FileInformation *fi, - uint64_t length, + uint64_t length, struct GNUNET_CONTAINER_MetaData *meta, struct GNUNET_FS_Uri **uri, - struct GNUNET_FS_BlockOptions *bo, + struct GNUNET_FS_BlockOptions *bo, int *do_index, void **client_info) { @@ -2123,7 +2123,7 @@ insert_advertisement (void *cls, struct GNUNET_FS_FileInformation *fi, GNUNET_CONTAINER_meta_data_insert (meta, "", EXTRACTOR_METATYPE_URI, EXTRACTOR_METAFORMAT_UTF8, - "text/plain", + "text/plain", sks_uri_string, strlen (sks_uri_string) + 1); GNUNET_free (sks_uri_string); @@ -2178,7 +2178,7 @@ GNUNET_GTK_master_publish_dialog_execute_button_clicked_cb (GtkButton * button, if (NULL != (id_entry_text = gtk_entry_get_text (GTK_ENTRY (ctx->identifier_entry)))) namespace_id = g_strdup (id_entry_text); else if (!do_global) - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Global publication is disabled, but namespace_id is not available\n"); if ((NULL != namespace_id) && ('\0' == namespace_id[0])) { @@ -2214,10 +2214,10 @@ GNUNET_GTK_master_publish_dialog_execute_button_clicked_cb (GtkButton * button, fi = get_file_information (ctx->file_info_treemodel, &iter); if (do_global && do_own && !disable_ads_insertion) GNUNET_FS_file_information_inspect (fi, insert_advertisement, ctx); - GNUNET_FS_publish_start (GNUNET_FS_GTK_get_fs_handle (), + GNUNET_FS_publish_start (GNUNET_FS_GTK_get_fs_handle (), fi, - (NULL == ns) - ? NULL + (NULL == ns) + ? NULL : GNUNET_IDENTITY_ego_get_private_key (ns), namespace_id, namespace_uid, GNUNET_FS_PUBLISH_OPTION_NONE); @@ -2278,7 +2278,7 @@ clear_keywords_from_file_information_in_tree_store (GtkTreeModel * tm, { GtkTreeIter child; struct GNUNET_FS_FileInformation *fip; - + gtk_tree_model_get (tm, iter, PUBLISH_MC_FILE_INFORMATION_STRUCT, &fip, -1); if (NULL != fip) { @@ -2398,7 +2398,7 @@ expander_callback (GObject *object, g_value_init (&gv, G_TYPE_BOOLEAN); g_value_set_boolean (&gv, expanded); gtk_container_child_set_property (GTK_CONTAINER (ctx->vpaned), - ctx->bottom_frame, + ctx->bottom_frame, "resize", &gv); paned_pos = gtk_paned_get_position (GTK_PANED (ctx->vpaned)); paned_pos = paned_pos + (scrolled_allocation.height * (expanded ? -1 : 1)); @@ -2492,7 +2492,7 @@ add_updateable_to_ts (void *cls, const char *last_id, urilen = 0; mdbuf = NULL; - mdsize = GNUNET_CONTAINER_meta_data_serialize (last_meta, + mdsize = GNUNET_CONTAINER_meta_data_serialize (last_meta, &mdbuf, 64*1024, GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL); if (0 > mdsize) @@ -2575,12 +2575,12 @@ add_updateable_to_ts (void *cls, const char *last_id, sc.ns = uc->ns; sc.seen = uc->seen; sc.update_called = GNUNET_NO; - GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (), + GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (), GNUNET_IDENTITY_ego_get_private_key (uc->ns), next_id, &add_updateable_to_ts, &sc); - if ((sc.update_called == GNUNET_NO) && + if ((sc.update_called == GNUNET_NO) && (NULL != next_id) && (strlen (next_id) > 0)) { @@ -2608,8 +2608,8 @@ add_updateable_to_ts (void *cls, const char *last_id, * @return #GNUNET_YES, always. */ static int -free_seen_paths (void *cls, - const struct GNUNET_HashCode *key, +free_seen_paths (void *cls, + const struct GNUNET_HashCode *key, void *value) { GNUNET_free_non_null (value); @@ -2669,7 +2669,7 @@ GNUNET_GTK_master_publish_dialog_ego_combobox_changed_cb (GtkComboBox *combo, uc.update_called = GNUNET_NO; uc.seen = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_NO); - GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (), + GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (), GNUNET_IDENTITY_ego_get_private_key (ego), NULL, &add_updateable_to_ts, @@ -2689,7 +2689,7 @@ GNUNET_GTK_master_publish_dialog_ego_combobox_changed_cb (GtkComboBox *combo, * * @param cls our `struct MainPublishingDialogContext` * @param ego identity of the namespace to add - * @param ego_ctx where to store context data + * @param ego_ctx where to store context data * @param name name of the namespace to add */ static void @@ -2714,14 +2714,14 @@ add_namespace_to_ts (void *cls, { /* insert operation */ GNUNET_assert (NULL != name); - gtk_list_store_insert_with_values (ls, + gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, EGO_MC_NAME, name, EGO_MC_EGO, ego, -1); path = gtk_tree_model_get_path (GTK_TREE_MODEL (ls), &iter); - rr = gtk_tree_row_reference_new (GTK_TREE_MODEL (ls), + rr = gtk_tree_row_reference_new (GTK_TREE_MODEL (ls), path); gtk_tree_path_free (path); *ego_ctx = rr; @@ -2741,13 +2741,13 @@ add_namespace_to_ts (void *cls, { /* rename operation */ path = gtk_tree_row_reference_get_path (rr); - GNUNET_assert (gtk_tree_model_get_iter (GTK_TREE_MODEL (ls), + GNUNET_assert (gtk_tree_model_get_iter (GTK_TREE_MODEL (ls), &iter, path)); - gtk_list_store_set (ls, + gtk_list_store_set (ls, &iter, G_MAXINT, EGO_MC_NAME, name, -1); - gtk_tree_path_free (path); + gtk_tree_path_free (path); } have_ns = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ls), &iter); gtk_widget_set_sensitive (ctx->own_checkbox, have_ns); @@ -2759,12 +2759,12 @@ add_namespace_to_ts (void *cls, /** * Run the file-publishing operation (by opening the master publishing dialog). - * + * * @param dummy widget that triggered the action * @param user_data builder of the main window */ void -GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget * dummy, +GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget * dummy, gpointer user_data) { struct MainPublishingDialogContext *ctx; @@ -2873,7 +2873,7 @@ GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget * dummy, /* show dialog */ toplevel = gtk_widget_get_toplevel (dummy); if (GTK_IS_WINDOW (toplevel)) - gtk_window_set_transient_for (GTK_WINDOW (ctx->master_pubdialog), + gtk_window_set_transient_for (GTK_WINDOW (ctx->master_pubdialog), GTK_WINDOW (toplevel)); gtk_window_present (GTK_WINDOW (ctx->master_pubdialog)); } -- cgit v1.2.3