diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-07 18:26:58 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-07 18:26:58 +0000 |
commit | 194b522a49637811f14680dcf16079365d010a77 (patch) | |
tree | ee08d03085bb904c95d812a37b956aca4079c46c /src/setup/gnunet-setup.c | |
parent | ce5c52239d9dafd17e08c6a7f04217ebae3c6533 (diff) | |
download | gnunet-gtk-194b522a49637811f14680dcf16079365d010a77.tar.gz gnunet-gtk-194b522a49637811f14680dcf16079365d010a77.zip |
launch gnunet-peerinfo-gtk to edit friends list
Diffstat (limited to 'src/setup/gnunet-setup.c')
-rw-r--r-- | src/setup/gnunet-setup.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/src/setup/gnunet-setup.c b/src/setup/gnunet-setup.c index 1ec84fe5..a7a306d8 100644 --- a/src/setup/gnunet-setup.c +++ b/src/setup/gnunet-setup.c | |||
@@ -429,7 +429,7 @@ GNUNET_SETUP_quit_cb (GObject * object, gpointer user_data) | |||
429 | * If the test failed, start the resolver process. | 429 | * If the test failed, start the resolver process. |
430 | * | 430 | * |
431 | * @param cls closure, NULL | 431 | * @param cls closure, NULL |
432 | * @param result GNUNET_YES if the service is running | 432 | * @param result #GNUNET_YES if the service is running |
433 | */ | 433 | */ |
434 | static void | 434 | static void |
435 | start_resolver (void *cls, | 435 | start_resolver (void *cls, |
@@ -477,7 +477,7 @@ start_identity (void *cls, | |||
477 | * If the test failed, start the namestore process. | 477 | * If the test failed, start the namestore process. |
478 | * | 478 | * |
479 | * @param cls closure, NULL | 479 | * @param cls closure, NULL |
480 | * @param result GNUNET_YES if the service is running | 480 | * @param result #GNUNET_YES if the service is running |
481 | */ | 481 | */ |
482 | static void | 482 | static void |
483 | start_namestore (void *cls, | 483 | start_namestore (void *cls, |
@@ -528,6 +528,33 @@ try_gksu (const char *username) | |||
528 | 528 | ||
529 | 529 | ||
530 | /** | 530 | /** |
531 | * User clicked on the button to edit the list of friends. | ||
532 | * Launch gnunet-peerinfo-gtk. | ||
533 | */ | ||
534 | void | ||
535 | GNUNET_setup_launch_edit_friends_button_clicked_cb (GtkButton *button, | ||
536 | gpointer *user_data) | ||
537 | { | ||
538 | struct GNUNET_OS_Process *proc; | ||
539 | |||
540 | proc = GNUNET_OS_start_process (GNUNET_NO, | ||
541 | GNUNET_OS_INHERIT_STD_ALL, | ||
542 | NULL, NULL, | ||
543 | "gnunet-peerinfo-gtk", | ||
544 | "-c", cfgName, | ||
545 | NULL); | ||
546 | if (NULL == proc) | ||
547 | { | ||
548 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
549 | _("Failed to launch gnunet-peerinfo-gtk\n")); | ||
550 | return; | ||
551 | } | ||
552 | /* simply yield control, let it run */ | ||
553 | GNUNET_free (proc); | ||
554 | } | ||
555 | |||
556 | |||
557 | /** | ||
531 | * Called once the autoconfiguration is done. Triggers shutdown. | 558 | * Called once the autoconfiguration is done. Triggers shutdown. |
532 | * | 559 | * |
533 | * @param cls unused | 560 | * @param cls unused |
@@ -546,7 +573,8 @@ autoconfig_finished_cb (void *cls) | |||
546 | * @param tc scheduler context | 573 | * @param tc scheduler context |
547 | */ | 574 | */ |
548 | static void | 575 | static void |
549 | run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 576 | run (void *cls, |
577 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
550 | { | 578 | { |
551 | GtkWidget *main_window; | 579 | GtkWidget *main_window; |
552 | #ifndef MINGW | 580 | #ifndef MINGW |