diff options
Diffstat (limited to 'src/fs/gnunet-fs-gtk.c')
-rw-r--r-- | src/fs/gnunet-fs-gtk.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c index a5067bb5..5545371b 100644 --- a/src/fs/gnunet-fs-gtk.c +++ b/src/fs/gnunet-fs-gtk.c | |||
@@ -354,6 +354,7 @@ namespace_selector_treeview_cursor_changed_cb (GtkWidget *widget, | |||
354 | GtkTreeModel *model; | 354 | GtkTreeModel *model; |
355 | gchar *value; | 355 | gchar *value; |
356 | GtkTreePath *treepath; | 356 | GtkTreePath *treepath; |
357 | GtkEntry *search_entry; | ||
357 | GtkTreeRowReference *ref, *old; | 358 | GtkTreeRowReference *ref, *old; |
358 | 359 | ||
359 | builder = GTK_BUILDER (user_data); | 360 | builder = GTK_BUILDER (user_data); |
@@ -362,6 +363,10 @@ namespace_selector_treeview_cursor_changed_cb (GtkWidget *widget, | |||
362 | if (!toggle_button) | 363 | if (!toggle_button) |
363 | return; | 364 | return; |
364 | 365 | ||
366 | search_entry = GTK_ENTRY (gtk_builder_get_object (builder, "main_window_search_entry")); | ||
367 | if (!search_entry) | ||
368 | return; | ||
369 | |||
365 | if (!get_selected_namespace_treepath_iter_model_widget (builder, &treepath, NULL, &model, NULL)) | 370 | if (!get_selected_namespace_treepath_iter_model_widget (builder, &treepath, NULL, &model, NULL)) |
366 | return; | 371 | return; |
367 | ref = gtk_tree_row_reference_new (model, treepath); | 372 | ref = gtk_tree_row_reference_new (model, treepath); |
@@ -376,8 +381,17 @@ namespace_selector_treeview_cursor_changed_cb (GtkWidget *widget, | |||
376 | return; | 381 | return; |
377 | 382 | ||
378 | if (GNUNET_GTK_get_tree_string (GTK_TREE_VIEW (widget), treepath, 0, | 383 | if (GNUNET_GTK_get_tree_string (GTK_TREE_VIEW (widget), treepath, 0, |
379 | &value)) | 384 | &value) && value != NULL) |
385 | { | ||
380 | gtk_label_set_text (sel_namespace_label, value); | 386 | gtk_label_set_text (sel_namespace_label, value); |
387 | g_free (value); | ||
388 | } | ||
389 | if (GNUNET_GTK_get_tree_string (GTK_TREE_VIEW (widget), treepath, 2, | ||
390 | &value) && value != NULL) | ||
391 | { | ||
392 | gtk_entry_set_text (search_entry, value); | ||
393 | g_free (value); | ||
394 | } | ||
381 | 395 | ||
382 | gtk_tree_path_free (treepath); | 396 | gtk_tree_path_free (treepath); |
383 | 397 | ||