aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-fs-gtk_common.c')
-rw-r--r--src/fs/gnunet-fs-gtk_common.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/fs/gnunet-fs-gtk_common.c b/src/fs/gnunet-fs-gtk_common.c
index d671a40d..1a8aa15c 100644
--- a/src/fs/gnunet-fs-gtk_common.c
+++ b/src/fs/gnunet-fs-gtk_common.c
@@ -106,9 +106,16 @@ GNUNET_FS_GTK_add_meta_data_to_list_store (void *cls, const char *plugin_name,
106 data_to_insert = GNUNET_FS_GTK_dubious_meta_to_utf8 (format, data, data_len); 106 data_to_insert = GNUNET_FS_GTK_dubious_meta_to_utf8 (format, data, data_len);
107 if (NULL == data_to_insert) 107 if (NULL == data_to_insert)
108 return 0; 108 return 0;
109 gtk_list_store_insert_with_values (ls, NULL, G_MAXINT, 0, type, 1, format, 109 gtk_list_store_insert_with_values (ls, NULL, G_MAXINT,
110 2, EXTRACTOR_metatype_to_string (type), 110 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_TYPE,
111 3, data_to_insert, -1); 111 type,
112 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_FORMAT,
113 format,
114 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_TYPE_STRING,
115 EXTRACTOR_metatype_to_string (type),
116 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_VALUE,
117 data_to_insert,
118 -1);
112 GNUNET_free (data_to_insert); 119 GNUNET_free (data_to_insert);
113 return 0; 120 return 0;
114} 121}
@@ -353,16 +360,18 @@ GNUNET_FS_GTK_handle_uri (const struct GNUNET_FS_Uri *uri,
353 return; 360 return;
354 } 361 }
355 gtk_tree_model_get (namespace_treestore, &iter, 362 gtk_tree_model_get (namespace_treestore, &iter,
356 1, &nsid, 363 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_KEY,
357 -1); 364 &nsid,
365 -1);
358 while ( ( (NULL == nsid) || 366 while ( ( (NULL == nsid) ||
359 (0 != memcmp (nsid, 367 (0 != memcmp (nsid,
360 &want, 368 &want,
361 sizeof (GNUNET_HashCode))) ) && 369 sizeof (GNUNET_HashCode))) ) &&
362 (gtk_tree_model_iter_next (namespace_treestore, &iter)) ) 370 (gtk_tree_model_iter_next (namespace_treestore, &iter)) )
363 gtk_tree_model_get (namespace_treestore, &iter, 371 gtk_tree_model_get (namespace_treestore, &iter,
364 1, &nsid, 372 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_KEY,
365 -1); 373 &nsid,
374 -1);
366 if ( (NULL == nsid) || 375 if ( (NULL == nsid) ||
367 (0 != memcmp (nsid, 376 (0 != memcmp (nsid,
368 &want, 377 &want,
@@ -376,7 +385,9 @@ GNUNET_FS_GTK_handle_uri (const struct GNUNET_FS_Uri *uri,
376 (namespace_tree), &iter); 385 (namespace_tree), &iter);
377 treepath = gtk_tree_model_get_path (namespace_treestore, 386 treepath = gtk_tree_model_get_path (namespace_treestore,
378 &iter); 387 &iter);
379 if (GNUNET_GTK_get_tree_string (namespace_tree, treepath, 0, &value)) 388 if (GNUNET_GTK_get_tree_string (namespace_tree, treepath,
389 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_NAME,
390 &value))
380 gtk_label_set_text (sel_namespace_label, value); 391 gtk_label_set_text (sel_namespace_label, value);
381 gtk_tree_path_free (treepath); 392 gtk_tree_path_free (treepath);
382 393
@@ -401,7 +412,9 @@ GNUNET_FS_GTK_handle_uri (const struct GNUNET_FS_Uri *uri,
401 gtk_tree_selection_select_iter (gtk_tree_view_get_selection 412 gtk_tree_selection_select_iter (gtk_tree_view_get_selection
402 (namespace_tree), &iter); 413 (namespace_tree), &iter);
403 treepath = gtk_tree_model_get_path (namespace_treestore, &iter); 414 treepath = gtk_tree_model_get_path (namespace_treestore, &iter);
404 if (GNUNET_GTK_get_tree_string (namespace_tree, treepath, 0, &value)) 415 if (GNUNET_GTK_get_tree_string (namespace_tree, treepath,
416 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_NAME,
417 &value))
405 gtk_label_set_text (sel_namespace_label, value); 418 gtk_label_set_text (sel_namespace_label, value);
406 gtk_tree_path_free (treepath); 419 gtk_tree_path_free (treepath);
407 } 420 }