diff options
Diffstat (limited to 'src/fs/gnunet-fs-gtk.c')
-rw-r--r-- | src/fs/gnunet-fs-gtk.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c index 50d3195b..a5067bb5 100644 --- a/src/fs/gnunet-fs-gtk.c +++ b/src/fs/gnunet-fs-gtk.c | |||
@@ -470,7 +470,6 @@ main_window_search_button_clicked_cb (GtkButton *button, gpointer user_data) | |||
470 | 470 | ||
471 | GNUNET_HashCode *nsid = NULL; | 471 | GNUNET_HashCode *nsid = NULL; |
472 | struct GNUNET_FS_Uri *uri; | 472 | struct GNUNET_FS_Uri *uri; |
473 | gchar *root = NULL; | ||
474 | char *emsg; | 473 | char *emsg; |
475 | 474 | ||
476 | builder = GTK_BUILDER (user_data); | 475 | builder = GTK_BUILDER (user_data); |
@@ -498,17 +497,13 @@ main_window_search_button_clicked_cb (GtkButton *button, gpointer user_data) | |||
498 | namespace_treepath = gtk_tree_row_reference_get_path (ref); | 497 | namespace_treepath = gtk_tree_row_reference_get_path (ref); |
499 | if ( (NULL != namespace_treepath) && | 498 | if ( (NULL != namespace_treepath) && |
500 | (TRUE == gtk_tree_model_get_iter (namespace_model, &iter, namespace_treepath)) ) | 499 | (TRUE == gtk_tree_model_get_iter (namespace_model, &iter, namespace_treepath)) ) |
501 | gtk_tree_model_get (namespace_model, &iter, 1, &nsid, 2, &root, -1); | 500 | gtk_tree_model_get (namespace_model, &iter, 1, &nsid, -1); |
502 | } | 501 | } |
503 | query_entry = GTK_ENTRY (gtk_builder_get_object (builder, | 502 | query_entry = GTK_ENTRY (gtk_builder_get_object (builder, |
504 | "main_window_search_entry")); | 503 | "main_window_search_entry")); |
505 | if (root == NULL) | ||
506 | root = g_strdup (""); | ||
507 | entry_keywords = gtk_entry_get_text (query_entry); | 504 | entry_keywords = gtk_entry_get_text (query_entry); |
508 | /* FIXME: why is 'root' added here? Why is 'mime_keyword' not made mandatory? (+) */ | 505 | keywords = g_strdup_printf ("%s +%s", entry_keywords, mime_keyword); |
509 | keywords = g_strdup_printf ("%s %s %s", entry_keywords, mime_keyword, root); | ||
510 | g_free (mime_keyword); | 506 | g_free (mime_keyword); |
511 | g_free (root); | ||
512 | if (nsid != NULL) | 507 | if (nsid != NULL) |
513 | { | 508 | { |
514 | uri = GNUNET_FS_uri_sks_create_from_nsid (nsid, keywords); | 509 | uri = GNUNET_FS_uri_sks_create_from_nsid (nsid, keywords); |