aboutsummaryrefslogtreecommitdiff
path: root/src/fs
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
parentdbbf5c6f679877488dfb6c84b5ce15784c02f15d (diff)
downloadgnunet-gtk-b5290908f7ee34c85d197c5382a194f18f06f0f2.tar.gz
gnunet-gtk-b5290908f7ee34c85d197c5382a194f18f06f0f2.zip
-remove tailing whitespaces
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/gnunet-fs-gtk.c52
-rw-r--r--src/fs/gnunet-fs-gtk.h14
-rw-r--r--src/fs/gnunet-fs-gtk_anonymity-widgets.c2
-rw-r--r--src/fs/gnunet-fs-gtk_common.c24
-rw-r--r--src/fs/gnunet-fs-gtk_common.h10
-rw-r--r--src/fs/gnunet-fs-gtk_download-save-as.c24
-rw-r--r--src/fs/gnunet-fs-gtk_event-handler.c304
-rw-r--r--src/fs/gnunet-fs-gtk_event-handler.h8
-rw-r--r--src/fs/gnunet-fs-gtk_main-window-meta-data-context-menu.c8
-rw-r--r--src/fs/gnunet-fs-gtk_main-window-search.c68
-rw-r--r--src/fs/gnunet-fs-gtk_main-window-view-toggles.c8
-rw-r--r--src/fs/gnunet-fs-gtk_open-directory.c6
-rw-r--r--src/fs/gnunet-fs-gtk_open-uri.c24
-rw-r--r--src/fs/gnunet-fs-gtk_open-uri.h4
-rw-r--r--src/fs/gnunet-fs-gtk_publish-dialog.c210
-rw-r--r--src/fs/gnunet-fs-gtk_publish-edit-dialog.c100
-rw-r--r--src/fs/gnunet-fs-gtk_unindex.c62
-rw-r--r--src/fs/metatypes.c106
18 files changed, 517 insertions, 517 deletions
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c
index 739ff005..4b3f0c35 100644
--- a/src/fs/gnunet-fs-gtk.c
+++ b/src/fs/gnunet-fs-gtk.c
@@ -192,12 +192,12 @@ main_window_save_position (GtkWidget *main_window)
192 GNUNET_CONFIGURATION_set_value_number (cfg, "gnunet-fs-gtk", 192 GNUNET_CONFIGURATION_set_value_number (cfg, "gnunet-fs-gtk",
193 "MAIN_WINDOW_HEIGHT", window_height); 193 "MAIN_WINDOW_HEIGHT", window_height);
194 GNUNET_CONFIGURATION_set_value_string (cfg, "gnunet-fs-gtk", 194 GNUNET_CONFIGURATION_set_value_string (cfg, "gnunet-fs-gtk",
195 "MAIN_WINDOW_MAXIMIZED", 195 "MAIN_WINDOW_MAXIMIZED",
196 (maximized == GNUNET_YES) ? "YES" : "NO"); 196 (maximized == GNUNET_YES) ? "YES" : "NO");
197 197
198 cfgDefault = GNUNET_CONFIGURATION_create (); 198 cfgDefault = GNUNET_CONFIGURATION_create ();
199 (void) GNUNET_CONFIGURATION_load (cfgDefault, NULL); /* load defaults only */ 199 (void) GNUNET_CONFIGURATION_load (cfgDefault, NULL); /* load defaults only */
200 GNUNET_CONFIGURATION_write_diffs (cfgDefault, cfg, 200 GNUNET_CONFIGURATION_write_diffs (cfgDefault, cfg,
201 GNUNET_GTK_main_loop_get_configuration_file (ml)); 201 GNUNET_GTK_main_loop_get_configuration_file (ml));
202 GNUNET_CONFIGURATION_destroy (cfgDefault); 202 GNUNET_CONFIGURATION_destroy (cfgDefault);
203} 203}
@@ -231,7 +231,7 @@ GNUNET_GTK_main_window_configure_event_cb (GtkWidget *main_window,
231 */ 231 */
232static void 232static void
233shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 233shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
234{ 234{
235 struct SearchLookup *sl; 235 struct SearchLookup *sl;
236 struct PseuLookupContext *lctx; 236 struct PseuLookupContext *lctx;
237 237
@@ -267,10 +267,10 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
267 GNUNET_IDENTITY_disconnect (main_context.identity); 267 GNUNET_IDENTITY_disconnect (main_context.identity);
268 main_context.identity = NULL; 268 main_context.identity = NULL;
269 } 269 }
270 while (NULL != (sl = main_context.sl_head)) 270 while (NULL != (sl = main_context.sl_head))
271 abort_search_lookup (sl); 271 abort_search_lookup (sl);
272 while (NULL != (lctx = main_context.lctx_head)) 272 while (NULL != (lctx = main_context.lctx_head))
273 abort_pseu_lookup (lctx); 273 abort_pseu_lookup (lctx);
274 if (NULL != main_context.zm) 274 if (NULL != main_context.zm)
275 { 275 {
276 GNUNET_NAMESTORE_zone_monitor_stop (main_context.zm); 276 GNUNET_NAMESTORE_zone_monitor_stop (main_context.zm);
@@ -372,7 +372,7 @@ process_paste (GtkClipboard *cb,
372 * TRUE if there is now a pop-up menu 372 * TRUE if there is now a pop-up menu
373 */ 373 */
374gboolean 374gboolean
375GNUNET_FS_GTK_main_window_button_press_event (GtkWidget * widget, 375GNUNET_FS_GTK_main_window_button_press_event (GtkWidget * widget,
376 GdkEvent * event, 376 GdkEvent * event,
377 gpointer user_data) 377 gpointer user_data)
378{ 378{
@@ -500,8 +500,8 @@ format_service_list (unsigned int count, const char *const*list)
500 500
501 501
502static void 502static void
503service_list_callback (void *cls, 503service_list_callback (void *cls,
504 enum GNUNET_ARM_RequestStatus rs, 504 enum GNUNET_ARM_RequestStatus rs,
505 unsigned int count, 505 unsigned int count,
506 const char *const*list) 506 const char *const*list)
507{ 507{
@@ -537,7 +537,7 @@ arm_connection_state_change (void *cls,
537 537
538static void 538static void
539service_status_change (void *cls, 539service_status_change (void *cls,
540 const char *service, 540 const char *service,
541 enum GNUNET_ARM_ServiceStatus status) 541 enum GNUNET_ARM_ServiceStatus status)
542{ 542{
543 /* Very crude, we can probably do better. 543 /* Very crude, we can probably do better.
@@ -545,7 +545,7 @@ service_status_change (void *cls,
545 * to service status changes, then update the indicator, 545 * to service status changes, then update the indicator,
546 * without requesting a list from ARM every goddamned time? 546 * without requesting a list from ARM every goddamned time?
547 */ 547 */
548 GNUNET_ARM_request_service_list (arm, 548 GNUNET_ARM_request_service_list (arm,
549 SERVICE_LIST_TIMEOUT, 549 SERVICE_LIST_TIMEOUT,
550 &service_list_callback, cls); 550 &service_list_callback, cls);
551} 551}
@@ -563,7 +563,7 @@ service_status_change (void *cls,
563 * @param rd_count number of entries in @a rd array; 0 on removal 563 * @param rd_count number of entries in @a rd array; 0 on removal
564 * @param rd array of records for the label 564 * @param rd array of records for the label
565 */ 565 */
566static void 566static void
567monitor_zone_records (void *cls, 567monitor_zone_records (void *cls,
568 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 568 const struct GNUNET_CRYPTO_EccPrivateKey *zone,
569 const char *label, 569 const char *label,
@@ -591,7 +591,7 @@ monitor_zone_records (void *cls,
591 if (gtk_tree_model_get_iter_first (tm, &iter)) 591 if (gtk_tree_model_get_iter_first (tm, &iter))
592 do 592 do
593 { 593 {
594 gtk_tree_model_get (tm, &iter, 594 gtk_tree_model_get (tm, &iter,
595 0, &id, 595 0, &id,
596 -1); 596 -1);
597 if (0 == strcmp (id, label_gnu)) 597 if (0 == strcmp (id, label_gnu))
@@ -635,7 +635,7 @@ handle_sks_zone_identity (void *cls,
635 const char *name) 635 const char *name)
636{ 636{
637 main_context.id_op = NULL; 637 main_context.id_op = NULL;
638 638
639 if (NULL == ego) 639 if (NULL == ego)
640 { 640 {
641 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 641 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -649,7 +649,7 @@ handle_sks_zone_identity (void *cls,
649 main_context.zm = GNUNET_NAMESTORE_zone_monitor_start (main_context.cfg, 649 main_context.zm = GNUNET_NAMESTORE_zone_monitor_start (main_context.cfg,
650 main_context.sks_zone, 650 main_context.sks_zone,
651 &monitor_zone_records, 651 &monitor_zone_records,
652 NULL, 652 NULL,
653 NULL); 653 NULL);
654} 654}
655 655
@@ -739,7 +739,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
739 /* If anything is wrong - play safe and show it maximized */ 739 /* If anything is wrong - play safe and show it maximized */
740 gtk_window_maximize (GTK_WINDOW (main_context.main_window)); 740 gtk_window_maximize (GTK_WINDOW (main_context.main_window));
741 } 741 }
742 742
743 /* Allow multiple selection in metadata view; */ 743 /* Allow multiple selection in metadata view; */
744 /* FIXME-GTK3: this can be done within (modern versions of) glade */ 744 /* FIXME-GTK3: this can be done within (modern versions of) glade */
745 gtk_tree_selection_set_mode (gtk_tree_view_get_selection (main_context.md_treeview), 745 gtk_tree_selection_set_mode (gtk_tree_view_get_selection (main_context.md_treeview),
@@ -762,7 +762,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
762 762
763 /* initialize file-sharing */ 763 /* initialize file-sharing */
764 fs = GNUNET_FS_start (main_context.cfg, "gnunet-fs-gtk", 764 fs = GNUNET_FS_start (main_context.cfg, "gnunet-fs-gtk",
765 &GNUNET_GTK_fs_event_handler, NULL, 765 &GNUNET_GTK_fs_event_handler, NULL,
766 GNUNET_FS_FLAGS_PERSISTENCE | GNUNET_FS_FLAGS_DO_PROBES, 766 GNUNET_FS_FLAGS_PERSISTENCE | GNUNET_FS_FLAGS_DO_PROBES,
767 GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM, 767 GNUNET_FS_OPTIONS_DOWNLOAD_PARALLELISM,
768 (unsigned int) dl_parallel, 768 (unsigned int) dl_parallel,
@@ -793,12 +793,12 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
793 gtk_widget_show (main_context.main_window); 793 gtk_widget_show (main_context.main_window);
794 gtk_window_present (GTK_WINDOW (main_context.main_window)); 794 gtk_window_present (GTK_WINDOW (main_context.main_window));
795 } 795 }
796 796
797 { 797 {
798 char *const *argv; 798 char *const *argv;
799 int argc; 799 int argc;
800 int i; 800 int i;
801 801
802 GNUNET_GTK_main_loop_get_args (ml, &argc, &argv); 802 GNUNET_GTK_main_loop_get_args (ml, &argc, &argv);
803 803
804 for (i = 0; i < argc; i++) 804 for (i = 0; i < argc; i++)
@@ -826,7 +826,7 @@ main (int argc, char **argv)
826 gettext_noop ("start in tray mode"), 0, 826 gettext_noop ("start in tray mode"), 0,
827 &GNUNET_GETOPT_set_one, &tray_only}, 827 &GNUNET_GETOPT_set_one, &tray_only},
828 GNUNET_GETOPT_OPTION_END 828 GNUNET_GETOPT_OPTION_END
829 }; 829 };
830#if HAVE_LIBUNIQUE 830#if HAVE_LIBUNIQUE
831 int arge; 831 int arge;
832 832
@@ -845,7 +845,7 @@ main (int argc, char **argv)
845 UniqueMessageData *msg; 845 UniqueMessageData *msg;
846 846
847 msg = unique_message_data_new (); 847 msg = unique_message_data_new ();
848 unique_message_data_set_text (msg, argv[arge], strlen (argv[arge])+1); 848 unique_message_data_set_text (msg, argv[arge], strlen (argv[arge])+1);
849 if (UNIQUE_RESPONSE_OK == response) 849 if (UNIQUE_RESPONSE_OK == response)
850 response = unique_app_send_message (unique_app, 850 response = unique_app_send_message (unique_app,
851 UNIQUE_OPEN, 851 UNIQUE_OPEN,
@@ -857,14 +857,14 @@ main (int argc, char **argv)
857 857
858 return (UNIQUE_RESPONSE_OK == response) ? 0 : 1; 858 return (UNIQUE_RESPONSE_OK == response) ? 0 : 1;
859 } 859 }
860 860
861#endif 861#endif
862 if (GNUNET_OK != 862 if (GNUNET_OK !=
863 GNUNET_GTK_main_loop_start ("gnunet-fs-gtk", 863 GNUNET_GTK_main_loop_start ("gnunet-fs-gtk",
864 "GTK GUI for GNUnet", 864 "GTK GUI for GNUnet",
865 argc, argv, 865 argc, argv,
866 options, 866 options,
867 "gnunet_fs_gtk_main_window.glade", 867 "gnunet_fs_gtk_main_window.glade",
868 &run)) 868 &run))
869 { 869 {
870#if HAVE_LIBUNIQUE 870#if HAVE_LIBUNIQUE
diff --git a/src/fs/gnunet-fs-gtk.h b/src/fs/gnunet-fs-gtk.h
index fd0c8419..295a513e 100644
--- a/src/fs/gnunet-fs-gtk.h
+++ b/src/fs/gnunet-fs-gtk.h
@@ -78,7 +78,7 @@ struct SearchLookup
78 */ 78 */
79struct PseuLookupContext 79struct PseuLookupContext
80{ 80{
81 81
82 /** 82 /**
83 * Kept in a DLL. 83 * Kept in a DLL.
84 */ 84 */
@@ -97,7 +97,7 @@ struct PseuLookupContext
97 /** 97 /**
98 * Lookup request with GNS. 98 * Lookup request with GNS.
99 */ 99 */
100 struct GNUNET_GNS_LookupRequest *lr; 100 struct GNUNET_GNS_LookupRequest *lr;
101 101
102 /** 102 /**
103 * Builder for the progress dialog that is displayed. 103 * Builder for the progress dialog that is displayed.
@@ -132,7 +132,7 @@ struct PseuLookupContext
132 /** 132 /**
133 * Public key of the namespace we are trying to save. 133 * Public key of the namespace we are trying to save.
134 */ 134 */
135 struct GNUNET_CRYPTO_EccPublicSignKey pkey; 135 struct GNUNET_CRYPTO_EccPublicSignKey pkey;
136 136
137 /** 137 /**
138 * Nickname we're saving under. 138 * Nickname we're saving under.
@@ -272,12 +272,12 @@ enum GNUNET_GTK_FS_MAIN_WINDOW_SearchNamespaceModelColumns
272 * A gpointer. 272 * A gpointer.
273 */ 273 */
274 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_KEY = 1, 274 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_KEY = 1,
275 275
276 /** 276 /**
277 * A gchararray. 277 * A gchararray.
278 */ 278 */
279 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_ROOT = 2, 279 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_ROOT = 2,
280 280
281 /** 281 /**
282 * A gchararray. 282 * A gchararray.
283 */ 283 */
@@ -299,12 +299,12 @@ enum GNUNET_GTK_FS_MAIN_WINDOW_MetaDataModelColumns
299 * A guint. 299 * A guint.
300 */ 300 */
301 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_FORMAT = 1, 301 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_FORMAT = 1,
302 302
303 /** 303 /**
304 * A gchararray. 304 * A gchararray.
305 */ 305 */
306 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_TYPE_STRING = 2, 306 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_TYPE_STRING = 2,
307 307
308 /** 308 /**
309 * A gchararray. 309 * A gchararray.
310 */ 310 */
diff --git a/src/fs/gnunet-fs-gtk_anonymity-widgets.c b/src/fs/gnunet-fs-gtk_anonymity-widgets.c
index 283899ee..14362e01 100644
--- a/src/fs/gnunet-fs-gtk_anonymity-widgets.c
+++ b/src/fs/gnunet-fs-gtk_anonymity-widgets.c
@@ -125,7 +125,7 @@ GNUNET_GTK_select_anonymity_combo_level (GtkComboBox *combo, guint sel_level)
125 gtk_combo_box_set_active_iter (combo, &iter); 125 gtk_combo_box_set_active_iter (combo, &iter);
126 return TRUE; 126 return TRUE;
127 } 127 }
128 } 128 }
129 while (gtk_tree_model_iter_next (model, &iter)); 129 while (gtk_tree_model_iter_next (model, &iter));
130 return FALSE; 130 return FALSE;
131} 131}
diff --git a/src/fs/gnunet-fs-gtk_common.c b/src/fs/gnunet-fs-gtk_common.c
index dcfbfa9f..a35e3d1e 100644
--- a/src/fs/gnunet-fs-gtk_common.c
+++ b/src/fs/gnunet-fs-gtk_common.c
@@ -54,11 +54,11 @@ GNUNET_FS_GTK_dubious_meta_to_utf8 (enum EXTRACTOR_MetaFormat format,
54 return GNUNET_strdup (data); 54 return GNUNET_strdup (data);
55 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 55 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
56 _("Failed to validate supposedly utf-8 string `%s' of length %u, assuming it to be a C string\n"), 56 _("Failed to validate supposedly utf-8 string `%s' of length %u, assuming it to be a C string\n"),
57 data, 57 data,
58 (unsigned int) data_len); 58 (unsigned int) data_len);
59 format = EXTRACTOR_METAFORMAT_C_STRING; 59 format = EXTRACTOR_METAFORMAT_C_STRING;
60 /* fall-through */ 60 /* fall-through */
61 case EXTRACTOR_METAFORMAT_C_STRING: 61 case EXTRACTOR_METAFORMAT_C_STRING:
62 if (data_len > 0) 62 if (data_len > 0)
63 { 63 {
64 /* There are no guarantees that data is NULL-terminated, AFAIU, 64 /* There are no guarantees that data is NULL-terminated, AFAIU,
@@ -117,7 +117,7 @@ GNUNET_FS_GTK_add_meta_data_to_list_store (void *cls, const char *plugin_name,
117 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_VALUE, 117 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_VALUE,
118 data_to_insert, 118 data_to_insert,
119 -1); 119 -1);
120 GNUNET_free (data_to_insert); 120 GNUNET_free (data_to_insert);
121 return 0; 121 return 0;
122} 122}
123 123
@@ -223,7 +223,7 @@ GNUNET_FS_GTK_mmap_and_scan (const char *filename,
223 * @return description of the result in utf-8, never NULL 223 * @return description of the result in utf-8, never NULL
224 */ 224 */
225char * 225char *
226GNUNET_FS_GTK_get_description_from_metadata (const struct GNUNET_CONTAINER_MetaData *meta, 226GNUNET_FS_GTK_get_description_from_metadata (const struct GNUNET_CONTAINER_MetaData *meta,
227 int *is_a_dup) 227 int *is_a_dup)
228{ 228{
229 char *desc; 229 char *desc;
@@ -277,8 +277,8 @@ GNUNET_FS_GTK_handle_uri (const struct GNUNET_FS_Uri *uri,
277 GtkComboBox *ns_cb; 277 GtkComboBox *ns_cb;
278 GtkEntry *ns_entry; 278 GtkEntry *ns_entry;
279 struct GNUNET_CRYPTO_EccPublicSignKey want; 279 struct GNUNET_CRYPTO_EccPublicSignKey want;
280 280
281 281
282 if (GNUNET_FS_uri_test_chk (uri) || GNUNET_FS_uri_test_loc (uri)) 282 if (GNUNET_FS_uri_test_chk (uri) || GNUNET_FS_uri_test_loc (uri))
283 { 283 {
284 struct DownloadEntry *de; 284 struct DownloadEntry *de;
@@ -291,7 +291,7 @@ GNUNET_FS_GTK_handle_uri (const struct GNUNET_FS_Uri *uri,
291 } 291 }
292 query_entry = GTK_ENTRY (GNUNET_FS_GTK_get_main_window_object ("main_window_search_entry")); 292 query_entry = GTK_ENTRY (GNUNET_FS_GTK_get_main_window_object ("main_window_search_entry"));
293 ns_cb = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object ("main_window_search_namespace_combobox")); 293 ns_cb = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object ("main_window_search_namespace_combobox"));
294 ns_entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (ns_cb))); 294 ns_entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (ns_cb)));
295 if (GNUNET_FS_uri_test_sks (uri)) 295 if (GNUNET_FS_uri_test_sks (uri))
296 { 296 {
297 /* select the namespace */ 297 /* select the namespace */
@@ -315,7 +315,7 @@ GNUNET_FS_GTK_handle_uri (const struct GNUNET_FS_Uri *uri,
315 query_string = GNUNET_FS_uri_sks_get_content_id (uri); 315 query_string = GNUNET_FS_uri_sks_get_content_id (uri);
316 gtk_entry_set_text (query_entry, 316 gtk_entry_set_text (query_entry,
317 query_string); 317 query_string);
318 GNUNET_free (query_string); 318 GNUNET_free (query_string);
319 } 319 }
320 return; 320 return;
321 } 321 }
@@ -329,7 +329,7 @@ GNUNET_FS_GTK_handle_uri (const struct GNUNET_FS_Uri *uri,
329 329
330 query_string = GNUNET_FS_uri_ksk_to_string_fancy (uri); 330 query_string = GNUNET_FS_uri_ksk_to_string_fancy (uri);
331 gtk_entry_set_text (query_entry, 331 gtk_entry_set_text (query_entry,
332 query_string); 332 query_string);
333 GNUNET_free (query_string); 333 GNUNET_free (query_string);
334 } 334 }
335 return; 335 return;
@@ -413,9 +413,9 @@ GNUNET_GTK_get_reference_from_iter (GtkTreeModel *model, GtkTreeIter *iter)
413 * FALSE if ran out of parents 413 * FALSE if ran out of parents
414 */ 414 */
415gboolean 415gboolean
416GNUNET_GTK_tree_model_get_next_flat_iter (GtkTreeModel *model, 416GNUNET_GTK_tree_model_get_next_flat_iter (GtkTreeModel *model,
417 GtkTreeIter *iter, 417 GtkTreeIter *iter,
418 gboolean allow_children, 418 gboolean allow_children,
419 GtkTreeIter *next_iter) 419 GtkTreeIter *next_iter)
420{ 420{
421 GtkTreeIter current_iter = *iter; 421 GtkTreeIter current_iter = *iter;
diff --git a/src/fs/gnunet-fs-gtk_common.h b/src/fs/gnunet-fs-gtk_common.h
index 9cc7ee29..bd9da77b 100644
--- a/src/fs/gnunet-fs-gtk_common.h
+++ b/src/fs/gnunet-fs-gtk_common.h
@@ -110,7 +110,7 @@ GNUNET_FS_GTK_dubious_meta_to_utf8 (enum EXTRACTOR_MetaFormat format,
110 * @return description of the result in utf-8, never NULL 110 * @return description of the result in utf-8, never NULL
111 */ 111 */
112char * 112char *
113GNUNET_FS_GTK_get_description_from_metadata (const struct GNUNET_CONTAINER_MetaData *meta, 113GNUNET_FS_GTK_get_description_from_metadata (const struct GNUNET_CONTAINER_MetaData *meta,
114 int *is_a_dup); 114 int *is_a_dup);
115 115
116 116
@@ -134,7 +134,7 @@ GNUNET_FS_GTK_handle_uri (const struct GNUNET_FS_Uri *uri,
134 * @return #GNUNET_OK if iter was filled, #GNUNET_SYSERR otherwise 134 * @return #GNUNET_OK if iter was filled, #GNUNET_SYSERR otherwise
135 */ 135 */
136int 136int
137GNUNET_GTK_get_iter_from_reference (GtkTreeRowReference *rr, 137GNUNET_GTK_get_iter_from_reference (GtkTreeRowReference *rr,
138 GtkTreeIter *iter); 138 GtkTreeIter *iter);
139 139
140 140
@@ -146,7 +146,7 @@ GNUNET_GTK_get_iter_from_reference (GtkTreeRowReference *rr,
146 * @return newly created reference or NULL in case of error 146 * @return newly created reference or NULL in case of error
147 */ 147 */
148GtkTreeRowReference * 148GtkTreeRowReference *
149GNUNET_GTK_get_reference_from_iter (GtkTreeModel *model, 149GNUNET_GTK_get_reference_from_iter (GtkTreeModel *model,
150 GtkTreeIter *iter); 150 GtkTreeIter *iter);
151 151
152 152
@@ -169,8 +169,8 @@ GNUNET_GTK_get_reference_from_iter (GtkTreeModel *model,
169 */ 169 */
170gboolean 170gboolean
171GNUNET_GTK_tree_model_get_next_flat_iter (GtkTreeModel *model, 171GNUNET_GTK_tree_model_get_next_flat_iter (GtkTreeModel *model,
172 GtkTreeIter *iter, 172 GtkTreeIter *iter,
173 gboolean allow_children, 173 gboolean allow_children,
174 GtkTreeIter *next_iter); 174 GtkTreeIter *next_iter);
175 175
176 176
diff --git a/src/fs/gnunet-fs-gtk_download-save-as.c b/src/fs/gnunet-fs-gtk_download-save-as.c
index 5ebaed70..aa0d3604 100644
--- a/src/fs/gnunet-fs-gtk_download-save-as.c
+++ b/src/fs/gnunet-fs-gtk_download-save-as.c
@@ -20,7 +20,7 @@
20 20
21/** 21/**
22 * @file src/fs/gnunet-fs-gtk_download-save-as.c 22 * @file src/fs/gnunet-fs-gtk_download-save-as.c
23 * @brief functions for managing the 'save as' dialog 23 * @brief functions for managing the 'save as' dialog
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 */ 25 */
26#include "gnunet-fs-gtk_download-save-as.h" 26#include "gnunet-fs-gtk_download-save-as.h"
@@ -43,7 +43,7 @@ struct DownloadAsDialogContext
43 * Builder for the dialog. 43 * Builder for the dialog.
44 */ 44 */
45 GtkBuilder *builder; 45 GtkBuilder *builder;
46 46
47 /** 47 /**
48 * Main dialog object. 48 * Main dialog object.
49 */ 49 */
@@ -97,13 +97,13 @@ GNUNET_FS_GTK_free_download_entry (struct DownloadEntry *de)
97 GNUNET_assert (NULL == de->dc); 97 GNUNET_assert (NULL == de->dc);
98 if (NULL != de->sr) 98 if (NULL != de->sr)
99 { 99 {
100 GNUNET_assert (de->sr->download == de); 100 GNUNET_assert (de->sr->download == de);
101 de->sr->download = NULL; 101 de->sr->download = NULL;
102 de->sr = NULL; 102 de->sr = NULL;
103 } 103 }
104 GNUNET_free_non_null (de->filename); 104 GNUNET_free_non_null (de->filename);
105 GNUNET_FS_uri_destroy (de->uri); 105 GNUNET_FS_uri_destroy (de->uri);
106 GNUNET_free (de); 106 GNUNET_free (de);
107} 107}
108 108
109 109
@@ -136,7 +136,7 @@ GNUNET_GTK_save_as_dialog_delete_event_cb (GtkWidget * widget, GdkEvent * event,
136 * @param user_data the 'structDownloadAsDialogContext' of the dialog 136 * @param user_data the 'structDownloadAsDialogContext' of the dialog
137 */ 137 */
138void 138void
139GNUNET_GTK_save_as_dialog_response_cb (GtkDialog * dialog, 139GNUNET_GTK_save_as_dialog_response_cb (GtkDialog * dialog,
140 gint response_id, 140 gint response_id,
141 gpointer user_data) 141 gpointer user_data)
142{ 142{
@@ -148,7 +148,7 @@ GNUNET_GTK_save_as_dialog_response_cb (GtkDialog * dialog,
148 if (GTK_RESPONSE_OK != response_id) 148 if (GTK_RESPONSE_OK != response_id)
149 { 149 {
150 GNUNET_FS_GTK_free_download_entry (de); 150 GNUNET_FS_GTK_free_download_entry (de);
151 gtk_widget_destroy (GTK_WIDGET (dialog)); 151 gtk_widget_destroy (GTK_WIDGET (dialog));
152 clean_up_download_as_context (dlc); 152 clean_up_download_as_context (dlc);
153 return; 153 return;
154 } 154 }
@@ -319,25 +319,25 @@ GNUNET_FS_GTK_download_context_start_download (struct DownloadEntry *de)
319 if ((NULL != de->sr) && (NULL != de->sr->result)) 319 if ((NULL != de->sr) && (NULL != de->sr->result))
320 { 320 {
321 GNUNET_break (NULL != 321 GNUNET_break (NULL !=
322 GNUNET_FS_download_start_from_search (fs, 322 GNUNET_FS_download_start_from_search (fs,
323 de->sr->result, 323 de->sr->result,
324 de->filename, 324 de->filename,
325 NULL /* tempname */ , 325 NULL /* tempname */ ,
326 0 /* offset */ , 326 0 /* offset */ ,
327 len, 327 len,
328 de->anonymity, opt, 328 de->anonymity, opt,
329 de)); 329 de));
330 } 330 }
331 else 331 else
332 { 332 {
333 GNUNET_break (NULL != 333 GNUNET_break (NULL !=
334 GNUNET_FS_download_start (fs, 334 GNUNET_FS_download_start (fs,
335 de->uri, 335 de->uri,
336 NULL /* meta data */, 336 NULL /* meta data */,
337 de->filename, NULL /* tempname */ , 337 de->filename, NULL /* tempname */ ,
338 0 /* offset */ , 338 0 /* offset */ ,
339 len, 339 len,
340 de->anonymity, opt, 340 de->anonymity, opt,
341 de, 341 de,
342 (NULL != de->pde) ? de->pde->dc : NULL)); 342 (NULL != de->pde) ? de->pde->dc : NULL));
343 } 343 }
diff --git a/src/fs/gnunet-fs-gtk_event-handler.c b/src/fs/gnunet-fs-gtk_event-handler.c
index 0b96dc52..dc01c04c 100644
--- a/src/fs/gnunet-fs-gtk_event-handler.c
+++ b/src/fs/gnunet-fs-gtk_event-handler.c
@@ -184,7 +184,7 @@ enum PUBLISH_TAB_ModelColumns
184/** 184/**
185 * We have a single tab where we display publishing operations. 185 * We have a single tab where we display publishing operations.
186 * So there is only one instance of this struct. 186 * So there is only one instance of this struct.
187 */ 187 */
188struct PublishTab 188struct PublishTab
189{ 189{
190 190
@@ -317,9 +317,9 @@ static struct GNUNET_FS_AnimationContext *animation_found_sources;
317static struct GNUNET_FS_AnimationContext *animation_error; 317static struct GNUNET_FS_AnimationContext *animation_error;
318 318
319 319
320/** 320/**
321 * Get the handle to the current search tab. 321 * Get the handle to the current search tab.
322 * 322 *
323 * @return handle to the current search tab. 323 * @return handle to the current search tab.
324 */ 324 */
325struct SearchTab * 325struct SearchTab *
@@ -331,9 +331,9 @@ GNUNET_FS_GTK_get_current_search_tab ()
331 331
332/* ***************** Search event handling ****************** */ 332/* ***************** Search event handling ****************** */
333 333
334/** 334/**
335 * Load an animation. 335 * Load an animation.
336 * 336 *
337 * @param basename basename of the animation file to load 337 * @param basename basename of the animation file to load
338 * @return handle to the animation. 338 * @return handle to the animation.
339 */ 339 */
@@ -371,7 +371,7 @@ clear_metadata_display ()
371 * This should get the default download directory (so that GNUnet 371 * This should get the default download directory (so that GNUnet
372 * won't offer the user to download files to the 'bin' subdirectory, 372 * won't offer the user to download files to the 'bin' subdirectory,
373 * or whatever is the cwd). Returns NULL on failure (such as 373 * or whatever is the cwd). Returns NULL on failure (such as
374 * non-existing directory). 374 * non-existing directory).
375 * TODO: Should also preserve the last setting (so 375 * TODO: Should also preserve the last setting (so
376 * if the user saves files somewhere else, next time we default to 376 * if the user saves files somewhere else, next time we default to
377 * somewhere else, at least until application restart, or maybe even 377 * somewhere else, at least until application restart, or maybe even
@@ -379,10 +379,10 @@ clear_metadata_display ()
379 * 379 *
380 * Fills the @a buffer up to @a size bytes, returns a pointer to it. 380 * Fills the @a buffer up to @a size bytes, returns a pointer to it.
381 * Buffer will be NUL-terminated, if not NULL. 381 * Buffer will be NUL-terminated, if not NULL.
382 * 382 *
383 * @param buffer where to store the download directory name 383 * @param buffer where to store the download directory name
384 * @param size number of bytes available in @a buffer 384 * @param size number of bytes available in @a buffer
385 * @return 385 * @return
386 */ 386 */
387static char * 387static char *
388get_default_download_directory (char *buffer, size_t size) 388get_default_download_directory (char *buffer, size_t size)
@@ -416,9 +416,9 @@ get_default_download_directory (char *buffer, size_t size)
416 return buffer; 416 return buffer;
417} 417}
418 418
419/** 419/**
420 * 420 *
421 * 421 *
422 * @param tm which tree model are we inspecting 422 * @param tm which tree model are we inspecting
423 * @param iter location in the tree model we are getting data from 423 * @param iter location in the tree model we are getting data from
424 * @param finished_chain non-NULL for top-level call (for the item we're about to download), NULL otherwise 424 * @param finished_chain non-NULL for top-level call (for the item we're about to download), NULL otherwise
@@ -430,7 +430,7 @@ get_default_download_directory (char *buffer, size_t size)
430 * @param relative_directory name of the directory in which we're about to download a file, relative to the root_directory. Whether it includes name of the file itself, depends on finished_chain; 430 * @param relative_directory name of the directory in which we're about to download a file, relative to the root_directory. Whether it includes name of the file itself, depends on finished_chain;
431 * Returned strings should be freed with GNUNET_free() if not NULL. 431 * Returned strings should be freed with GNUNET_free() if not NULL.
432 * @param anonymity anonymity level of one of the *parents. Initialize to -1. If none were downloaded, remains -1. 432 * @param anonymity anonymity level of one of the *parents. Initialize to -1. If none were downloaded, remains -1.
433 */ 433 */
434static void 434static void
435build_relative_name (GtkTreeModel *tm, 435build_relative_name (GtkTreeModel *tm,
436 GtkTreeIter *iter, 436 GtkTreeIter *iter,
@@ -444,7 +444,7 @@ build_relative_name (GtkTreeModel *tm,
444 GtkTreeIter parent; 444 GtkTreeIter parent;
445 445
446 gtk_tree_model_get (tm, iter, 446 gtk_tree_model_get (tm, iter,
447 SEARCH_TAB_MC_DOWNLOADED_FILENAME, &filename, 447 SEARCH_TAB_MC_DOWNLOADED_FILENAME, &filename,
448 SEARCH_TAB_MC_DOWNLOADED_ANONYMITY, &downloaded_anonymity, 448 SEARCH_TAB_MC_DOWNLOADED_ANONYMITY, &downloaded_anonymity,
449 -1); 449 -1);
450 450
@@ -563,7 +563,7 @@ build_relative_name (GtkTreeModel *tm,
563 */ 563 */
564static char * 564static char *
565get_suggested_filename_anonymity2 (GtkTreeModel *tm, 565get_suggested_filename_anonymity2 (GtkTreeModel *tm,
566 GtkTreeIter *iter, 566 GtkTreeIter *iter,
567 char **download_directory, 567 char **download_directory,
568 int *anonymity) 568 int *anonymity)
569{ 569{
@@ -581,9 +581,9 @@ get_suggested_filename_anonymity2 (GtkTreeModel *tm,
581 relname = NULL; 581 relname = NULL;
582 finished_chain = GNUNET_NO; 582 finished_chain = GNUNET_NO;
583 build_relative_name (tm, iter, &finished_chain, &downloaddir, &relname, &downloaded_anonymity); 583 build_relative_name (tm, iter, &finished_chain, &downloaddir, &relname, &downloaded_anonymity);
584 584
585 gtk_tree_model_get (tm, iter, 585 gtk_tree_model_get (tm, iter,
586 SEARCH_TAB_MC_METADATA, &meta, 586 SEARCH_TAB_MC_METADATA, &meta,
587 -1); 587 -1);
588 588
589 filename = GNUNET_FS_meta_data_suggest_filename (meta); 589 filename = GNUNET_FS_meta_data_suggest_filename (meta);
@@ -648,7 +648,7 @@ struct SearchListPopupContext
648 * Tab where the search list popup was created. 648 * Tab where the search list popup was created.
649 */ 649 */
650 struct SearchTab *tab; 650 struct SearchTab *tab;
651 651
652 /** 652 /**
653 * Row where the search list popup was created. 653 * Row where the search list popup was created.
654 */ 654 */
@@ -658,7 +658,7 @@ struct SearchListPopupContext
658 * Search result at the respective row. 658 * Search result at the respective row.
659 */ 659 */
660 struct SearchResult *sr; 660 struct SearchResult *sr;
661 661
662}; 662};
663 663
664 664
@@ -666,7 +666,7 @@ struct SearchListPopupContext
666 * An item was selected from the context menu; destroy the menu shell. 666 * An item was selected from the context menu; destroy the menu shell.
667 * 667 *
668 * @param menushell menu to destroy 668 * @param menushell menu to destroy
669 * @param user_data the 'struct SearchListPopupContext' of the menu 669 * @param user_data the 'struct SearchListPopupContext' of the menu
670 */ 670 */
671static void 671static void
672search_list_popup_selection_done (GtkMenuShell *menushell, 672search_list_popup_selection_done (GtkMenuShell *menushell,
@@ -688,7 +688,7 @@ search_list_popup_selection_done (GtkMenuShell *menushell,
688 * @param user_data the 'struct SearchTab' that contains the tree view 688 * @param user_data the 'struct SearchTab' that contains the tree view
689 */ 689 */
690void 690void
691GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv, 691GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv,
692 gpointer user_data); 692 gpointer user_data);
693 693
694 694
@@ -853,7 +853,7 @@ GNUNET_GTK_search_frame_download_download_button_clicked_cb (GtkButton *button,
853 * @param user_data the main window context 853 * @param user_data the main window context
854 */ 854 */
855void 855void
856GNUNET_GTK_search_frame_download_filename_change_button_clicked_cb (GtkButton *button, 856GNUNET_GTK_search_frame_download_filename_change_button_clicked_cb (GtkButton *button,
857 gpointer user_data) 857 gpointer user_data)
858{ 858{
859 start_download2 (GNUNET_YES, GNUNET_NO); 859 start_download2 (GNUNET_YES, GNUNET_NO);
@@ -862,9 +862,9 @@ GNUNET_GTK_search_frame_download_filename_change_button_clicked_cb (GtkButton *b
862 862
863/** 863/**
864 * "Download" was selected in the current search context menu. 864 * "Download" was selected in the current search context menu.
865 * 865 *
866 * @param item the 'download' menu item 866 * @param item the 'download' menu item
867 * @param user_data the `struct SearchListPopupContext` of the menu 867 * @param user_data the `struct SearchListPopupContext` of the menu
868 */ 868 */
869static void 869static void
870start_download_ctx_menu (GtkMenuItem *item, gpointer user_data) 870start_download_ctx_menu (GtkMenuItem *item, gpointer user_data)
@@ -904,9 +904,9 @@ handle_uri_from_ctx_menu (GtkMenuItem *item, gpointer user_data)
904 904
905/** 905/**
906 * "Download recursively" was selected in the current search context menu. 906 * "Download recursively" was selected in the current search context menu.
907 * 907 *
908 * @param item the 'download recursively' menu item 908 * @param item the 'download recursively' menu item
909 * @param user_data the 'struct SearchListPopupContext' of the menu 909 * @param user_data the 'struct SearchListPopupContext' of the menu
910 */ 910 */
911static void 911static void
912start_download_recursively_ctx_menu (GtkMenuItem *item, gpointer user_data) 912start_download_recursively_ctx_menu (GtkMenuItem *item, gpointer user_data)
@@ -919,9 +919,9 @@ start_download_recursively_ctx_menu (GtkMenuItem *item, gpointer user_data)
919 919
920/** 920/**
921 * "Download as..." was selected in the current search context menu. 921 * "Download as..." was selected in the current search context menu.
922 * 922 *
923 * @param item the 'download as...' menu item 923 * @param item the 'download as...' menu item
924 * @param user_data the 'struct SearchListPopupContext' of the menu 924 * @param user_data the 'struct SearchListPopupContext' of the menu
925 */ 925 */
926static void 926static void
927download_as_ctx_menu (GtkMenuItem *item, gpointer user_data) 927download_as_ctx_menu (GtkMenuItem *item, gpointer user_data)
@@ -933,7 +933,7 @@ download_as_ctx_menu (GtkMenuItem *item, gpointer user_data)
933 933
934/** 934/**
935 * Download "abort" was selected in the current search context menu. 935 * Download "abort" was selected in the current search context menu.
936 * 936 *
937 * @param item the 'abort' menu item 937 * @param item the 'abort' menu item
938 * @param user_data the 'struct SearchListPopupContext' with the download to abort. 938 * @param user_data the 'struct SearchListPopupContext' with the download to abort.
939 */ 939 */
@@ -953,7 +953,7 @@ abort_download_ctx_menu (GtkMenuItem *item, gpointer user_data)
953 953
954/** 954/**
955 * Copy current URI to clipboard was selected in the current context menu. 955 * Copy current URI to clipboard was selected in the current context menu.
956 * 956 *
957 * @param item the 'copy-to-clipboard' menu item 957 * @param item the 'copy-to-clipboard' menu item
958 * @param user_data the `struct SearchListPopupContext` of the menu 958 * @param user_data the `struct SearchListPopupContext` of the menu
959 */ 959 */
@@ -981,7 +981,7 @@ copy_search_uri_to_clipboard_ctx_menu (GtkMenuItem *item, gpointer user_data)
981 return; 981 return;
982 } 982 }
983 gtk_tree_model_get (tm, &iter, 983 gtk_tree_model_get (tm, &iter,
984 SEARCH_TAB_MC_URI, &uri, 984 SEARCH_TAB_MC_URI, &uri,
985 -1); 985 -1);
986 gtk_tree_path_free (path); 986 gtk_tree_path_free (path);
987 if (uri == NULL) 987 if (uri == NULL)
@@ -998,11 +998,11 @@ copy_search_uri_to_clipboard_ctx_menu (GtkMenuItem *item, gpointer user_data)
998 998
999 999
1000/** 1000/**
1001 * Callback invoked for each embedded URIs. 1001 * Callback invoked for each embedded URIs.
1002 * 1002 *
1003 * @return 0 to continue iteration, 1 to abort 1003 * @return 0 to continue iteration, 1 to abort
1004 */ 1004 */
1005typedef int (*EmbeddedUriCallback) (void *cls, 1005typedef int (*EmbeddedUriCallback) (void *cls,
1006 const struct GNUNET_FS_Uri *uri); 1006 const struct GNUNET_FS_Uri *uri);
1007 1007
1008 1008
@@ -1038,8 +1038,8 @@ struct UriScannerCallbackContext
1038 * whatever the callback returned 1038 * whatever the callback returned
1039 */ 1039 */
1040static int 1040static int
1041check_for_embedded_uri (void *cls, 1041check_for_embedded_uri (void *cls,
1042 const char *plugin_name, 1042 const char *plugin_name,
1043 enum EXTRACTOR_MetaType type, 1043 enum EXTRACTOR_MetaType type,
1044 enum EXTRACTOR_MetaFormat format, 1044 enum EXTRACTOR_MetaFormat format,
1045 const char *data_mime_type, 1045 const char *data_mime_type,
@@ -1056,7 +1056,7 @@ check_for_embedded_uri (void *cls,
1056 (0 != strcmp ("text/plain", data_mime_type)) || 1056 (0 != strcmp ("text/plain", data_mime_type)) ||
1057 (0 == data_size) || 1057 (0 == data_size) ||
1058 ('\0' != data[data_size - 1]) ) 1058 ('\0' != data[data_size - 1]) )
1059 return 0; 1059 return 0;
1060 emsg = NULL; 1060 emsg = NULL;
1061 uri = GNUNET_FS_uri_parse (data, &emsg); 1061 uri = GNUNET_FS_uri_parse (data, &emsg);
1062 if (NULL == uri) 1062 if (NULL == uri)
@@ -1076,21 +1076,21 @@ check_for_embedded_uri (void *cls,
1076 1076
1077 1077
1078/** 1078/**
1079 * Search metadata for URIs, invoke the callback for each one. 1079 * Search metadata for URIs, invoke the callback for each one.
1080 * 1080 *
1081 * @param meta meta data to inspect 1081 * @param meta meta data to inspect
1082 * @param cb function to call on URIs that were found 1082 * @param cb function to call on URIs that were found
1083 * @param cls closure for @a cb 1083 * @param cls closure for @a cb
1084 */ 1084 */
1085static void 1085static void
1086find_embedded_uris (const struct GNUNET_CONTAINER_MetaData *meta, 1086find_embedded_uris (const struct GNUNET_CONTAINER_MetaData *meta,
1087 EmbeddedUriCallback cb, void *cls) 1087 EmbeddedUriCallback cb, void *cls)
1088{ 1088{
1089 struct UriScannerCallbackContext ctx; 1089 struct UriScannerCallbackContext ctx;
1090 1090
1091 ctx.cb = cb; 1091 ctx.cb = cb;
1092 ctx.cls = cls; 1092 ctx.cls = cls;
1093 GNUNET_CONTAINER_meta_data_iterate (meta, 1093 GNUNET_CONTAINER_meta_data_iterate (meta,
1094 &check_for_embedded_uri, &ctx); 1094 &check_for_embedded_uri, &ctx);
1095} 1095}
1096 1096
@@ -1116,7 +1116,7 @@ struct UriPopulationContext
1116/** 1116/**
1117 * Called for every URI in metadata. Adds up to 3 menu items 1117 * Called for every URI in metadata. Adds up to 3 menu items
1118 * that will initiate downloads for these URIs 1118 * that will initiate downloads for these URIs
1119 * 1119 *
1120 * @param cls the `struct UriPopulationContext` 1120 * @param cls the `struct UriPopulationContext`
1121 * @param uri URI to download 1121 * @param uri URI to download
1122 * @return 0 if we might add more iterms, 1122 * @return 0 if we might add more iterms,
@@ -1134,27 +1134,27 @@ populate_popup_with_uri_items (void *cls,
1134 1134
1135 ctx->counter++; 1135 ctx->counter++;
1136 uris = GNUNET_FS_uri_to_string (uri); 1136 uris = GNUNET_FS_uri_to_string (uri);
1137 GNUNET_asprintf (&label, 1137 GNUNET_asprintf (&label,
1138 _("URI #%d: %s"), 1138 _("URI #%d: %s"),
1139 ctx->counter, 1139 ctx->counter,
1140 uris); 1140 uris);
1141 GNUNET_free (uris); 1141 GNUNET_free (uris);
1142 child = gtk_image_menu_item_new_with_label (label); 1142 child = gtk_image_menu_item_new_with_label (label);
1143 GNUNET_free (label); 1143 GNUNET_free (label);
1144 1144
1145 ns_association_icon = gtk_image_new_from_icon_name ("gnunet-fs-gtk-ns-association", 1145 ns_association_icon = gtk_image_new_from_icon_name ("gnunet-fs-gtk-ns-association",
1146 GTK_ICON_SIZE_MENU); 1146 GTK_ICON_SIZE_MENU);
1147 1147
1148 /* Takes ownership of the icon */ 1148 /* Takes ownership of the icon */
1149 gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (child), 1149 gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (child),
1150 ns_association_icon); 1150 ns_association_icon);
1151 1151
1152 g_object_set_data_full (G_OBJECT (child), 1152 g_object_set_data_full (G_OBJECT (child),
1153 "fs-uri", 1153 "fs-uri",
1154 GNUNET_FS_uri_dup (uri), 1154 GNUNET_FS_uri_dup (uri),
1155 (GDestroyNotify) &GNUNET_FS_uri_destroy); 1155 (GDestroyNotify) &GNUNET_FS_uri_destroy);
1156 g_signal_connect (child, "activate", 1156 g_signal_connect (child, "activate",
1157 G_CALLBACK (handle_uri_from_ctx_menu), 1157 G_CALLBACK (handle_uri_from_ctx_menu),
1158 NULL); 1158 NULL);
1159 gtk_widget_show (child); 1159 gtk_widget_show (child);
1160 gtk_menu_shell_append (GTK_MENU_SHELL (ctx->menu), child); 1160 gtk_menu_shell_append (GTK_MENU_SHELL (ctx->menu), child);
@@ -1177,8 +1177,8 @@ populate_popup_with_uri_items (void *cls,
1177 * TRUE if there is now a pop-up menu 1177 * TRUE if there is now a pop-up menu
1178 */ 1178 */
1179static gboolean 1179static gboolean
1180search_list_popup (GtkTreeModel *tm, 1180search_list_popup (GtkTreeModel *tm,
1181 struct SearchTab *tab, 1181 struct SearchTab *tab,
1182 gint init_button, 1182 gint init_button,
1183 guint32 event_time, 1183 guint32 event_time,
1184 GtkTreeIter *iter) 1184 GtkTreeIter *iter)
@@ -1251,8 +1251,8 @@ search_list_popup (GtkTreeModel *tm,
1251 1251
1252 /* check for embedded URIs */ 1252 /* check for embedded URIs */
1253 uri_pop_ctx.counter = 0; 1253 uri_pop_ctx.counter = 0;
1254 uri_pop_ctx.menu = menu; 1254 uri_pop_ctx.menu = menu;
1255 find_embedded_uris (meta, 1255 find_embedded_uris (meta,
1256 &populate_popup_with_uri_items, 1256 &populate_popup_with_uri_items,
1257 &uri_pop_ctx); 1257 &uri_pop_ctx);
1258 if (0 < uri_pop_ctx.counter) 1258 if (0 < uri_pop_ctx.counter)
@@ -1301,7 +1301,7 @@ search_list_popup (GtkTreeModel *tm,
1301 * TRUE if there is now a pop-up menu 1301 * TRUE if there is now a pop-up menu
1302 */ 1302 */
1303gboolean 1303gboolean
1304GNUNET_FS_GTK_search_treeview_popup_menu (GtkWidget *widget, 1304GNUNET_FS_GTK_search_treeview_popup_menu (GtkWidget *widget,
1305 gpointer user_data) 1305 gpointer user_data)
1306{ 1306{
1307 GtkTreeView *tv = GTK_TREE_VIEW (widget); 1307 GtkTreeView *tv = GTK_TREE_VIEW (widget);
@@ -1328,7 +1328,7 @@ GNUNET_FS_GTK_search_treeview_popup_menu (GtkWidget *widget,
1328 * TRUE to stop the propagation 1328 * TRUE to stop the propagation
1329 */ 1329 */
1330gboolean 1330gboolean
1331GNUNET_FS_GTK_search_treeview_button_press_event (GtkWidget * widget, 1331GNUNET_FS_GTK_search_treeview_button_press_event (GtkWidget * widget,
1332 GdkEvent * event, 1332 GdkEvent * event,
1333 gpointer user_data) 1333 gpointer user_data)
1334{ 1334{
@@ -1345,12 +1345,12 @@ GNUNET_FS_GTK_search_treeview_button_press_event (GtkWidget * widget,
1345 if (! gtk_tree_view_get_path_at_pos (tv, 1345 if (! gtk_tree_view_get_path_at_pos (tv,
1346 event_button->x, event_button->y, 1346 event_button->x, event_button->y,
1347 &path, NULL, NULL, NULL)) 1347 &path, NULL, NULL, NULL))
1348 return FALSE; /* click outside of area with values, ignore */ 1348 return FALSE; /* click outside of area with values, ignore */
1349 tm = gtk_tree_view_get_model (tv); 1349 tm = gtk_tree_view_get_model (tv);
1350 if (! gtk_tree_model_get_iter (tm, &iter, path)) 1350 if (! gtk_tree_model_get_iter (tm, &iter, path))
1351 return FALSE; /* not sure how we got a path but no iter... */ 1351 return FALSE; /* not sure how we got a path but no iter... */
1352 gtk_tree_path_free (path); 1352 gtk_tree_path_free (path);
1353 search_list_popup (tm, tab, 1353 search_list_popup (tm, tab,
1354 event_button->button, 1354 event_button->button,
1355 event_button->time, 1355 event_button->time,
1356 &iter); 1356 &iter);
@@ -1444,7 +1444,7 @@ close_search_tab (struct SearchTab *tab)
1444 1444
1445/** 1445/**
1446 * Close the 'uri_tab'. 1446 * Close the 'uri_tab'.
1447 */ 1447 */
1448void 1448void
1449GNUNET_FS_GTK_close_uri_tab_ () 1449GNUNET_FS_GTK_close_uri_tab_ ()
1450{ 1450{
@@ -1463,7 +1463,7 @@ GNUNET_FS_GTK_close_uri_tab_ ()
1463 * to refer to the new model. 1463 * to refer to the new model.
1464 * 1464 *
1465 * @param src_model source model 1465 * @param src_model source model
1466 * @param src_iter parent of the nodes to move 1466 * @param src_iter parent of the nodes to move
1467 * @param dst_tab destination tab 1467 * @param dst_tab destination tab
1468 * @param dst_iter new parent of the entries we are moving 1468 * @param dst_iter new parent of the entries we are moving
1469 */ 1469 */
@@ -1610,10 +1610,10 @@ download_lost_parent (struct DownloadEntry *de)
1610 return; 1610 return;
1611 } 1611 }
1612 gtk_tree_path_free (path); 1612 gtk_tree_path_free (path);
1613 gtk_tree_model_get (tm_old, &iter_old, 1613 gtk_tree_model_get (tm_old, &iter_old,
1614 SEARCH_TAB_MC_METADATA, &meta, 1614 SEARCH_TAB_MC_METADATA, &meta,
1615 SEARCH_TAB_MC_URI, &uri, 1615 SEARCH_TAB_MC_URI, &uri,
1616 SEARCH_TAB_MC_PERCENT_PROGRESS, &percent_progress, 1616 SEARCH_TAB_MC_PERCENT_PROGRESS, &percent_progress,
1617 SEARCH_TAB_MC_PERCENT_AVAILABILITY, &percent_availability, 1617 SEARCH_TAB_MC_PERCENT_AVAILABILITY, &percent_availability,
1618 SEARCH_TAB_MC_UNKNOWN_AVAILABILITY, &unknown_availability, 1618 SEARCH_TAB_MC_UNKNOWN_AVAILABILITY, &unknown_availability,
1619 SEARCH_TAB_MC_FILENAME, &filename, 1619 SEARCH_TAB_MC_FILENAME, &filename,
@@ -1700,9 +1700,9 @@ move_downloads_in_subtree (GtkTreeModel *tm,
1700 gtk_tree_model_get (tm, &child, 1700 gtk_tree_model_get (tm, &child,
1701 SEARCH_TAB_MC_METADATA, &meta, 1701 SEARCH_TAB_MC_METADATA, &meta,
1702 SEARCH_TAB_MC_URI, &uri, 1702 SEARCH_TAB_MC_URI, &uri,
1703 SEARCH_TAB_MC_SEARCH_RESULT, &sr, 1703 SEARCH_TAB_MC_SEARCH_RESULT, &sr,
1704 -1); 1704 -1);
1705 if (NULL != sr->download) 1705 if (NULL != sr->download)
1706 { 1706 {
1707 if (sr->download->is_done == GNUNET_YES) 1707 if (sr->download->is_done == GNUNET_YES)
1708 { 1708 {
@@ -1731,7 +1731,7 @@ move_downloads_in_subtree (GtkTreeModel *tm,
1731 SEARCH_TAB_MC_SEARCH_RESULT, NULL, 1731 SEARCH_TAB_MC_SEARCH_RESULT, NULL,
1732 -1); 1732 -1);
1733 } 1733 }
1734 while (TRUE == gtk_tree_model_iter_next (tm, &child)); 1734 while (TRUE == gtk_tree_model_iter_next (tm, &child));
1735 } 1735 }
1736} 1736}
1737 1737
@@ -1754,7 +1754,7 @@ free_search_result (struct SearchResult *sr)
1754 struct GNUNET_CONTAINER_MetaData *meta; 1754 struct GNUNET_CONTAINER_MetaData *meta;
1755 1755
1756 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1756 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1757 "Freeing a search result SR=%p\n", 1757 "Freeing a search result SR=%p\n",
1758 sr); 1758 sr);
1759 if ( (NULL == sr) || 1759 if ( (NULL == sr) ||
1760 (NULL == sr->rr) || 1760 (NULL == sr->rr) ||
@@ -1796,7 +1796,7 @@ free_search_result (struct SearchResult *sr)
1796 * @param user_data the 'struct SearchTab' that contains the tree view 1796 * @param user_data the 'struct SearchTab' that contains the tree view
1797 */ 1797 */
1798void 1798void
1799GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv, 1799GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv,
1800 gpointer user_data) 1800 gpointer user_data)
1801{ 1801{
1802 struct SearchTab *tab = user_data; 1802 struct SearchTab *tab = user_data;
@@ -1861,7 +1861,7 @@ GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv,
1861 1861
1862 gtk_entry_set_text (mctx->download_name_entry, filename != NULL ? filename : NULL); 1862 gtk_entry_set_text (mctx->download_name_entry, filename != NULL ? filename : NULL);
1863 gtk_file_chooser_set_current_folder (mctx->download_location_chooser, download_directory); 1863 gtk_file_chooser_set_current_folder (mctx->download_location_chooser, download_directory);
1864 1864
1865 gtk_widget_show_all (GTK_WIDGET (mctx->download_panel)); 1865 gtk_widget_show_all (GTK_WIDGET (mctx->download_panel));
1866 GNUNET_free_non_null (filename); 1866 GNUNET_free_non_null (filename);
1867 GNUNET_free (download_directory); 1867 GNUNET_free (download_directory);
@@ -1922,7 +1922,7 @@ GNUNET_GTK_main_window_notebook_switch_page_cb (GtkWidget * dummy,
1922 return; 1922 return;
1923 } 1923 }
1924 gtk_widget_hide (GTK_WIDGET (mctx->download_panel)); 1924 gtk_widget_hide (GTK_WIDGET (mctx->download_panel));
1925 /* active tab is not a search tab (likely the 'publish' tab), 1925 /* active tab is not a search tab (likely the 'publish' tab),
1926 clear meta data and preview widgets */ 1926 clear meta data and preview widgets */
1927 gtk_image_clear (mctx->preview_image); 1927 gtk_image_clear (mctx->preview_image);
1928 gtk_list_store_clear (mctx->md_liststore); 1928 gtk_list_store_clear (mctx->md_liststore);
@@ -1995,7 +1995,7 @@ GNUNET_FS_GTK_search_result_play_button_clicked (GtkButton * button, gpointer us
1995 } 1995 }
1996 GNUNET_FS_search_continue (tab->sc); 1996 GNUNET_FS_search_continue (tab->sc);
1997 gtk_widget_show (tab->pause_button); 1997 gtk_widget_show (tab->pause_button);
1998 gtk_widget_hide (tab->play_button); 1998 gtk_widget_hide (tab->play_button);
1999} 1999}
2000 2000
2001 2001
@@ -2036,7 +2036,7 @@ stop_downloads_in_subtree (GtkTreeModel *tm,
2036 if (GNUNET_YES != stop_downloads_in_subtree (tm, &child)) 2036 if (GNUNET_YES != stop_downloads_in_subtree (tm, &child))
2037 ret = GNUNET_NO; 2037 ret = GNUNET_NO;
2038 } 2038 }
2039 while (TRUE == gtk_tree_model_iter_next (tm, &child)); 2039 while (TRUE == gtk_tree_model_iter_next (tm, &child));
2040 } 2040 }
2041 return ret; 2041 return ret;
2042} 2042}
@@ -2065,7 +2065,7 @@ GNUNET_FS_GTK_search_result_clear_button_clicked (GtkButton * button, gpointer u
2065 if (! gtk_tree_model_get_iter_first (tm, &iter)) 2065 if (! gtk_tree_model_get_iter_first (tm, &iter))
2066 return; 2066 return;
2067 do 2067 do
2068 { 2068 {
2069 gtk_tree_model_get (tm, &iter, 2069 gtk_tree_model_get (tm, &iter,
2070 SEARCH_TAB_MC_SEARCH_RESULT, &sr, 2070 SEARCH_TAB_MC_SEARCH_RESULT, &sr,
2071 -1); 2071 -1);
@@ -2080,7 +2080,7 @@ GNUNET_FS_GTK_search_result_clear_button_clicked (GtkButton * button, gpointer u
2080 (GNUNET_YES == stop_downloads_in_subtree (tm, &iter)) ) 2080 (GNUNET_YES == stop_downloads_in_subtree (tm, &iter)) )
2081 { 2081 {
2082 /* no active download and no associated FS-API search result; 2082 /* no active download and no associated FS-API search result;
2083 so this must be some left-over entry from an opened 2083 so this must be some left-over entry from an opened
2084 directory; clean it up */ 2084 directory; clean it up */
2085 free_search_result (sr); 2085 free_search_result (sr);
2086 /* the above call clobbered our 'iter', restart from the beginning... */ 2086 /* the above call clobbered our 'iter', restart from the beginning... */
@@ -2100,7 +2100,7 @@ GNUNET_FS_GTK_search_result_clear_button_clicked (GtkButton * button, gpointer u
2100 * @param emsg the error message 2100 * @param emsg the error message
2101 */ 2101 */
2102static void 2102static void
2103handle_search_error (struct SearchTab *tab, 2103handle_search_error (struct SearchTab *tab,
2104 const char *emsg) 2104 const char *emsg)
2105{ 2105{
2106 gtk_label_set_text (tab->label, _("Error!")); 2106 gtk_label_set_text (tab->label, _("Error!"));
@@ -2183,7 +2183,7 @@ update_search_result (struct SearchResult *sr,
2183 percent_avail = 50 + (gint) (availability_rank * 50.0 / availability_certainty); 2183 percent_avail = 50 + (gint) (availability_rank * 50.0 / availability_certainty);
2184 else 2184 else
2185 percent_avail = 50; 2185 percent_avail = 50;
2186 gtk_tree_store_set (ts, &iter, 2186 gtk_tree_store_set (ts, &iter,
2187 SEARCH_TAB_MC_METADATA, GNUNET_CONTAINER_meta_data_duplicate (meta), 2187 SEARCH_TAB_MC_METADATA, GNUNET_CONTAINER_meta_data_duplicate (meta),
2188 SEARCH_TAB_MC_PREVIEW, pixbuf, 2188 SEARCH_TAB_MC_PREVIEW, pixbuf,
2189 SEARCH_TAB_MC_PERCENT_AVAILABILITY, (guint) percent_avail, 2189 SEARCH_TAB_MC_PERCENT_AVAILABILITY, (guint) percent_avail,
@@ -2219,9 +2219,9 @@ update_search_result (struct SearchResult *sr,
2219} 2219}
2220 2220
2221 2221
2222/** 2222/**
2223 * If called, sets the `gboolean` pointer in @a cls to TRUE. 2223 * If called, sets the `gboolean` pointer in @a cls to TRUE.
2224 * 2224 *
2225 * @param cls pointer to a `gboolean` 2225 * @param cls pointer to a `gboolean`
2226 * @param sks_uri a URI 2226 * @param sks_uri a URI
2227 * @return 1 (abort iteration) 2227 * @return 1 (abort iteration)
@@ -2238,14 +2238,14 @@ see_if_there_are_any_uris (void *cls,
2238 2238
2239 2239
2240/** 2240/**
2241 * Add a search result to the given search tab. This function is called 2241 * Add a search result to the given search tab. This function is called
2242 * not only for 'normal' search results but also for directories that 2242 * not only for 'normal' search results but also for directories that
2243 * are being opened and if the user manually enters a URI. 2243 * are being opened and if the user manually enters a URI.
2244 * 2244 *
2245 * @param tab search tab to extend, never NULL 2245 * @param tab search tab to extend, never NULL
2246 * @param anonymity anonymity level to use for probes for this result 2246 * @param anonymity anonymity level to use for probes for this result
2247 * @param parent_rr reference to parent entry in search tab, NULL for normal 2247 * @param parent_rr reference to parent entry in search tab, NULL for normal
2248 * search results, 2248 * search results,
2249 * @param uri uri to add, can be NULL for top-level entry of a directory opened from disk 2249 * @param uri uri to add, can be NULL for top-level entry of a directory opened from disk
2250 * (in this case, we don't know the URI and should probably not 2250 * (in this case, we don't know the URI and should probably not
2251 * bother to calculate it) 2251 * bother to calculate it)
@@ -2257,7 +2257,7 @@ see_if_there_are_any_uris (void *cls,
2257 * model at 'iter') 2257 * model at 'iter')
2258 */ 2258 */
2259struct SearchResult * 2259struct SearchResult *
2260GNUNET_GTK_add_search_result (struct SearchTab *tab, 2260GNUNET_GTK_add_search_result (struct SearchTab *tab,
2261 uint32_t anonymity, 2261 uint32_t anonymity,
2262 GtkTreeRowReference *parent_rr, 2262 GtkTreeRowReference *parent_rr,
2263 const struct GNUNET_FS_Uri *uri, 2263 const struct GNUNET_FS_Uri *uri,
@@ -2303,14 +2303,14 @@ GNUNET_GTK_add_search_result (struct SearchTab *tab,
2303 else 2303 else
2304 { 2304 {
2305 fsize = 0; 2305 fsize = 0;
2306 mime = GNUNET_strdup ("gnunet/namespace"); 2306 mime = GNUNET_strdup ("gnunet/namespace");
2307 status_colour = "lightgreen"; 2307 status_colour = "lightgreen";
2308 } 2308 }
2309 uris = GNUNET_FS_uri_to_string (uri); 2309 uris = GNUNET_FS_uri_to_string (uri);
2310 } 2310 }
2311 desc = GNUNET_FS_GTK_get_description_from_metadata (meta, &desc_is_a_dup); 2311 desc = GNUNET_FS_GTK_get_description_from_metadata (meta, &desc_is_a_dup);
2312 pixbuf = GNUNET_FS_GTK_get_thumbnail_from_meta_data (meta); 2312 pixbuf = GNUNET_FS_GTK_get_thumbnail_from_meta_data (meta);
2313 find_embedded_uris (meta, 2313 find_embedded_uris (meta,
2314 &see_if_there_are_any_uris, 2314 &see_if_there_are_any_uris,
2315 &show_uri_association); 2315 &show_uri_association);
2316 2316
@@ -2352,7 +2352,7 @@ GNUNET_GTK_add_search_result (struct SearchTab *tab,
2352 } 2352 }
2353 gtk_tree_store_insert_with_values (ts, &iter, pitr, G_MAXINT, 2353 gtk_tree_store_insert_with_values (ts, &iter, pitr, G_MAXINT,
2354 SEARCH_TAB_MC_METADATA, GNUNET_CONTAINER_meta_data_duplicate (meta), 2354 SEARCH_TAB_MC_METADATA, GNUNET_CONTAINER_meta_data_duplicate (meta),
2355 SEARCH_TAB_MC_URI, (uri == NULL) ? NULL : GNUNET_FS_uri_dup (uri), 2355 SEARCH_TAB_MC_URI, (uri == NULL) ? NULL : GNUNET_FS_uri_dup (uri),
2356 SEARCH_TAB_MC_FILESIZE, fsize, 2356 SEARCH_TAB_MC_FILESIZE, fsize,
2357 SEARCH_TAB_MC_PREVIEW, pixbuf, 2357 SEARCH_TAB_MC_PREVIEW, pixbuf,
2358 SEARCH_TAB_MC_PERCENT_PROGRESS, 0, 2358 SEARCH_TAB_MC_PERCENT_PROGRESS, 0,
@@ -2387,7 +2387,7 @@ GNUNET_GTK_add_search_result (struct SearchTab *tab,
2387 while (NULL != tab->parent) 2387 while (NULL != tab->parent)
2388 tab = tab->parent->tab; 2388 tab = tab->parent->tab;
2389 tab->num_results++; 2389 tab->num_results++;
2390 2390
2391 return sr; 2391 return sr;
2392} 2392}
2393 2393
@@ -2427,7 +2427,7 @@ GNUNET_FS_GTK_set_item_downloaded_name (GtkTreeStore *ts, GtkTreeRowReference *r
2427 char *suggested_filename; 2427 char *suggested_filename;
2428 int anonymity = -1; 2428 int anonymity = -1;
2429 2429
2430 gtk_tree_store_set (ts, &iter, 2430 gtk_tree_store_set (ts, &iter,
2431 SEARCH_TAB_MC_DOWNLOADED_FILENAME, filename, 2431 SEARCH_TAB_MC_DOWNLOADED_FILENAME, filename,
2432 -1); 2432 -1);
2433 2433
@@ -2492,7 +2492,7 @@ GNUNET_FS_GTK_set_item_downloaded_name (GtkTreeStore *ts, GtkTreeRowReference *r
2492 * model at 'iter') 2492 * model at 'iter')
2493 */ 2493 */
2494static struct SearchResult * 2494static struct SearchResult *
2495process_search_result (struct SearchTab *tab, 2495process_search_result (struct SearchTab *tab,
2496 uint32_t anonymity, 2496 uint32_t anonymity,
2497 struct SearchResult *parent, 2497 struct SearchResult *parent,
2498 const struct GNUNET_FS_Uri *uri, 2498 const struct GNUNET_FS_Uri *uri,
@@ -2696,18 +2696,18 @@ GNUNET_GTK_add_to_uri_tab (uint32_t anonymity,
2696/** 2696/**
2697 * Change the (background) color of the given download entry. 2697 * Change the (background) color of the given download entry.
2698 * 2698 *
2699 * @param de entry to change 2699 * @param de entry to change
2700 * @param color name of the color to use 2700 * @param color name of the color to use
2701 */ 2701 */
2702static void 2702static void
2703change_download_color (struct DownloadEntry *de, 2703change_download_color (struct DownloadEntry *de,
2704 const char *color) 2704 const char *color)
2705{ 2705{
2706 GtkTreeIter iter; 2706 GtkTreeIter iter;
2707 GtkTreePath *path; 2707 GtkTreePath *path;
2708 2708
2709 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2709 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2710 "Changing download DE=%p color to %s\n", 2710 "Changing download DE=%p color to %s\n",
2711 de, color); 2711 de, color);
2712 path = gtk_tree_row_reference_get_path (de->sr->rr); 2712 path = gtk_tree_row_reference_get_path (de->sr->rr);
2713 if (! gtk_tree_model_get_iter (GTK_TREE_MODEL (de->sr->tab->ts), &iter, path)) 2713 if (! gtk_tree_model_get_iter (GTK_TREE_MODEL (de->sr->tab->ts), &iter, path))
@@ -2786,7 +2786,7 @@ struct AddDirectoryEntryContext
2786 * Anonymity level to use for probes in this directory. 2786 * Anonymity level to use for probes in this directory.
2787 */ 2787 */
2788 uint32_t anonymity; 2788 uint32_t anonymity;
2789 2789
2790 /** 2790 /**
2791 * Do we need to check if the given entry already exists to 2791 * Do we need to check if the given entry already exists to
2792 * avoid adding it twice? Set to #GNUNET_YES if #add_directory_entry 2792 * avoid adding it twice? Set to #GNUNET_YES if #add_directory_entry
@@ -2835,8 +2835,8 @@ add_directory_entry (void *cls, const char *filename,
2835 GtkTreeModel *tm; 2835 GtkTreeModel *tm;
2836 struct GNUNET_FS_Uri *xuri; 2836 struct GNUNET_FS_Uri *xuri;
2837 2837
2838 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2838 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2839 "Adding directory entry `%s'\n", 2839 "Adding directory entry `%s'\n",
2840 filename); 2840 filename);
2841 if (NULL == uri) 2841 if (NULL == uri)
2842 { 2842 {
@@ -2849,7 +2849,7 @@ add_directory_entry (void *cls, const char *filename,
2849 { 2849 {
2850 tm = gtk_tree_row_reference_get_model (ade->prr); 2850 tm = gtk_tree_row_reference_get_model (ade->prr);
2851 path = gtk_tree_row_reference_get_path (ade->prr); 2851 path = gtk_tree_row_reference_get_path (ade->prr);
2852 if (! gtk_tree_model_get_iter (tm, &piter, path)) 2852 if (! gtk_tree_model_get_iter (tm, &piter, path))
2853 { 2853 {
2854 GNUNET_break (0); 2854 GNUNET_break (0);
2855 gtk_tree_path_free (path); 2855 gtk_tree_path_free (path);
@@ -2860,8 +2860,8 @@ add_directory_entry (void *cls, const char *filename,
2860 { 2860 {
2861 do 2861 do
2862 { 2862 {
2863 gtk_tree_model_get (tm, &iter, 2863 gtk_tree_model_get (tm, &iter,
2864 SEARCH_TAB_MC_URI, &xuri, 2864 SEARCH_TAB_MC_URI, &xuri,
2865 -1); 2865 -1);
2866 if (GNUNET_YES == GNUNET_FS_uri_test_equal (xuri, uri)) 2866 if (GNUNET_YES == GNUNET_FS_uri_test_equal (xuri, uri))
2867 return; /* already present */ 2867 return; /* already present */
@@ -2869,9 +2869,9 @@ add_directory_entry (void *cls, const char *filename,
2869 while (TRUE == gtk_tree_model_iter_next (tm, &iter)); 2869 while (TRUE == gtk_tree_model_iter_next (tm, &iter));
2870 } 2870 }
2871 } 2871 }
2872 GNUNET_GTK_add_search_result (ade->tab, 2872 GNUNET_GTK_add_search_result (ade->tab,
2873 ade->anonymity, 2873 ade->anonymity,
2874 ade->prr, 2874 ade->prr,
2875 uri, meta, NULL, 2875 uri, meta, NULL,
2876 0); 2876 0);
2877} 2877}
@@ -2892,7 +2892,7 @@ add_directory_entry (void *cls, const char *filename,
2892 * @param depth depth of the block in the ECRS tree 2892 * @param depth depth of the block in the ECRS tree
2893 */ 2893 */
2894static void 2894static void
2895mark_download_progress (struct DownloadEntry *de, 2895mark_download_progress (struct DownloadEntry *de,
2896 const char *filename, 2896 const char *filename,
2897 uint64_t size, 2897 uint64_t size,
2898 uint64_t completed, const void *block_data, 2898 uint64_t completed, const void *block_data,
@@ -2931,19 +2931,19 @@ mark_download_progress (struct DownloadEntry *de,
2931 { 2931 {
2932 /* got a data block of a directory, list its contents */ 2932 /* got a data block of a directory, list its contents */
2933 struct AddDirectoryEntryContext ade; 2933 struct AddDirectoryEntryContext ade;
2934 2934
2935 ade.tab = de->sr->tab; 2935 ade.tab = de->sr->tab;
2936 ade.prr = de->sr->rr; 2936 ade.prr = de->sr->rr;
2937 ade.check_duplicates = GNUNET_NO; 2937 ade.check_duplicates = GNUNET_NO;
2938 ade.anonymity = de->anonymity; 2938 ade.anonymity = de->anonymity;
2939 if (GNUNET_SYSERR == 2939 if (GNUNET_SYSERR ==
2940 GNUNET_FS_directory_list_contents ((size_t) block_size, block_data, 2940 GNUNET_FS_directory_list_contents ((size_t) block_size, block_data,
2941 offset, &add_directory_entry, &ade)) 2941 offset, &add_directory_entry, &ade))
2942 { 2942 {
2943 /* Mime type was wrong, this is not a directory, update model! */ 2943 /* Mime type was wrong, this is not a directory, update model! */
2944 de->is_directory = GNUNET_SYSERR; 2944 de->is_directory = GNUNET_SYSERR;
2945 gtk_tree_store_set (de->sr->tab->ts, &iter, 2945 gtk_tree_store_set (de->sr->tab->ts, &iter,
2946 SEARCH_TAB_MC_MIMETYPE, "", 2946 SEARCH_TAB_MC_MIMETYPE, "",
2947 -1); 2947 -1);
2948 } 2948 }
2949 } 2949 }
@@ -2955,7 +2955,7 @@ mark_download_progress (struct DownloadEntry *de,
2955 (filename != NULL) ) 2955 (filename != NULL) )
2956 { 2956 {
2957 struct AddDirectoryEntryContext ade; 2957 struct AddDirectoryEntryContext ade;
2958 2958
2959 /* download was for a directory (and we have a temp file for scanning); 2959 /* download was for a directory (and we have a temp file for scanning);
2960 add contents of the directory to the view */ 2960 add contents of the directory to the view */
2961 ade.tab = de->sr->tab; 2961 ade.tab = de->sr->tab;
@@ -3026,7 +3026,7 @@ mark_download_completed (struct DownloadEntry *de, uint64_t size)
3026 return; 3026 return;
3027 } 3027 }
3028 gtk_tree_path_free (path); 3028 gtk_tree_path_free (path);
3029 gtk_tree_store_set (de->sr->tab->ts, &iter, 3029 gtk_tree_store_set (de->sr->tab->ts, &iter,
3030 SEARCH_TAB_MC_PERCENT_PROGRESS, (guint) 100, 3030 SEARCH_TAB_MC_PERCENT_PROGRESS, (guint) 100,
3031 SEARCH_TAB_MC_PERCENT_AVAILABILITY, (guint) 100, 3031 SEARCH_TAB_MC_PERCENT_AVAILABILITY, (guint) 100,
3032 SEARCH_TAB_MC_UNKNOWN_AVAILABILITY, -1, 3032 SEARCH_TAB_MC_UNKNOWN_AVAILABILITY, -1,
@@ -3052,7 +3052,7 @@ mark_download_completed (struct DownloadEntry *de, uint64_t size)
3052 */ 3052 */
3053static struct DownloadEntry * 3053static struct DownloadEntry *
3054setup_download (struct DownloadEntry *de, struct DownloadEntry *pde, 3054setup_download (struct DownloadEntry *de, struct DownloadEntry *pde,
3055 struct SearchResult *sr, 3055 struct SearchResult *sr,
3056 uint32_t anonymity, 3056 uint32_t anonymity,
3057 struct GNUNET_FS_DownloadContext *dc, 3057 struct GNUNET_FS_DownloadContext *dc,
3058 const struct GNUNET_FS_Uri *uri, const char *filename, 3058 const struct GNUNET_FS_Uri *uri, const char *filename,
@@ -3078,7 +3078,7 @@ setup_download (struct DownloadEntry *de, struct DownloadEntry *pde,
3078 } 3078 }
3079 de->dc = dc; 3079 de->dc = dc;
3080 de->pde = pde; 3080 de->pde = pde;
3081 if (NULL != sr) 3081 if (NULL != sr)
3082 { 3082 {
3083 /* have a search result, establish mapping de <--> sr */ 3083 /* have a search result, establish mapping de <--> sr */
3084 if (NULL == de->sr) 3084 if (NULL == de->sr)
@@ -3086,7 +3086,7 @@ setup_download (struct DownloadEntry *de, struct DownloadEntry *pde,
3086 GNUNET_assert (sr->download == NULL); 3086 GNUNET_assert (sr->download == NULL);
3087 de->sr = sr; 3087 de->sr = sr;
3088 sr->download = de; 3088 sr->download = de;
3089 } 3089 }
3090 else 3090 else
3091 { 3091 {
3092 GNUNET_assert (sr == de->sr); 3092 GNUNET_assert (sr == de->sr);
@@ -3101,7 +3101,7 @@ setup_download (struct DownloadEntry *de, struct DownloadEntry *pde,
3101 GtkTreeIter iter; 3101 GtkTreeIter iter;
3102 GtkTreeIter child; 3102 GtkTreeIter child;
3103 struct GNUNET_FS_Uri *uri; 3103 struct GNUNET_FS_Uri *uri;
3104 3104
3105 tm = GTK_TREE_MODEL (pde->sr->tab->ts); 3105 tm = GTK_TREE_MODEL (pde->sr->tab->ts);
3106 path = gtk_tree_row_reference_get_path (pde->sr->rr); 3106 path = gtk_tree_row_reference_get_path (pde->sr->rr);
3107 if ( (! gtk_tree_model_get_iter (tm, &iter, path)) || 3107 if ( (! gtk_tree_model_get_iter (tm, &iter, path)) ||
@@ -3121,7 +3121,7 @@ setup_download (struct DownloadEntry *de, struct DownloadEntry *pde,
3121 uri)) 3121 uri))
3122 break; 3122 break;
3123 de->sr = NULL; 3123 de->sr = NULL;
3124 } 3124 }
3125 while (gtk_tree_model_iter_next (tm, &child)); 3125 while (gtk_tree_model_iter_next (tm, &child));
3126 if (NULL == de->sr) 3126 if (NULL == de->sr)
3127 { 3127 {
@@ -3154,7 +3154,7 @@ setup_download (struct DownloadEntry *de, struct DownloadEntry *pde,
3154 else 3154 else
3155 { 3155 {
3156 struct GNUNET_CONTAINER_MetaData *meta; 3156 struct GNUNET_CONTAINER_MetaData *meta;
3157 3157
3158 /* get metadata from existing tab, might have a mime type */ 3158 /* get metadata from existing tab, might have a mime type */
3159 path = gtk_tree_row_reference_get_path (de->sr->rr); 3159 path = gtk_tree_row_reference_get_path (de->sr->rr);
3160 if (! gtk_tree_model_get_iter (GTK_TREE_MODEL (de->sr->tab->ts), &iter, path)) 3160 if (! gtk_tree_model_get_iter (GTK_TREE_MODEL (de->sr->tab->ts), &iter, path))
@@ -3169,11 +3169,11 @@ setup_download (struct DownloadEntry *de, struct DownloadEntry *pde,
3169 de->is_directory = GNUNET_FS_meta_data_test_for_directory (meta); 3169 de->is_directory = GNUNET_FS_meta_data_test_for_directory (meta);
3170 } 3170 }
3171 gtk_tree_path_free (path); 3171 gtk_tree_path_free (path);
3172 gtk_tree_store_set (de->sr->tab->ts, &iter, 3172 gtk_tree_store_set (de->sr->tab->ts, &iter,
3173 SEARCH_TAB_MC_PERCENT_PROGRESS, (guint) ((size > 0) ? (100 * completed / size) : 100), 3173 SEARCH_TAB_MC_PERCENT_PROGRESS, (guint) ((size > 0) ? (100 * completed / size) : 100),
3174 SEARCH_TAB_MC_FILENAME, filename, 3174 SEARCH_TAB_MC_FILENAME, filename,
3175 SEARCH_TAB_MC_STATUS_COLOUR, "blue", 3175 SEARCH_TAB_MC_STATUS_COLOUR, "blue",
3176 SEARCH_TAB_MC_SEARCH_RESULT, de->sr, 3176 SEARCH_TAB_MC_SEARCH_RESULT, de->sr,
3177 SEARCH_TAB_MC_COMPLETED, (guint64) completed, 3177 SEARCH_TAB_MC_COMPLETED, (guint64) completed,
3178 SEARCH_TAB_MC_DOWNLOADED_FILENAME, de->filename, 3178 SEARCH_TAB_MC_DOWNLOADED_FILENAME, de->filename,
3179 SEARCH_TAB_MC_DOWNLOADED_ANONYMITY, de->anonymity, 3179 SEARCH_TAB_MC_DOWNLOADED_ANONYMITY, de->anonymity,
@@ -3191,7 +3191,7 @@ setup_download (struct DownloadEntry *de, struct DownloadEntry *pde,
3191/** 3191/**
3192 * Change the (background) color of the given publish entry. 3192 * Change the (background) color of the given publish entry.
3193 * 3193 *
3194 * @param pe entry to change 3194 * @param pe entry to change
3195 * @param color name of the color to use 3195 * @param color name of the color to use
3196 */ 3196 */
3197static void 3197static void
@@ -3201,8 +3201,8 @@ change_publish_color (struct PublishEntry *pe,
3201 GtkTreeIter iter; 3201 GtkTreeIter iter;
3202 GtkTreePath *path; 3202 GtkTreePath *path;
3203 3203
3204 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3204 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3205 "Changing publish PE=%p color to %s\n", 3205 "Changing publish PE=%p color to %s\n",
3206 pe, color); 3206 pe, color);
3207 path = gtk_tree_row_reference_get_path (pe->rr); 3207 path = gtk_tree_row_reference_get_path (pe->rr);
3208 if (! gtk_tree_model_get_iter (GTK_TREE_MODEL (pe->tab->ts), &iter, path)) 3208 if (! gtk_tree_model_get_iter (GTK_TREE_MODEL (pe->tab->ts), &iter, path))
@@ -3212,8 +3212,8 @@ change_publish_color (struct PublishEntry *pe,
3212 return; 3212 return;
3213 } 3213 }
3214 gtk_tree_path_free (path); 3214 gtk_tree_path_free (path);
3215 gtk_tree_store_set (pe->tab->ts, &iter, 3215 gtk_tree_store_set (pe->tab->ts, &iter,
3216 PUBLISH_TAB_MC_BGCOLOUR, color, 3216 PUBLISH_TAB_MC_BGCOLOUR, color,
3217 -1); 3217 -1);
3218} 3218}
3219 3219
@@ -3272,7 +3272,7 @@ handle_publish_completed (struct PublishEntry *pe,
3272 gtk_tree_path_free (path); 3272 gtk_tree_path_free (path);
3273 pe->uri = GNUNET_FS_uri_dup (uri); 3273 pe->uri = GNUNET_FS_uri_dup (uri);
3274 uris = GNUNET_FS_uri_to_string (uri); 3274 uris = GNUNET_FS_uri_to_string (uri);
3275 gtk_tree_store_set (pe->tab->ts, &iter, 3275 gtk_tree_store_set (pe->tab->ts, &iter,
3276 PUBLISH_TAB_MC_RESULT_STRING, uris, 3276 PUBLISH_TAB_MC_RESULT_STRING, uris,
3277 PUBLISH_TAB_MC_PROGRESS, 100, 3277 PUBLISH_TAB_MC_PROGRESS, 100,
3278 PUBLISH_TAB_MC_STATUS_ICON, GNUNET_GTK_animation_context_get_pixbuf (animation_published), 3278 PUBLISH_TAB_MC_STATUS_ICON, GNUNET_GTK_animation_context_get_pixbuf (animation_published),
@@ -3286,7 +3286,7 @@ handle_publish_completed (struct PublishEntry *pe,
3286 * We received a publish error message from the FS library. 3286 * We received a publish error message from the FS library.
3287 * Present it to the user in an appropriate form. 3287 * Present it to the user in an appropriate form.
3288 * 3288 *
3289 * @param pe publishing operation affected by the error 3289 * @param pe publishing operation affected by the error
3290 * @param emsg the error message 3290 * @param emsg the error message
3291 */ 3291 */
3292static void 3292static void
@@ -3306,7 +3306,7 @@ handle_publish_error (struct PublishEntry *pe,
3306 gtk_tree_path_free (path); 3306 gtk_tree_path_free (path);
3307 if (NULL == animation_error) 3307 if (NULL == animation_error)
3308 animation_error = load_animation ("error"); 3308 animation_error = load_animation ("error");
3309 gtk_tree_store_set (pe->tab->ts, &iter, 3309 gtk_tree_store_set (pe->tab->ts, &iter,
3310 PUBLISH_TAB_MC_RESULT_STRING, emsg, 3310 PUBLISH_TAB_MC_RESULT_STRING, emsg,
3311 PUBLISH_TAB_MC_PROGRESS, 100, 3311 PUBLISH_TAB_MC_PROGRESS, 100,
3312 PUBLISH_TAB_MC_STATUS_ICON, GNUNET_GTK_animation_context_get_pixbuf (animation_error), 3312 PUBLISH_TAB_MC_STATUS_ICON, GNUNET_GTK_animation_context_get_pixbuf (animation_error),
@@ -3316,7 +3316,7 @@ handle_publish_error (struct PublishEntry *pe,
3316 3316
3317 3317
3318/** 3318/**
3319 * Remove publish tab from notebook 3319 * Remove publish tab from notebook
3320 */ 3320 */
3321static void 3321static void
3322delete_publish_tab () 3322delete_publish_tab ()
@@ -3325,7 +3325,7 @@ delete_publish_tab ()
3325 int index; 3325 int index;
3326 int i; 3326 int i;
3327 struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context (); 3327 struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context ();
3328 3328
3329 if (NULL == publish_tab) 3329 if (NULL == publish_tab)
3330 return; 3330 return;
3331 pt = publish_tab; 3331 pt = publish_tab;
@@ -3391,7 +3391,7 @@ handle_publish_stop (struct PublishEntry *pe)
3391 * @param user_data the 'struct PublishTab' that is being closed 3391 * @param user_data the 'struct PublishTab' that is being closed
3392 */ 3392 */
3393void 3393void
3394GNUNET_FS_GTK_publish_label_close_button_clicked (GtkButton * button, 3394GNUNET_FS_GTK_publish_label_close_button_clicked (GtkButton * button,
3395 gpointer user_data) 3395 gpointer user_data)
3396{ 3396{
3397 struct PublishTab *tab = user_data; 3397 struct PublishTab *tab = user_data;
@@ -3404,8 +3404,8 @@ GNUNET_FS_GTK_publish_label_close_button_clicked (GtkButton * button,
3404 tm = GTK_TREE_MODEL (publish_tab->ts); 3404 tm = GTK_TREE_MODEL (publish_tab->ts);
3405 while (gtk_tree_model_iter_children (tm, &iter, NULL)) 3405 while (gtk_tree_model_iter_children (tm, &iter, NULL))
3406 { 3406 {
3407 gtk_tree_model_get (tm, &iter, 3407 gtk_tree_model_get (tm, &iter,
3408 PUBLISH_TAB_MC_ENT, &pe, 3408 PUBLISH_TAB_MC_ENT, &pe,
3409 -1); 3409 -1);
3410 GNUNET_FS_publish_stop (pe->pc); 3410 GNUNET_FS_publish_stop (pe->pc);
3411 } 3411 }
@@ -3439,7 +3439,7 @@ setup_publish (struct GNUNET_FS_PublishContext *pc, const char *fn,
3439 GtkTreeView *tv; 3439 GtkTreeView *tv;
3440 GtkTreeViewColumn *anim_col; 3440 GtkTreeViewColumn *anim_col;
3441 struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context (); 3441 struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context ();
3442 3442
3443 if (NULL == publish_tab) 3443 if (NULL == publish_tab)
3444 { 3444 {
3445 /* create new tab */ 3445 /* create new tab */
@@ -3453,7 +3453,7 @@ setup_publish (struct GNUNET_FS_PublishContext *pc, const char *fn,
3453 g_object_ref (publish_tab->frame); 3453 g_object_ref (publish_tab->frame);
3454 gtk_container_remove (GTK_CONTAINER (df), publish_tab->frame); 3454 gtk_container_remove (GTK_CONTAINER (df), publish_tab->frame);
3455 gtk_widget_destroy (GTK_WIDGET (df)); 3455 gtk_widget_destroy (GTK_WIDGET (df));
3456 3456
3457 /* load tab_label */ 3457 /* load tab_label */
3458 df = GTK_WINDOW (gtk_builder_get_object 3458 df = GTK_WINDOW (gtk_builder_get_object
3459 (publish_tab->builder, "_publish_label_window")); 3459 (publish_tab->builder, "_publish_label_window"));
@@ -3534,7 +3534,7 @@ struct PublishListPopupContext
3534 * Tab where the publish list popup was created. 3534 * Tab where the publish list popup was created.
3535 */ 3535 */
3536 struct PublishTab *tab; 3536 struct PublishTab *tab;
3537 3537
3538 /** 3538 /**
3539 * Row where the publish list popup was created. 3539 * Row where the publish list popup was created.
3540 */ 3540 */
@@ -3545,7 +3545,7 @@ struct PublishListPopupContext
3545 * Publishing entry at the respective row. 3545 * Publishing entry at the respective row.
3546 */ 3546 */
3547 struct PublishEntry *pe; 3547 struct PublishEntry *pe;
3548 3548
3549}; 3549};
3550 3550
3551 3551
@@ -3553,7 +3553,7 @@ struct PublishListPopupContext
3553 * An item was selected from the context menu; destroy the menu shell. 3553 * An item was selected from the context menu; destroy the menu shell.
3554 * 3554 *
3555 * @param menushell menu to destroy 3555 * @param menushell menu to destroy
3556 * @param user_data the 'struct PublishListPopupContext' of the menu 3556 * @param user_data the 'struct PublishListPopupContext' of the menu
3557 */ 3557 */
3558static void 3558static void
3559publish_list_popup_selection_done (GtkMenuShell *menushell, 3559publish_list_popup_selection_done (GtkMenuShell *menushell,
@@ -3569,7 +3569,7 @@ publish_list_popup_selection_done (GtkMenuShell *menushell,
3569 3569
3570/** 3570/**
3571 * Publish "abort" was selected in the current publish context menu. 3571 * Publish "abort" was selected in the current publish context menu.
3572 * 3572 *
3573 * @param item the 'abort' menu item 3573 * @param item the 'abort' menu item
3574 * @param user_data the 'struct PublishListPopupContext' with the operation to abort. 3574 * @param user_data the 'struct PublishListPopupContext' with the operation to abort.
3575 */ 3575 */
@@ -3578,7 +3578,7 @@ abort_publish_ctx_menu (GtkMenuItem *item, gpointer user_data)
3578{ 3578{
3579 struct PublishListPopupContext *ppc = user_data; 3579 struct PublishListPopupContext *ppc = user_data;
3580 struct PublishEntry *pe = ppc->pe; 3580 struct PublishEntry *pe = ppc->pe;
3581 3581
3582 if (NULL != pe->pc) 3582 if (NULL != pe->pc)
3583 GNUNET_FS_publish_stop (pe->pc); 3583 GNUNET_FS_publish_stop (pe->pc);
3584} 3584}
@@ -3586,7 +3586,7 @@ abort_publish_ctx_menu (GtkMenuItem *item, gpointer user_data)
3586 3586
3587/** 3587/**
3588 * Copy current URI to clipboard was selected in the current context menu. 3588 * Copy current URI to clipboard was selected in the current context menu.
3589 * 3589 *
3590 * @param item the 'copy-to-clipboard' menu item 3590 * @param item the 'copy-to-clipboard' menu item
3591 * @param user_data the 'struct DownloadListPopupContext' of the menu 3591 * @param user_data the 'struct DownloadListPopupContext' of the menu
3592 */ 3592 */
@@ -3626,8 +3626,8 @@ copy_publish_uri_to_clipboard_ctx_menu (GtkMenuItem *item, gpointer user_data)
3626 * TRUE if there is now a pop-up menu 3626 * TRUE if there is now a pop-up menu
3627 */ 3627 */
3628static gboolean 3628static gboolean
3629publish_list_popup (GtkTreeModel *tm, 3629publish_list_popup (GtkTreeModel *tm,
3630 struct PublishTab *tab, 3630 struct PublishTab *tab,
3631 gint init_button, 3631 gint init_button,
3632 guint32 event_time, 3632 guint32 event_time,
3633 GtkTreeIter *iter) 3633 GtkTreeIter *iter)
@@ -3638,8 +3638,8 @@ publish_list_popup (GtkTreeModel *tm,
3638 struct PublishEntry *pe; 3638 struct PublishEntry *pe;
3639 struct PublishListPopupContext *ppc; 3639 struct PublishListPopupContext *ppc;
3640 3640
3641 gtk_tree_model_get (tm, iter, 3641 gtk_tree_model_get (tm, iter,
3642 PUBLISH_TAB_MC_ENT, &pe, 3642 PUBLISH_TAB_MC_ENT, &pe,
3643 -1); 3643 -1);
3644 if ( (NULL == pe->uri) && 3644 if ( (NULL == pe->uri) &&
3645 ( (NULL == pe->pc) || 3645 ( (NULL == pe->pc) ||
@@ -3676,7 +3676,7 @@ publish_list_popup (GtkTreeModel *tm,
3676 TRUE); 3676 TRUE);
3677 gtk_widget_show (child); 3677 gtk_widget_show (child);
3678 gtk_menu_shell_append (GTK_MENU_SHELL (menu), child); 3678 gtk_menu_shell_append (GTK_MENU_SHELL (menu), child);
3679 } 3679 }
3680 g_signal_connect (menu, "selection-done", 3680 g_signal_connect (menu, "selection-done",
3681 G_CALLBACK (publish_list_popup_selection_done), ppc); 3681 G_CALLBACK (publish_list_popup_selection_done), ppc);
3682 gtk_menu_popup (menu, NULL, NULL, NULL, NULL, init_button, event_time); 3682 gtk_menu_popup (menu, NULL, NULL, NULL, NULL, init_button, event_time);
@@ -3693,7 +3693,7 @@ publish_list_popup (GtkTreeModel *tm,
3693 * TRUE if there is now a pop-up menu 3693 * TRUE if there is now a pop-up menu
3694 */ 3694 */
3695gboolean 3695gboolean
3696GNUNET_FS_GTK_publish_treeview_popup_menu (GtkWidget *widget, 3696GNUNET_FS_GTK_publish_treeview_popup_menu (GtkWidget *widget,
3697 gpointer user_data) 3697 gpointer user_data)
3698{ 3698{
3699 GtkTreeView *tv = GTK_TREE_VIEW (widget); 3699 GtkTreeView *tv = GTK_TREE_VIEW (widget);
@@ -3720,7 +3720,7 @@ GNUNET_FS_GTK_publish_treeview_popup_menu (GtkWidget *widget,
3720 * TRUE to stop the event propagation. 3720 * TRUE to stop the event propagation.
3721 */ 3721 */
3722gboolean 3722gboolean
3723GNUNET_FS_GTK_publish_treeview_button_press_event (GtkWidget * widget, 3723GNUNET_FS_GTK_publish_treeview_button_press_event (GtkWidget * widget,
3724 GdkEvent * event, 3724 GdkEvent * event,
3725 gpointer user_data) 3725 gpointer user_data)
3726{ 3726{
@@ -3737,12 +3737,12 @@ GNUNET_FS_GTK_publish_treeview_button_press_event (GtkWidget * widget,
3737 if (! gtk_tree_view_get_path_at_pos (tv, 3737 if (! gtk_tree_view_get_path_at_pos (tv,
3738 event_button->x, event_button->y, 3738 event_button->x, event_button->y,
3739 &path, NULL, NULL, NULL)) 3739 &path, NULL, NULL, NULL))
3740 return FALSE; /* click outside of area with values, ignore */ 3740 return FALSE; /* click outside of area with values, ignore */
3741 tm = gtk_tree_view_get_model (tv); 3741 tm = gtk_tree_view_get_model (tv);
3742 if (! gtk_tree_model_get_iter (tm, &iter, path)) 3742 if (! gtk_tree_model_get_iter (tm, &iter, path))
3743 return FALSE; /* not sure how we got a path but no iter... */ 3743 return FALSE; /* not sure how we got a path but no iter... */
3744 gtk_tree_path_free (path); 3744 gtk_tree_path_free (path);
3745 publish_list_popup (tm, tab, 3745 publish_list_popup (tm, tab,
3746 event_button->button, 3746 event_button->button,
3747 event_button->time, 3747 event_button->time,
3748 &iter); 3748 &iter);
@@ -3775,7 +3775,7 @@ GNUNET_GTK_fs_event_handler (void *cls,
3775 const struct GNUNET_FS_ProgressInfo *info) 3775 const struct GNUNET_FS_ProgressInfo *info)
3776{ 3776{
3777 void *ret; 3777 void *ret;
3778 3778
3779 GNUNET_FS_GTK_set_fs_handle (info->fsh); 3779 GNUNET_FS_GTK_set_fs_handle (info->fsh);
3780 switch (info->status) 3780 switch (info->status)
3781 { 3781 {
@@ -3820,7 +3820,7 @@ GNUNET_GTK_fs_event_handler (void *cls,
3820 return NULL; 3820 return NULL;
3821 case GNUNET_FS_STATUS_DOWNLOAD_START: 3821 case GNUNET_FS_STATUS_DOWNLOAD_START:
3822 return setup_download (info->value.download.cctx, info->value.download.pctx, 3822 return setup_download (info->value.download.cctx, info->value.download.pctx,
3823 info->value.download.sctx, 3823 info->value.download.sctx,
3824 info->value.download.anonymity, 3824 info->value.download.anonymity,
3825 info->value.download.dc, 3825 info->value.download.dc,
3826 info->value.download.uri, 3826 info->value.download.uri,
@@ -3831,7 +3831,7 @@ GNUNET_GTK_fs_event_handler (void *cls,
3831 case GNUNET_FS_STATUS_DOWNLOAD_RESUME: 3831 case GNUNET_FS_STATUS_DOWNLOAD_RESUME:
3832 ret = 3832 ret =
3833 setup_download (info->value.download.cctx, info->value.download.pctx, 3833 setup_download (info->value.download.cctx, info->value.download.pctx,
3834 info->value.download.sctx, 3834 info->value.download.sctx,
3835 info->value.download.anonymity, 3835 info->value.download.anonymity,
3836 info->value.download.dc, 3836 info->value.download.dc,
3837 info->value.download.uri, info->value.download.filename, 3837 info->value.download.uri, info->value.download.filename,
@@ -3840,7 +3840,7 @@ GNUNET_GTK_fs_event_handler (void *cls,
3840 info->value.download.completed); 3840 info->value.download.completed);
3841 if (NULL != info->value.download.specifics.resume.message) 3841 if (NULL != info->value.download.specifics.resume.message)
3842 mark_download_error (ret, 3842 mark_download_error (ret,
3843 info->value.download.specifics.resume.message); 3843 info->value.download.specifics.resume.message);
3844 return ret; 3844 return ret;
3845 case GNUNET_FS_STATUS_DOWNLOAD_SUSPEND: 3845 case GNUNET_FS_STATUS_DOWNLOAD_SUSPEND:
3846 stop_download (info->value.download.cctx); 3846 stop_download (info->value.download.cctx);
@@ -3871,12 +3871,12 @@ GNUNET_GTK_fs_event_handler (void *cls,
3871 return NULL; 3871 return NULL;
3872 case GNUNET_FS_STATUS_DOWNLOAD_ACTIVE: 3872 case GNUNET_FS_STATUS_DOWNLOAD_ACTIVE:
3873 change_download_color (info->value.download.cctx, "yellow"); 3873 change_download_color (info->value.download.cctx, "yellow");
3874 change_download_status_icon (info->value.download.cctx, 3874 change_download_status_icon (info->value.download.cctx,
3875 GNUNET_GTK_animation_context_get_pixbuf (animation_downloading)); 3875 GNUNET_GTK_animation_context_get_pixbuf (animation_downloading));
3876 return info->value.download.cctx; 3876 return info->value.download.cctx;
3877 case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE: 3877 case GNUNET_FS_STATUS_DOWNLOAD_INACTIVE:
3878 change_download_color (info->value.download.cctx, "blue"); 3878 change_download_color (info->value.download.cctx, "blue");
3879 change_download_status_icon (info->value.download.cctx, 3879 change_download_status_icon (info->value.download.cctx,
3880 GNUNET_GTK_animation_context_get_pixbuf (animation_download_stalled)); 3880 GNUNET_GTK_animation_context_get_pixbuf (animation_download_stalled));
3881 return info->value.download.cctx; 3881 return info->value.download.cctx;
3882 case GNUNET_FS_STATUS_DOWNLOAD_LOST_PARENT: 3882 case GNUNET_FS_STATUS_DOWNLOAD_LOST_PARENT:
@@ -3895,7 +3895,7 @@ GNUNET_GTK_fs_event_handler (void *cls,
3895 return ret; 3895 return ret;
3896 case GNUNET_FS_STATUS_SEARCH_RESUME_RESULT: 3896 case GNUNET_FS_STATUS_SEARCH_RESUME_RESULT:
3897 ret = 3897 ret =
3898 process_search_result (info->value.search.cctx, 3898 process_search_result (info->value.search.cctx,
3899 info->value.search.anonymity, 3899 info->value.search.anonymity,
3900 info->value.search.pctx, 3900 info->value.search.pctx,
3901 info->value.search.specifics.resume_result.uri, 3901 info->value.search.specifics.resume_result.uri,
diff --git a/src/fs/gnunet-fs-gtk_event-handler.h b/src/fs/gnunet-fs-gtk_event-handler.h
index ae7bde2c..e0f5d8ed 100644
--- a/src/fs/gnunet-fs-gtk_event-handler.h
+++ b/src/fs/gnunet-fs-gtk_event-handler.h
@@ -68,7 +68,7 @@ struct SearchTab
68 68
69 /** 69 /**
70 * GtkBuilder object for the search tab. 70 * GtkBuilder object for the search tab.
71 */ 71 */
72 GtkBuilder *builder; 72 GtkBuilder *builder;
73 73
74 /** 74 /**
@@ -238,7 +238,7 @@ GNUNET_GTK_add_to_uri_tab (uint32_t anonymity,
238 * @param tab search tab to extend, never NULL 238 * @param tab search tab to extend, never NULL
239 * @param anonymity anonymity level to use for probes for this result 239 * @param anonymity anonymity level to use for probes for this result
240 * @param parent_rr reference to parent entry in search tab, NULL for normal 240 * @param parent_rr reference to parent entry in search tab, NULL for normal
241 * search results, 241 * search results,
242 * @param uri uri to add, can be NULL for top-level entry of a directory opened from disk 242 * @param uri uri to add, can be NULL for top-level entry of a directory opened from disk
243 * (in this case, we don't know the URI and should probably not 243 * (in this case, we don't know the URI and should probably not
244 * bother to calculate it) 244 * bother to calculate it)
@@ -250,7 +250,7 @@ GNUNET_GTK_add_to_uri_tab (uint32_t anonymity,
250 * model at 'iter') 250 * model at 'iter')
251 */ 251 */
252struct SearchResult * 252struct SearchResult *
253GNUNET_GTK_add_search_result (struct SearchTab *tab, 253GNUNET_GTK_add_search_result (struct SearchTab *tab,
254 uint32_t anonymity, 254 uint32_t anonymity,
255 GtkTreeRowReference *parent_rr, 255 GtkTreeRowReference *parent_rr,
256 const struct GNUNET_FS_Uri *uri, 256 const struct GNUNET_FS_Uri *uri,
@@ -284,7 +284,7 @@ GNUNET_GTK_fs_event_handler (void *cls,
284 284
285/** 285/**
286 * Close the 'uri_tab'. 286 * Close the 'uri_tab'.
287 */ 287 */
288void 288void
289GNUNET_FS_GTK_close_uri_tab_ (); 289GNUNET_FS_GTK_close_uri_tab_ ();
290 290
diff --git a/src/fs/gnunet-fs-gtk_main-window-meta-data-context-menu.c b/src/fs/gnunet-fs-gtk_main-window-meta-data-context-menu.c
index 308b2582..9777b892 100644
--- a/src/fs/gnunet-fs-gtk_main-window-meta-data-context-menu.c
+++ b/src/fs/gnunet-fs-gtk_main-window-meta-data-context-menu.c
@@ -39,7 +39,7 @@
39 * @param path unused 39 * @param path unused
40 * @param iter position in the model to access 40 * @param iter position in the model to access
41 * @param user_data 'GList**' where we should store the types and values found 41 * @param user_data 'GList**' where we should store the types and values found
42 */ 42 */
43static void 43static void
44copy_metadata_to_clipboard (GtkTreeModel * model, GtkTreePath * path, 44copy_metadata_to_clipboard (GtkTreeModel * model, GtkTreePath * path,
45 GtkTreeIter * iter, gpointer user_data) 45 GtkTreeIter * iter, gpointer user_data)
@@ -66,7 +66,7 @@ copy_metadata_to_clipboard (GtkTreeModel * model, GtkTreePath * path,
66 * @param user_data the GtkBuilder of the main window 66 * @param user_data the GtkBuilder of the main window
67 */ 67 */
68void 68void
69GNUNET_GTK_FS_metadata_copy_selection_activated (GtkMenuItem * menuitem, 69GNUNET_GTK_FS_metadata_copy_selection_activated (GtkMenuItem * menuitem,
70 gpointer user_data) 70 gpointer user_data)
71{ 71{
72 struct GNUNET_GTK_MainWindowContext *main_ctx = user_data; 72 struct GNUNET_GTK_MainWindowContext *main_ctx = user_data;
@@ -115,14 +115,14 @@ GNUNET_GTK_FS_metadata_copy_selection_activated (GtkMenuItem * menuitem,
115 p = g_stpcpy (p, ": "); 115 p = g_stpcpy (p, ": ");
116 p = g_stpcpy (p, (gchar *) value->data); 116 p = g_stpcpy (p, (gchar *) value->data);
117 if (NULL != value->next) 117 if (NULL != value->next)
118 p = g_stpcpy (p, "\n"); 118 p = g_stpcpy (p, "\n");
119 } 119 }
120 g_list_foreach (pairs, (GFunc) &g_free, NULL); 120 g_list_foreach (pairs, (GFunc) &g_free, NULL);
121 g_list_free (pairs); 121 g_list_free (pairs);
122 cb = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); 122 cb = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
123 gtk_clipboard_set_text (cb, s, -1); 123 gtk_clipboard_set_text (cb, s, -1);
124 gtk_clipboard_store (cb); 124 gtk_clipboard_store (cb);
125 g_free (s); 125 g_free (s);
126} 126}
127 127
128 128
diff --git a/src/fs/gnunet-fs-gtk_main-window-search.c b/src/fs/gnunet-fs-gtk_main-window-search.c
index 45aaf590..11bacee2 100644
--- a/src/fs/gnunet-fs-gtk_main-window-search.c
+++ b/src/fs/gnunet-fs-gtk_main-window-search.c
@@ -43,7 +43,7 @@ static void
43search_for_uri (struct GNUNET_FS_Uri *uri, 43search_for_uri (struct GNUNET_FS_Uri *uri,
44 guint anonymity_level) 44 guint anonymity_level)
45{ 45{
46 GNUNET_FS_search_start (GNUNET_FS_GTK_get_fs_handle (), 46 GNUNET_FS_search_start (GNUNET_FS_GTK_get_fs_handle (),
47 uri, anonymity_level, 47 uri, anonymity_level,
48 GNUNET_FS_SEARCH_OPTION_NONE, NULL); 48 GNUNET_FS_SEARCH_OPTION_NONE, NULL);
49 GNUNET_FS_uri_destroy (uri); 49 GNUNET_FS_uri_destroy (uri);
@@ -74,7 +74,7 @@ abort_search_lookup (struct SearchLookup *sl)
74 sl->gns = NULL; 74 sl->gns = NULL;
75 } 75 }
76 g_free (sl->keywords); 76 g_free (sl->keywords);
77 GNUNET_free (sl); 77 GNUNET_free (sl);
78} 78}
79 79
80 80
@@ -92,7 +92,7 @@ timeout_search_lookup (void *cls,
92 struct SearchLookup *sl = cls; 92 struct SearchLookup *sl = cls;
93 93
94 sl->timeout_task = GNUNET_SCHEDULER_NO_TASK; 94 sl->timeout_task = GNUNET_SCHEDULER_NO_TASK;
95 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 95 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
96 _("Failed to resolve namespace in time\n")); 96 _("Failed to resolve namespace in time\n"));
97 abort_search_lookup (sl); 97 abort_search_lookup (sl);
98} 98}
@@ -128,9 +128,9 @@ handle_gns_result (void *cls,
128 uri = GNUNET_FS_uri_sks_create (rd[i].data, sl->keywords); 128 uri = GNUNET_FS_uri_sks_create (rd[i].data, sl->keywords);
129 search_for_uri (uri, sl->anonymity_level); 129 search_for_uri (uri, sl->anonymity_level);
130 abort_search_lookup (sl); 130 abort_search_lookup (sl);
131 return; 131 return;
132 } 132 }
133 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 133 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
134 _("Failed to resolve namespace in time\n")); 134 _("Failed to resolve namespace in time\n"));
135 abort_search_lookup (sl); 135 abort_search_lookup (sl);
136} 136}
@@ -171,7 +171,7 @@ start_search (struct GNUNET_GTK_MainWindowContext *main_ctx)
171 ("main_window_search_mime_combobox")); 171 ("main_window_search_mime_combobox"));
172 mime_model = gtk_combo_box_get_model (mime_combo); 172 mime_model = gtk_combo_box_get_model (mime_combo);
173 mime_keyword = NULL; 173 mime_keyword = NULL;
174 if ( (NULL != mime_model) && 174 if ( (NULL != mime_model) &&
175 gtk_combo_box_get_active_iter (mime_combo, &iter)) 175 gtk_combo_box_get_active_iter (mime_combo, &iter))
176 gtk_tree_model_get (mime_model, &iter, 176 gtk_tree_model_get (mime_model, &iter,
177 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_MIME, 177 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_MIME,
@@ -186,7 +186,7 @@ start_search (struct GNUNET_GTK_MainWindowContext *main_ctx)
186 } 186 }
187 { 187 {
188 GtkComboBox *namespace_box; 188 GtkComboBox *namespace_box;
189 189
190 namespace_box = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object ("main_window_search_namespace_combobox")); 190 namespace_box = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object ("main_window_search_namespace_combobox"));
191 nsid = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (namespace_box)))); 191 nsid = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (namespace_box))));
192 if ( (NULL != nsid) && 192 if ( (NULL != nsid) &&
@@ -196,16 +196,16 @@ start_search (struct GNUNET_GTK_MainWindowContext *main_ctx)
196 _("<none>"))) ) ) 196 _("<none>"))) ) )
197 nsid = NULL; 197 nsid = NULL;
198 } 198 }
199 199
200 /* get keywords and compose keyword string */ 200 /* get keywords and compose keyword string */
201 { 201 {
202 const char *entry_keywords; 202 const char *entry_keywords;
203 203
204 entry_keywords = gtk_entry_get_text (main_ctx->search_entry); 204 entry_keywords = gtk_entry_get_text (main_ctx->search_entry);
205 if (NULL != mime_keyword) 205 if (NULL != mime_keyword)
206 { 206 {
207 keywords = g_strdup_printf ("%s +%s", 207 keywords = g_strdup_printf ("%s +%s",
208 entry_keywords, 208 entry_keywords,
209 mime_keyword); 209 mime_keyword);
210 g_free (mime_keyword); 210 g_free (mime_keyword);
211 } 211 }
@@ -218,7 +218,7 @@ start_search (struct GNUNET_GTK_MainWindowContext *main_ctx)
218 /* build KSK/SKS URI */ 218 /* build KSK/SKS URI */
219 if ( (NULL != nsid) && 219 if ( (NULL != nsid) &&
220 (0 < strlen (nsid)) ) 220 (0 < strlen (nsid)) )
221 { 221 {
222 sl = GNUNET_new (struct SearchLookup); 222 sl = GNUNET_new (struct SearchLookup);
223 sl->keywords = keywords; 223 sl->keywords = keywords;
224 sl->anonymity_level = anonymity_level; 224 sl->anonymity_level = anonymity_level;
@@ -244,13 +244,13 @@ start_search (struct GNUNET_GTK_MainWindowContext *main_ctx)
244 uri = GNUNET_FS_uri_ksk_create (keywords, &emsg); 244 uri = GNUNET_FS_uri_ksk_create (keywords, &emsg);
245 if (NULL == uri) 245 if (NULL == uri)
246 { 246 {
247 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 247 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
248 _("Invalid keyword string `%s': %s"), 248 _("Invalid keyword string `%s': %s"),
249 keywords, emsg); 249 keywords, emsg);
250 g_free (keywords); 250 g_free (keywords);
251 GNUNET_free_non_null (emsg); 251 GNUNET_free_non_null (emsg);
252 return; 252 return;
253 } 253 }
254 g_free (keywords); 254 g_free (keywords);
255 search_for_uri (uri, anonymity_level); 255 search_for_uri (uri, anonymity_level);
256} 256}
@@ -263,7 +263,7 @@ start_search (struct GNUNET_GTK_MainWindowContext *main_ctx)
263 * @param user_data the main window context builder 263 * @param user_data the main window context builder
264 */ 264 */
265void 265void
266main_window_search_button_clicked_cb (GtkButton * button, 266main_window_search_button_clicked_cb (GtkButton * button,
267 gpointer user_data) 267 gpointer user_data)
268{ 268{
269 struct GNUNET_GTK_MainWindowContext *main_ctx = user_data; 269 struct GNUNET_GTK_MainWindowContext *main_ctx = user_data;
@@ -312,13 +312,13 @@ end_pseu_lookup (void *cls,
312 if (NULL != lctx->progress_dialog_builder) 312 if (NULL != lctx->progress_dialog_builder)
313 { 313 {
314 gtk_widget_destroy (lctx->progress_dialog); 314 gtk_widget_destroy (lctx->progress_dialog);
315 g_object_unref (G_OBJECT (lctx->progress_dialog_builder)); 315 g_object_unref (G_OBJECT (lctx->progress_dialog_builder));
316 lctx->progress_dialog_builder = NULL; 316 lctx->progress_dialog_builder = NULL;
317 } 317 }
318 if (NULL != lctx->nick_dialog_builder) 318 if (NULL != lctx->nick_dialog_builder)
319 { 319 {
320 gtk_widget_destroy (lctx->nick_dialog); 320 gtk_widget_destroy (lctx->nick_dialog);
321 g_object_unref (G_OBJECT (lctx->nick_dialog_builder)); 321 g_object_unref (G_OBJECT (lctx->nick_dialog_builder));
322 lctx->nick_dialog_builder = NULL; 322 lctx->nick_dialog_builder = NULL;
323 } 323 }
324 324
@@ -406,11 +406,11 @@ save_pseudonym_with_nick (struct PseuLookupContext *lctx,
406 lctx->nick = GNUNET_strdup (nick); 406 lctx->nick = GNUNET_strdup (nick);
407 /* again, show progress indicator, this should be fast though... */ 407 /* again, show progress indicator, this should be fast though... */
408 lctx->progress_dialog_builder 408 lctx->progress_dialog_builder
409 = GNUNET_GTK_get_new_builder 409 = GNUNET_GTK_get_new_builder
410 ("gnunet_fs_gtk_pseu_progress_dialog.glade", 410 ("gnunet_fs_gtk_pseu_progress_dialog.glade",
411 lctx); 411 lctx);
412 lctx->progress_dialog 412 lctx->progress_dialog
413 = GTK_WIDGET (gtk_builder_get_object 413 = GTK_WIDGET (gtk_builder_get_object
414 (lctx->progress_dialog_builder, 414 (lctx->progress_dialog_builder,
415 "GNUNET_FS_GTK_pseu_progress_dialog")); 415 "GNUNET_FS_GTK_pseu_progress_dialog"));
416 /* show the window */ 416 /* show the window */
@@ -441,14 +441,14 @@ save_pseudonym_with_nick (struct PseuLookupContext *lctx,
441 * @param user_data the `struct PseuLookupContext` 441 * @param user_data the `struct PseuLookupContext`
442 */ 442 */
443void 443void
444GNUNET_GTK_enter_nick_window_execute_button_clicked_cb (GtkButton * button, 444GNUNET_GTK_enter_nick_window_execute_button_clicked_cb (GtkButton * button,
445 gpointer user_data) 445 gpointer user_data)
446{ 446{
447 struct PseuLookupContext *lctx = user_data; 447 struct PseuLookupContext *lctx = user_data;
448 GtkEntry *entry; 448 GtkEntry *entry;
449 const char *nick; 449 const char *nick;
450 450
451 entry = GTK_ENTRY (gtk_builder_get_object 451 entry = GTK_ENTRY (gtk_builder_get_object
452 (lctx->nick_dialog_builder, 452 (lctx->nick_dialog_builder,
453 "GNUNET_GTK_enter_nick_window_nick_entry")); 453 "GNUNET_GTK_enter_nick_window_nick_entry"));
454 nick = gtk_entry_get_text (entry); 454 nick = gtk_entry_get_text (entry);
@@ -461,8 +461,8 @@ GNUNET_GTK_enter_nick_window_execute_button_clicked_cb (GtkButton * button,
461 } 461 }
462 save_pseudonym_with_nick (lctx, nick); 462 save_pseudonym_with_nick (lctx, nick);
463 gtk_widget_destroy (lctx->nick_dialog); 463 gtk_widget_destroy (lctx->nick_dialog);
464 g_object_unref (G_OBJECT (lctx->nick_dialog_builder)); 464 g_object_unref (G_OBJECT (lctx->nick_dialog_builder));
465 lctx->nick_dialog_builder = NULL; 465 lctx->nick_dialog_builder = NULL;
466 lctx->nick_dialog = NULL; 466 lctx->nick_dialog = NULL;
467} 467}
468 468
@@ -474,7 +474,7 @@ GNUNET_GTK_enter_nick_window_execute_button_clicked_cb (GtkButton * button,
474 * @param user_data the `struct PseuLookupContext` 474 * @param user_data the `struct PseuLookupContext`
475 */ 475 */
476void 476void
477GNUNET_GTK_enter_nick_window_nick_entry_changed_cb (GtkWidget *widget, 477GNUNET_GTK_enter_nick_window_nick_entry_changed_cb (GtkWidget *widget,
478 gpointer user_data) 478 gpointer user_data)
479{ 479{
480 struct PseuLookupContext *lctx = user_data; 480 struct PseuLookupContext *lctx = user_data;
@@ -497,7 +497,7 @@ GNUNET_GTK_enter_nick_window_nick_entry_changed_cb (GtkWidget *widget,
497 * @param user_data the `struct PseuLookupContext` 497 * @param user_data the `struct PseuLookupContext`
498 */ 498 */
499void 499void
500GNUNET_GTK_enter_nick_window_cancel_button_clicked_cb (GtkButton * button, 500GNUNET_GTK_enter_nick_window_cancel_button_clicked_cb (GtkButton * button,
501 gpointer user_data) 501 gpointer user_data)
502{ 502{
503 struct PseuLookupContext *lctx = user_data; 503 struct PseuLookupContext *lctx = user_data;
@@ -521,7 +521,7 @@ ask_for_nickname (struct PseuLookupContext *lctx)
521 lctx->nick_dialog = GTK_WIDGET (gtk_builder_get_object (lctx->nick_dialog_builder, 521 lctx->nick_dialog = GTK_WIDGET (gtk_builder_get_object (lctx->nick_dialog_builder,
522 "GNUNET_GTK_enter_nick_window")); 522 "GNUNET_GTK_enter_nick_window"));
523 /* show the window */ 523 /* show the window */
524 gtk_window_present (GTK_WINDOW (lctx->nick_dialog)); 524 gtk_window_present (GTK_WINDOW (lctx->nick_dialog));
525} 525}
526 526
527 527
@@ -548,7 +548,7 @@ lookup_finished (void *cls,
548 if (NULL != lctx->progress_dialog_builder) 548 if (NULL != lctx->progress_dialog_builder)
549 { 549 {
550 gtk_widget_destroy (lctx->progress_dialog); 550 gtk_widget_destroy (lctx->progress_dialog);
551 g_object_unref (G_OBJECT (lctx->progress_dialog_builder)); 551 g_object_unref (G_OBJECT (lctx->progress_dialog_builder));
552 lctx->progress_dialog_builder = NULL; 552 lctx->progress_dialog_builder = NULL;
553 lctx->progress_dialog = NULL; 553 lctx->progress_dialog = NULL;
554 } 554 }
@@ -588,7 +588,7 @@ GNUNET_FS_GTK_pseu_progress_dialog_cancel_button_clicked_cb (GtkButton *button,
588 if (NULL != lctx->progress_dialog_builder) 588 if (NULL != lctx->progress_dialog_builder)
589 { 589 {
590 gtk_widget_destroy (lctx->progress_dialog); 590 gtk_widget_destroy (lctx->progress_dialog);
591 g_object_unref (G_OBJECT (lctx->progress_dialog_builder)); 591 g_object_unref (G_OBJECT (lctx->progress_dialog_builder));
592 lctx->progress_dialog_builder = NULL; 592 lctx->progress_dialog_builder = NULL;
593 lctx->progress_dialog = NULL; 593 lctx->progress_dialog = NULL;
594 } 594 }
@@ -645,7 +645,7 @@ GNUNET_FS_GTK_pseu_progress_dialog_delete_event_cb (GtkWidget *widget,
645 * @param user_data the main window context builder 645 * @param user_data the main window context builder
646 */ 646 */
647void 647void
648GNUNET_FS_GTK_save_button_clicked_cb (GtkButton * button, 648GNUNET_FS_GTK_save_button_clicked_cb (GtkButton * button,
649 gpointer user_data) 649 gpointer user_data)
650{ 650{
651 struct GNUNET_GTK_MainWindowContext *main_ctx = user_data; 651 struct GNUNET_GTK_MainWindowContext *main_ctx = user_data;
@@ -687,7 +687,7 @@ GNUNET_FS_GTK_save_button_clicked_cb (GtkButton * button,
687 if (0 == anonymity_level) 687 if (0 == anonymity_level)
688 { 688 {
689 /* setup the dialog and get the widgets we need most */ 689 /* setup the dialog and get the widgets we need most */
690 lctx->progress_dialog_builder = GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_pseu_progress_dialog.glade", 690 lctx->progress_dialog_builder = GNUNET_GTK_get_new_builder ("gnunet_fs_gtk_pseu_progress_dialog.glade",
691 lctx); 691 lctx);
692 lctx->progress_dialog = GTK_WIDGET (gtk_builder_get_object (lctx->progress_dialog_builder, 692 lctx->progress_dialog = GTK_WIDGET (gtk_builder_get_object (lctx->progress_dialog_builder,
693 "GNUNET_FS_GTK_pseu_progress_dialog")); 693 "GNUNET_FS_GTK_pseu_progress_dialog"));
@@ -729,7 +729,7 @@ main_window_search_namespace_combobox_changed_cb (GtkComboBox *widget,
729 const gchar *text; 729 const gchar *text;
730 struct GNUNET_CRYPTO_EccPublicSignKey pkey; 730 struct GNUNET_CRYPTO_EccPublicSignKey pkey;
731 int ret; 731 int ret;
732 732
733 text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget)))); 733 text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))));
734 ret = GNUNET_NAMESTORE_zkey_to_pkey (text, &pkey); 734 ret = GNUNET_NAMESTORE_zkey_to_pkey (text, &pkey);
735 button = GTK_BUTTON (GNUNET_FS_GTK_get_main_window_object 735 button = GTK_BUTTON (GNUNET_FS_GTK_get_main_window_object
diff --git a/src/fs/gnunet-fs-gtk_main-window-view-toggles.c b/src/fs/gnunet-fs-gtk_main-window-view-toggles.c
index 25749be6..f8e1b9c3 100644
--- a/src/fs/gnunet-fs-gtk_main-window-view-toggles.c
+++ b/src/fs/gnunet-fs-gtk_main-window-view-toggles.c
@@ -35,7 +35,7 @@
35 * @param toggle_menu name of menu entry 35 * @param toggle_menu name of menu entry
36 */ 36 */
37static void 37static void
38toggle_view (const char *toggled_widget, 38toggle_view (const char *toggled_widget,
39 const char *toggle_menu) 39 const char *toggle_menu)
40{ 40{
41 GtkCheckMenuItem *mi; 41 GtkCheckMenuItem *mi;
@@ -79,7 +79,7 @@ check_extras ()
79 * @param data main window builder (unused) 79 * @param data main window builder (unused)
80 */ 80 */
81void 81void
82GNUNET_GTK_main_menu_view_preview_toggled_cb (GtkWidget * dummy, 82GNUNET_GTK_main_menu_view_preview_toggled_cb (GtkWidget * dummy,
83 gpointer data) 83 gpointer data)
84{ 84{
85 toggle_view ("GNUNET_GTK_main_window_preview_image", 85 toggle_view ("GNUNET_GTK_main_window_preview_image",
@@ -95,7 +95,7 @@ GNUNET_GTK_main_menu_view_preview_toggled_cb (GtkWidget * dummy,
95 * @param data main window builder (unused) 95 * @param data main window builder (unused)
96 */ 96 */
97void 97void
98GNUNET_GTK_main_menu_view_metadata_toggled_cb (GtkWidget * dummy, 98GNUNET_GTK_main_menu_view_metadata_toggled_cb (GtkWidget * dummy,
99 gpointer data) 99 gpointer data)
100{ 100{
101 toggle_view ("GNUNET_GTK_main_window_metadata_treeview", 101 toggle_view ("GNUNET_GTK_main_window_metadata_treeview",
@@ -112,7 +112,7 @@ GNUNET_GTK_main_menu_view_metadata_toggled_cb (GtkWidget * dummy,
112 * @param data main window builder (unused) 112 * @param data main window builder (unused)
113 */ 113 */
114void 114void
115GNUNET_GTK_main_menu_view_search_toggled_cb (GtkWidget * dummy, 115GNUNET_GTK_main_menu_view_search_toggled_cb (GtkWidget * dummy,
116 gpointer data) 116 gpointer data)
117{ 117{
118 toggle_view ("main_window_search_hbox", 118 toggle_view ("main_window_search_hbox",
diff --git a/src/fs/gnunet-fs-gtk_open-directory.c b/src/fs/gnunet-fs-gtk_open-directory.c
index ae05b2e2..8e255106 100644
--- a/src/fs/gnunet-fs-gtk_open-directory.c
+++ b/src/fs/gnunet-fs-gtk_open-directory.c
@@ -40,7 +40,7 @@ struct AddChildContext
40 * Reference to the directorie's search result. 40 * Reference to the directorie's search result.
41 */ 41 */
42 struct SearchResult *sr; 42 struct SearchResult *sr;
43 43
44 /** 44 /**
45 * Anonymity level to use for probes in the directory. 45 * Anonymity level to use for probes in the directory.
46 */ 46 */
@@ -94,9 +94,9 @@ add_child (void *cls, const char *filename, const struct GNUNET_FS_Uri *uri,
94 return; 94 return;
95 } 95 }
96 GNUNET_assert (NULL != 96 GNUNET_assert (NULL !=
97 GNUNET_GTK_add_search_result (acc->sr->tab, 97 GNUNET_GTK_add_search_result (acc->sr->tab,
98 acc->anonymity, 98 acc->anonymity,
99 acc->sr->rr, 99 acc->sr->rr,
100 uri, 100 uri,
101 meta, NULL, 0)); 101 meta, NULL, 0));
102} 102}
diff --git a/src/fs/gnunet-fs-gtk_open-uri.c b/src/fs/gnunet-fs-gtk_open-uri.c
index c272083d..86e7778c 100644
--- a/src/fs/gnunet-fs-gtk_open-uri.c
+++ b/src/fs/gnunet-fs-gtk_open-uri.c
@@ -61,7 +61,7 @@ GNUNET_FS_GTK_handle_uri_string (const char *uris,
61 61
62/** 62/**
63 * User selected "execute" in the open-URI dialog. 63 * User selected "execute" in the open-URI dialog.
64 * 64 *
65 * @param button the execute button 65 * @param button the execute button
66 * @param user_data the `GtkBuilder` of the URI dialog 66 * @param user_data the `GtkBuilder` of the URI dialog
67 */ 67 */
@@ -92,20 +92,20 @@ GNUNET_GTK_open_url_dialog_execute_button_clicked_cb (GtkButton * button,
92 { 92 {
93 GNUNET_break (0); 93 GNUNET_break (0);
94 gtk_widget_destroy (dialog); 94 gtk_widget_destroy (dialog);
95 g_object_unref (G_OBJECT (builder)); 95 g_object_unref (G_OBJECT (builder));
96 return; 96 return;
97 } 97 }
98 GNUNET_break (GNUNET_OK == 98 GNUNET_break (GNUNET_OK ==
99 GNUNET_FS_GTK_handle_uri_string (uris, anonymity_level)); 99 GNUNET_FS_GTK_handle_uri_string (uris, anonymity_level));
100 g_free (uris); 100 g_free (uris);
101 gtk_widget_destroy (dialog); 101 gtk_widget_destroy (dialog);
102 g_object_unref (G_OBJECT (builder)); 102 g_object_unref (G_OBJECT (builder));
103} 103}
104 104
105 105
106/** 106/**
107 * User selected "cancel" in the open-URI dialog. 107 * User selected "cancel" in the open-URI dialog.
108 * 108 *
109 * @param button the cancel button 109 * @param button the cancel button
110 * @param user_data the 'GtkBuilder' of the URI dialog 110 * @param user_data the 'GtkBuilder' of the URI dialog
111 */ 111 */
@@ -117,7 +117,7 @@ GNUNET_GTK_open_url_dialog_cancel_button_clicked_cb (GtkButton * button,
117 GtkWidget *dialog; 117 GtkWidget *dialog;
118 118
119 dialog = GTK_WIDGET (gtk_builder_get_object 119 dialog = GTK_WIDGET (gtk_builder_get_object
120 (builder, 120 (builder,
121 "GNUNET_GTK_open_url_window")); 121 "GNUNET_GTK_open_url_window"));
122 gtk_widget_destroy (GTK_WIDGET (dialog)); 122 gtk_widget_destroy (GTK_WIDGET (dialog));
123 g_object_unref (G_OBJECT (builder)); 123 g_object_unref (G_OBJECT (builder));
@@ -126,7 +126,7 @@ GNUNET_GTK_open_url_dialog_cancel_button_clicked_cb (GtkButton * button,
126 126
127/** 127/**
128 * User closed the window of the open-URI dialog. 128 * User closed the window of the open-URI dialog.
129 * 129 *
130 * @param widget the window 130 * @param widget the window
131 * @param event the deletion event 131 * @param event the deletion event
132 * @param user_data the 'GtkBuilder' of the URI dialog 132 * @param user_data the 'GtkBuilder' of the URI dialog
@@ -147,7 +147,7 @@ GNUNET_GTK_open_url_window_delete_event_cb (GtkWidget * widget,
147/** 147/**
148 * User pushed a key in the open-URI dialog, check if we currently 148 * User pushed a key in the open-URI dialog, check if we currently
149 * have valid URI and if the key was 'RETURN', run the action. 149 * have valid URI and if the key was 'RETURN', run the action.
150 * 150 *
151 * @param widget the window 151 * @param widget the window
152 * @param event the deletion event 152 * @param event the deletion event
153 * @param user_data the 'GtkBuilder' of the URI dialog 153 * @param user_data the 'GtkBuilder' of the URI dialog
@@ -163,7 +163,7 @@ GNUNET_GTK_open_url_dialog_url_textview_key_press_event_cb (GtkWidget * widget,
163 if (event->keyval != GDK_KEY_Return) 163 if (event->keyval != GDK_KEY_Return)
164 return FALSE; 164 return FALSE;
165 execute = GTK_WIDGET (gtk_builder_get_object (builder, 165 execute = GTK_WIDGET (gtk_builder_get_object (builder,
166 "GNUNET_GTK_open_url_dialog_execute_button")); 166 "GNUNET_GTK_open_url_dialog_execute_button"));
167 if (gtk_widget_get_sensitive (execute)) 167 if (gtk_widget_get_sensitive (execute))
168 GNUNET_GTK_open_url_dialog_execute_button_clicked_cb (GTK_BUTTON (execute), 168 GNUNET_GTK_open_url_dialog_execute_button_clicked_cb (GTK_BUTTON (execute),
169 user_data); 169 user_data);
@@ -174,7 +174,7 @@ GNUNET_GTK_open_url_dialog_url_textview_key_press_event_cb (GtkWidget * widget,
174/** 174/**
175 * User edited the URI of the open-URI dialog, check if it is currently 175 * User edited the URI of the open-URI dialog, check if it is currently
176 * a valid URI and update the sensitivity of the 'execute' button accordingly. 176 * a valid URI and update the sensitivity of the 'execute' button accordingly.
177 * 177 *
178 * @param textbuffer the updated buffer 178 * @param textbuffer the updated buffer
179 * @param user_data the 'GtkBuilder' of the URI dialog 179 * @param user_data the 'GtkBuilder' of the URI dialog
180 */ 180 */
@@ -240,7 +240,7 @@ GNUNET_GTK_main_menu_file_download_uri_activate_cb (GtkWidget * dummy,
240 return; 240 return;
241 } 241 }
242 dialog = GTK_WIDGET (gtk_builder_get_object 242 dialog = GTK_WIDGET (gtk_builder_get_object
243 (builder, 243 (builder,
244 "GNUNET_GTK_open_url_window")); 244 "GNUNET_GTK_open_url_window"));
245 tb = GTK_TEXT_BUFFER (gtk_builder_get_object 245 tb = GTK_TEXT_BUFFER (gtk_builder_get_object
246 (builder, 246 (builder,
@@ -251,7 +251,7 @@ GNUNET_GTK_main_menu_file_download_uri_activate_cb (GtkWidget * dummy,
251 251
252 /* FIXME-FEATURE: query the clipboard, maybe there's valid URI in there? 252 /* FIXME-FEATURE: query the clipboard, maybe there's valid URI in there?
253 * If so, get it. */ 253 * If so, get it. */
254 combo = GTK_COMBO_BOX (gtk_builder_get_object 254 combo = GTK_COMBO_BOX (gtk_builder_get_object
255 (builder, 255 (builder,
256 "GNUNET_GTK_open_url_dialog_anonymity_combobox")); 256 "GNUNET_GTK_open_url_dialog_anonymity_combobox"));
257 gtk_combo_box_set_model (combo, GNUNET_FS_GTK_get_anonymity_level_list_store ()); 257 gtk_combo_box_set_model (combo, GNUNET_FS_GTK_get_anonymity_level_list_store ());
diff --git a/src/fs/gnunet-fs-gtk_open-uri.h b/src/fs/gnunet-fs-gtk_open-uri.h
index e41de56a..cc85754c 100644
--- a/src/fs/gnunet-fs-gtk_open-uri.h
+++ b/src/fs/gnunet-fs-gtk_open-uri.h
@@ -31,8 +31,8 @@
31 * 31 *
32 * @param uris string we got 32 * @param uris string we got
33 * @param anonymity_level anonymity level to use 33 * @param anonymity_level anonymity level to use
34 * @return #GNUNET_OK on success, 34 * @return #GNUNET_OK on success,
35 * #GNUNET_NO if the URI type is not supported, 35 * #GNUNET_NO if the URI type is not supported,
36 * #GNUNET_SYSERR if we failed to parse the URI 36 * #GNUNET_SYSERR if we failed to parse the URI
37 */ 37 */
38int 38int
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}
diff --git a/src/fs/gnunet-fs-gtk_publish-edit-dialog.c b/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
index 71260209..196726a1 100644
--- a/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
+++ b/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
@@ -300,26 +300,26 @@ change_metatypes (struct EditPublicationDialogContext *ctx, gint code)
300 /* double-check that 'code' is valid */ 300 /* double-check that 'code' is valid */
301 for (pubtype_count = 0; NULL != types[pubtype_count]; pubtype_count++) ; 301 for (pubtype_count = 0; NULL != types[pubtype_count]; pubtype_count++) ;
302 GNUNET_assert (code < pubtype_count); 302 GNUNET_assert (code < pubtype_count);
303 303
304 /* clear existing selection of metatypes */ 304 /* clear existing selection of metatypes */
305 gtk_list_store_clear (ctx->metatypes_liststore); 305 gtk_list_store_clear (ctx->metatypes_liststore);
306 max_type = EXTRACTOR_metatype_get_max (); 306 max_type = EXTRACTOR_metatype_get_max ();
307 /* add new types based on selection */ 307 /* add new types based on selection */
308 for (i = 0; types[code][i] != EXTRACTOR_METATYPE_RESERVED; i++) 308 for (i = 0; types[code][i] != EXTRACTOR_METATYPE_RESERVED; i++)
309 if ( (types[code][i] < max_type) && (types[code][i] > 0) ) 309 if ( (types[code][i] < max_type) && (types[code][i] > 0) )
310 gtk_list_store_insert_with_values (ctx->metatypes_liststore, 310 gtk_list_store_insert_with_values (ctx->metatypes_liststore,
311 &iter, G_MAXINT, 311 &iter, G_MAXINT,
312 PUBLISH_METADATA_TYPES_MC_TYPE, 312 PUBLISH_METADATA_TYPES_MC_TYPE,
313 types[code][i], 313 types[code][i],
314 PUBLISH_METADATA_TYPES_MC_FORMAT, 314 PUBLISH_METADATA_TYPES_MC_FORMAT,
315 EXTRACTOR_METAFORMAT_UTF8, 315 EXTRACTOR_METAFORMAT_UTF8,
316 PUBLISH_METADATA_TYPES_MC_TYPE_NAME, 316 PUBLISH_METADATA_TYPES_MC_TYPE_NAME,
317 EXTRACTOR_metatype_to_string 317 EXTRACTOR_metatype_to_string
318 (types [code][i]), 318 (types [code][i]),
319 PUBLISH_METADATA_TYPES_MC_DESCRIPTION, 319 PUBLISH_METADATA_TYPES_MC_DESCRIPTION,
320 EXTRACTOR_metatype_to_description 320 EXTRACTOR_metatype_to_description
321 (types[code][i]), 321 (types[code][i]),
322 -1); 322 -1);
323} 323}
324 324
325 325
@@ -361,7 +361,7 @@ metadata_selection_changed_cb (GtkTreeSelection *ts,
361 struct EditPublicationDialogContext *ctx = user_data; 361 struct EditPublicationDialogContext *ctx = user_data;
362 362
363 gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object 363 gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object
364 (ctx->builder, 364 (ctx->builder,
365 "GNUNET_GTK_edit_publication_delete_button")), 365 "GNUNET_GTK_edit_publication_delete_button")),
366 gtk_tree_selection_get_selected (ts, NULL, NULL)); 366 gtk_tree_selection_get_selected (ts, NULL, NULL));
367} 367}
@@ -377,9 +377,9 @@ metadata_selection_changed_cb (GtkTreeSelection *ts,
377 * @param new_text new value for the item 377 * @param new_text new value for the item
378 * @param user_data the 'struct EditPublicationDialogContext' 378 * @param user_data the 'struct EditPublicationDialogContext'
379 */ 379 */
380void 380void
381GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_edited_cb (GtkCellRendererText *renderer, 381GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_edited_cb (GtkCellRendererText *renderer,
382 gchar * path, 382 gchar * path,
383 gchar * new_text, 383 gchar * new_text,
384 gpointer user_data) 384 gpointer user_data)
385{ 385{
@@ -387,8 +387,8 @@ GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_edited_cb (GtkCellR
387 GtkTreeIter iter; 387 GtkTreeIter iter;
388 gint type_id; 388 gint type_id;
389 389
390 if (! gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (ctx->meta_liststore), 390 if (! gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (ctx->meta_liststore),
391 &iter, 391 &iter,
392 path)) 392 path))
393 { 393 {
394 GNUNET_break (0); 394 GNUNET_break (0);
@@ -421,10 +421,10 @@ GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_edited_cb (GtkCellR
421 * @param combo combo box that was dropped down 421 * @param combo combo box that was dropped down
422 * @param path_string which item was changed in the tree view 422 * @param path_string which item was changed in the tree view
423 * @param new_iter item that is now selected in the drop-down combo box 423 * @param new_iter item that is now selected in the drop-down combo box
424 * @param user_data the 'struct EditPublicationDialogContext' 424 * @param user_data the 'struct EditPublicationDialogContext'
425 */ 425 */
426void 426void
427GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_changed_cb (GtkCellRendererCombo * combo, 427GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_changed_cb (GtkCellRendererCombo * combo,
428 gchar * path_string, 428 gchar * path_string,
429 GtkTreeIter * new_iter, 429 GtkTreeIter * new_iter,
430 gpointer user_data) 430 gpointer user_data)
@@ -452,7 +452,7 @@ GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_changed_cb (GtkCell
452 * @param new_text new value for the item 452 * @param new_text new value for the item
453 * @param user_data the 'struct EditPublicationDialogContext' 453 * @param user_data the 'struct EditPublicationDialogContext'
454 */ 454 */
455void 455void
456GNUNET_GTK_edit_publication_metadata_tree_view_value_renderer_edited_cb (GtkCellRendererText * renderer, 456GNUNET_GTK_edit_publication_metadata_tree_view_value_renderer_edited_cb (GtkCellRendererText * renderer,
457 gchar * path, 457 gchar * path,
458 gchar * new_text, 458 gchar * new_text,
@@ -467,16 +467,16 @@ GNUNET_GTK_edit_publication_metadata_tree_view_value_renderer_edited_cb (GtkCell
467 char *pos; 467 char *pos;
468 468
469 if (! gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (ctx->meta_liststore), 469 if (! gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (ctx->meta_liststore),
470 &iter, 470 &iter,
471 path)) 471 path))
472 { 472 {
473 GNUNET_break (0); 473 GNUNET_break (0);
474 return; 474 return;
475 } 475 }
476 476
477 gtk_tree_model_get (GTK_TREE_MODEL (ctx->meta_liststore), &iter, 477 gtk_tree_model_get (GTK_TREE_MODEL (ctx->meta_liststore), &iter,
478 PUBLISH_METADATA_MC_TYPE, &metatype, -1); 478 PUBLISH_METADATA_MC_TYPE, &metatype, -1);
479 if (metatype == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME) 479 if (metatype == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME)
480 { 480 {
481 /* apply filename rules */ 481 /* apply filename rules */
482 /* First, use UNIX-style separators */ 482 /* First, use UNIX-style separators */
@@ -493,16 +493,16 @@ GNUNET_GTK_edit_publication_metadata_tree_view_value_renderer_edited_cb (GtkCell
493 } 493 }
494 494
495 /* However, directories must end with '/', so add it */ 495 /* However, directories must end with '/', so add it */
496 if ( (new_text[strlen (new_text) - 1] != '/') && 496 if ( (new_text[strlen (new_text) - 1] != '/') &&
497 ctx->is_directory == GNUNET_YES) 497 ctx->is_directory == GNUNET_YES)
498 { 498 {
499 char * tmp; 499 char * tmp;
500 500
501 GNUNET_asprintf (&tmp, "%s/", avalue); 501 GNUNET_asprintf (&tmp, "%s/", avalue);
502 GNUNET_free (avalue); 502 GNUNET_free (avalue);
503 avalue = tmp; 503 avalue = tmp;
504 } 504 }
505 505
506 /* Also, replace '../' everywhere with "___" */ 506 /* Also, replace '../' everywhere with "___" */
507 while (NULL != (pos = strstr (avalue, "../"))) 507 while (NULL != (pos = strstr (avalue, "../")))
508 memset (pos, '_', 3); 508 memset (pos, '_', 3);
@@ -514,8 +514,8 @@ GNUNET_GTK_edit_publication_metadata_tree_view_value_renderer_edited_cb (GtkCell
514 ivalue = new_text; 514 ivalue = new_text;
515 avalue = NULL; 515 avalue = NULL;
516 } 516 }
517 gtk_list_store_set (ctx->meta_liststore, &iter, 517 gtk_list_store_set (ctx->meta_liststore, &iter,
518 PUBLISH_METADATA_MC_VALUE, ivalue, 518 PUBLISH_METADATA_MC_VALUE, ivalue,
519 -1); 519 -1);
520 GNUNET_free_non_null (avalue); 520 GNUNET_free_non_null (avalue);
521} 521}
@@ -583,7 +583,7 @@ GNUNET_GTK_edit_publication_delete_button_clicked_cb (GtkButton * button,
583 * @param user_data the 'struct EditPublicationDialogContext' 583 * @param user_data the 'struct EditPublicationDialogContext'
584 */ 584 */
585void 585void
586GNUNET_GTK_edit_publication_metadata_preview_file_chooser_button_file_set_cb (GtkFileChooserButton * widget, 586GNUNET_GTK_edit_publication_metadata_preview_file_chooser_button_file_set_cb (GtkFileChooserButton * widget,
587 gpointer user_data) 587 gpointer user_data)
588{ 588{
589 struct EditPublicationDialogContext *ctx = user_data; 589 struct EditPublicationDialogContext *ctx = user_data;
@@ -637,14 +637,14 @@ GNUNET_GTK_edit_publication_keyword_entry_changed_cb (GtkEditable * editable,
637 637
638 keyword = gtk_entry_get_text (ctx->keyword_entry); 638 keyword = gtk_entry_get_text (ctx->keyword_entry);
639 gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (ctx->builder, 639 gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (ctx->builder,
640 "GNUNET_GTK_edit_publication_keyword_list_add_button")), 640 "GNUNET_GTK_edit_publication_keyword_list_add_button")),
641 (strlen (keyword) > 0) ? TRUE : FALSE); 641 (strlen (keyword) > 0) ? TRUE : FALSE);
642} 642}
643 643
644 644
645/** 645/**
646 * Update the sensitivity of the 'confirm' button based on 646 * Update the sensitivity of the 'confirm' button based on
647 * the availability of keywords and whether they are required or 647 * the availability of keywords and whether they are required or
648 * not. 648 * not.
649 * 649 *
650 * @param ctx the 'struct EditPublicationDialogContext' 650 * @param ctx the 'struct EditPublicationDialogContext'
@@ -654,7 +654,7 @@ update_confirm_sensitivity (struct EditPublicationDialogContext *ctx)
654{ 654{
655 GtkTreeIter iter; 655 GtkTreeIter iter;
656 656
657 if ( (! ctx->allow_no_keywords) && 657 if ( (! ctx->allow_no_keywords) &&
658 (! gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ctx->keywords_liststore), 658 (! gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ctx->keywords_liststore),
659 &iter)) ) 659 &iter)) )
660 gtk_widget_set_sensitive (ctx->confirm_button, FALSE); 660 gtk_widget_set_sensitive (ctx->confirm_button, FALSE);
@@ -674,7 +674,7 @@ void
674GNUNET_GTK_edit_publication_keyword_list_del_button_clicked_cb (GtkButton * 674GNUNET_GTK_edit_publication_keyword_list_del_button_clicked_cb (GtkButton *
675 button, 675 button,
676 gpointer user_data) 676 gpointer user_data)
677{ 677{
678 struct EditPublicationDialogContext *ctx = user_data; 678 struct EditPublicationDialogContext *ctx = user_data;
679 GtkTreeIter iter; 679 GtkTreeIter iter;
680 GtkTreeSelection *keywords_selection; 680 GtkTreeSelection *keywords_selection;
@@ -712,7 +712,7 @@ GNUNET_GTK_edit_publication_keyword_list_add_button_clicked_cb (GtkButton *
712 keyword = gtk_entry_get_text (ctx->keyword_entry); 712 keyword = gtk_entry_get_text (ctx->keyword_entry);
713 if (strlen (keyword) == 0) 713 if (strlen (keyword) == 0)
714 return; 714 return;
715 gtk_list_store_insert_with_values (ctx->keywords_liststore, 715 gtk_list_store_insert_with_values (ctx->keywords_liststore,
716 &iter, G_MAXINT, 716 &iter, G_MAXINT,
717 PUBLISH_TYPES_MC_KEYWORD, keyword, 717 PUBLISH_TYPES_MC_KEYWORD, keyword,
718 PUBLISH_TYPES_MC_ADDED, TRUE, 718 PUBLISH_TYPES_MC_ADDED, TRUE,
@@ -884,13 +884,13 @@ preserve_meta_items (void *cls, const char *plugin_name,
884 * used in the main libextractor library and yielding 884 * used in the main libextractor library and yielding
885 * meta data). 885 * meta data).
886 * @param type libextractor-type describing the meta data 886 * @param type libextractor-type describing the meta data
887 * @param format basic format information about data 887 * @param format basic format information about data
888 * @param data_mime_type mime-type of data (not of the original file); 888 * @param data_mime_type mime-type of data (not of the original file);
889 * can be NULL (if mime-type is not known) 889 * can be NULL (if mime-type is not known)
890 * @param data actual meta-data found 890 * @param data actual meta-data found
891 * @param data_len number of bytes in data 891 * @param data_len number of bytes in data
892 * @return 0 to continue extracting, 1 to abort 892 * @return 0 to continue extracting, 1 to abort
893 */ 893 */
894static int 894static int
895le_callback (void *cls, 895le_callback (void *cls,
896 const char *plugin_name, 896 const char *plugin_name,
@@ -930,7 +930,7 @@ get_mime_type (const void *data,
930 return NULL; 930 return NULL;
931 ret = NULL; 931 ret = NULL;
932 EXTRACTOR_extract (pl, NULL, data, data_size, &le_callback, &ret); 932 EXTRACTOR_extract (pl, NULL, data, data_size, &le_callback, &ret);
933 EXTRACTOR_plugin_remove_all (pl); 933 EXTRACTOR_plugin_remove_all (pl);
934 return ret; 934 return ret;
935} 935}
936 936
@@ -994,8 +994,8 @@ file_information_update (void *cls, struct GNUNET_FS_FileInformation *fi,
994 994
995 /* update meta data; first, we copy the unchanged values from the original meta data */ 995 /* update meta data; first, we copy the unchanged values from the original meta data */
996 ctx->md = GNUNET_CONTAINER_meta_data_create (); 996 ctx->md = GNUNET_CONTAINER_meta_data_create ();
997 GNUNET_CONTAINER_meta_data_iterate (meta, 997 GNUNET_CONTAINER_meta_data_iterate (meta,
998 &preserve_meta_items, 998 &preserve_meta_items,
999 ctx); 999 ctx);
1000 /* clear original meta data */ 1000 /* clear original meta data */
1001 GNUNET_CONTAINER_meta_data_clear (meta); 1001 GNUNET_CONTAINER_meta_data_clear (meta);
@@ -1003,7 +1003,7 @@ file_information_update (void *cls, struct GNUNET_FS_FileInformation *fi,
1003 GNUNET_CONTAINER_meta_data_merge (meta, ctx->md); 1003 GNUNET_CONTAINER_meta_data_merge (meta, ctx->md);
1004 GNUNET_CONTAINER_meta_data_destroy (ctx->md); 1004 GNUNET_CONTAINER_meta_data_destroy (ctx->md);
1005 ctx->md = NULL; 1005 ctx->md = NULL;
1006 /* now add all of the values from the model; adding will simply do 1006 /* now add all of the values from the model; adding will simply do
1007 nothing for values that are already in the set because they were preserved */ 1007 nothing for values that are already in the set because they were preserved */
1008 if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ctx->meta_liststore), &iter)) 1008 if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ctx->meta_liststore), &iter))
1009 { 1009 {
@@ -1028,7 +1028,7 @@ file_information_update (void *cls, struct GNUNET_FS_FileInformation *fi,
1028 } 1028 }
1029 while (gtk_tree_model_iter_next (GTK_TREE_MODEL (ctx->meta_liststore), &iter)); 1029 while (gtk_tree_model_iter_next (GTK_TREE_MODEL (ctx->meta_liststore), &iter));
1030 } 1030 }
1031 1031
1032 /* finally, if we got a new preview, add it as well */ 1032 /* finally, if we got a new preview, add it as well */
1033 if (ctx->preview_changed == GNUNET_YES) 1033 if (ctx->preview_changed == GNUNET_YES)
1034 { 1034 {
@@ -1058,7 +1058,7 @@ file_information_update (void *cls, struct GNUNET_FS_FileInformation *fi,
1058 GFileInfo *finfo; 1058 GFileInfo *finfo;
1059 const char *gmime; 1059 const char *gmime;
1060 1060
1061 finfo = g_file_query_info (f, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, 1061 finfo = g_file_query_info (f, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
1062 0, NULL, NULL); 1062 0, NULL, NULL);
1063 gmime = g_file_info_get_attribute_string (finfo, 1063 gmime = g_file_info_get_attribute_string (finfo,
1064 G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE); 1064 G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
@@ -1082,7 +1082,7 @@ file_information_update (void *cls, struct GNUNET_FS_FileInformation *fi,
1082 1082
1083/** 1083/**
1084 * The user clicked the 'confirm' button. Push the edits back into the 1084 * The user clicked the 'confirm' button. Push the edits back into the
1085 * FileInformation structure and given it and the options back to the 1085 * FileInformation structure and given it and the options back to the
1086 * callback. Then clean up the dialog. 1086 * callback. Then clean up the dialog.
1087 * 1087 *
1088 * @param button the cancel button 1088 * @param button the cancel button
@@ -1095,11 +1095,11 @@ GNUNET_GTK_edit_publication_confirm_button_clicked_cb (GtkButton * button,
1095 struct EditPublicationDialogContext *ctx = user_data; 1095 struct EditPublicationDialogContext *ctx = user_data;
1096 1096
1097 /* push back changes to file-information */ 1097 /* push back changes to file-information */
1098 GNUNET_FS_file_information_inspect (ctx->fip, 1098 GNUNET_FS_file_information_inspect (ctx->fip,
1099 &file_information_update, 1099 &file_information_update,
1100 ctx); 1100 ctx);
1101 /* call our continuation */ 1101 /* call our continuation */
1102 ctx->cb (ctx->cb_cls, 1102 ctx->cb (ctx->cb_cls,
1103 GTK_RESPONSE_OK, 1103 GTK_RESPONSE_OK,
1104 gtk_entry_get_text (ctx->root_entry)); 1104 gtk_entry_get_text (ctx->root_entry));
1105 /* free resources from the edit dialog */ 1105 /* free resources from the edit dialog */
@@ -1144,13 +1144,13 @@ add_keyword (void *cls, const char *keyword, int is_mandatory)
1144 * used in the main libextractor library and yielding 1144 * used in the main libextractor library and yielding
1145 * meta data). 1145 * meta data).
1146 * @param type libextractor-type describing the meta data 1146 * @param type libextractor-type describing the meta data
1147 * @param format basic format information about data 1147 * @param format basic format information about data
1148 * @param data_mime_type mime-type of data (not of the original file); 1148 * @param data_mime_type mime-type of data (not of the original file);
1149 * can be NULL (if mime-type is not known) 1149 * can be NULL (if mime-type is not known)
1150 * @param data actual meta-data found 1150 * @param data actual meta-data found
1151 * @param data_len number of bytes in data 1151 * @param data_len number of bytes in data
1152 * @return 0 to continue extracting, 1 to abort 1152 * @return 0 to continue extracting, 1 to abort
1153 */ 1153 */
1154static int 1154static int
1155set_window_title_to_filename (void *cls, 1155set_window_title_to_filename (void *cls,
1156 const char *plugin_name, 1156 const char *plugin_name,
@@ -1188,7 +1188,7 @@ set_window_title_to_filename (void *cls,
1188 * @return GNUNET_SYSERR (aborts after first call) 1188 * @return GNUNET_SYSERR (aborts after first call)
1189 */ 1189 */
1190static int 1190static int
1191file_information_import (void *cls, 1191file_information_import (void *cls,
1192 struct GNUNET_FS_FileInformation *fi, 1192 struct GNUNET_FS_FileInformation *fi,
1193 uint64_t length, 1193 uint64_t length,
1194 struct GNUNET_CONTAINER_MetaData *meta, 1194 struct GNUNET_CONTAINER_MetaData *meta,
@@ -1226,7 +1226,7 @@ file_information_import (void *cls,
1226 gtk_image_set_from_pixbuf (ctx->preview_image, pixbuf); 1226 gtk_image_set_from_pixbuf (ctx->preview_image, pixbuf);
1227 } 1227 }
1228 } 1228 }
1229 1229
1230 /* Also update window title based on filename */ 1230 /* Also update window title based on filename */
1231 gtk_window_set_title (ctx->edit_publication_window, _("<unnamed>")); 1231 gtk_window_set_title (ctx->edit_publication_window, _("<unnamed>"));
1232 GNUNET_CONTAINER_meta_data_iterate (meta, 1232 GNUNET_CONTAINER_meta_data_iterate (meta,
@@ -1294,7 +1294,7 @@ GNUNET_FS_GTK_edit_publish_dialog (GtkWindow * parent,
1294 (ctx->builder, 1294 (ctx->builder,
1295 "GNUNET_GTK_edit_publication_keyword_list_tree_view")); 1295 "GNUNET_GTK_edit_publication_keyword_list_tree_view"));
1296 ctx->edit_publication_window = 1296 ctx->edit_publication_window =
1297 GTK_WINDOW (gtk_builder_get_object (ctx->builder, 1297 GTK_WINDOW (gtk_builder_get_object (ctx->builder,
1298 "GNUNET_GTK_edit_publication_window")); 1298 "GNUNET_GTK_edit_publication_window"));
1299 ctx->keywords_liststore = GTK_LIST_STORE (gtk_builder_get_object 1299 ctx->keywords_liststore = GTK_LIST_STORE (gtk_builder_get_object
1300 (ctx->builder, "GNUNET_GTK_publication_keywords_liststore")); 1300 (ctx->builder, "GNUNET_GTK_publication_keywords_liststore"));
@@ -1332,7 +1332,7 @@ GNUNET_FS_GTK_edit_publish_dialog (GtkWindow * parent,
1332 "GNUNET_GTK_edit_publication_anonymity_combobox")); 1332 "GNUNET_GTK_edit_publication_anonymity_combobox"));
1333 1333
1334 /* Basic initialization of widgets models and visibility */ 1334 /* Basic initialization of widgets models and visibility */
1335 gtk_combo_box_set_model (ctx->anonymity_combo, 1335 gtk_combo_box_set_model (ctx->anonymity_combo,
1336 GNUNET_FS_GTK_get_anonymity_level_list_store ()); 1336 GNUNET_FS_GTK_get_anonymity_level_list_store ());
1337 GNUNET_GTK_setup_expiration_year_adjustment (ctx->builder); 1337 GNUNET_GTK_setup_expiration_year_adjustment (ctx->builder);
1338 1338
diff --git a/src/fs/gnunet-fs-gtk_unindex.c b/src/fs/gnunet-fs-gtk_unindex.c
index a4fc4c61..d7efdf8e 100644
--- a/src/fs/gnunet-fs-gtk_unindex.c
+++ b/src/fs/gnunet-fs-gtk_unindex.c
@@ -43,7 +43,7 @@ enum UNINDEX_ModelColumns
43 * A guint64. 43 * A guint64.
44 */ 44 */
45 UNINDEX_MC_FILESIZE = 1, 45 UNINDEX_MC_FILESIZE = 1,
46 46
47 /** 47 /**
48 * A gchararray representing a color. 48 * A gchararray representing a color.
49 */ 49 */
@@ -180,7 +180,7 @@ static struct UnindexEntry *ue_tail;
180 180
181 181
182/** 182/**
183 * User has clicked on the 'delete/unindex' button for the dialog. 183 * User has clicked on the 'delete/unindex' button for the dialog.
184 * Unindex the selected file. 184 * Unindex the selected file.
185 * 185 *
186 * @param dummy the button 186 * @param dummy the button
@@ -203,17 +203,17 @@ GNUNET_FS_GTK_unindex_button_clicked_cb (GtkWidget * dummy,
203 GNUNET_break (0); 203 GNUNET_break (0);
204 return; 204 return;
205 } 205 }
206 gtk_tree_model_get (udc->model, &iter, 206 gtk_tree_model_get (udc->model, &iter,
207 UNINDEX_MC_FILENAME, &filename, 207 UNINDEX_MC_FILENAME, &filename,
208 UNINDEX_MC_FILESIZE, &filesize, 208 UNINDEX_MC_FILESIZE, &filesize,
209 UNINDEX_MC_UNINDEX_CONTEXT, &ue, 209 UNINDEX_MC_UNINDEX_CONTEXT, &ue,
210 -1); 210 -1);
211 if (NULL != ue) 211 if (NULL != ue)
212 { 212 {
213 GNUNET_break (0); 213 GNUNET_break (0);
214 g_free (filename); 214 g_free (filename);
215 return; 215 return;
216 } 216 }
217 ue = GNUNET_malloc (sizeof (struct UnindexEntry)); 217 ue = GNUNET_malloc (sizeof (struct UnindexEntry));
218 ue->filesize = filesize; 218 ue->filesize = filesize;
219 GNUNET_CONTAINER_DLL_insert (ue_head, ue_tail, ue); 219 GNUNET_CONTAINER_DLL_insert (ue_head, ue_tail, ue);
@@ -223,8 +223,8 @@ GNUNET_FS_GTK_unindex_button_clicked_cb (GtkWidget * dummy,
223 gtk_tree_path_free (path); 223 gtk_tree_path_free (path);
224 ue->uc = GNUNET_FS_unindex_start (GNUNET_FS_GTK_get_fs_handle (), 224 ue->uc = GNUNET_FS_unindex_start (GNUNET_FS_GTK_get_fs_handle (),
225 filename, ue); 225 filename, ue);
226 gtk_list_store_set (GTK_LIST_STORE (udc->model), 226 gtk_list_store_set (GTK_LIST_STORE (udc->model),
227 &iter, 227 &iter,
228 UNINDEX_MC_BACKGROUND_COLOR, "yellow", 228 UNINDEX_MC_BACKGROUND_COLOR, "yellow",
229 UNINDEX_MC_UNINDEX_CONTEXT, ue, 229 UNINDEX_MC_UNINDEX_CONTEXT, ue,
230 UNINDEX_MC_UNINDEX_PROGRESS, 0, 230 UNINDEX_MC_UNINDEX_PROGRESS, 0,
@@ -253,10 +253,10 @@ GNUNET_FS_GTK_unindex_close_button_clicked_cb (GtkWidget * dummy,
253 GNUNET_FS_get_indexed_files_cancel (udc->gic); 253 GNUNET_FS_get_indexed_files_cancel (udc->gic);
254 udc->gic = NULL; 254 udc->gic = NULL;
255 } 255 }
256 if (gtk_tree_model_get_iter_first (udc->model, &iter)) 256 if (gtk_tree_model_get_iter_first (udc->model, &iter))
257 do 257 do
258 { 258 {
259 gtk_tree_model_get (udc->model, &iter, 259 gtk_tree_model_get (udc->model, &iter,
260 UNINDEX_MC_UNINDEX_CONTEXT, &ue, 260 UNINDEX_MC_UNINDEX_CONTEXT, &ue,
261 -1); 261 -1);
262 if (NULL != ue) 262 if (NULL != ue)
@@ -264,10 +264,10 @@ GNUNET_FS_GTK_unindex_close_button_clicked_cb (GtkWidget * dummy,
264 gtk_tree_row_reference_free (ue->rr); 264 gtk_tree_row_reference_free (ue->rr);
265 ue->rr = NULL; 265 ue->rr = NULL;
266 } 266 }
267 } 267 }
268 while (TRUE == gtk_tree_model_iter_next (udc->model, &iter)); 268 while (TRUE == gtk_tree_model_iter_next (udc->model, &iter));
269 gtk_widget_destroy (udc->dialog); 269 gtk_widget_destroy (udc->dialog);
270 g_object_unref (G_OBJECT (udc->builder)); 270 g_object_unref (G_OBJECT (udc->builder));
271 GNUNET_free (udc); 271 GNUNET_free (udc);
272 master_udc = NULL; 272 master_udc = NULL;
273} 273}
@@ -280,7 +280,7 @@ GNUNET_FS_GTK_unindex_close_button_clicked_cb (GtkWidget * dummy,
280 * @param user_data our unindex context 280 * @param user_data our unindex context
281 */ 281 */
282static void 282static void
283selection_changed_cb (GtkTreeSelection * ts, 283selection_changed_cb (GtkTreeSelection * ts,
284 gpointer user_data) 284 gpointer user_data)
285{ 285{
286 struct UnindexDialogContext *udc = user_data; 286 struct UnindexDialogContext *udc = user_data;
@@ -290,8 +290,8 @@ selection_changed_cb (GtkTreeSelection * ts,
290 /* find out if a file is selected */ 290 /* find out if a file is selected */
291 if (gtk_tree_selection_get_selected (udc->selection, NULL, &iter)) 291 if (gtk_tree_selection_get_selected (udc->selection, NULL, &iter))
292 { 292 {
293 gtk_tree_model_get (udc->model, &iter, 293 gtk_tree_model_get (udc->model, &iter,
294 UNINDEX_MC_UNINDEX_CONTEXT, &ue, 294 UNINDEX_MC_UNINDEX_CONTEXT, &ue,
295 -1); 295 -1);
296 if (NULL == ue) 296 if (NULL == ue)
297 { 297 {
@@ -312,7 +312,7 @@ selection_changed_cb (GtkTreeSelection * ts,
312 * @param file_id hash of the contents of the indexed file 312 * @param file_id hash of the contents of the indexed file
313 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort 313 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
314 */ 314 */
315static int 315static int
316add_indexed_file (void *cls, const char *filename, 316add_indexed_file (void *cls, const char *filename,
317 const struct GNUNET_HashCode * file_id) 317 const struct GNUNET_HashCode * file_id)
318{ 318{
@@ -387,7 +387,7 @@ GNUNET_GTK_main_menu_unindex_activate_cb (GtkWidget * dummy,
387{ 387{
388 GtkWidget *toplevel; 388 GtkWidget *toplevel;
389 struct UnindexDialogContext *udc; 389 struct UnindexDialogContext *udc;
390 390
391 if (NULL != master_udc) 391 if (NULL != master_udc)
392 { 392 {
393 /* window already exists, raise focus */ 393 /* window already exists, raise focus */
@@ -417,7 +417,7 @@ GNUNET_GTK_main_menu_unindex_activate_cb (GtkWidget * dummy,
417 udc); 417 udc);
418 toplevel = gtk_widget_get_toplevel (dummy); 418 toplevel = gtk_widget_get_toplevel (dummy);
419 if (GTK_IS_WINDOW (toplevel)) 419 if (GTK_IS_WINDOW (toplevel))
420 gtk_window_set_transient_for (GTK_WINDOW (udc->dialog), GTK_WINDOW (toplevel)); 420 gtk_window_set_transient_for (GTK_WINDOW (udc->dialog), GTK_WINDOW (toplevel));
421 /* connect signals; FIXME-GTK3: these could be connected with (modern) Glade */ 421 /* connect signals; FIXME-GTK3: these could be connected with (modern) Glade */
422 g_signal_connect (G_OBJECT (udc->selection), "changed", 422 g_signal_connect (G_OBJECT (udc->selection), "changed",
423 G_CALLBACK (selection_changed_cb), udc); 423 G_CALLBACK (selection_changed_cb), udc);
@@ -471,19 +471,19 @@ GNUNET_FS_GTK_unindex_handle_stop_ (struct UnindexEntry *ue)
471 GtkTreePath *path; 471 GtkTreePath *path;
472 GtkTreeIter iter; 472 GtkTreeIter iter;
473 GtkTreeModel *model; 473 GtkTreeModel *model;
474 474
475 if (NULL != ue->rr) 475 if (NULL != ue->rr)
476 { 476 {
477 path = gtk_tree_row_reference_get_path (ue->rr); 477 path = gtk_tree_row_reference_get_path (ue->rr);
478 model = gtk_tree_row_reference_get_model (ue->rr); 478 model = gtk_tree_row_reference_get_model (ue->rr);
479 gtk_tree_row_reference_free (ue->rr); 479 gtk_tree_row_reference_free (ue->rr);
480 ue->rr = NULL; 480 ue->rr = NULL;
481 GNUNET_assert (TRUE == gtk_tree_model_get_iter (model, 481 GNUNET_assert (TRUE == gtk_tree_model_get_iter (model,
482 &iter, 482 &iter,
483 path)); 483 path));
484 gtk_tree_path_free (path); 484 gtk_tree_path_free (path);
485 gtk_list_store_set (GTK_LIST_STORE (model), 485 gtk_list_store_set (GTK_LIST_STORE (model),
486 &iter, 486 &iter,
487 UNINDEX_MC_UNINDEX_CONTEXT, NULL, 487 UNINDEX_MC_UNINDEX_CONTEXT, NULL,
488 -1); 488 -1);
489 } 489 }
@@ -515,12 +515,12 @@ GNUNET_FS_GTK_unindex_handle_error_ (struct UnindexEntry *ue,
515 return; 515 return;
516 path = gtk_tree_row_reference_get_path (ue->rr); 516 path = gtk_tree_row_reference_get_path (ue->rr);
517 model = gtk_tree_row_reference_get_model (ue->rr); 517 model = gtk_tree_row_reference_get_model (ue->rr);
518 GNUNET_assert (TRUE == gtk_tree_model_get_iter (model, 518 GNUNET_assert (TRUE == gtk_tree_model_get_iter (model,
519 &iter, 519 &iter,
520 path)); 520 path));
521 gtk_tree_path_free (path); 521 gtk_tree_path_free (path);
522 gtk_list_store_set (GTK_LIST_STORE (model), 522 gtk_list_store_set (GTK_LIST_STORE (model),
523 &iter, 523 &iter,
524 UNINDEX_MC_BACKGROUND_COLOR, "red", 524 UNINDEX_MC_BACKGROUND_COLOR, "red",
525 UNINDEX_MC_ERROR, emsg, 525 UNINDEX_MC_ERROR, emsg,
526 -1); 526 -1);
@@ -546,12 +546,12 @@ GNUNET_FS_GTK_unindex_handle_progress_ (struct UnindexEntry *ue,
546 return; 546 return;
547 path = gtk_tree_row_reference_get_path (ue->rr); 547 path = gtk_tree_row_reference_get_path (ue->rr);
548 model = gtk_tree_row_reference_get_model (ue->rr); 548 model = gtk_tree_row_reference_get_model (ue->rr);
549 GNUNET_assert (TRUE == gtk_tree_model_get_iter (model, 549 GNUNET_assert (TRUE == gtk_tree_model_get_iter (model,
550 &iter, 550 &iter,
551 path)); 551 path));
552 gtk_tree_path_free (path); 552 gtk_tree_path_free (path);
553 gtk_list_store_set (GTK_LIST_STORE (model), 553 gtk_list_store_set (GTK_LIST_STORE (model),
554 &iter, 554 &iter,
555 UNINDEX_MC_UNINDEX_PROGRESS, ue->progress, 555 UNINDEX_MC_UNINDEX_PROGRESS, ue->progress,
556 -1); 556 -1);
557} 557}
@@ -573,11 +573,11 @@ GNUNET_FS_GTK_unindex_handle_completed_ (struct UnindexEntry *ue)
573 { 573 {
574 path = gtk_tree_row_reference_get_path (ue->rr); 574 path = gtk_tree_row_reference_get_path (ue->rr);
575 model = gtk_tree_row_reference_get_model (ue->rr); 575 model = gtk_tree_row_reference_get_model (ue->rr);
576 GNUNET_assert (TRUE == gtk_tree_model_get_iter (model, 576 GNUNET_assert (TRUE == gtk_tree_model_get_iter (model,
577 &iter, 577 &iter,
578 path)); 578 path));
579 gtk_tree_path_free (path); 579 gtk_tree_path_free (path);
580 gtk_list_store_remove (GTK_LIST_STORE (model), 580 gtk_list_store_remove (GTK_LIST_STORE (model),
581 &iter); 581 &iter);
582 gtk_tree_row_reference_free (ue->rr); 582 gtk_tree_row_reference_free (ue->rr);
583 ue->rr = NULL; 583 ue->rr = NULL;
diff --git a/src/fs/metatypes.c b/src/fs/metatypes.c
index 5e9cba98..c722aef2 100644
--- a/src/fs/metatypes.c
+++ b/src/fs/metatypes.c
@@ -1,44 +1,44 @@
1/* *INDENT-OFF* */ 1/* *INDENT-OFF* */
2 2
3gint types_generic[] = { 3gint types_generic[] = {
4 EXTRACTOR_METATYPE_MIMETYPE, 4 EXTRACTOR_METATYPE_MIMETYPE,
5 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME, 5 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME,
6 EXTRACTOR_METATYPE_TITLE, 6 EXTRACTOR_METATYPE_TITLE,
7 EXTRACTOR_METATYPE_KEYWORDS, 7 EXTRACTOR_METATYPE_KEYWORDS,
8 EXTRACTOR_METATYPE_SUBJECT, 8 EXTRACTOR_METATYPE_SUBJECT,
9 EXTRACTOR_METATYPE_DESCRIPTION, 9 EXTRACTOR_METATYPE_DESCRIPTION,
10 EXTRACTOR_METATYPE_COMMENT, 10 EXTRACTOR_METATYPE_COMMENT,
11 EXTRACTOR_METATYPE_COPYRIGHT, 11 EXTRACTOR_METATYPE_COPYRIGHT,
12 EXTRACTOR_METATYPE_URI, 12 EXTRACTOR_METATYPE_URI,
13 EXTRACTOR_METATYPE_CREATOR, 13 EXTRACTOR_METATYPE_CREATOR,
14 EXTRACTOR_METATYPE_CREATION_DATE, 14 EXTRACTOR_METATYPE_CREATION_DATE,
15 EXTRACTOR_METATYPE_RESERVED 15 EXTRACTOR_METATYPE_RESERVED
16}; 16};
17 17
18 18
19gint types_text[] = 19gint types_text[] =
20{ 20{
21 EXTRACTOR_METATYPE_MIMETYPE, 21 EXTRACTOR_METATYPE_MIMETYPE,
22 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME, 22 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME,
23 EXTRACTOR_METATYPE_TITLE, 23 EXTRACTOR_METATYPE_TITLE,
24 EXTRACTOR_METATYPE_KEYWORDS, 24 EXTRACTOR_METATYPE_KEYWORDS,
25 EXTRACTOR_METATYPE_ABSTRACT, 25 EXTRACTOR_METATYPE_ABSTRACT,
26 EXTRACTOR_METATYPE_SUMMARY, 26 EXTRACTOR_METATYPE_SUMMARY,
27 EXTRACTOR_METATYPE_SUBJECT, 27 EXTRACTOR_METATYPE_SUBJECT,
28 EXTRACTOR_METATYPE_AUTHOR_NAME, 28 EXTRACTOR_METATYPE_AUTHOR_NAME,
29 EXTRACTOR_METATYPE_AUTHOR_EMAIL, 29 EXTRACTOR_METATYPE_AUTHOR_EMAIL,
30 EXTRACTOR_METATYPE_AUTHOR_INSTITUTION, 30 EXTRACTOR_METATYPE_AUTHOR_INSTITUTION,
31 EXTRACTOR_METATYPE_DESCRIPTION, 31 EXTRACTOR_METATYPE_DESCRIPTION,
32 EXTRACTOR_METATYPE_LANGUAGE, 32 EXTRACTOR_METATYPE_LANGUAGE,
33 EXTRACTOR_METATYPE_COPYRIGHT, 33 EXTRACTOR_METATYPE_COPYRIGHT,
34 EXTRACTOR_METATYPE_COMMENT, 34 EXTRACTOR_METATYPE_COMMENT,
35 EXTRACTOR_METATYPE_BOOK_TITLE, 35 EXTRACTOR_METATYPE_BOOK_TITLE,
36 EXTRACTOR_METATYPE_BOOK_EDITION, 36 EXTRACTOR_METATYPE_BOOK_EDITION,
37 EXTRACTOR_METATYPE_BOOK_CHAPTER_NUMBER, 37 EXTRACTOR_METATYPE_BOOK_CHAPTER_NUMBER,
38 EXTRACTOR_METATYPE_JOURNAL_NAME, 38 EXTRACTOR_METATYPE_JOURNAL_NAME,
39 EXTRACTOR_METATYPE_JOURNAL_VOLUME, 39 EXTRACTOR_METATYPE_JOURNAL_VOLUME,
40 EXTRACTOR_METATYPE_JOURNAL_NUMBER, 40 EXTRACTOR_METATYPE_JOURNAL_NUMBER,
41 EXTRACTOR_METATYPE_PAGE_COUNT, 41 EXTRACTOR_METATYPE_PAGE_COUNT,
42 EXTRACTOR_METATYPE_PAGE_RANGE, 42 EXTRACTOR_METATYPE_PAGE_RANGE,
43 EXTRACTOR_METATYPE_PUBLISHER, 43 EXTRACTOR_METATYPE_PUBLISHER,
44 EXTRACTOR_METATYPE_PUBLISHER_ADDRESS, 44 EXTRACTOR_METATYPE_PUBLISHER_ADDRESS,
@@ -46,11 +46,11 @@ gint types_text[] =
46 EXTRACTOR_METATYPE_PUBLISHER_SERIES, 46 EXTRACTOR_METATYPE_PUBLISHER_SERIES,
47 EXTRACTOR_METATYPE_PUBLICATION_TYPE, 47 EXTRACTOR_METATYPE_PUBLICATION_TYPE,
48 EXTRACTOR_METATYPE_PUBLICATION_DATE, 48 EXTRACTOR_METATYPE_PUBLICATION_DATE,
49 EXTRACTOR_METATYPE_URL, 49 EXTRACTOR_METATYPE_URL,
50 EXTRACTOR_METATYPE_CREATOR, 50 EXTRACTOR_METATYPE_CREATOR,
51 EXTRACTOR_METATYPE_CREATION_DATE, 51 EXTRACTOR_METATYPE_CREATION_DATE,
52 EXTRACTOR_METATYPE_MODIFICATION_DATE, 52 EXTRACTOR_METATYPE_MODIFICATION_DATE,
53 EXTRACTOR_METATYPE_CHARACTER_SET, 53 EXTRACTOR_METATYPE_CHARACTER_SET,
54 EXTRACTOR_METATYPE_LINE_COUNT, 54 EXTRACTOR_METATYPE_LINE_COUNT,
55 EXTRACTOR_METATYPE_WORD_COUNT, 55 EXTRACTOR_METATYPE_WORD_COUNT,
56 EXTRACTOR_METATYPE_PAGE_ORIENTATION, 56 EXTRACTOR_METATYPE_PAGE_ORIENTATION,
@@ -62,14 +62,14 @@ gint types_text[] =
62}; 62};
63 63
64 64
65gint types_music[] = 65gint types_music[] =
66{ 66{
67 EXTRACTOR_METATYPE_MIMETYPE, 67 EXTRACTOR_METATYPE_MIMETYPE,
68 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME, 68 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME,
69 EXTRACTOR_METATYPE_TITLE, 69 EXTRACTOR_METATYPE_TITLE,
70 EXTRACTOR_METATYPE_ARTIST, 70 EXTRACTOR_METATYPE_ARTIST,
71 EXTRACTOR_METATYPE_COMPOSER, 71 EXTRACTOR_METATYPE_COMPOSER,
72 EXTRACTOR_METATYPE_CONDUCTOR, 72 EXTRACTOR_METATYPE_CONDUCTOR,
73 EXTRACTOR_METATYPE_ALBUM, 73 EXTRACTOR_METATYPE_ALBUM,
74 EXTRACTOR_METATYPE_DURATION, 74 EXTRACTOR_METATYPE_DURATION,
75 EXTRACTOR_METATYPE_KEYWORDS, 75 EXTRACTOR_METATYPE_KEYWORDS,
@@ -81,15 +81,15 @@ gint types_music[] =
81 EXTRACTOR_METATYPE_COMMENT, 81 EXTRACTOR_METATYPE_COMMENT,
82 EXTRACTOR_METATYPE_ISRC, 82 EXTRACTOR_METATYPE_ISRC,
83 EXTRACTOR_METATYPE_LYRICS, 83 EXTRACTOR_METATYPE_LYRICS,
84 EXTRACTOR_METATYPE_COPYRIGHT, 84 EXTRACTOR_METATYPE_COPYRIGHT,
85 EXTRACTOR_METATYPE_PUBLISHER, 85 EXTRACTOR_METATYPE_PUBLISHER,
86 EXTRACTOR_METATYPE_PERFORMER, 86 EXTRACTOR_METATYPE_PERFORMER,
87 EXTRACTOR_METATYPE_PRODUCER, 87 EXTRACTOR_METATYPE_PRODUCER,
88 EXTRACTOR_METATYPE_SONG_VERSION, 88 EXTRACTOR_METATYPE_SONG_VERSION,
89 EXTRACTOR_METATYPE_URI, 89 EXTRACTOR_METATYPE_URI,
90 EXTRACTOR_METATYPE_CREATION_DATE, 90 EXTRACTOR_METATYPE_CREATION_DATE,
91 EXTRACTOR_METATYPE_DISCLAIMER, 91 EXTRACTOR_METATYPE_DISCLAIMER,
92 EXTRACTOR_METATYPE_WRITER, 92 EXTRACTOR_METATYPE_WRITER,
93 EXTRACTOR_METATYPE_CONTRIBUTOR_NAME, 93 EXTRACTOR_METATYPE_CONTRIBUTOR_NAME,
94 EXTRACTOR_METATYPE_SONG_COUNT, 94 EXTRACTOR_METATYPE_SONG_COUNT,
95 EXTRACTOR_METATYPE_STARTING_SONG, 95 EXTRACTOR_METATYPE_STARTING_SONG,
@@ -98,35 +98,35 @@ gint types_music[] =
98 EXTRACTOR_METATYPE_ORIGINAL_ARTIST, 98 EXTRACTOR_METATYPE_ORIGINAL_ARTIST,
99 EXTRACTOR_METATYPE_ORIGINAL_WRITER, 99 EXTRACTOR_METATYPE_ORIGINAL_WRITER,
100 EXTRACTOR_METATYPE_ORIGINAL_RELEASE_YEAR, 100 EXTRACTOR_METATYPE_ORIGINAL_RELEASE_YEAR,
101 EXTRACTOR_METATYPE_ORIGINAL_PERFORMER, 101 EXTRACTOR_METATYPE_ORIGINAL_PERFORMER,
102 EXTRACTOR_METATYPE_MUSICIAN_CREDITS_LIST, 102 EXTRACTOR_METATYPE_MUSICIAN_CREDITS_LIST,
103 EXTRACTOR_METATYPE_SUBTITLE, 103 EXTRACTOR_METATYPE_SUBTITLE,
104 EXTRACTOR_METATYPE_RESERVED 104 EXTRACTOR_METATYPE_RESERVED
105}; 105};
106 106
107 107
108gint types_video[] = 108gint types_video[] =
109{ 109{
110 EXTRACTOR_METATYPE_MIMETYPE, 110 EXTRACTOR_METATYPE_MIMETYPE,
111 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME, 111 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME,
112 EXTRACTOR_METATYPE_TITLE, 112 EXTRACTOR_METATYPE_TITLE,
113 EXTRACTOR_METATYPE_GENRE, 113 EXTRACTOR_METATYPE_GENRE,
114 EXTRACTOR_METATYPE_KEYWORDS, 114 EXTRACTOR_METATYPE_KEYWORDS,
115 EXTRACTOR_METATYPE_SUMMARY, 115 EXTRACTOR_METATYPE_SUMMARY,
116 EXTRACTOR_METATYPE_DESCRIPTION, 116 EXTRACTOR_METATYPE_DESCRIPTION,
117 EXTRACTOR_METATYPE_DURATION, 117 EXTRACTOR_METATYPE_DURATION,
118 EXTRACTOR_METATYPE_IMAGE_DIMENSIONS, 118 EXTRACTOR_METATYPE_IMAGE_DIMENSIONS,
119 EXTRACTOR_METATYPE_COMMENT, 119 EXTRACTOR_METATYPE_COMMENT,
120 EXTRACTOR_METATYPE_CREATOR, 120 EXTRACTOR_METATYPE_CREATOR,
121 EXTRACTOR_METATYPE_WRITER, 121 EXTRACTOR_METATYPE_WRITER,
122 EXTRACTOR_METATYPE_MOVIE_DIRECTOR, 122 EXTRACTOR_METATYPE_MOVIE_DIRECTOR,
123 EXTRACTOR_METATYPE_PRODUCER, 123 EXTRACTOR_METATYPE_PRODUCER,
124 EXTRACTOR_METATYPE_PUBLISHER, 124 EXTRACTOR_METATYPE_PUBLISHER,
125 EXTRACTOR_METATYPE_NETWORK_NAME, 125 EXTRACTOR_METATYPE_NETWORK_NAME,
126 EXTRACTOR_METATYPE_SHOW_NAME, 126 EXTRACTOR_METATYPE_SHOW_NAME,
127 EXTRACTOR_METATYPE_CHAPTER_NAME, 127 EXTRACTOR_METATYPE_CHAPTER_NAME,
128 EXTRACTOR_METATYPE_MUSICIAN_CREDITS_LIST, 128 EXTRACTOR_METATYPE_MUSICIAN_CREDITS_LIST,
129 EXTRACTOR_METATYPE_COPYRIGHT, 129 EXTRACTOR_METATYPE_COPYRIGHT,
130 EXTRACTOR_METATYPE_URI, 130 EXTRACTOR_METATYPE_URI,
131 EXTRACTOR_METATYPE_LOCATION_CITY, 131 EXTRACTOR_METATYPE_LOCATION_CITY,
132 EXTRACTOR_METATYPE_LOCATION_COUNTRY, 132 EXTRACTOR_METATYPE_LOCATION_COUNTRY,
@@ -137,15 +137,15 @@ gint types_video[] =
137}; 137};
138 138
139 139
140gint types_image[] = 140gint types_image[] =
141{ 141{
142 EXTRACTOR_METATYPE_MIMETYPE, 142 EXTRACTOR_METATYPE_MIMETYPE,
143 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME, 143 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME,
144 EXTRACTOR_METATYPE_TITLE, 144 EXTRACTOR_METATYPE_TITLE,
145 EXTRACTOR_METATYPE_KEYWORDS, 145 EXTRACTOR_METATYPE_KEYWORDS,
146 EXTRACTOR_METATYPE_DESCRIPTION, 146 EXTRACTOR_METATYPE_DESCRIPTION,
147 EXTRACTOR_METATYPE_IMAGE_DIMENSIONS, 147 EXTRACTOR_METATYPE_IMAGE_DIMENSIONS,
148 EXTRACTOR_METATYPE_IMAGE_RESOLUTION, 148 EXTRACTOR_METATYPE_IMAGE_RESOLUTION,
149 EXTRACTOR_METATYPE_COMMENT, 149 EXTRACTOR_METATYPE_COMMENT,
150 EXTRACTOR_METATYPE_COPYRIGHT, 150 EXTRACTOR_METATYPE_COPYRIGHT,
151 EXTRACTOR_METATYPE_SUBJECT, 151 EXTRACTOR_METATYPE_SUBJECT,
@@ -155,7 +155,7 @@ gint types_image[] =
155 EXTRACTOR_METATYPE_LOCATION_CITY, 155 EXTRACTOR_METATYPE_LOCATION_CITY,
156 EXTRACTOR_METATYPE_LOCATION_COUNTRY, 156 EXTRACTOR_METATYPE_LOCATION_COUNTRY,
157 EXTRACTOR_METATYPE_LOCATION_COUNTRY_CODE, 157 EXTRACTOR_METATYPE_LOCATION_COUNTRY_CODE,
158 EXTRACTOR_METATYPE_ORGANIZATION, 158 EXTRACTOR_METATYPE_ORGANIZATION,
159 EXTRACTOR_METATYPE_RESERVED 159 EXTRACTOR_METATYPE_RESERVED
160}; 160};
161 161
@@ -171,7 +171,7 @@ gint types_namespace[] =
171 EXTRACTOR_METATYPE_RIGHTS, 171 EXTRACTOR_METATYPE_RIGHTS,
172 EXTRACTOR_METATYPE_KEYWORDS, 172 EXTRACTOR_METATYPE_KEYWORDS,
173 EXTRACTOR_METATYPE_ABSTRACT, 173 EXTRACTOR_METATYPE_ABSTRACT,
174 EXTRACTOR_METATYPE_SUMMARY, 174 EXTRACTOR_METATYPE_SUMMARY,
175 EXTRACTOR_METATYPE_SUBJECT, 175 EXTRACTOR_METATYPE_SUBJECT,
176 EXTRACTOR_METATYPE_CREATOR, 176 EXTRACTOR_METATYPE_CREATOR,
177 EXTRACTOR_METATYPE_RATING, 177 EXTRACTOR_METATYPE_RATING,
@@ -183,17 +183,17 @@ gint types_namespace[] =
183}; 183};
184 184
185 185
186gint types_software[] = 186gint types_software[] =
187{ 187{
188 EXTRACTOR_METATYPE_MIMETYPE, 188 EXTRACTOR_METATYPE_MIMETYPE,
189 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME, 189 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME,
190 EXTRACTOR_METATYPE_PACKAGE_NAME, 190 EXTRACTOR_METATYPE_PACKAGE_NAME,
191 EXTRACTOR_METATYPE_PACKAGE_VERSION, 191 EXTRACTOR_METATYPE_PACKAGE_VERSION,
192 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE, 192 EXTRACTOR_METATYPE_TARGET_ARCHITECTURE,
193 EXTRACTOR_METATYPE_LICENSE, 193 EXTRACTOR_METATYPE_LICENSE,
194 EXTRACTOR_METATYPE_TARGET_OS, 194 EXTRACTOR_METATYPE_TARGET_OS,
195 EXTRACTOR_METATYPE_COMMENT, 195 EXTRACTOR_METATYPE_COMMENT,
196 EXTRACTOR_METATYPE_SECTION, 196 EXTRACTOR_METATYPE_SECTION,
197 EXTRACTOR_METATYPE_PACKAGE_DEPENDENCY, 197 EXTRACTOR_METATYPE_PACKAGE_DEPENDENCY,
198 EXTRACTOR_METATYPE_PACKAGE_CONFLICTS, 198 EXTRACTOR_METATYPE_PACKAGE_CONFLICTS,
199 EXTRACTOR_METATYPE_PACKAGE_REPLACES, 199 EXTRACTOR_METATYPE_PACKAGE_REPLACES,
@@ -205,11 +205,11 @@ gint types_software[] =
205 EXTRACTOR_METATYPE_PACKAGE_SOURCE, 205 EXTRACTOR_METATYPE_PACKAGE_SOURCE,
206 EXTRACTOR_METATYPE_PACKAGE_ESSENTIAL, 206 EXTRACTOR_METATYPE_PACKAGE_ESSENTIAL,
207 EXTRACTOR_METATYPE_PACKAGE_PRE_DEPENDENCY, 207 EXTRACTOR_METATYPE_PACKAGE_PRE_DEPENDENCY,
208 EXTRACTOR_METATYPE_PACKAGE_DISTRIBUTION, 208 EXTRACTOR_METATYPE_PACKAGE_DISTRIBUTION,
209 EXTRACTOR_METATYPE_BUILDHOST, 209 EXTRACTOR_METATYPE_BUILDHOST,
210 EXTRACTOR_METATYPE_VENDOR, 210 EXTRACTOR_METATYPE_VENDOR,
211 EXTRACTOR_METATYPE_SOFTWARE_VERSION, 211 EXTRACTOR_METATYPE_SOFTWARE_VERSION,
212 EXTRACTOR_METATYPE_TARGET_PLATFORM, 212 EXTRACTOR_METATYPE_TARGET_PLATFORM,
213 EXTRACTOR_METATYPE_RESOURCE_TYPE, 213 EXTRACTOR_METATYPE_RESOURCE_TYPE,
214 EXTRACTOR_METATYPE_LIBRARY_SEARCH_PATH, 214 EXTRACTOR_METATYPE_LIBRARY_SEARCH_PATH,
215 EXTRACTOR_METATYPE_LIBRARY_DEPENDENCY, 215 EXTRACTOR_METATYPE_LIBRARY_DEPENDENCY,
@@ -225,12 +225,12 @@ gint types_software[] =
225 */ 225 */
226gint *types[] = { 226gint *types[] = {
227 types_generic, 227 types_generic,
228 types_text, 228 types_text,
229 types_music, 229 types_music,
230 types_video, 230 types_video,
231 types_image, 231 types_image,
232 types_software, 232 types_software,
233 types_namespace, 233 types_namespace,
234 NULL 234 NULL
235}; 235};
236 236