aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2008-06-29 05:42:44 +0000
committerChristian Grothoff <christian@grothoff.org>2008-06-29 05:42:44 +0000
commitd2d66bddb7675dc920ddfc0cc7f0ff16e05c83c3 (patch)
tree2dd1ffdded9beb251188d445257b27b32e1bc5a4
parentbb6ccf56690f1b0066492bb117da6ecd4007cf87 (diff)
downloadgnunet-gtk-d2d66bddb7675dc920ddfc0cc7f0ff16e05c83c3.tar.gz
gnunet-gtk-d2d66bddb7675dc920ddfc0cc7f0ff16e05c83c3.zip
improving namespace listing
-rw-r--r--src/plugins/fs/namespace_search.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/fs/namespace_search.c b/src/plugins/fs/namespace_search.c
index d4cef48c..a2966a7e 100644
--- a/src/plugins/fs/namespace_search.c
+++ b/src/plugins/fs/namespace_search.c
@@ -213,6 +213,7 @@ saveDiscovery (void *cls)
213 char *desc; 213 char *desc;
214 char *haveName; 214 char *haveName;
215 int found; 215 int found;
216 char *fulldesc;
216 217
217 GNUNET_GTK_DEBUG_BEGIN (); 218 GNUNET_GTK_DEBUG_BEGIN ();
218 ncbe = 219 ncbe =
@@ -263,13 +264,23 @@ saveDiscovery (void *cls)
263 { 264 {
264 GNUNET_GTK_show_info_message (_("Namespace `%s' found: %s.\n"), 265 GNUNET_GTK_show_info_message (_("Namespace `%s' found: %s.\n"),
265 nni->namespaceName, desc); 266 nni->namespaceName, desc);
267 fulldesc = GNUNET_malloc(strlen(desc) + strlen(nni->namespaceName) + 3);
268 strcpy(fulldesc, nni->namespaceName);
269 if (NULL == strstr(nni->namespaceName,
270 desc))
271 {
272 /* append only if desc adds something new! */
273 strcat(fulldesc, ": ");
274 strcat(fulldesc, desc);
275 }
266 gtk_list_store_append (model, &iter); 276 gtk_list_store_append (model, &iter);
267 gtk_list_store_set (model, 277 gtk_list_store_set (model,
268 &iter, 278 &iter,
269 NS_SEARCH_DESCRIPTION, desc, 279 NS_SEARCH_DESCRIPTION, fulldesc,
270 NS_SEARCH_NAME, nni->namespaceName, 280 NS_SEARCH_NAME, nni->namespaceName,
271 NS_SEARCH_METADATA, dmd, 281 NS_SEARCH_METADATA, dmd,
272 NS_SEARCH_RATING, nni->rating, -1); 282 NS_SEARCH_RATING, nni->rating, -1);
283 GNUNET_free(fulldesc);
273 } 284 }
274 else 285 else
275 { 286 {