aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-20 13:56:06 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-20 13:56:06 +0000
commit75c05fb633ba6d7fa2f52d46347db109726cc4b2 (patch)
treebd4531819d3df6fa756110dea0c57c380aabdd8d
parent73947661a2d9dd45e88919f772da6dd5838575ec (diff)
downloadgnunet-gtk-75c05fb633ba6d7fa2f52d46347db109726cc4b2.tar.gz
gnunet-gtk-75c05fb633ba6d7fa2f52d46347db109726cc4b2.zip
-make options in gnunet-setup match those that the code actually uses
-rw-r--r--contrib/gnunet_setup_main_window.glade42
-rw-r--r--src/setup/gnunet-setup-options.c30
-rw-r--r--src/setup/gnunet-setup-transport-test.c4
-rw-r--r--src/setup/gnunet-setup.c53
4 files changed, 10 insertions, 119 deletions
diff --git a/contrib/gnunet_setup_main_window.glade b/contrib/gnunet_setup_main_window.glade
index 476d4011..bec6406e 100644
--- a/contrib/gnunet_setup_main_window.glade
+++ b/contrib/gnunet_setup_main_window.glade
@@ -4317,48 +4317,6 @@
4317 <property name="can_focus">False</property> 4317 <property name="can_focus">False</property>
4318 <property name="label_xalign">0</property> 4318 <property name="label_xalign">0</property>
4319 <property name="shadow_type">none</property> 4319 <property name="shadow_type">none</property>
4320 <child>
4321 <object class="GtkAlignment" id="GNUNET_setup_gns_alignment">
4322 <property name="visible">True</property>
4323 <property name="can_focus">False</property>
4324 <property name="left_padding">12</property>
4325 <child>
4326 <object class="GtkVBox" id="GNUNET_setup_gns_option_vbox">
4327 <property name="visible">True</property>
4328 <property name="can_focus">False</property>
4329 <child>
4330 <object class="GtkCheckButton" id="GNUNET_setup_gns_hijack_checkbutton">
4331 <property name="label" translatable="yes">Enable iptables-based DNS hijacking (GNU/Linux-only)</property>
4332 <property name="visible">True</property>
4333 <property name="can_focus">True</property>
4334 <property name="receives_default">False</property>
4335 <property name="draw_indicator">True</property>
4336 </object>
4337 <packing>
4338 <property name="expand">False</property>
4339 <property name="fill">False</property>
4340 <property name="padding">5</property>
4341 <property name="position">0</property>
4342 </packing>
4343 </child>
4344 <child>
4345 <object class="GtkCheckButton" id="GNUNET_setup_gns_auto_import_checkbutton">
4346 <property name="label" translatable="yes">Enable automatic shortening</property>
4347 <property name="visible">True</property>
4348 <property name="can_focus">True</property>
4349 <property name="receives_default">False</property>
4350 <property name="draw_indicator">True</property>
4351 </object>
4352 <packing>
4353 <property name="expand">False</property>
4354 <property name="fill">False</property>
4355 <property name="position">1</property>
4356 </packing>
4357 </child>
4358 </object>
4359 </child>
4360 </object>
4361 </child>
4362 <child type="label"> 4320 <child type="label">
4363 <object class="GtkLabel" id="GNUNET_setup_gns_option_label"> 4321 <object class="GtkLabel" id="GNUNET_setup_gns_option_label">
4364 <property name="visible">True</property> 4322 <property name="visible">True</property>
diff --git a/src/setup/gnunet-setup-options.c b/src/setup/gnunet-setup-options.c
index 9495e824..2eae2b90 100644
--- a/src/setup/gnunet-setup-options.c
+++ b/src/setup/gnunet-setup-options.c
@@ -1904,7 +1904,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
1904 "GNUNET_setup_vpn_interface_v6_mask_spinbutton", 1904 "GNUNET_setup_vpn_interface_v6_mask_spinbutton",
1905 "value-changed", 1905 "value-changed",
1906 "vpn", 1906 "vpn",
1907 "IPV6MASK", 1907 "IPV6PREFIX",
1908 gettext_noop ("IPv6 network prefix length to use for the VPN interface"), 1908 gettext_noop ("IPv6 network prefix length to use for the VPN interface"),
1909 "https://gnunet.org/configuration-vpn", 1909 "https://gnunet.org/configuration-vpn",
1910 &load_number, 1910 &load_number,
@@ -1958,7 +1958,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
1958 "GNUNET_setup_exit_interface_name_entry", 1958 "GNUNET_setup_exit_interface_name_entry",
1959 "changed", 1959 "changed",
1960 "exit", 1960 "exit",
1961 "IFNAME", 1961 "TUN_IFNAME",
1962 gettext_noop 1962 gettext_noop
1963 ("Name of the virtual interface the GNUnet exit service should create for traffic exiting the VPN to the Internet"), 1963 ("Name of the virtual interface the GNUnet exit service should create for traffic exiting the VPN to the Internet"),
1964 "https://gnunet.org/configuration-exit", 1964 "https://gnunet.org/configuration-exit",
@@ -2007,7 +2007,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2007 "GNUNET_setup_exit_interface_v6_mask_spinbutton", 2007 "GNUNET_setup_exit_interface_v6_mask_spinbutton",
2008 "value-changed", 2008 "value-changed",
2009 "exit", 2009 "exit",
2010 "IPV6MASK", 2010 "IPV6PREFIX",
2011 gettext_noop 2011 gettext_noop
2012 ("IPv6 network prefix length to use for the Exit interface"), 2012 ("IPv6 network prefix length to use for the Exit interface"),
2013 "https://gnunet.org/configuration-exit", 2013 "https://gnunet.org/configuration-exit",
@@ -2128,30 +2128,6 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = {
2128 hide_gns_tabs}, 2128 hide_gns_tabs},
2129 2129
2130 2130
2131 {
2132 "GNUNET_setup_gns_hijack_checkbutton",
2133 "toggled",
2134 "gns",
2135 "HIJACK_DNS",
2136 gettext_noop ("Should DNS queries be intercepted using iptables?"),
2137 "https://gnunet.org/gnunet-dns-setup",
2138 &load_yes_no,
2139 &save_yes_no, NULL,
2140 NULL, NULL,
2141 NULL},
2142
2143 {
2144 "GNUNET_setup_gns_auto_import_checkbutton",
2145 "toggled",
2146 "gns",
2147 "AUTO_IMPORT_PKEY",
2148 gettext_noop ("Should names be automatically learned and placed into the 'shorten' Zone?"),
2149 "https://gnunet.org/configuration-gns-shortening",
2150 &load_yes_no,
2151 &save_yes_no, NULL,
2152 NULL, NULL,
2153 NULL},
2154
2155 /* EXIT services */ 2131 /* EXIT services */
2156 2132
2157 { 2133 {
diff --git a/src/setup/gnunet-setup-transport-test.c b/src/setup/gnunet-setup-transport-test.c
index 6f885a43..5a539bc7 100644
--- a/src/setup/gnunet-setup-transport-test.c
+++ b/src/setup/gnunet-setup-transport-test.c
@@ -107,7 +107,7 @@ display_test_result (struct TestContext *tc, int result)
107 * Clean up and update GUI (with success). 107 * Clean up and update GUI (with success).
108 * 108 *
109 * @param cls test context 109 * @param cls test context
110 * @param success currently always GNUNET_OK 110 * @param success currently always #GNUNET_OK
111 */ 111 */
112static void 112static void
113result_callback (void *cls, int success) 113result_callback (void *cls, int success)
@@ -140,7 +140,7 @@ fail_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
140 * transport configuration. 140 * transport configuration.
141 * 141 *
142 * @param section_name section with the port numbers 142 * @param section_name section with the port numbers
143 * @param is_tcp GNUNET_YES for TCP, GNUNET_NO for UDP 143 * @param is_tcp #GNUNET_YES for TCP, #GNUNET_NO for UDP
144 * @param success_image image to show on success 144 * @param success_image image to show on success
145 * @param failure_image image to show on failure 145 * @param failure_image image to show on failure
146 */ 146 */
diff --git a/src/setup/gnunet-setup.c b/src/setup/gnunet-setup.c
index 547f7441..1f5bc0a4 100644
--- a/src/setup/gnunet-setup.c
+++ b/src/setup/gnunet-setup.c
@@ -330,7 +330,7 @@ load_options ()
330/** 330/**
331 * Write final configuration to disk. 331 * Write final configuration to disk.
332 * 332 *
333 * @return GNUNET_OK on success 333 * @return #GNUNET_OK on success
334 */ 334 */
335static int 335static int
336write_configuration () 336write_configuration ()
@@ -602,54 +602,11 @@ run (void *cls,
602 602
603 option_cfg_name = GNUNET_GTK_main_loop_get_configuration_file (ml); 603 option_cfg_name = GNUNET_GTK_main_loop_get_configuration_file (ml);
604 cfg = GNUNET_CONFIGURATION_create (); 604 cfg = GNUNET_CONFIGURATION_create ();
605 605 if (GNUNET_YES ==
606#ifndef MINGW 606 GNUNET_DISK_file_test (option_cfg_name))
607 if ( (0 != my_uid) &&
608 (NULL != gnunet_pw) &&
609 (my_uid != gnunet_pw->pw_uid) )
610 {
611 /* load system defaults, system/'gnunet' user's configuration and THEN
612 our configuration file */
613 if (GNUNET_YES ==
614 GNUNET_DISK_file_test ("/etc/gnunet.conf"))
615 {
616 (void) GNUNET_CONFIGURATION_load (cfg, "/etc/gnunet.conf");
617 }
618 else
619 {
620#if HAVE_GETPWNAM
621 struct passwd *pw;
622
623 pw = getpwnam ("gnunet");
624 if (NULL != pw)
625 {
626 char *gnunet_user_cfgname;
627
628 GNUNET_asprintf (&gnunet_user_cfgname,
629 "%s%s%s",
630 pw->pw_dir,
631 DIR_SEPARATOR_STR,
632 ".config/gnunet.conf");
633 if (GNUNET_YES ==
634 GNUNET_DISK_file_test (gnunet_user_cfgname))
635 (void) GNUNET_CONFIGURATION_load (cfg, gnunet_user_cfgname);
636 GNUNET_free (gnunet_user_cfgname);
637 }
638#endif
639 }
640 if (GNUNET_YES ==
641 GNUNET_DISK_file_test (option_cfg_name))
642 (void) GNUNET_CONFIGURATION_parse (cfg,
643 option_cfg_name);
644 }
645 else
646#endif
647 {
648 /* only load system defaults and our configuration file */
649 if (GNUNET_YES ==
650 GNUNET_DISK_file_test (option_cfg_name))
651 (void) GNUNET_CONFIGURATION_load (cfg, option_cfg_name); 607 (void) GNUNET_CONFIGURATION_load (cfg, option_cfg_name);
652 } 608 else
609 (void) GNUNET_CONFIGURATION_load (cfg, NULL);
653 main_window = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_dialog")); 610 main_window = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_dialog"));
654 main_window = GNUNET_GTK_plug_me ("GNUNET_FS_GTK_PLUG", 611 main_window = GNUNET_GTK_plug_me ("GNUNET_FS_GTK_PLUG",
655 main_window); 612 main_window);