diff options
Diffstat (limited to 'src/gns/gnunet-gns-gtk.c')
-rw-r--r-- | src/gns/gnunet-gns-gtk.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/gns/gnunet-gns-gtk.c b/src/gns/gnunet-gns-gtk.c index 59edb42b..ed3ff064 100644 --- a/src/gns/gnunet-gns-gtk.c +++ b/src/gns/gnunet-gns-gtk.c | |||
@@ -67,7 +67,7 @@ struct GNUNET_GNS_Context | |||
67 | */ | 67 | */ |
68 | struct GNUNET_NAMESTORE_Handle *ns; | 68 | struct GNUNET_NAMESTORE_Handle *ns; |
69 | 69 | ||
70 | GtkBuilder builder; | 70 | GtkBuilder *builder; |
71 | 71 | ||
72 | 72 | ||
73 | }; | 73 | }; |
@@ -245,6 +245,7 @@ GNUNET_GNS_GTK_public_key_copy_button_clicked_cb (GtkButton *button, | |||
245 | static void | 245 | static void |
246 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 246 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
247 | { | 247 | { |
248 | |||
248 | struct GNUNET_GNS_Context *gns = cls; | 249 | struct GNUNET_GNS_Context *gns = cls; |
249 | GNUNET_assert (gns != NULL); | 250 | GNUNET_assert (gns != NULL); |
250 | if (NULL != gns->ns) | 251 | if (NULL != gns->ns) |
@@ -383,20 +384,14 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
383 | return; | 384 | return; |
384 | } | 385 | } |
385 | 386 | ||
386 | struct ZoneIteration_Context * zc_ctx = GNUNET_malloc (sizeof (struct ZoneIteration_Context)); | ||
387 | zc_ctx->zone = zone; | ||
388 | GNUNET_NAMESTORE_zone_iteration_start(gns->ns, &zone, | ||
389 | GNUNET_NAMESTORE_RF_NONE, | ||
390 | GNUNET_NAMESTORE_RF_NONE, | ||
391 | &zone_iteration_proc, | ||
392 | zc_ctx); | ||
393 | |||
394 | if (GNUNET_OK != GNUNET_GTK_main_loop_build_window (ml, gns)) | 387 | if (GNUNET_OK != GNUNET_GTK_main_loop_build_window (ml, gns)) |
395 | { | 388 | { |
396 | GNUNET_break (0); | 389 | GNUNET_break (0); |
397 | GNUNET_SCHEDULER_add_now (&shutdown_task, gns); | 390 | GNUNET_SCHEDULER_add_now (&shutdown_task, gns); |
398 | return; | 391 | return; |
399 | } | 392 | } |
393 | gns->builder = GNUNET_GTK_main_loop_get_builder(ml); | ||
394 | |||
400 | zone_as_string = GNUNET_strdup (GNUNET_h2s_full (&zone)); | 395 | zone_as_string = GNUNET_strdup (GNUNET_h2s_full (&zone)); |
401 | label = g_markup_printf_escaped (_("<b>Editing zone %s</b>"), | 396 | label = g_markup_printf_escaped (_("<b>Editing zone %s</b>"), |
402 | zone_as_string); | 397 | zone_as_string); |
@@ -413,12 +408,21 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
413 | "gnunet-gtk" /* FIXME: different icon? */ , | 408 | "gnunet-gtk" /* FIXME: different icon? */ , |
414 | "gnunet-gns-gtk"); | 409 | "gnunet-gns-gtk"); |
415 | 410 | ||
411 | struct ZoneIteration_Context * zc_ctx = GNUNET_malloc (sizeof (struct ZoneIteration_Context)); | ||
412 | zc_ctx->zone = zone; | ||
413 | GNUNET_NAMESTORE_zone_iteration_start(gns->ns, &zone, | ||
414 | GNUNET_NAMESTORE_RF_NONE, | ||
415 | GNUNET_NAMESTORE_RF_NONE, | ||
416 | &zone_iteration_proc, | ||
417 | zc_ctx); | ||
418 | |||
416 | /* make GUI visible */ | 419 | /* make GUI visible */ |
417 | if (!tray_only) | 420 | if (!tray_only) |
418 | { | 421 | { |
419 | gtk_widget_show (main_window); | 422 | gtk_widget_show (main_window); |
420 | gtk_window_present (GTK_WINDOW (main_window)); | 423 | gtk_window_present (GTK_WINDOW (main_window)); |
421 | } | 424 | } |
425 | |||
422 | } | 426 | } |
423 | 427 | ||
424 | 428 | ||