aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk_main-window-namespace-dropdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-fs-gtk_main-window-namespace-dropdown.c')
-rw-r--r--src/fs/gnunet-fs-gtk_main-window-namespace-dropdown.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/fs/gnunet-fs-gtk_main-window-namespace-dropdown.c b/src/fs/gnunet-fs-gtk_main-window-namespace-dropdown.c
index 6c5e0f92..cb5dc461 100644
--- a/src/fs/gnunet-fs-gtk_main-window-namespace-dropdown.c
+++ b/src/fs/gnunet-fs-gtk_main-window-namespace-dropdown.c
@@ -329,6 +329,7 @@ add_namespace_to_ts (void *cls, const GNUNET_HashCode * pseudonym,
329 char *ns_name; 329 char *ns_name;
330 GNUNET_HashCode *nsid; 330 GNUNET_HashCode *nsid;
331 char *description; 331 char *description;
332 int desc_is_a_dup;
332 char *uris; 333 char *uris;
333 char *emsg; 334 char *emsg;
334 struct GNUNET_FS_Uri *uri; 335 struct GNUNET_FS_Uri *uri;
@@ -350,32 +351,7 @@ add_namespace_to_ts (void *cls, const GNUNET_HashCode * pseudonym,
350 root = GNUNET_FS_uri_sks_get_content_id (uri); 351 root = GNUNET_FS_uri_sks_get_content_id (uri);
351 GNUNET_FS_uri_destroy (uri); 352 GNUNET_FS_uri_destroy (uri);
352 } 353 }
353 description = 354 description = GNUNET_FS_GTK_get_description_from_metadata (md, &desc_is_a_dup);
354 GNUNET_CONTAINER_meta_data_get_first_by_types (md,
355 EXTRACTOR_METATYPE_TITLE,
356 EXTRACTOR_METATYPE_BOOK_TITLE,
357 EXTRACTOR_METATYPE_DESCRIPTION,
358 EXTRACTOR_METATYPE_SUMMARY,
359 EXTRACTOR_METATYPE_ALBUM,
360 EXTRACTOR_METATYPE_COMMENT,
361 EXTRACTOR_METATYPE_SUBJECT,
362 EXTRACTOR_METATYPE_KEYWORDS,
363 -1);
364 if (description == NULL)
365 description = GNUNET_strdup (_("no description supplied"));
366 else
367 {
368 char *utf8_desc = NULL;
369
370 utf8_desc =
371 GNUNET_FS_GTK_dubious_meta_to_utf8 (EXTRACTOR_METAFORMAT_UTF8,
372 description, strlen (description));
373 GNUNET_free (description);
374 if (utf8_desc != NULL)
375 description = utf8_desc;
376 else
377 description = NULL;
378 }
379 gtk_tree_store_insert_with_values (ts, &iter, NULL, G_MAXINT, 355 gtk_tree_store_insert_with_values (ts, &iter, NULL, G_MAXINT,
380 0, ns_name, 356 0, ns_name,
381 1, nsid, 357 1, nsid,
@@ -384,7 +360,7 @@ add_namespace_to_ts (void *cls, const GNUNET_HashCode * pseudonym,
384 -1); 360 -1);
385 GNUNET_free (ns_name); 361 GNUNET_free (ns_name);
386 GNUNET_free_non_null (root); 362 GNUNET_free_non_null (root);
387 GNUNET_free_non_null (description); 363 GNUNET_free (description);
388 return GNUNET_OK; 364 return GNUNET_OK;
389} 365}
390 366