aboutsummaryrefslogtreecommitdiff
path: root/src/setup
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-13 13:18:03 +0000
committerChristian Grothoff <christian@grothoff.org>2015-07-13 13:18:03 +0000
commit25c2f513fa6fb3bc97197087122bbcbc99ae85e9 (patch)
treee15d2bd414178b5716f467004b9a515a78941da7 /src/setup
parent6ade75bb5526e7b015341c385cb9f65c1423aa90 (diff)
downloadgnunet-gtk-25c2f513fa6fb3bc97197087122bbcbc99ae85e9.tar.gz
gnunet-gtk-25c2f513fa6fb3bc97197087122bbcbc99ae85e9.zip
allow vpn/pt to be configured individually (#3885)
Diffstat (limited to 'src/setup')
-rw-r--r--src/setup/gnunet-setup-options.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/src/setup/gnunet-setup-options.c b/src/setup/gnunet-setup-options.c
index bfa0532a..8500a9fe 100644
--- a/src/setup/gnunet-setup-options.c
+++ b/src/setup/gnunet-setup-options.c
@@ -1011,10 +1011,23 @@ static struct GNUNET_SETUP_VisibilitySpecification hide_fs_tab[] = {
1011 1011
1012 1012
1013/** 1013/**
1014 * Hide "vpn" tab if VPN not active. 1014 * Hide "vpn" tab and "pt" checkbutton if VPN is not active.
1015 */ 1015 */
1016static struct GNUNET_SETUP_VisibilitySpecification hide_vpn_tab[] = { 1016static struct GNUNET_SETUP_VisibilitySpecification hide_vpn_options[] = {
1017 {"GNUNET_setup_general_services_pt_checkbutton", "YES", NULL},
1017 {"GNUNET_setup_vpn_vbox", "YES", NULL}, 1018 {"GNUNET_setup_vpn_vbox", "YES", NULL},
1019 {"GNUNET_setup_vpn_label", "YES", NULL},
1020 {NULL, NULL, NULL}
1021};
1022
1023
1024/**
1025 * Hides "vpn" option if PT is active (so that it cannot be disabled),
1026 * and shows PT-specific options.
1027 */
1028static struct GNUNET_SETUP_VisibilitySpecification hide_pt_options[] = {
1029 {"GNUNET_setup_pt_frame", "YES", NULL},
1030 {"GNUNET_setup_general_services_vpn_checkbutton", "NO", NULL},
1018 {NULL, NULL, NULL} 1031 {NULL, NULL, NULL}
1019}; 1032};
1020 1033
@@ -1024,6 +1037,7 @@ static struct GNUNET_SETUP_VisibilitySpecification hide_vpn_tab[] = {
1024 */ 1037 */
1025static struct GNUNET_SETUP_VisibilitySpecification hide_gns_tabs[] = { 1038static struct GNUNET_SETUP_VisibilitySpecification hide_gns_tabs[] = {
1026 {"GNUNET_setup_namestore_vbox", "YES", NULL}, 1039 {"GNUNET_setup_namestore_vbox", "YES", NULL},
1040 {"GNUNET_setup_namestore_label", "YES", NULL},
1027 {NULL, NULL, NULL} 1041 {NULL, NULL, NULL}
1028}; 1042};
1029 1043
@@ -2318,16 +2332,28 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2318 /* VPN/PT service */ 2332 /* VPN/PT service */
2319 2333
2320 { 2334 {
2335 "GNUNET_setup_general_services_vpn_checkbutton",
2336 "toggled",
2337 "vpn",
2338 "FORCESTART",
2339 gettext_noop ("Should the VPN be started automatically on startup?"),
2340 "https://gnunet.org/configuration-vpn",
2341 &load_yes_no,
2342 &save_yes_no, NULL,
2343 NULL, NULL,
2344 hide_vpn_options},
2345
2346 {
2321 "GNUNET_setup_general_services_pt_checkbutton", 2347 "GNUNET_setup_general_services_pt_checkbutton",
2322 "toggled", 2348 "toggled",
2323 "pt", 2349 "pt",
2324 "FORCESTART", 2350 "FORCESTART",
2325 gettext_noop ("Should the VPN/PT be started automatically on startup?"), 2351 gettext_noop ("Should the PT be started automatically on startup?"),
2326 "https://gnunet.org/configuration-vpn", 2352 "https://gnunet.org/configuration-vpn",
2327 &load_yes_no, 2353 &load_yes_no,
2328 &save_yes_no, NULL, 2354 &save_yes_no, NULL,
2329 NULL, NULL, 2355 NULL, NULL,
2330 hide_vpn_tab}, 2356 hide_pt_options},
2331 2357
2332 2358
2333 { 2359 {