diff options
author | ng0 <ng0@n0.is> | 2019-05-15 15:51:29 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-05-15 15:51:29 +0000 |
commit | 51cf7682ce12732f75365e2766f481132b3baaee (patch) | |
tree | a3f0a8e08c6e93a17216dc66236ad3e157878cd9 /src/setup | |
parent | f85786c61f2f03c6e3d2d7f00a6b1446bab3c41e (diff) | |
download | gnunet-gtk-51cf7682ce12732f75365e2766f481132b3baaee.tar.gz gnunet-gtk-51cf7682ce12732f75365e2766f481132b3baaee.zip |
clang-format all C code. Add symlink of clang-format to bootstrap.
Diffstat (limited to 'src/setup')
-rw-r--r-- | src/setup/gnunet-setup-datacache-config.c | 16 | ||||
-rw-r--r-- | src/setup/gnunet-setup-datacache-plugins.c | 12 | ||||
-rw-r--r-- | src/setup/gnunet-setup-datastore-config.c | 10 | ||||
-rw-r--r-- | src/setup/gnunet-setup-datastore-plugins.c | 9 | ||||
-rw-r--r-- | src/setup/gnunet-setup-exit-services.c | 252 | ||||
-rw-r--r-- | src/setup/gnunet-setup-exit-services.h | 60 | ||||
-rw-r--r-- | src/setup/gnunet-setup-hostlist-editing.c | 37 | ||||
-rw-r--r-- | src/setup/gnunet-setup-hostlist-server.c | 27 | ||||
-rw-r--r-- | src/setup/gnunet-setup-namestore-config.c | 2 | ||||
-rw-r--r-- | src/setup/gnunet-setup-namestore-plugins.c | 11 | ||||
-rw-r--r-- | src/setup/gnunet-setup-options.c | 1861 | ||||
-rw-r--r-- | src/setup/gnunet-setup-options.h | 24 | ||||
-rw-r--r-- | src/setup/gnunet-setup-transport-plugins.c | 27 | ||||
-rw-r--r-- | src/setup/gnunet-setup-transport-test.c | 49 | ||||
-rw-r--r-- | src/setup/gnunet-setup-transport-udp.c | 1 | ||||
-rw-r--r-- | src/setup/gnunet-setup.c | 198 | ||||
-rw-r--r-- | src/setup/gnunet-setup.h | 12 |
17 files changed, 1333 insertions, 1275 deletions
diff --git a/src/setup/gnunet-setup-datacache-config.c b/src/setup/gnunet-setup-datacache-config.c index d4bf668f..958ce611 100644 --- a/src/setup/gnunet-setup-datacache-config.c +++ b/src/setup/gnunet-setup-datacache-config.c | |||
@@ -30,7 +30,7 @@ | |||
30 | * Stub implementation of the 'DeleteNotifyCallback' callback. | 30 | * Stub implementation of the 'DeleteNotifyCallback' callback. |
31 | */ | 31 | */ |
32 | static void | 32 | static void |
33 | dnc_dummy (void *cls, const struct GNUNET_HashCode * key, size_t size) | 33 | dnc_dummy (void *cls, const struct GNUNET_HashCode *key, size_t size) |
34 | { | 34 | { |
35 | /* do nothing */ | 35 | /* do nothing */ |
36 | } | 36 | } |
@@ -45,12 +45,11 @@ dnc_dummy (void *cls, const struct GNUNET_HashCode * key, size_t size) | |||
45 | static int | 45 | static int |
46 | test_config (const char *name) | 46 | test_config (const char *name) |
47 | { | 47 | { |
48 | struct GNUNET_DATACACHE_PluginEnvironment env = { | 48 | struct GNUNET_DATACACHE_PluginEnvironment env = {cfg, |
49 | cfg, | 49 | "dhtcache", |
50 | "dhtcache", | 50 | NULL, |
51 | NULL, &dnc_dummy, | 51 | &dnc_dummy, |
52 | 1024LL | 52 | 1024LL}; |
53 | }; | ||
54 | void *ret; | 53 | void *ret; |
55 | 54 | ||
56 | ret = GNUNET_PLUGIN_load (name, &env); | 55 | ret = GNUNET_PLUGIN_load (name, &env); |
@@ -84,7 +83,7 @@ GNUNET_setup_datacache_postgres_invalidate_cb () | |||
84 | 83 | ||
85 | 84 | ||
86 | void | 85 | void |
87 | GNUNET_setup_datacache_postgres_tab_test_button_clicked_cb (GtkWidget * widget, | 86 | GNUNET_setup_datacache_postgres_tab_test_button_clicked_cb (GtkWidget *widget, |
88 | gpointer user_data) | 87 | gpointer user_data) |
89 | { | 88 | { |
90 | if (GNUNET_OK == test_config ("libgnunet_plugin_datacache_postgres")) | 89 | if (GNUNET_OK == test_config ("libgnunet_plugin_datacache_postgres")) |
@@ -100,5 +99,4 @@ GNUNET_setup_datacache_postgres_tab_test_button_clicked_cb (GtkWidget * widget, | |||
100 | } | 99 | } |
101 | 100 | ||
102 | 101 | ||
103 | |||
104 | /* end of gnunet-setup-datacache-config.c */ | 102 | /* end of gnunet-setup-datacache-config.c */ |
diff --git a/src/setup/gnunet-setup-datacache-plugins.c b/src/setup/gnunet-setup-datacache-plugins.c index 512766ea..5a40225e 100644 --- a/src/setup/gnunet-setup-datacache-plugins.c +++ b/src/setup/gnunet-setup-datacache-plugins.c | |||
@@ -34,7 +34,7 @@ | |||
34 | * @param name name of the plugin to check | 34 | * @param name name of the plugin to check |
35 | */ | 35 | */ |
36 | static void | 36 | static void |
37 | test_plugin (GtkWidget * widget, const char *name) | 37 | test_plugin (GtkWidget *widget, const char *name) |
38 | { | 38 | { |
39 | if (GNUNET_YES == GNUNET_PLUGIN_test (name)) | 39 | if (GNUNET_YES == GNUNET_PLUGIN_test (name)) |
40 | { | 40 | { |
@@ -48,9 +48,8 @@ test_plugin (GtkWidget * widget, const char *name) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | 50 | ||
51 | |||
52 | void | 51 | void |
53 | GNUNET_setup_fs_datacache_sqlite_radiobutton_realize_cb (GtkWidget * widget, | 52 | GNUNET_setup_fs_datacache_sqlite_radiobutton_realize_cb (GtkWidget *widget, |
54 | gpointer user_data) | 53 | gpointer user_data) |
55 | { | 54 | { |
56 | test_plugin (widget, "libgnunet_plugin_datacache_sqlite"); | 55 | test_plugin (widget, "libgnunet_plugin_datacache_sqlite"); |
@@ -58,20 +57,19 @@ GNUNET_setup_fs_datacache_sqlite_radiobutton_realize_cb (GtkWidget * widget, | |||
58 | 57 | ||
59 | 58 | ||
60 | void | 59 | void |
61 | GNUNET_setup_fs_datacache_heap_radiobutton_realize_cb (GtkWidget * widget, | 60 | GNUNET_setup_fs_datacache_heap_radiobutton_realize_cb (GtkWidget *widget, |
62 | gpointer user_data) | 61 | gpointer user_data) |
63 | { | 62 | { |
64 | test_plugin (widget, "libgnunet_plugin_datacache_heap"); | 63 | test_plugin (widget, "libgnunet_plugin_datacache_heap"); |
65 | } | 64 | } |
66 | 65 | ||
67 | 66 | ||
68 | void | 67 | void |
69 | GNUNET_setup_fs_datacache_postgres_radiobutton_realize_cb (GtkWidget * widget, | 68 | GNUNET_setup_fs_datacache_postgres_radiobutton_realize_cb (GtkWidget *widget, |
70 | gpointer user_data) | 69 | gpointer user_data) |
71 | { | 70 | { |
72 | test_plugin (widget, "libgnunet_plugin_datacache_postgres"); | 71 | test_plugin (widget, "libgnunet_plugin_datacache_postgres"); |
73 | } | 72 | } |
74 | 73 | ||
75 | 74 | ||
76 | |||
77 | /* end of gnunet-setup-transport-plugins.c */ | 75 | /* end of gnunet-setup-transport-plugins.c */ |
diff --git a/src/setup/gnunet-setup-datastore-config.c b/src/setup/gnunet-setup-datastore-config.c index 2e41ec4b..ff0ee74d 100644 --- a/src/setup/gnunet-setup-datastore-config.c +++ b/src/setup/gnunet-setup-datastore-config.c | |||
@@ -45,10 +45,7 @@ duc_dummy (void *cls, int delta) | |||
45 | static int | 45 | static int |
46 | test_config (const char *name) | 46 | test_config (const char *name) |
47 | { | 47 | { |
48 | struct GNUNET_DATASTORE_PluginEnvironment env = { | 48 | struct GNUNET_DATASTORE_PluginEnvironment env = {cfg, &duc_dummy, NULL}; |
49 | cfg, | ||
50 | &duc_dummy, NULL | ||
51 | }; | ||
52 | void *ret; | 49 | void *ret; |
53 | 50 | ||
54 | ret = GNUNET_PLUGIN_load (name, &env); | 51 | ret = GNUNET_PLUGIN_load (name, &env); |
@@ -90,7 +87,7 @@ GNUNET_setup_datastore_postgres_invalidate_cb () | |||
90 | 87 | ||
91 | 88 | ||
92 | void | 89 | void |
93 | GNUNET_setup_datastore_mysql_tab_test_button_clicked_cb (GtkWidget * widget, | 90 | GNUNET_setup_datastore_mysql_tab_test_button_clicked_cb (GtkWidget *widget, |
94 | gpointer user_data) | 91 | gpointer user_data) |
95 | { | 92 | { |
96 | if (GNUNET_OK == test_config ("libgnunet_plugin_datastore_mysql")) | 93 | if (GNUNET_OK == test_config ("libgnunet_plugin_datastore_mysql")) |
@@ -107,7 +104,7 @@ GNUNET_setup_datastore_mysql_tab_test_button_clicked_cb (GtkWidget * widget, | |||
107 | 104 | ||
108 | 105 | ||
109 | void | 106 | void |
110 | GNUNET_setup_datastore_postgres_tab_test_button_clicked_cb (GtkWidget * widget, | 107 | GNUNET_setup_datastore_postgres_tab_test_button_clicked_cb (GtkWidget *widget, |
111 | gpointer user_data) | 108 | gpointer user_data) |
112 | { | 109 | { |
113 | if (GNUNET_OK == test_config ("libgnunet_plugin_datastore_postgres")) | 110 | if (GNUNET_OK == test_config ("libgnunet_plugin_datastore_postgres")) |
@@ -123,5 +120,4 @@ GNUNET_setup_datastore_postgres_tab_test_button_clicked_cb (GtkWidget * widget, | |||
123 | } | 120 | } |
124 | 121 | ||
125 | 122 | ||
126 | |||
127 | /* end of gnunet-setup-datastore-config.c */ | 123 | /* end of gnunet-setup-datastore-config.c */ |
diff --git a/src/setup/gnunet-setup-datastore-plugins.c b/src/setup/gnunet-setup-datastore-plugins.c index bf5ad468..e772e3ba 100644 --- a/src/setup/gnunet-setup-datastore-plugins.c +++ b/src/setup/gnunet-setup-datastore-plugins.c | |||
@@ -33,7 +33,7 @@ | |||
33 | * @param name name of the plugin to check | 33 | * @param name name of the plugin to check |
34 | */ | 34 | */ |
35 | static void | 35 | static void |
36 | test_plugin (GtkWidget * widget, const char *name) | 36 | test_plugin (GtkWidget *widget, const char *name) |
37 | { | 37 | { |
38 | if (GNUNET_YES == GNUNET_PLUGIN_test (name)) | 38 | if (GNUNET_YES == GNUNET_PLUGIN_test (name)) |
39 | { | 39 | { |
@@ -48,7 +48,7 @@ test_plugin (GtkWidget * widget, const char *name) | |||
48 | 48 | ||
49 | 49 | ||
50 | void | 50 | void |
51 | GNUNET_setup_fs_datastore_sqlite_radiobutton_realize_cb (GtkWidget * widget, | 51 | GNUNET_setup_fs_datastore_sqlite_radiobutton_realize_cb (GtkWidget *widget, |
52 | gpointer user_data) | 52 | gpointer user_data) |
53 | { | 53 | { |
54 | test_plugin (widget, "libgnunet_plugin_datastore_sqlite"); | 54 | test_plugin (widget, "libgnunet_plugin_datastore_sqlite"); |
@@ -56,7 +56,7 @@ GNUNET_setup_fs_datastore_sqlite_radiobutton_realize_cb (GtkWidget * widget, | |||
56 | 56 | ||
57 | 57 | ||
58 | void | 58 | void |
59 | GNUNET_setup_fs_datastore_mysql_radiobutton_realize_cb (GtkWidget * widget, | 59 | GNUNET_setup_fs_datastore_mysql_radiobutton_realize_cb (GtkWidget *widget, |
60 | gpointer user_data) | 60 | gpointer user_data) |
61 | { | 61 | { |
62 | test_plugin (widget, "libgnunet_plugin_datastore_mysql"); | 62 | test_plugin (widget, "libgnunet_plugin_datastore_mysql"); |
@@ -64,12 +64,11 @@ GNUNET_setup_fs_datastore_mysql_radiobutton_realize_cb (GtkWidget * widget, | |||
64 | 64 | ||
65 | 65 | ||
66 | void | 66 | void |
67 | GNUNET_setup_fs_datastore_postgres_radiobutton_realize_cb (GtkWidget * widget, | 67 | GNUNET_setup_fs_datastore_postgres_radiobutton_realize_cb (GtkWidget *widget, |
68 | gpointer user_data) | 68 | gpointer user_data) |
69 | { | 69 | { |
70 | test_plugin (widget, "libgnunet_plugin_datastore_postgres"); | 70 | test_plugin (widget, "libgnunet_plugin_datastore_postgres"); |
71 | } | 71 | } |
72 | 72 | ||
73 | 73 | ||
74 | |||
75 | /* end of gnunet-setup-datastore-plugins.c */ | 74 | /* end of gnunet-setup-datastore-plugins.c */ |
diff --git a/src/setup/gnunet-setup-exit-services.c b/src/setup/gnunet-setup-exit-services.c index eb8c3aed..641642e9 100644 --- a/src/setup/gnunet-setup-exit-services.c +++ b/src/setup/gnunet-setup-exit-services.c | |||
@@ -64,8 +64,7 @@ enum ServiceModelColumns | |||
64 | * @param section name of the section | 64 | * @param section name of the section |
65 | */ | 65 | */ |
66 | static void | 66 | static void |
67 | add_name_entry_to_list_store (void *cls, | 67 | add_name_entry_to_list_store (void *cls, const char *section) |
68 | const char *section) | ||
69 | { | 68 | { |
70 | GtkListStore *ls = cls; | 69 | GtkListStore *ls = cls; |
71 | GtkTreeIter iter; | 70 | GtkTreeIter iter; |
@@ -78,11 +77,17 @@ add_name_entry_to_list_store (void *cls, | |||
78 | 77 | ||
79 | if (NULL == section) | 78 | if (NULL == section) |
80 | { | 79 | { |
81 | gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, | 80 | gtk_list_store_insert_with_values (ls, |
82 | SERVICE_MC_SERVICE_NAME, "", | 81 | &iter, |
83 | SERVICE_MC_ISUDP, FALSE, | 82 | G_MAXINT, |
84 | SERVICE_MC_VISIBLE_PORT, (guint) 80, | 83 | SERVICE_MC_SERVICE_NAME, |
85 | SERVICE_MC_DESTINATION_ADDRESS, "169.254.86.1:8080", | 84 | "", |
85 | SERVICE_MC_ISUDP, | ||
86 | FALSE, | ||
87 | SERVICE_MC_VISIBLE_PORT, | ||
88 | (guint) 80, | ||
89 | SERVICE_MC_DESTINATION_ADDRESS, | ||
90 | "169.254.86.1:8080", | ||
86 | -1); | 91 | -1); |
87 | return; | 92 | return; |
88 | } | 93 | } |
@@ -95,12 +100,12 @@ add_name_entry_to_list_store (void *cls, | |||
95 | udp = FALSE; | 100 | udp = FALSE; |
96 | do | 101 | do |
97 | { | 102 | { |
98 | if (GNUNET_OK == | 103 | if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (cfg, |
99 | GNUNET_CONFIGURATION_get_value_string (cfg, section, | 104 | section, |
100 | (udp) | 105 | (udp) |
101 | ? "UDP_REDIRECTS" | 106 | ? "UDP_REDIRECTS" |
102 | : "TCP_REDIRECTS", | 107 | : "TCP_REDIRECTS", |
103 | &cpy)) | 108 | &cpy)) |
104 | { | 109 | { |
105 | for (redirect = strtok (cpy, " "); NULL != redirect; | 110 | for (redirect = strtok (cpy, " "); NULL != redirect; |
106 | redirect = strtok (NULL, " ")) | 111 | redirect = strtok (NULL, " ")) |
@@ -108,7 +113,7 @@ add_name_entry_to_list_store (void *cls, | |||
108 | if (NULL == (destination = strstr (redirect, ":"))) | 113 | if (NULL == (destination = strstr (redirect, ":"))) |
109 | { | 114 | { |
110 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 115 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
111 | _("Option `%s' is not formatted correctly!\n"), | 116 | _ ("Option `%s' is not formatted correctly!\n"), |
112 | redirect); | 117 | redirect); |
113 | continue; | 118 | continue; |
114 | } | 119 | } |
@@ -116,25 +121,30 @@ add_name_entry_to_list_store (void *cls, | |||
116 | destination++; | 121 | destination++; |
117 | 122 | ||
118 | local_port = atoi (redirect); | 123 | local_port = atoi (redirect); |
119 | if (!((local_port > 0) && (local_port < 65536))) | 124 | if (! ((local_port > 0) && (local_port < 65536))) |
120 | { | 125 | { |
121 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 126 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
122 | _("`%s' is not a valid port number!\n"), | 127 | _ ("`%s' is not a valid port number!\n"), |
123 | redirect); | 128 | redirect); |
124 | continue; | 129 | continue; |
125 | } | 130 | } |
126 | gtk_list_store_insert_with_values (ls, &iter, 0, | 131 | gtk_list_store_insert_with_values (ls, |
127 | SERVICE_MC_SERVICE_NAME, sld, | 132 | &iter, |
128 | SERVICE_MC_ISUDP, udp, | 133 | 0, |
129 | SERVICE_MC_VISIBLE_PORT, local_port, | 134 | SERVICE_MC_SERVICE_NAME, |
130 | SERVICE_MC_DESTINATION_ADDRESS, destination, | 135 | sld, |
136 | SERVICE_MC_ISUDP, | ||
137 | udp, | ||
138 | SERVICE_MC_VISIBLE_PORT, | ||
139 | local_port, | ||
140 | SERVICE_MC_DESTINATION_ADDRESS, | ||
141 | destination, | ||
131 | -1); | 142 | -1); |
132 | } | 143 | } |
133 | GNUNET_free (cpy); | 144 | GNUNET_free (cpy); |
134 | } | 145 | } |
135 | udp = !udp; | 146 | udp = ! udp; |
136 | } | 147 | } while (udp); |
137 | while (udp); | ||
138 | GNUNET_free (sld); | 148 | GNUNET_free (sld); |
139 | } | 149 | } |
140 | 150 | ||
@@ -151,12 +161,13 @@ add_name_entry_to_list_store (void *cls, | |||
151 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem | 161 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem |
152 | */ | 162 | */ |
153 | int | 163 | int |
154 | load_hosted_service_configuration (const void *cls, | 164 | load_hosted_service_configuration ( |
155 | const char *section, | 165 | const void *cls, |
156 | const char *option, | 166 | const char *section, |
157 | const char *value, | 167 | const char *option, |
158 | GObject * widget, | 168 | const char *value, |
159 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 169 | GObject *widget, |
170 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
160 | { | 171 | { |
161 | GtkTreeView *tv; | 172 | GtkTreeView *tv; |
162 | GtkListStore *ls; | 173 | GtkListStore *ls; |
@@ -201,7 +212,6 @@ struct HostedServiceInfo | |||
201 | * String describing all UDP redirects. | 212 | * String describing all UDP redirects. |
202 | */ | 213 | */ |
203 | char *udpred; | 214 | char *udpred; |
204 | |||
205 | }; | 215 | }; |
206 | 216 | ||
207 | 217 | ||
@@ -213,15 +223,13 @@ struct HostedServiceInfo | |||
213 | * @param section name of a section in the configuration | 223 | * @param section name of a section in the configuration |
214 | */ | 224 | */ |
215 | static void | 225 | static void |
216 | collect_hosted_service_sections (void *cls, | 226 | collect_hosted_service_sections (void *cls, const char *section) |
217 | const char *section) | ||
218 | { | 227 | { |
219 | struct HostedServiceInfo **base = cls; | 228 | struct HostedServiceInfo **base = cls; |
220 | struct HostedServiceInfo *pos; | 229 | struct HostedServiceInfo *pos; |
221 | 230 | ||
222 | if ((8 > strlen (section)) || | 231 | if ((8 > strlen (section)) || |
223 | (0 != strcmp (".gnunet.", | 232 | (0 != strcmp (".gnunet.", section + ((strlen (section) - 8))))) |
224 | section + ((strlen (section) - 8))))) | ||
225 | return; | 233 | return; |
226 | pos = GNUNET_new (struct HostedServiceInfo); | 234 | pos = GNUNET_new (struct HostedServiceInfo); |
227 | pos->section = GNUNET_strdup (section); | 235 | pos->section = GNUNET_strdup (section); |
@@ -240,8 +248,7 @@ collect_hosted_service_sections (void *cls, | |||
240 | * @param section name of a section in the configuration | 248 | * @param section name of a section in the configuration |
241 | */ | 249 | */ |
242 | static void | 250 | static void |
243 | remove_hosted_service_sections (void *cls, | 251 | remove_hosted_service_sections (void *cls, const char *section) |
244 | const char *section) | ||
245 | { | 252 | { |
246 | if ((8 > strlen (section)) || | 253 | if ((8 > strlen (section)) || |
247 | (0 != strcmp (".gnunet.", section + ((strlen (section) - 8))))) | 254 | (0 != strcmp (".gnunet.", section + ((strlen (section) - 8))))) |
@@ -257,7 +264,7 @@ remove_hosted_service_sections (void *cls, | |||
257 | * @param tm model to use | 264 | * @param tm model to use |
258 | */ | 265 | */ |
259 | static void | 266 | static void |
260 | update_hosted_service_configuration (GtkTreeModel * tm) | 267 | update_hosted_service_configuration (GtkTreeModel *tm) |
261 | { | 268 | { |
262 | GtkTreeIter iter; | 269 | GtkTreeIter iter; |
263 | gchar *name; | 270 | gchar *name; |
@@ -275,11 +282,16 @@ update_hosted_service_configuration (GtkTreeModel * tm) | |||
275 | if (gtk_tree_model_get_iter_first (tm, &iter)) | 282 | if (gtk_tree_model_get_iter_first (tm, &iter)) |
276 | do | 283 | do |
277 | { | 284 | { |
278 | gtk_tree_model_get (tm, &iter, | 285 | gtk_tree_model_get (tm, |
279 | SERVICE_MC_SERVICE_NAME, &name, | 286 | &iter, |
280 | SERVICE_MC_ISUDP, &is_udp, | 287 | SERVICE_MC_SERVICE_NAME, |
281 | SERVICE_MC_VISIBLE_PORT, &srcport, | 288 | &name, |
282 | SERVICE_MC_DESTINATION_ADDRESS, &targetaddress, | 289 | SERVICE_MC_ISUDP, |
290 | &is_udp, | ||
291 | SERVICE_MC_VISIBLE_PORT, | ||
292 | &srcport, | ||
293 | SERVICE_MC_DESTINATION_ADDRESS, | ||
294 | &targetaddress, | ||
283 | -1); | 295 | -1); |
284 | if (0 != strlen (name)) | 296 | if (0 != strlen (name)) |
285 | { | 297 | { |
@@ -304,9 +316,7 @@ update_hosted_service_configuration (GtkTreeModel * tm) | |||
304 | "%u:%s %s", | 316 | "%u:%s %s", |
305 | srcport, | 317 | srcport, |
306 | targetaddress, | 318 | targetaddress, |
307 | (is_udp) | 319 | (is_udp) ? pos->udpred : pos->tcpred); |
308 | ? pos->udpred | ||
309 | : pos->tcpred); | ||
310 | if (is_udp) | 320 | if (is_udp) |
311 | { | 321 | { |
312 | GNUNET_free (pos->udpred); | 322 | GNUNET_free (pos->udpred); |
@@ -320,8 +330,7 @@ update_hosted_service_configuration (GtkTreeModel * tm) | |||
320 | } | 330 | } |
321 | g_free (name); | 331 | g_free (name); |
322 | g_free (targetaddress); | 332 | g_free (targetaddress); |
323 | } | 333 | } while (TRUE == gtk_tree_model_iter_next (tm, &iter)); |
324 | while (TRUE == gtk_tree_model_iter_next (tm, &iter)); | ||
325 | GNUNET_CONFIGURATION_iterate_sections (cfg, | 334 | GNUNET_CONFIGURATION_iterate_sections (cfg, |
326 | &remove_hosted_service_sections, | 335 | &remove_hosted_service_sections, |
327 | NULL); | 336 | NULL); |
@@ -330,11 +339,13 @@ update_hosted_service_configuration (GtkTreeModel * tm) | |||
330 | pos = head; | 339 | pos = head; |
331 | head = pos->next; | 340 | head = pos->next; |
332 | if (strlen (pos->udpred) > 0) | 341 | if (strlen (pos->udpred) > 0) |
333 | GNUNET_CONFIGURATION_set_value_string (cfg, pos->section, | 342 | GNUNET_CONFIGURATION_set_value_string (cfg, |
343 | pos->section, | ||
334 | "UDP_REDIRECTS", | 344 | "UDP_REDIRECTS", |
335 | pos->udpred); | 345 | pos->udpred); |
336 | if (strlen (pos->tcpred) > 0) | 346 | if (strlen (pos->tcpred) > 0) |
337 | GNUNET_CONFIGURATION_set_value_string (cfg, pos->section, | 347 | GNUNET_CONFIGURATION_set_value_string (cfg, |
348 | pos->section, | ||
338 | "TCP_REDIRECTS", | 349 | "TCP_REDIRECTS", |
339 | pos->tcpred); | 350 | pos->tcpred); |
340 | GNUNET_free (pos->tcpred); | 351 | GNUNET_free (pos->tcpred); |
@@ -359,9 +370,9 @@ update_hosted_service_configuration (GtkTreeModel * tm) | |||
359 | * @param user_data NULL | 370 | * @param user_data NULL |
360 | */ | 371 | */ |
361 | static void | 372 | static void |
362 | save_hosted_service_name (GtkCellRendererText * renderer, | 373 | save_hosted_service_name (GtkCellRendererText *renderer, |
363 | gchar * path, | 374 | gchar *path, |
364 | gchar * new_text, | 375 | gchar *new_text, |
365 | gpointer user_data) | 376 | gpointer user_data) |
366 | { | 377 | { |
367 | GtkTreeModel *tm; | 378 | GtkTreeModel *tm; |
@@ -369,7 +380,8 @@ save_hosted_service_name (GtkCellRendererText * renderer, | |||
369 | GtkTreeIter iter; | 380 | GtkTreeIter iter; |
370 | gchar *old; | 381 | gchar *old; |
371 | 382 | ||
372 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("GNUNET_setup_hosted_service_liststore")); | 383 | tm = GTK_TREE_MODEL ( |
384 | GNUNET_SETUP_get_object ("GNUNET_setup_hosted_service_liststore")); | ||
373 | if (NULL == tm) | 385 | if (NULL == tm) |
374 | { | 386 | { |
375 | GNUNET_break (0); | 387 | GNUNET_break (0); |
@@ -397,8 +409,7 @@ save_hosted_service_name (GtkCellRendererText * renderer, | |||
397 | return; | 409 | return; |
398 | } | 410 | } |
399 | /* update model */ | 411 | /* update model */ |
400 | gtk_list_store_set (ls, &iter, | 412 | gtk_list_store_set (ls, &iter, SERVICE_MC_SERVICE_NAME, new_text, -1); |
401 | SERVICE_MC_SERVICE_NAME, new_text, -1); | ||
402 | /* update configuration */ | 413 | /* update configuration */ |
403 | update_hosted_service_configuration (tm); | 414 | update_hosted_service_configuration (tm); |
404 | if ((0 == strlen (old)) && (0 != strlen (new_text))) | 415 | if ((0 == strlen (old)) && (0 != strlen (new_text))) |
@@ -421,11 +432,12 @@ save_hosted_service_name (GtkCellRendererText * renderer, | |||
421 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem | 432 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem |
422 | */ | 433 | */ |
423 | int | 434 | int |
424 | hosted_service_name_install_edited_handler (const void *cls, | 435 | hosted_service_name_install_edited_handler ( |
425 | const char *section, | 436 | const void *cls, |
426 | const char *option, | 437 | const char *section, |
427 | GObject * widget, | 438 | const char *option, |
428 | struct GNUNET_CONFIGURATION_Handle *cfg) | 439 | GObject *widget, |
440 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
429 | { | 441 | { |
430 | static int once; | 442 | static int once; |
431 | GtkCellRendererText *rt; | 443 | GtkCellRendererText *rt; |
@@ -435,9 +447,7 @@ hosted_service_name_install_edited_handler (const void *cls, | |||
435 | return GNUNET_SYSERR; | 447 | return GNUNET_SYSERR; |
436 | if (0 != once++) | 448 | if (0 != once++) |
437 | return GNUNET_OK; | 449 | return GNUNET_OK; |
438 | g_signal_connect (rt, "edited", | 450 | g_signal_connect (rt, "edited", G_CALLBACK (&save_hosted_service_name), NULL); |
439 | G_CALLBACK (&save_hosted_service_name), | ||
440 | NULL); | ||
441 | return GNUNET_OK; | 451 | return GNUNET_OK; |
442 | } | 452 | } |
443 | 453 | ||
@@ -455,8 +465,8 @@ hosted_service_name_install_edited_handler (const void *cls, | |||
455 | * @param user_data NULL | 465 | * @param user_data NULL |
456 | */ | 466 | */ |
457 | static void | 467 | static void |
458 | save_hosted_service_is_udp (GtkCellRendererToggle * renderer, | 468 | save_hosted_service_is_udp (GtkCellRendererToggle *renderer, |
459 | gchar * path, | 469 | gchar *path, |
460 | gpointer user_data) | 470 | gpointer user_data) |
461 | { | 471 | { |
462 | GtkTreeModel *tm; | 472 | GtkTreeModel *tm; |
@@ -464,7 +474,8 @@ save_hosted_service_is_udp (GtkCellRendererToggle * renderer, | |||
464 | GtkTreeIter iter; | 474 | GtkTreeIter iter; |
465 | gboolean is_udp; | 475 | gboolean is_udp; |
466 | 476 | ||
467 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("GNUNET_setup_hosted_service_liststore")); | 477 | tm = GTK_TREE_MODEL ( |
478 | GNUNET_SETUP_get_object ("GNUNET_setup_hosted_service_liststore")); | ||
468 | if (NULL == tm) | 479 | if (NULL == tm) |
469 | { | 480 | { |
470 | GNUNET_break (0); | 481 | GNUNET_break (0); |
@@ -482,12 +493,8 @@ save_hosted_service_is_udp (GtkCellRendererToggle * renderer, | |||
482 | return; | 493 | return; |
483 | } | 494 | } |
484 | /* update model */ | 495 | /* update model */ |
485 | gtk_tree_model_get (tm, &iter, | 496 | gtk_tree_model_get (tm, &iter, SERVICE_MC_ISUDP, &is_udp, -1); |
486 | SERVICE_MC_ISUDP, &is_udp, | 497 | gtk_list_store_set (ls, &iter, SERVICE_MC_ISUDP, ! is_udp, -1); |
487 | -1); | ||
488 | gtk_list_store_set (ls, &iter, | ||
489 | SERVICE_MC_ISUDP, ! is_udp, | ||
490 | -1); | ||
491 | /* update configuration */ | 498 | /* update configuration */ |
492 | update_hosted_service_configuration (tm); | 499 | update_hosted_service_configuration (tm); |
493 | } | 500 | } |
@@ -504,11 +511,12 @@ save_hosted_service_is_udp (GtkCellRendererToggle * renderer, | |||
504 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem | 511 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem |
505 | */ | 512 | */ |
506 | int | 513 | int |
507 | hosted_service_is_udp_install_toggled_handler (const void *cls, | 514 | hosted_service_is_udp_install_toggled_handler ( |
508 | const char *section, | 515 | const void *cls, |
509 | const char *option, | 516 | const char *section, |
510 | GObject * widget, | 517 | const char *option, |
511 | struct GNUNET_CONFIGURATION_Handle *cfg) | 518 | GObject *widget, |
519 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
512 | { | 520 | { |
513 | static int once; | 521 | static int once; |
514 | GtkCellRendererToggle *rt; | 522 | GtkCellRendererToggle *rt; |
@@ -518,7 +526,9 @@ hosted_service_is_udp_install_toggled_handler (const void *cls, | |||
518 | return GNUNET_SYSERR; | 526 | return GNUNET_SYSERR; |
519 | if (0 != once++) | 527 | if (0 != once++) |
520 | return GNUNET_OK; | 528 | return GNUNET_OK; |
521 | g_signal_connect (rt, "toggled", G_CALLBACK (&save_hosted_service_is_udp), | 529 | g_signal_connect (rt, |
530 | "toggled", | ||
531 | G_CALLBACK (&save_hosted_service_is_udp), | ||
522 | NULL); | 532 | NULL); |
523 | return GNUNET_OK; | 533 | return GNUNET_OK; |
524 | } | 534 | } |
@@ -538,9 +548,9 @@ hosted_service_is_udp_install_toggled_handler (const void *cls, | |||
538 | * @param user_data NULL | 548 | * @param user_data NULL |
539 | */ | 549 | */ |
540 | static void | 550 | static void |
541 | save_hosted_service_visible_port (GtkCellRendererText * renderer, | 551 | save_hosted_service_visible_port (GtkCellRendererText *renderer, |
542 | gchar * path, | 552 | gchar *path, |
543 | gchar * new_text, | 553 | gchar *new_text, |
544 | gpointer user_data) | 554 | gpointer user_data) |
545 | { | 555 | { |
546 | GtkTreeModel *tm; | 556 | GtkTreeModel *tm; |
@@ -548,18 +558,16 @@ save_hosted_service_visible_port (GtkCellRendererText * renderer, | |||
548 | GtkTreeIter iter; | 558 | GtkTreeIter iter; |
549 | int port; | 559 | int port; |
550 | 560 | ||
551 | if ( (1 != sscanf (new_text, | 561 | if ((1 != sscanf (new_text, "%d", &port)) || (port < 1) || |
552 | "%d", | 562 | (port > UINT16_MAX)) |
553 | &port) ) || | ||
554 | (port < 1) || | ||
555 | (port > UINT16_MAX) ) | ||
556 | { | 563 | { |
557 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 564 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
558 | _("Illegal value `%s' for port\n"), | 565 | _ ("Illegal value `%s' for port\n"), |
559 | new_text); | 566 | new_text); |
560 | return; | 567 | return; |
561 | } | 568 | } |
562 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("GNUNET_setup_hosted_service_liststore")); | 569 | tm = GTK_TREE_MODEL ( |
570 | GNUNET_SETUP_get_object ("GNUNET_setup_hosted_service_liststore")); | ||
563 | if (NULL == tm) | 571 | if (NULL == tm) |
564 | { | 572 | { |
565 | GNUNET_break (0); | 573 | GNUNET_break (0); |
@@ -577,9 +585,7 @@ save_hosted_service_visible_port (GtkCellRendererText * renderer, | |||
577 | return; | 585 | return; |
578 | } | 586 | } |
579 | /* update model */ | 587 | /* update model */ |
580 | gtk_list_store_set (ls, &iter, | 588 | gtk_list_store_set (ls, &iter, SERVICE_MC_VISIBLE_PORT, port, -1); |
581 | SERVICE_MC_VISIBLE_PORT, port, | ||
582 | -1); | ||
583 | /* update configuration */ | 589 | /* update configuration */ |
584 | update_hosted_service_configuration (tm); | 590 | update_hosted_service_configuration (tm); |
585 | } | 591 | } |
@@ -596,11 +602,12 @@ save_hosted_service_visible_port (GtkCellRendererText * renderer, | |||
596 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem | 602 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem |
597 | */ | 603 | */ |
598 | int | 604 | int |
599 | hosted_service_visible_port_install_edited_handler (const void *cls, | 605 | hosted_service_visible_port_install_edited_handler ( |
600 | const char *section, | 606 | const void *cls, |
601 | const char *option, | 607 | const char *section, |
602 | GObject * widget, | 608 | const char *option, |
603 | struct GNUNET_CONFIGURATION_Handle *cfg) | 609 | GObject *widget, |
610 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
604 | { | 611 | { |
605 | static int once; | 612 | static int once; |
606 | GtkCellRendererText *rt; | 613 | GtkCellRendererText *rt; |
@@ -610,7 +617,9 @@ hosted_service_visible_port_install_edited_handler (const void *cls, | |||
610 | return GNUNET_SYSERR; | 617 | return GNUNET_SYSERR; |
611 | if (0 != once++) | 618 | if (0 != once++) |
612 | return GNUNET_OK; | 619 | return GNUNET_OK; |
613 | g_signal_connect (rt, "edited", G_CALLBACK (&save_hosted_service_visible_port), | 620 | g_signal_connect (rt, |
621 | "edited", | ||
622 | G_CALLBACK (&save_hosted_service_visible_port), | ||
614 | NULL); | 623 | NULL); |
615 | return GNUNET_OK; | 624 | return GNUNET_OK; |
616 | } | 625 | } |
@@ -630,8 +639,9 @@ hosted_service_visible_port_install_edited_handler (const void *cls, | |||
630 | * @param user_data NULL | 639 | * @param user_data NULL |
631 | */ | 640 | */ |
632 | static void | 641 | static void |
633 | save_hosted_service_destination (GtkCellRendererText * renderer, | 642 | save_hosted_service_destination (GtkCellRendererText *renderer, |
634 | gchar * path, gchar * new_text, | 643 | gchar *path, |
644 | gchar *new_text, | ||
635 | gpointer user_data) | 645 | gpointer user_data) |
636 | { | 646 | { |
637 | GtkTreeModel *tm; | 647 | GtkTreeModel *tm; |
@@ -640,27 +650,26 @@ save_hosted_service_destination (GtkCellRendererText * renderer, | |||
640 | struct sockaddr_in v4; | 650 | struct sockaddr_in v4; |
641 | struct sockaddr_in6 v6; | 651 | struct sockaddr_in6 v6; |
642 | 652 | ||
643 | if ( ('[' != new_text[0]) && | 653 | if (('[' != new_text[0]) && |
644 | (GNUNET_OK != | 654 | (GNUNET_OK != |
645 | GNUNET_STRINGS_to_address_ipv4 (new_text, strlen (new_text), | 655 | GNUNET_STRINGS_to_address_ipv4 (new_text, strlen (new_text), &v4))) |
646 | &v4)) ) | ||
647 | { | 656 | { |
648 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 657 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
649 | _("Illegal IPv4 destination address `%s'\n"), | 658 | _ ("Illegal IPv4 destination address `%s'\n"), |
650 | new_text); | 659 | new_text); |
651 | return; | 660 | return; |
652 | } | 661 | } |
653 | if ( ('[' == new_text[0]) && | 662 | if (('[' == new_text[0]) && |
654 | (GNUNET_OK != | 663 | (GNUNET_OK != |
655 | GNUNET_STRINGS_to_address_ipv6 (new_text, strlen (new_text), | 664 | GNUNET_STRINGS_to_address_ipv6 (new_text, strlen (new_text), &v6))) |
656 | &v6)) ) | ||
657 | { | 665 | { |
658 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 666 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
659 | _("Illegal IPv6 destination address `%s'\n"), | 667 | _ ("Illegal IPv6 destination address `%s'\n"), |
660 | new_text); | 668 | new_text); |
661 | return; | 669 | return; |
662 | } | 670 | } |
663 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("GNUNET_setup_hosted_service_liststore")); | 671 | tm = GTK_TREE_MODEL ( |
672 | GNUNET_SETUP_get_object ("GNUNET_setup_hosted_service_liststore")); | ||
664 | if (NULL == tm) | 673 | if (NULL == tm) |
665 | { | 674 | { |
666 | GNUNET_break (0); | 675 | GNUNET_break (0); |
@@ -678,9 +687,7 @@ save_hosted_service_destination (GtkCellRendererText * renderer, | |||
678 | return; | 687 | return; |
679 | } | 688 | } |
680 | /* update model */ | 689 | /* update model */ |
681 | gtk_list_store_set (ls, &iter, | 690 | gtk_list_store_set (ls, &iter, SERVICE_MC_DESTINATION_ADDRESS, new_text, -1); |
682 | SERVICE_MC_DESTINATION_ADDRESS, new_text, | ||
683 | -1); | ||
684 | /* update configuration */ | 691 | /* update configuration */ |
685 | update_hosted_service_configuration (tm); | 692 | update_hosted_service_configuration (tm); |
686 | } | 693 | } |
@@ -697,11 +704,12 @@ save_hosted_service_destination (GtkCellRendererText * renderer, | |||
697 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem | 704 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem |
698 | */ | 705 | */ |
699 | int | 706 | int |
700 | hosted_service_destination_install_edited_handler (const void *cls, | 707 | hosted_service_destination_install_edited_handler ( |
701 | const char *section, | 708 | const void *cls, |
702 | const char *option, | 709 | const char *section, |
703 | GObject * widget, | 710 | const char *option, |
704 | struct GNUNET_CONFIGURATION_Handle *cfg) | 711 | GObject *widget, |
712 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
705 | { | 713 | { |
706 | static int once; | 714 | static int once; |
707 | GtkCellRendererText *rt; | 715 | GtkCellRendererText *rt; |
@@ -711,8 +719,10 @@ hosted_service_destination_install_edited_handler (const void *cls, | |||
711 | return GNUNET_SYSERR; | 719 | return GNUNET_SYSERR; |
712 | if (0 != once++) | 720 | if (0 != once++) |
713 | return GNUNET_OK; | 721 | return GNUNET_OK; |
714 | g_signal_connect (rt, "edited", | 722 | g_signal_connect (rt, |
715 | G_CALLBACK (&save_hosted_service_destination), NULL); | 723 | "edited", |
724 | G_CALLBACK (&save_hosted_service_destination), | ||
725 | NULL); | ||
716 | return GNUNET_OK; | 726 | return GNUNET_OK; |
717 | } | 727 | } |
718 | 728 | ||
diff --git a/src/setup/gnunet-setup-exit-services.h b/src/setup/gnunet-setup-exit-services.h index 063e05da..b98ab37e 100644 --- a/src/setup/gnunet-setup-exit-services.h +++ b/src/setup/gnunet-setup-exit-services.h | |||
@@ -31,8 +31,6 @@ | |||
31 | #include <gdk/gdkkeysyms.h> | 31 | #include <gdk/gdkkeysyms.h> |
32 | 32 | ||
33 | 33 | ||
34 | |||
35 | |||
36 | /** | 34 | /** |
37 | * Initialize the GtkListModel with the hosted service specification. | 35 | * Initialize the GtkListModel with the hosted service specification. |
38 | * | 36 | * |
@@ -45,12 +43,13 @@ | |||
45 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem | 43 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem |
46 | */ | 44 | */ |
47 | int | 45 | int |
48 | load_hosted_service_configuration (const void *cls, | 46 | load_hosted_service_configuration ( |
49 | const char *section, | 47 | const void *cls, |
50 | const char *option, | 48 | const char *section, |
51 | const char *value, | 49 | const char *option, |
52 | GObject * widget, | 50 | const char *value, |
53 | const struct GNUNET_CONFIGURATION_Handle *cfg); | 51 | GObject *widget, |
52 | const struct GNUNET_CONFIGURATION_Handle *cfg); | ||
54 | 53 | ||
55 | 54 | ||
56 | /** | 55 | /** |
@@ -64,11 +63,12 @@ load_hosted_service_configuration (const void *cls, | |||
64 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem | 63 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem |
65 | */ | 64 | */ |
66 | int | 65 | int |
67 | hosted_service_name_install_edited_handler (const void *cls, | 66 | hosted_service_name_install_edited_handler ( |
68 | const char *section, | 67 | const void *cls, |
69 | const char *option, | 68 | const char *section, |
70 | GObject * widget, | 69 | const char *option, |
71 | struct GNUNET_CONFIGURATION_Handle *cfg); | 70 | GObject *widget, |
71 | struct GNUNET_CONFIGURATION_Handle *cfg); | ||
72 | 72 | ||
73 | 73 | ||
74 | /** | 74 | /** |
@@ -82,11 +82,12 @@ hosted_service_name_install_edited_handler (const void *cls, | |||
82 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem | 82 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem |
83 | */ | 83 | */ |
84 | int | 84 | int |
85 | hosted_service_is_udp_install_toggled_handler (const void *cls, | 85 | hosted_service_is_udp_install_toggled_handler ( |
86 | const char *section, | 86 | const void *cls, |
87 | const char *option, | 87 | const char *section, |
88 | GObject * widget, | 88 | const char *option, |
89 | struct GNUNET_CONFIGURATION_Handle *cfg); | 89 | GObject *widget, |
90 | struct GNUNET_CONFIGURATION_Handle *cfg); | ||
90 | 91 | ||
91 | 92 | ||
92 | /** | 93 | /** |
@@ -100,12 +101,12 @@ hosted_service_is_udp_install_toggled_handler (const void *cls, | |||
100 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem | 101 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem |
101 | */ | 102 | */ |
102 | int | 103 | int |
103 | hosted_service_visible_port_install_edited_handler (const void *cls, | 104 | hosted_service_visible_port_install_edited_handler ( |
104 | const char *section, | 105 | const void *cls, |
105 | const char *option, | 106 | const char *section, |
106 | GObject * widget, | 107 | const char *option, |
107 | struct GNUNET_CONFIGURATION_Handle *cfg); | 108 | GObject *widget, |
108 | 109 | struct GNUNET_CONFIGURATION_Handle *cfg); | |
109 | 110 | ||
110 | 111 | ||
111 | /** | 112 | /** |
@@ -119,11 +120,12 @@ hosted_service_visible_port_install_edited_handler (const void *cls, | |||
119 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem | 120 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if there was a problem |
120 | */ | 121 | */ |
121 | int | 122 | int |
122 | hosted_service_destination_install_edited_handler (const void *cls, | 123 | hosted_service_destination_install_edited_handler ( |
123 | const char *section, | 124 | const void *cls, |
124 | const char *option, | 125 | const char *section, |
125 | GObject * widget, | 126 | const char *option, |
126 | struct GNUNET_CONFIGURATION_Handle *cfg); | 127 | GObject *widget, |
128 | struct GNUNET_CONFIGURATION_Handle *cfg); | ||
127 | 129 | ||
128 | 130 | ||
129 | #endif | 131 | #endif |
diff --git a/src/setup/gnunet-setup-hostlist-editing.c b/src/setup/gnunet-setup-hostlist-editing.c index 9ca8eb11..f2a90742 100644 --- a/src/setup/gnunet-setup-hostlist-editing.c +++ b/src/setup/gnunet-setup-hostlist-editing.c | |||
@@ -36,18 +36,19 @@ | |||
36 | * @param user_data not used | 36 | * @param user_data not used |
37 | */ | 37 | */ |
38 | void | 38 | void |
39 | GNUNET_setup_hostlist_url_cellrenderertext_edited_cb (GtkCellRendererText *renderer, | 39 | GNUNET_setup_hostlist_url_cellrenderertext_edited_cb ( |
40 | gchar * path, | 40 | GtkCellRendererText *renderer, |
41 | gchar * new_text, | 41 | gchar *path, |
42 | gpointer user_data) | 42 | gchar *new_text, |
43 | gpointer user_data) | ||
43 | { | 44 | { |
44 | GtkListStore *ls; | 45 | GtkListStore *ls; |
45 | GtkTreeIter old; | 46 | GtkTreeIter old; |
46 | GtkTreeIter iter; | 47 | GtkTreeIter iter; |
47 | gchar *oldtext; | 48 | gchar *oldtext; |
48 | 49 | ||
49 | ls = GTK_LIST_STORE (GNUNET_SETUP_get_object | 50 | ls = GTK_LIST_STORE ( |
50 | ("GNUNET_setup_hostlist_url_liststore")); | 51 | GNUNET_SETUP_get_object ("GNUNET_setup_hostlist_url_liststore")); |
51 | if (NULL == ls) | 52 | if (NULL == ls) |
52 | { | 53 | { |
53 | GNUNET_break (0); | 54 | GNUNET_break (0); |
@@ -58,22 +59,30 @@ GNUNET_setup_hostlist_url_cellrenderertext_edited_cb (GtkCellRendererText *rende | |||
58 | GNUNET_break (0); | 59 | GNUNET_break (0); |
59 | return; | 60 | return; |
60 | } | 61 | } |
61 | gtk_tree_model_get (GTK_TREE_MODEL (ls), &old, | 62 | gtk_tree_model_get (GTK_TREE_MODEL (ls), |
62 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, &oldtext, | 63 | &old, |
64 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, | ||
65 | &oldtext, | ||
63 | -1); | 66 | -1); |
64 | if (0 == strlen (oldtext)) | 67 | if (0 == strlen (oldtext)) |
65 | { | 68 | { |
66 | gtk_list_store_insert_before (ls, &iter, &old); | 69 | gtk_list_store_insert_before (ls, &iter, &old); |
67 | gtk_list_store_set (ls, &iter, | 70 | gtk_list_store_set (ls, |
68 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, new_text, | 71 | &iter, |
69 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE, FALSE, | 72 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, |
73 | new_text, | ||
74 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE, | ||
75 | FALSE, | ||
70 | -1); | 76 | -1); |
71 | } | 77 | } |
72 | else | 78 | else |
73 | { | 79 | { |
74 | gtk_list_store_set (ls, &old, | 80 | gtk_list_store_set (ls, |
75 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, new_text, | 81 | &old, |
76 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE, FALSE, | 82 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, |
83 | new_text, | ||
84 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE, | ||
85 | FALSE, | ||
77 | -1); | 86 | -1); |
78 | } | 87 | } |
79 | g_free (oldtext); | 88 | g_free (oldtext); |
diff --git a/src/setup/gnunet-setup-hostlist-server.c b/src/setup/gnunet-setup-hostlist-server.c index 0a9523e1..b812676d 100644 --- a/src/setup/gnunet-setup-hostlist-server.c +++ b/src/setup/gnunet-setup-hostlist-server.c | |||
@@ -41,8 +41,7 @@ | |||
41 | * @param result GNUNET_YES if the hostlist daemon has an integrated hostlist | 41 | * @param result GNUNET_YES if the hostlist daemon has an integrated hostlist |
42 | * server, GNUNET_NO otherwise | 42 | * server, GNUNET_NO otherwise |
43 | */ | 43 | */ |
44 | typedef void (*TestHostlistDaemonCallback) (void *cls, | 44 | typedef void (*TestHostlistDaemonCallback) (void *cls, int result); |
45 | int result); | ||
46 | 45 | ||
47 | 46 | ||
48 | /** | 47 | /** |
@@ -69,15 +68,13 @@ struct CommandContext | |||
69 | * GNUNET_YES if the target argument was found, GNUNET_NO otherwise. | 68 | * GNUNET_YES if the target argument was found, GNUNET_NO otherwise. |
70 | */ | 69 | */ |
71 | int found; | 70 | int found; |
72 | |||
73 | }; | 71 | }; |
74 | 72 | ||
75 | 73 | ||
76 | static void | 74 | static void |
77 | set_checkbutton_status (void *cls, | 75 | set_checkbutton_status (void *cls, int result) |
78 | int result) | ||
79 | { | 76 | { |
80 | GtkWidget * widget = cls; | 77 | GtkWidget *widget = cls; |
81 | GtkToggleButton *button; | 78 | GtkToggleButton *button; |
82 | 79 | ||
83 | if (GNUNET_YES != result) | 80 | if (GNUNET_YES != result) |
@@ -97,10 +94,9 @@ set_checkbutton_status (void *cls, | |||
97 | 94 | ||
98 | 95 | ||
99 | static void | 96 | static void |
100 | set_spinbutton_status (void *cls, | 97 | set_spinbutton_status (void *cls, int result) |
101 | int result) | ||
102 | { | 98 | { |
103 | GtkWidget * widget = cls; | 99 | GtkWidget *widget = cls; |
104 | 100 | ||
105 | if (GNUNET_YES != result) | 101 | if (GNUNET_YES != result) |
106 | gtk_widget_set_sensitive (widget, FALSE); | 102 | gtk_widget_set_sensitive (widget, FALSE); |
@@ -152,8 +148,7 @@ process_hostlist_daemon_output (void *cls, const char *line) | |||
152 | * @param cls closure for the callback | 148 | * @param cls closure for the callback |
153 | */ | 149 | */ |
154 | static void | 150 | static void |
155 | test_hostlist_daemon (TestHostlistDaemonCallback callback, | 151 | test_hostlist_daemon (TestHostlistDaemonCallback callback, void *cls) |
156 | void *cls) | ||
157 | { | 152 | { |
158 | struct CommandContext *ctx; | 153 | struct CommandContext *ctx; |
159 | char *binary; | 154 | char *binary; |
@@ -174,15 +169,15 @@ test_hostlist_daemon (TestHostlistDaemonCallback callback, | |||
174 | if (NULL == ctx->cmd) | 169 | if (NULL == ctx->cmd) |
175 | { | 170 | { |
176 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 171 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
177 | _("Could not determine whether the hostlist daemon has" | 172 | _ ("Could not determine whether the hostlist daemon has" |
178 | " an integrated hostlist server!\n")); | 173 | " an integrated hostlist server!\n")); |
179 | GNUNET_free (ctx); | 174 | GNUNET_free (ctx); |
180 | } | 175 | } |
181 | } | 176 | } |
182 | 177 | ||
183 | 178 | ||
184 | void | 179 | void |
185 | GNUNET_setup_hostlist_offer_hostlist_checkbutton_realize_cb (GtkWidget * widget, | 180 | GNUNET_setup_hostlist_offer_hostlist_checkbutton_realize_cb (GtkWidget *widget, |
186 | gpointer user_data) | 181 | gpointer user_data) |
187 | { | 182 | { |
188 | test_hostlist_daemon (&set_checkbutton_status, widget); | 183 | test_hostlist_daemon (&set_checkbutton_status, widget); |
@@ -190,7 +185,7 @@ GNUNET_setup_hostlist_offer_hostlist_checkbutton_realize_cb (GtkWidget * widget, | |||
190 | 185 | ||
191 | 186 | ||
192 | void | 187 | void |
193 | GNUNET_setup_hostlist_advertise_checkbutton_realize_cb (GtkWidget * widget, | 188 | GNUNET_setup_hostlist_advertise_checkbutton_realize_cb (GtkWidget *widget, |
194 | gpointer user_data) | 189 | gpointer user_data) |
195 | { | 190 | { |
196 | test_hostlist_daemon (&set_checkbutton_status, widget); | 191 | test_hostlist_daemon (&set_checkbutton_status, widget); |
@@ -198,7 +193,7 @@ GNUNET_setup_hostlist_advertise_checkbutton_realize_cb (GtkWidget * widget, | |||
198 | 193 | ||
199 | 194 | ||
200 | void | 195 | void |
201 | GNUNET_setup_hostlist_server_port_spin_button_realize_cb (GtkWidget * widget, | 196 | GNUNET_setup_hostlist_server_port_spin_button_realize_cb (GtkWidget *widget, |
202 | gpointer user_data) | 197 | gpointer user_data) |
203 | { | 198 | { |
204 | test_hostlist_daemon (&set_spinbutton_status, widget); | 199 | test_hostlist_daemon (&set_spinbutton_status, widget); |
diff --git a/src/setup/gnunet-setup-namestore-config.c b/src/setup/gnunet-setup-namestore-config.c index e3c277bb..f539127b 100644 --- a/src/setup/gnunet-setup-namestore-config.c +++ b/src/setup/gnunet-setup-namestore-config.c | |||
@@ -69,7 +69,7 @@ GNUNET_setup_namestore_postgres_invalidate_cb () | |||
69 | 69 | ||
70 | 70 | ||
71 | void | 71 | void |
72 | GNUNET_setup_namestore_postgres_tab_test_button_clicked_cb (GtkWidget * widget, | 72 | GNUNET_setup_namestore_postgres_tab_test_button_clicked_cb (GtkWidget *widget, |
73 | gpointer user_data) | 73 | gpointer user_data) |
74 | { | 74 | { |
75 | if (GNUNET_OK == test_config ("libgnunet_plugin_namestore_postgres")) | 75 | if (GNUNET_OK == test_config ("libgnunet_plugin_namestore_postgres")) |
diff --git a/src/setup/gnunet-setup-namestore-plugins.c b/src/setup/gnunet-setup-namestore-plugins.c index e9c5d31a..fdb7832e 100644 --- a/src/setup/gnunet-setup-namestore-plugins.c +++ b/src/setup/gnunet-setup-namestore-plugins.c | |||
@@ -33,7 +33,7 @@ | |||
33 | * @param name name of the plugin to check | 33 | * @param name name of the plugin to check |
34 | */ | 34 | */ |
35 | static void | 35 | static void |
36 | test_plugin (GtkWidget * widget, const char *name) | 36 | test_plugin (GtkWidget *widget, const char *name) |
37 | { | 37 | { |
38 | if (GNUNET_YES == GNUNET_PLUGIN_test (name)) | 38 | if (GNUNET_YES == GNUNET_PLUGIN_test (name)) |
39 | { | 39 | { |
@@ -48,20 +48,19 @@ test_plugin (GtkWidget * widget, const char *name) | |||
48 | 48 | ||
49 | 49 | ||
50 | void | 50 | void |
51 | GNUNET_setup_namestore_sqlite_radiobutton_realize_cb (GtkWidget * widget, | 51 | GNUNET_setup_namestore_sqlite_radiobutton_realize_cb (GtkWidget *widget, |
52 | gpointer user_data) | 52 | gpointer user_data) |
53 | { | 53 | { |
54 | test_plugin (widget, "libgnunet_plugin_namestore_sqlite"); | 54 | test_plugin (widget, "libgnunet_plugin_namestore_sqlite"); |
55 | } | 55 | } |
56 | 56 | ||
57 | 57 | ||
58 | void | 58 | void |
59 | GNUNET_setup_namestore_postgres_radiobutton_realize_cb (GtkWidget * widget, | 59 | GNUNET_setup_namestore_postgres_radiobutton_realize_cb (GtkWidget *widget, |
60 | gpointer user_data) | 60 | gpointer user_data) |
61 | { | 61 | { |
62 | test_plugin (widget, "libgnunet_plugin_namestore_postgres"); | 62 | test_plugin (widget, "libgnunet_plugin_namestore_postgres"); |
63 | } | 63 | } |
64 | 64 | ||
65 | 65 | ||
66 | |||
67 | /* end of gnunet-setup-namestore-plugins.c */ | 66 | /* end of gnunet-setup-namestore-plugins.c */ |
diff --git a/src/setup/gnunet-setup-options.c b/src/setup/gnunet-setup-options.c index b0e64142..bd8944b4 100644 --- a/src/setup/gnunet-setup-options.c +++ b/src/setup/gnunet-setup-options.c | |||
@@ -63,7 +63,6 @@ struct PortSpecification | |||
63 | * Name of the transport/daemon which owns this port. | 63 | * Name of the transport/daemon which owns this port. |
64 | */ | 64 | */ |
65 | const char *owner_name; | 65 | const char *owner_name; |
66 | |||
67 | }; | 66 | }; |
68 | 67 | ||
69 | 68 | ||
@@ -80,10 +79,10 @@ struct PortSpecification | |||
80 | */ | 79 | */ |
81 | static int | 80 | static int |
82 | load_yes_no (const void *cls, | 81 | load_yes_no (const void *cls, |
83 | const char *section, | 82 | const char *section, |
84 | const char *option, | 83 | const char *option, |
85 | const char *value, | 84 | const char *value, |
86 | GObject * widget, | 85 | GObject *widget, |
87 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 86 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
88 | { | 87 | { |
89 | GtkToggleButton *button; | 88 | GtkToggleButton *button; |
@@ -92,8 +91,8 @@ load_yes_no (const void *cls, | |||
92 | if (NULL == button) | 91 | if (NULL == button) |
93 | return GNUNET_SYSERR; | 92 | return GNUNET_SYSERR; |
94 | gtk_toggle_button_set_active (button, | 93 | gtk_toggle_button_set_active (button, |
95 | (0 == | 94 | (0 == strcasecmp (value, "YES")) ? TRUE |
96 | strcasecmp (value, "YES")) ? TRUE : FALSE); | 95 | : FALSE); |
97 | return GNUNET_OK; | 96 | return GNUNET_OK; |
98 | } | 97 | } |
99 | 98 | ||
@@ -110,10 +109,10 @@ load_yes_no (const void *cls, | |||
110 | */ | 109 | */ |
111 | static int | 110 | static int |
112 | save_yes_no (const void *cls, | 111 | save_yes_no (const void *cls, |
113 | const char *section, | 112 | const char *section, |
114 | const char *option, | 113 | const char *option, |
115 | GObject * widget, | 114 | GObject *widget, |
116 | struct GNUNET_CONFIGURATION_Handle *cfg) | 115 | struct GNUNET_CONFIGURATION_Handle *cfg) |
117 | { | 116 | { |
118 | GtkToggleButton *button; | 117 | GtkToggleButton *button; |
119 | gboolean mode; | 118 | gboolean mode; |
@@ -122,7 +121,9 @@ save_yes_no (const void *cls, | |||
122 | if (button == NULL) | 121 | if (button == NULL) |
123 | return GNUNET_SYSERR; | 122 | return GNUNET_SYSERR; |
124 | mode = gtk_toggle_button_get_active (button); | 123 | mode = gtk_toggle_button_get_active (button); |
125 | GNUNET_CONFIGURATION_set_value_string (cfg, section, option, | 124 | GNUNET_CONFIGURATION_set_value_string (cfg, |
125 | section, | ||
126 | option, | ||
126 | mode == TRUE ? "YES" : "NO"); | 127 | mode == TRUE ? "YES" : "NO"); |
127 | return GNUNET_OK; | 128 | return GNUNET_OK; |
128 | } | 129 | } |
@@ -141,10 +142,10 @@ save_yes_no (const void *cls, | |||
141 | */ | 142 | */ |
142 | static int | 143 | static int |
143 | load_filename (const void *cls, | 144 | load_filename (const void *cls, |
144 | const char *section, | 145 | const char *section, |
145 | const char *option, | 146 | const char *option, |
146 | const char *value, | 147 | const char *value, |
147 | GObject * widget, | 148 | GObject *widget, |
148 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 149 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
149 | { | 150 | { |
150 | GtkFileChooser *chooser; | 151 | GtkFileChooser *chooser; |
@@ -171,7 +172,7 @@ static int | |||
171 | save_filename (const void *cls, | 172 | save_filename (const void *cls, |
172 | const char *section, | 173 | const char *section, |
173 | const char *option, | 174 | const char *option, |
174 | GObject * widget, | 175 | GObject *widget, |
175 | struct GNUNET_CONFIGURATION_Handle *cfg) | 176 | struct GNUNET_CONFIGURATION_Handle *cfg) |
176 | { | 177 | { |
177 | GtkFileChooser *chooser; | 178 | GtkFileChooser *chooser; |
@@ -202,10 +203,10 @@ save_filename (const void *cls, | |||
202 | */ | 203 | */ |
203 | static int | 204 | static int |
204 | load_text (const void *cls, | 205 | load_text (const void *cls, |
205 | const char *section, | 206 | const char *section, |
206 | const char *option, | 207 | const char *option, |
207 | const char *value, | 208 | const char *value, |
208 | GObject * widget, | 209 | GObject *widget, |
209 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 210 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
210 | { | 211 | { |
211 | GtkEntry *entry; | 212 | GtkEntry *entry; |
@@ -230,10 +231,10 @@ load_text (const void *cls, | |||
230 | */ | 231 | */ |
231 | static int | 232 | static int |
232 | save_text (const void *cls, | 233 | save_text (const void *cls, |
233 | const char *section, | 234 | const char *section, |
234 | const char *option, | 235 | const char *option, |
235 | GObject * widget, | 236 | GObject *widget, |
236 | struct GNUNET_CONFIGURATION_Handle *cfg) | 237 | struct GNUNET_CONFIGURATION_Handle *cfg) |
237 | { | 238 | { |
238 | GtkEntry *entry; | 239 | GtkEntry *entry; |
239 | const gchar *txt; | 240 | const gchar *txt; |
@@ -321,10 +322,10 @@ save_combo_text (const void *cls, | |||
321 | */ | 322 | */ |
322 | static int | 323 | static int |
323 | load_number (const void *cls, | 324 | load_number (const void *cls, |
324 | const char *section, | 325 | const char *section, |
325 | const char *option, | 326 | const char *option, |
326 | const char *value, | 327 | const char *value, |
327 | GObject * widget, | 328 | GObject *widget, |
328 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 329 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
329 | { | 330 | { |
330 | GtkSpinButton *spin; | 331 | GtkSpinButton *spin; |
@@ -352,19 +353,21 @@ load_number (const void *cls, | |||
352 | */ | 353 | */ |
353 | static int | 354 | static int |
354 | save_number (const void *cls, | 355 | save_number (const void *cls, |
355 | const char *section, | 356 | const char *section, |
356 | const char *option, | 357 | const char *option, |
357 | GObject * widget, | 358 | GObject *widget, |
358 | struct GNUNET_CONFIGURATION_Handle *cfg) | 359 | struct GNUNET_CONFIGURATION_Handle *cfg) |
359 | { | 360 | { |
360 | GtkSpinButton *spin; | 361 | GtkSpinButton *spin; |
361 | 362 | ||
362 | spin = GTK_SPIN_BUTTON (widget); | 363 | spin = GTK_SPIN_BUTTON (widget); |
363 | if (spin == NULL) | 364 | if (spin == NULL) |
364 | return GNUNET_SYSERR; | 365 | return GNUNET_SYSERR; |
365 | GNUNET_CONFIGURATION_set_value_number (cfg, section, option, | 366 | GNUNET_CONFIGURATION_set_value_number (cfg, |
366 | gtk_spin_button_get_value_as_int | 367 | section, |
367 | (spin)); | 368 | option, |
369 | gtk_spin_button_get_value_as_int ( | ||
370 | spin)); | ||
368 | return GNUNET_OK; | 371 | return GNUNET_OK; |
369 | } | 372 | } |
370 | 373 | ||
@@ -373,25 +376,28 @@ save_number (const void *cls, | |||
373 | * NULL-terminated list of port specifications, which should be checked | 376 | * NULL-terminated list of port specifications, which should be checked |
374 | * for collisions. | 377 | * for collisions. |
375 | */ | 378 | */ |
376 | static struct PortSpecification port_specifications[] = { | 379 | static struct PortSpecification port_specifications[] = |
377 | { | 380 | {{ |
378 | "GNUNET_setup_hostlist_server_port_spin_button", | 381 | "GNUNET_setup_hostlist_server_port_spin_button", |
379 | "GNUNET_setup_hostlist_offer_hostlist_checkbutton", | 382 | "GNUNET_setup_hostlist_offer_hostlist_checkbutton", |
380 | gettext_noop ("the hostlist server"),}, | 383 | gettext_noop ("the hostlist server"), |
381 | { | 384 | }, |
382 | "GNUNET_setup_transport_tcp_port_spinbutton", | 385 | { |
383 | "GNUNET_setup_transport_tcp_checkbutton", | 386 | "GNUNET_setup_transport_tcp_port_spinbutton", |
384 | gettext_noop ("the TCP transport plugin"),}, | 387 | "GNUNET_setup_transport_tcp_checkbutton", |
385 | { | 388 | gettext_noop ("the TCP transport plugin"), |
386 | "GNUNET_setup_transport_http_port_spinbutton", | 389 | }, |
387 | "GNUNET_setup_transport_http_server_checkbutton", | 390 | { |
388 | gettext_noop ("the HTTP transport plugin"),}, | 391 | "GNUNET_setup_transport_http_port_spinbutton", |
389 | { | 392 | "GNUNET_setup_transport_http_server_checkbutton", |
390 | "GNUNET_setup_transport_https_port_spinbutton", | 393 | gettext_noop ("the HTTP transport plugin"), |
391 | "GNUNET_setup_transport_https_server_checkbutton", | 394 | }, |
392 | gettext_noop ("the HTTPS transport plugin"),}, | 395 | { |
393 | {NULL, NULL} | 396 | "GNUNET_setup_transport_https_port_spinbutton", |
394 | }; | 397 | "GNUNET_setup_transport_https_server_checkbutton", |
398 | gettext_noop ("the HTTPS transport plugin"), | ||
399 | }, | ||
400 | {NULL, NULL}}; | ||
395 | 401 | ||
396 | 402 | ||
397 | /** | 403 | /** |
@@ -410,15 +416,15 @@ get_port_spinbutton (unsigned int i) | |||
410 | GtkSpinButton *spinbt; | 416 | GtkSpinButton *spinbt; |
411 | gboolean mode; | 417 | gboolean mode; |
412 | 418 | ||
413 | if ( (NULL == port_specifications[i].spinbutton_name) || | 419 | if ((NULL == port_specifications[i].spinbutton_name) || |
414 | (NULL == port_specifications[i].checkbutton_name) ) | 420 | (NULL == port_specifications[i].checkbutton_name)) |
415 | return NULL; | 421 | return NULL; |
416 | cb_name = port_specifications[i].checkbutton_name; | 422 | cb_name = port_specifications[i].checkbutton_name; |
417 | widget = GTK_WIDGET (GNUNET_SETUP_get_object (cb_name)); | 423 | widget = GTK_WIDGET (GNUNET_SETUP_get_object (cb_name)); |
418 | if (widget == NULL) | 424 | if (widget == NULL) |
419 | { | 425 | { |
420 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 426 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
421 | _("Widget `%s' not found\n"), | 427 | _ ("Widget `%s' not found\n"), |
422 | cb_name); | 428 | cb_name); |
423 | return NULL; | 429 | return NULL; |
424 | } | 430 | } |
@@ -426,7 +432,7 @@ get_port_spinbutton (unsigned int i) | |||
426 | if (checkbt == NULL) | 432 | if (checkbt == NULL) |
427 | { | 433 | { |
428 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 434 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
429 | _("Specified widget `%s' is not a checkbutton\n"), | 435 | _ ("Specified widget `%s' is not a checkbutton\n"), |
430 | cb_name); | 436 | cb_name); |
431 | return NULL; | 437 | return NULL; |
432 | } | 438 | } |
@@ -439,7 +445,7 @@ get_port_spinbutton (unsigned int i) | |||
439 | if (widget == NULL) | 445 | if (widget == NULL) |
440 | { | 446 | { |
441 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 447 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
442 | _("Widget `%s' not found\n"), | 448 | _ ("Widget `%s' not found\n"), |
443 | sb_name); | 449 | sb_name); |
444 | return NULL; | 450 | return NULL; |
445 | } | 451 | } |
@@ -447,7 +453,7 @@ get_port_spinbutton (unsigned int i) | |||
447 | if (spinbt == NULL) | 453 | if (spinbt == NULL) |
448 | { | 454 | { |
449 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 455 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
450 | _("Specified widget `%s' is not a spinbutton\n"), | 456 | _ ("Specified widget `%s' is not a spinbutton\n"), |
451 | sb_name); | 457 | sb_name); |
452 | return NULL; | 458 | return NULL; |
453 | } | 459 | } |
@@ -462,8 +468,7 @@ get_port_spinbutton (unsigned int i) | |||
462 | * @param widget widget whose state was changed (unused) | 468 | * @param widget widget whose state was changed (unused) |
463 | */ | 469 | */ |
464 | static void | 470 | static void |
465 | highlight_port_collisions (const void *cls, | 471 | highlight_port_collisions (const void *cls, GObject *widget) |
466 | GObject *widget) | ||
467 | { | 472 | { |
468 | static GtkCssProvider *conflict_provider; | 473 | static GtkCssProvider *conflict_provider; |
469 | unsigned int i; | 474 | unsigned int i; |
@@ -478,25 +483,23 @@ highlight_port_collisions (const void *cls, | |||
478 | { | 483 | { |
479 | conflict_provider = gtk_css_provider_new (); | 484 | conflict_provider = gtk_css_provider_new (); |
480 | 485 | ||
481 | gtk_css_provider_load_from_data (conflict_provider, | 486 | gtk_css_provider_load_from_data ( |
482 | ".conflict {\n color: rgba(255, 0.0, 0.0, 255);\n}", | 487 | conflict_provider, |
483 | -1, | 488 | ".conflict {\n color: rgba(255, 0.0, 0.0, 255);\n}", |
484 | NULL); | 489 | -1, |
485 | for (i = 0; | 490 | NULL); |
486 | NULL != port_specifications[i].spinbutton_name; | 491 | for (i = 0; NULL != port_specifications[i].spinbutton_name; i++) |
487 | i++) | ||
488 | { | 492 | { |
489 | spinbt_i = get_port_spinbutton (i); | 493 | spinbt_i = get_port_spinbutton (i); |
490 | if (NULL == spinbt_i) | 494 | if (NULL == spinbt_i) |
491 | continue; | 495 | continue; |
492 | gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (spinbt_i)), | 496 | gtk_style_context_add_provider (gtk_widget_get_style_context ( |
493 | GTK_STYLE_PROVIDER (conflict_provider), | 497 | GTK_WIDGET (spinbt_i)), |
494 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); | 498 | GTK_STYLE_PROVIDER (conflict_provider), |
499 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); | ||
495 | } | 500 | } |
496 | } | 501 | } |
497 | for (i = 0; | 502 | for (i = 0; NULL != port_specifications[i].spinbutton_name; i++) |
498 | NULL != port_specifications[i].spinbutton_name; | ||
499 | i++) | ||
500 | { | 503 | { |
501 | spinbt_i = get_port_spinbutton (i); | 504 | spinbt_i = get_port_spinbutton (i); |
502 | if (NULL == spinbt_i) | 505 | if (NULL == spinbt_i) |
@@ -504,12 +507,10 @@ highlight_port_collisions (const void *cls, | |||
504 | port = gtk_spin_button_get_value_as_int (spinbt_i); | 507 | port = gtk_spin_button_get_value_as_int (spinbt_i); |
505 | 508 | ||
506 | found = GNUNET_NO; | 509 | found = GNUNET_NO; |
507 | for (j = 0; | 510 | for (j = 0; NULL != port_specifications[j].spinbutton_name; j++) |
508 | NULL != port_specifications[j].spinbutton_name; | ||
509 | j++) | ||
510 | { | 511 | { |
511 | if (i == j) | 512 | if (i == j) |
512 | continue; | 513 | continue; |
513 | spinbt_j = get_port_spinbutton (j); | 514 | spinbt_j = get_port_spinbutton (j); |
514 | if (NULL == spinbt_j) | 515 | if (NULL == spinbt_j) |
515 | continue; | 516 | continue; |
@@ -521,21 +522,21 @@ highlight_port_collisions (const void *cls, | |||
521 | } | 522 | } |
522 | if (GNUNET_YES == found) | 523 | if (GNUNET_YES == found) |
523 | { | 524 | { |
524 | gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (spinbt_i)), | 525 | gtk_style_context_add_class (gtk_widget_get_style_context ( |
525 | "conflict"); | 526 | GTK_WIDGET (spinbt_i)), |
527 | "conflict"); | ||
526 | GNUNET_asprintf (&tooltip, | 528 | GNUNET_asprintf (&tooltip, |
527 | _("This port is already occupied by %s."), | 529 | _ ("This port is already occupied by %s."), |
528 | port_specifications[j].owner_name); | 530 | port_specifications[j].owner_name); |
529 | gtk_widget_set_tooltip_text (GTK_WIDGET (spinbt_i), | 531 | gtk_widget_set_tooltip_text (GTK_WIDGET (spinbt_i), tooltip); |
530 | tooltip); | ||
531 | GNUNET_free (tooltip); | 532 | GNUNET_free (tooltip); |
532 | } | 533 | } |
533 | else | 534 | else |
534 | { | 535 | { |
535 | gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (spinbt_i)), | 536 | gtk_style_context_remove_class (gtk_widget_get_style_context ( |
536 | "conflict"); | 537 | GTK_WIDGET (spinbt_i)), |
537 | gtk_widget_set_tooltip_text (GTK_WIDGET (spinbt_i), | 538 | "conflict"); |
538 | ""); | 539 | gtk_widget_set_tooltip_text (GTK_WIDGET (spinbt_i), ""); |
539 | } | 540 | } |
540 | } | 541 | } |
541 | } | 542 | } |
@@ -548,8 +549,7 @@ highlight_port_collisions (const void *cls, | |||
548 | * @param widget widget whose state was changed | 549 | * @param widget widget whose state was changed |
549 | */ | 550 | */ |
550 | static void | 551 | static void |
551 | validate_v4_policy (const void *cls, | 552 | validate_v4_policy (const void *cls, GObject *widget) |
552 | GObject *widget) | ||
553 | { | 553 | { |
554 | static GtkCssProvider *invalid_syntax_provider; | 554 | static GtkCssProvider *invalid_syntax_provider; |
555 | GtkEntry *entry; | 555 | GtkEntry *entry; |
@@ -561,40 +561,41 @@ validate_v4_policy (const void *cls, | |||
561 | entry = GTK_ENTRY (widget); | 561 | entry = GTK_ENTRY (widget); |
562 | text = gtk_entry_get_text (entry); | 562 | text = gtk_entry_get_text (entry); |
563 | r = GNUNET_TUN_ipv4policy2regex (text); | 563 | r = GNUNET_TUN_ipv4policy2regex (text); |
564 | invalid = ( (strlen (text) > 0) && | 564 | invalid = |
565 | ( (NULL == r) || | 565 | ((strlen (text) > 0) && ((NULL == r) || (text[strlen (text) - 1] != ';'))); |
566 | (text[strlen(text)-1] != ';') ) ); | ||
567 | if (invalid) | 566 | if (invalid) |
568 | { | 567 | { |
569 | if (NULL == invalid_syntax_provider) | 568 | if (NULL == invalid_syntax_provider) |
570 | { | 569 | { |
571 | invalid_syntax_provider = gtk_css_provider_new (); | 570 | invalid_syntax_provider = gtk_css_provider_new (); |
572 | 571 | ||
573 | gtk_css_provider_load_from_data (invalid_syntax_provider, | 572 | gtk_css_provider_load_from_data ( |
574 | ".syntax_error {\n color: rgba(255, 0.0, 0.0, 255);\n}", | 573 | invalid_syntax_provider, |
575 | -1, | 574 | ".syntax_error {\n color: rgba(255, 0.0, 0.0, 255);\n}", |
576 | NULL); | 575 | -1, |
577 | gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (entry)), | 576 | NULL); |
578 | GTK_STYLE_PROVIDER (invalid_syntax_provider), | 577 | gtk_style_context_add_provider (gtk_widget_get_style_context ( |
579 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); | 578 | GTK_WIDGET (entry)), |
579 | GTK_STYLE_PROVIDER ( | ||
580 | invalid_syntax_provider), | ||
581 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); | ||
580 | } | 582 | } |
581 | gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), | 583 | gtk_style_context_add_class (gtk_widget_get_style_context ( |
582 | "syntax_error"); | 584 | GTK_WIDGET (entry)), |
583 | GNUNET_asprintf (&tooltip, | 585 | "syntax_error"); |
584 | _("Invalid policy.")); | 586 | GNUNET_asprintf (&tooltip, _ ("Invalid policy.")); |
585 | gtk_widget_set_tooltip_text (GTK_WIDGET (widget), | 587 | gtk_widget_set_tooltip_text (GTK_WIDGET (widget), tooltip); |
586 | tooltip); | ||
587 | GNUNET_free (tooltip); | 588 | GNUNET_free (tooltip); |
588 | } | 589 | } |
589 | else | 590 | else |
590 | { | 591 | { |
591 | if (NULL != invalid_syntax_provider) | 592 | if (NULL != invalid_syntax_provider) |
592 | { | 593 | { |
593 | gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), | 594 | gtk_style_context_remove_class (gtk_widget_get_style_context ( |
594 | "syntax_error"); | 595 | GTK_WIDGET (entry)), |
596 | "syntax_error"); | ||
595 | } | 597 | } |
596 | gtk_widget_set_tooltip_text (GTK_WIDGET (widget), | 598 | gtk_widget_set_tooltip_text (GTK_WIDGET (widget), ""); |
597 | ""); | ||
598 | } | 599 | } |
599 | GNUNET_free_non_null (r); | 600 | GNUNET_free_non_null (r); |
600 | } | 601 | } |
@@ -607,8 +608,7 @@ validate_v4_policy (const void *cls, | |||
607 | * @param widget widget whose state was changed | 608 | * @param widget widget whose state was changed |
608 | */ | 609 | */ |
609 | static void | 610 | static void |
610 | validate_v6_policy (const void *cls, | 611 | validate_v6_policy (const void *cls, GObject *widget) |
611 | GObject *widget) | ||
612 | { | 612 | { |
613 | static GtkCssProvider *invalid_syntax_provider; | 613 | static GtkCssProvider *invalid_syntax_provider; |
614 | GtkEntry *entry; | 614 | GtkEntry *entry; |
@@ -620,39 +620,40 @@ validate_v6_policy (const void *cls, | |||
620 | entry = GTK_ENTRY (widget); | 620 | entry = GTK_ENTRY (widget); |
621 | text = gtk_entry_get_text (entry); | 621 | text = gtk_entry_get_text (entry); |
622 | r = GNUNET_TUN_ipv6policy2regex (text); | 622 | r = GNUNET_TUN_ipv6policy2regex (text); |
623 | invalid = ( (strlen (text) > 0) && | 623 | invalid = |
624 | ( (NULL == r) || | 624 | ((strlen (text) > 0) && ((NULL == r) || (text[strlen (text) - 1] != ';'))); |
625 | (text[strlen(text)-1] != ';') ) ); | ||
626 | if (invalid) | 625 | if (invalid) |
627 | { | 626 | { |
628 | if (NULL == invalid_syntax_provider) | 627 | if (NULL == invalid_syntax_provider) |
629 | { | 628 | { |
630 | invalid_syntax_provider = gtk_css_provider_new (); | 629 | invalid_syntax_provider = gtk_css_provider_new (); |
631 | gtk_css_provider_load_from_data (invalid_syntax_provider, | 630 | gtk_css_provider_load_from_data ( |
632 | ".syntax_error {\n color: rgba(255, 0.0, 0.0, 255);\n}", | 631 | invalid_syntax_provider, |
633 | -1, | 632 | ".syntax_error {\n color: rgba(255, 0.0, 0.0, 255);\n}", |
634 | NULL); | 633 | -1, |
635 | gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (entry)), | 634 | NULL); |
636 | GTK_STYLE_PROVIDER (invalid_syntax_provider), | 635 | gtk_style_context_add_provider (gtk_widget_get_style_context ( |
637 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); | 636 | GTK_WIDGET (entry)), |
637 | GTK_STYLE_PROVIDER ( | ||
638 | invalid_syntax_provider), | ||
639 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); | ||
638 | } | 640 | } |
639 | gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), | 641 | gtk_style_context_add_class (gtk_widget_get_style_context ( |
640 | "syntax_error"); | 642 | GTK_WIDGET (entry)), |
641 | GNUNET_asprintf (&tooltip, | 643 | "syntax_error"); |
642 | _("Invalid policy.")); | 644 | GNUNET_asprintf (&tooltip, _ ("Invalid policy.")); |
643 | gtk_widget_set_tooltip_text (GTK_WIDGET (widget), | 645 | gtk_widget_set_tooltip_text (GTK_WIDGET (widget), tooltip); |
644 | tooltip); | ||
645 | GNUNET_free (tooltip); | 646 | GNUNET_free (tooltip); |
646 | } | 647 | } |
647 | else | 648 | else |
648 | { | 649 | { |
649 | if (NULL != invalid_syntax_provider) | 650 | if (NULL != invalid_syntax_provider) |
650 | { | 651 | { |
651 | gtk_style_context_remove_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), | 652 | gtk_style_context_remove_class (gtk_widget_get_style_context ( |
652 | "syntax_error"); | 653 | GTK_WIDGET (entry)), |
654 | "syntax_error"); | ||
653 | } | 655 | } |
654 | gtk_widget_set_tooltip_text (GTK_WIDGET (widget), | 656 | gtk_widget_set_tooltip_text (GTK_WIDGET (widget), ""); |
655 | ""); | ||
656 | } | 657 | } |
657 | GNUNET_free_non_null (r); | 658 | GNUNET_free_non_null (r); |
658 | } | 659 | } |
@@ -672,10 +673,10 @@ validate_v6_policy (const void *cls, | |||
672 | */ | 673 | */ |
673 | static int | 674 | static int |
674 | load_option_list (const void *cls, | 675 | load_option_list (const void *cls, |
675 | const char *section, | 676 | const char *section, |
676 | const char *option, | 677 | const char *option, |
677 | const char *value, | 678 | const char *value, |
678 | GObject * widget, | 679 | GObject *widget, |
679 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 680 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
680 | { | 681 | { |
681 | const char *word = cls; | 682 | const char *word = cls; |
@@ -717,10 +718,10 @@ load_option_list (const void *cls, | |||
717 | */ | 718 | */ |
718 | static int | 719 | static int |
719 | save_option_list (const void *cls, | 720 | save_option_list (const void *cls, |
720 | const char *section, | 721 | const char *section, |
721 | const char *option, | 722 | const char *option, |
722 | GObject * widget, | 723 | GObject *widget, |
723 | struct GNUNET_CONFIGURATION_Handle *cfg) | 724 | struct GNUNET_CONFIGURATION_Handle *cfg) |
724 | { | 725 | { |
725 | const char *word = cls; | 726 | const char *word = cls; |
726 | GtkToggleButton *button; | 727 | GtkToggleButton *button; |
@@ -749,8 +750,8 @@ save_option_list (const void *cls, | |||
749 | * @return TRUE to stop other handlers from being invoked | 750 | * @return TRUE to stop other handlers from being invoked |
750 | */ | 751 | */ |
751 | gboolean | 752 | gboolean |
752 | GNUNET_setup_treeview_key_press_event_cb (GtkTreeView * tv, | 753 | GNUNET_setup_treeview_key_press_event_cb (GtkTreeView *tv, |
753 | GdkEventKey * event, | 754 | GdkEventKey *event, |
754 | gpointer user_data) | 755 | gpointer user_data) |
755 | { | 756 | { |
756 | GtkListStore *ls; | 757 | GtkListStore *ls; |
@@ -765,7 +766,7 @@ GNUNET_setup_treeview_key_press_event_cb (GtkTreeView * tv, | |||
765 | #else | 766 | #else |
766 | (event->keyval != GDK_KEY_Delete) | 767 | (event->keyval != GDK_KEY_Delete) |
767 | #endif | 768 | #endif |
768 | ) | 769 | ) |
769 | return FALSE; | 770 | return FALSE; |
770 | ls = GTK_LIST_STORE (gtk_tree_view_get_model (tv)); | 771 | ls = GTK_LIST_STORE (gtk_tree_view_get_model (tv)); |
771 | if (ls == NULL) | 772 | if (ls == NULL) |
@@ -776,11 +777,13 @@ GNUNET_setup_treeview_key_press_event_cb (GtkTreeView * tv, | |||
776 | sel = gtk_tree_view_get_selection (tv); | 777 | sel = gtk_tree_view_get_selection (tv); |
777 | if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter)) | 778 | if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter)) |
778 | return FALSE; | 779 | return FALSE; |
779 | gtk_tree_model_get (tm, &iter, | 780 | gtk_tree_model_get (tm, |
780 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE, &editable, | 781 | &iter, |
782 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE, | ||
783 | &editable, | ||
781 | -1); | 784 | -1); |
782 | if (TRUE == editable) | 785 | if (TRUE == editable) |
783 | return FALSE; /* likely currently editing... */ | 786 | return FALSE; /* likely currently editing... */ |
784 | gtk_list_store_remove (ls, &iter); | 787 | gtk_list_store_remove (ls, &iter); |
785 | if (TRUE == gtk_tree_model_get_iter_first (tm, &iter)) | 788 | if (TRUE == gtk_tree_model_get_iter_first (tm, &iter)) |
786 | gtk_tree_selection_select_iter (sel, &iter); | 789 | gtk_tree_selection_select_iter (sel, &iter); |
@@ -801,10 +804,10 @@ GNUNET_setup_treeview_key_press_event_cb (GtkTreeView * tv, | |||
801 | */ | 804 | */ |
802 | static int | 805 | static int |
803 | load_string_list_store (const void *cls, | 806 | load_string_list_store (const void *cls, |
804 | const char *section, | 807 | const char *section, |
805 | const char *option, | 808 | const char *option, |
806 | const char *value, | 809 | const char *value, |
807 | GObject * widget, | 810 | GObject *widget, |
808 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 811 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
809 | { | 812 | { |
810 | char *t; | 813 | char *t; |
@@ -818,17 +821,19 @@ load_string_list_store (const void *cls, | |||
818 | t = GNUNET_strdup (value); | 821 | t = GNUNET_strdup (value); |
819 | for (w = strtok (t, " "); w != NULL; w = strtok (NULL, " ")) | 822 | for (w = strtok (t, " "); w != NULL; w = strtok (NULL, " ")) |
820 | gtk_list_store_insert_with_values (ls, | 823 | gtk_list_store_insert_with_values (ls, |
821 | &iter, | 824 | &iter, |
822 | G_MAXINT, | 825 | G_MAXINT, |
823 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, w, | 826 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, |
827 | w, | ||
824 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE, | 828 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE, |
825 | FALSE, | 829 | FALSE, |
826 | -1); | 830 | -1); |
827 | GNUNET_free (t); | 831 | GNUNET_free (t); |
828 | gtk_list_store_insert_with_values (ls, | 832 | gtk_list_store_insert_with_values (ls, |
829 | &iter, | 833 | &iter, |
830 | G_MAXINT, | 834 | G_MAXINT, |
831 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, "", | 835 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, |
836 | "", | ||
832 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE, | 837 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE, |
833 | TRUE, | 838 | TRUE, |
834 | -1); | 839 | -1); |
@@ -849,9 +854,9 @@ load_string_list_store (const void *cls, | |||
849 | */ | 854 | */ |
850 | static int | 855 | static int |
851 | save_string_list_store (const void *cls, | 856 | save_string_list_store (const void *cls, |
852 | const char *section, | 857 | const char *section, |
853 | const char *option, | 858 | const char *option, |
854 | GObject * widget, | 859 | GObject *widget, |
855 | struct GNUNET_CONFIGURATION_Handle *cfg) | 860 | struct GNUNET_CONFIGURATION_Handle *cfg) |
856 | { | 861 | { |
857 | GtkTreeModel *tm; | 862 | GtkTreeModel *tm; |
@@ -868,24 +873,26 @@ save_string_list_store (const void *cls, | |||
868 | { | 873 | { |
869 | do | 874 | do |
870 | { | 875 | { |
871 | gtk_tree_model_get (tm, &iter, | 876 | gtk_tree_model_get (tm, |
872 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, &val, -1); | 877 | &iter, |
878 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL, | ||
879 | &val, | ||
880 | -1); | ||
873 | if (0 < strlen (val)) | 881 | if (0 < strlen (val)) |
874 | { | 882 | { |
875 | if (value == NULL) | 883 | if (value == NULL) |
876 | { | 884 | { |
877 | value = GNUNET_strdup (val); | 885 | value = GNUNET_strdup (val); |
878 | } | 886 | } |
879 | else | 887 | else |
880 | { | 888 | { |
881 | GNUNET_asprintf (&n, "%s %s", value, val); | 889 | GNUNET_asprintf (&n, "%s %s", value, val); |
882 | GNUNET_free (value); | 890 | GNUNET_free (value); |
883 | value = n; | 891 | value = n; |
884 | } | 892 | } |
885 | } | 893 | } |
886 | g_free (val); | 894 | g_free (val); |
887 | } | 895 | } while (TRUE == gtk_tree_model_iter_next (tm, &iter)); |
888 | while (TRUE == gtk_tree_model_iter_next (tm, &iter)); | ||
889 | } | 896 | } |
890 | if (value == NULL) | 897 | if (value == NULL) |
891 | value = GNUNET_strdup (""); | 898 | value = GNUNET_strdup (""); |
@@ -898,295 +905,262 @@ save_string_list_store (const void *cls, | |||
898 | /** | 905 | /** |
899 | * Hide "min connected friends" option if in F2F-only mode. | 906 | * Hide "min connected friends" option if in F2F-only mode. |
900 | */ | 907 | */ |
901 | static struct GNUNET_SETUP_VisibilitySpecification hide_min_connected_friends[] = { | 908 | static struct GNUNET_SETUP_VisibilitySpecification |
902 | {"GNUNET_setup_minimum_friends_label", NULL, REX_YES }, | 909 | hide_min_connected_friends[] = |
903 | {"GNUNET_setup_minimum_friends_spinbutton", NULL, REX_YES }, | 910 | {{"GNUNET_setup_minimum_friends_label", NULL, REX_YES}, |
904 | {NULL, NULL, NULL} | 911 | {"GNUNET_setup_minimum_friends_spinbutton", NULL, REX_YES}, |
905 | }; | 912 | {NULL, NULL, NULL}}; |
906 | 913 | ||
907 | 914 | ||
908 | /** | 915 | /** |
909 | * Hide "hostlist" options if hostlist is not in use. | 916 | * Hide "hostlist" options if hostlist is not in use. |
910 | */ | 917 | */ |
911 | static struct GNUNET_SETUP_VisibilitySpecification hide_hostlist_tab[] = { | 918 | static struct GNUNET_SETUP_VisibilitySpecification hide_hostlist_tab[] = |
912 | {"GNUNET_setup_hostlist_vbox", "YES", NULL}, | 919 | {{"GNUNET_setup_hostlist_vbox", "YES", NULL}, |
913 | {"GNUNET_setup_hostlist_label", "YES", NULL}, | 920 | {"GNUNET_setup_hostlist_label", "YES", NULL}, |
914 | {NULL, NULL, NULL} | 921 | {NULL, NULL, NULL}}; |
915 | }; | ||
916 | 922 | ||
917 | 923 | ||
918 | /** | 924 | /** |
919 | * Hide "exit" options if VPN exit is not in use. | 925 | * Hide "exit" options if VPN exit is not in use. |
920 | */ | 926 | */ |
921 | static struct GNUNET_SETUP_VisibilitySpecification hide_exit_options[] = { | 927 | static struct GNUNET_SETUP_VisibilitySpecification hide_exit_options[] = |
922 | {"GNUNET_setup_exit_label", "YES", NULL}, | 928 | {{"GNUNET_setup_exit_label", "YES", NULL}, |
923 | {"GNUNET_setup_exit_vbox", "YES", NULL}, | 929 | {"GNUNET_setup_exit_vbox", "YES", NULL}, |
924 | {NULL, NULL, NULL} | 930 | {NULL, NULL, NULL}}; |
925 | }; | ||
926 | 931 | ||
927 | 932 | ||
928 | /** | 933 | /** |
929 | * Hide DNS "exit" options if DNS exit is not in use. | 934 | * Hide DNS "exit" options if DNS exit is not in use. |
930 | */ | 935 | */ |
931 | static struct GNUNET_SETUP_VisibilitySpecification hide_dns_exit_options[] = { | 936 | static struct GNUNET_SETUP_VisibilitySpecification hide_dns_exit_options[] = |
932 | {"GNUNET_setup_dns_resolver_hbox", "YES", NULL}, | 937 | {{"GNUNET_setup_dns_resolver_hbox", "YES", NULL}, {NULL, NULL, NULL}}; |
933 | {NULL, NULL, NULL} | ||
934 | }; | ||
935 | 938 | ||
936 | 939 | ||
937 | /** | 940 | /** |
938 | * Hide IPv4 "exit" options if IPv4 exit is not in use. | 941 | * Hide IPv4 "exit" options if IPv4 exit is not in use. |
939 | */ | 942 | */ |
940 | static struct GNUNET_SETUP_VisibilitySpecification hide_v4_exit_options[] = { | 943 | static struct GNUNET_SETUP_VisibilitySpecification hide_v4_exit_options[] = |
941 | {"GNUNET_SETUP_exit_policy_v4_hbox", "YES", NULL}, | 944 | {{"GNUNET_SETUP_exit_policy_v4_hbox", "YES", NULL}, {NULL, NULL, NULL}}; |
942 | {NULL, NULL, NULL} | ||
943 | }; | ||
944 | 945 | ||
945 | 946 | ||
946 | /** | 947 | /** |
947 | * Hide IPv6 "exit" options if IPv6 exit is not in use. | 948 | * Hide IPv6 "exit" options if IPv6 exit is not in use. |
948 | */ | 949 | */ |
949 | static struct GNUNET_SETUP_VisibilitySpecification hide_v6_exit_options[] = { | 950 | static struct GNUNET_SETUP_VisibilitySpecification hide_v6_exit_options[] = |
950 | {"GNUNET_SETUP_exit_policy_v6_hbox", "YES", NULL}, | 951 | {{"GNUNET_SETUP_exit_policy_v6_hbox", "YES", NULL}, {NULL, NULL, NULL}}; |
951 | {NULL, NULL, NULL} | ||
952 | }; | ||
953 | 952 | ||
954 | 953 | ||
955 | /** | 954 | /** |
956 | * Hide "hostlist" server options if hostlist server is not in use. | 955 | * Hide "hostlist" server options if hostlist server is not in use. |
957 | */ | 956 | */ |
958 | static struct GNUNET_SETUP_VisibilitySpecification | 957 | static struct GNUNET_SETUP_VisibilitySpecification |
959 | hide_hostlist_server_options[] = { | 958 | hide_hostlist_server_options[] = |
960 | {"GNUNET_setup_hostlist_advertise_checkbutton", "(^| )-p($| )", NULL}, | 959 | {{"GNUNET_setup_hostlist_advertise_checkbutton", "(^| )-p($| )", NULL}, |
961 | {"GNUNET_setup_hostlist_port_label", "(^| )-p($| )", NULL}, | 960 | {"GNUNET_setup_hostlist_port_label", "(^| )-p($| )", NULL}, |
962 | {"GNUNET_setup_hostlist_server_port_spin_button", "(^| )-p($| )", NULL}, | 961 | {"GNUNET_setup_hostlist_server_port_spin_button", "(^| )-p($| )", NULL}, |
963 | {NULL, NULL, NULL} | 962 | {NULL, NULL, NULL}}; |
964 | }; | ||
965 | 963 | ||
966 | 964 | ||
967 | /** | 965 | /** |
968 | * Hide "hostlist" proxy options if proxy is not in use. | 966 | * Hide "hostlist" proxy options if proxy is not in use. |
969 | */ | 967 | */ |
970 | static struct GNUNET_SETUP_VisibilitySpecification | 968 | static struct GNUNET_SETUP_VisibilitySpecification |
971 | hide_hostlist_proxy_options[] = { | 969 | hide_hostlist_proxy_options[] = |
972 | {"GNUNET_setup_hostlist_proxy_hostname_hbox", NULL, "NONE"}, | 970 | {{"GNUNET_setup_hostlist_proxy_hostname_hbox", NULL, "NONE"}, |
973 | {"GNUNET_setup_hostlist_proxy_username_hbox", NULL, "NONE"}, | 971 | {"GNUNET_setup_hostlist_proxy_username_hbox", NULL, "NONE"}, |
974 | {"GNUNET_setup_hostlist_proxy_password_hbox", NULL, "NONE"}, | 972 | {"GNUNET_setup_hostlist_proxy_password_hbox", NULL, "NONE"}, |
975 | {NULL, NULL, NULL} | 973 | {NULL, NULL, NULL}}; |
976 | }; | ||
977 | 974 | ||
978 | 975 | ||
979 | /** | 976 | /** |
980 | * Hide "http-client" proxy options if proxy is not in use. | 977 | * Hide "http-client" proxy options if proxy is not in use. |
981 | */ | 978 | */ |
982 | static struct GNUNET_SETUP_VisibilitySpecification | 979 | static struct GNUNET_SETUP_VisibilitySpecification hide_http_proxy_options[] = |
983 | hide_http_proxy_options[] = { | 980 | {{"GNUNET_setup_transport_http_client_proxy_hostname_hbox", NULL, "NONE"}, |
984 | {"GNUNET_setup_transport_http_client_proxy_hostname_hbox", NULL, "NONE"}, | 981 | {"GNUNET_setup_transport_http_client_proxy_username_hbox", NULL, "NONE"}, |
985 | {"GNUNET_setup_transport_http_client_proxy_username_hbox", NULL, "NONE"}, | 982 | {"GNUNET_setup_transport_http_client_proxy_password_hbox", NULL, "NONE"}, |
986 | {"GNUNET_setup_transport_http_client_proxy_password_hbox", NULL, "NONE"}, | 983 | {NULL, NULL, NULL}}; |
987 | {NULL, NULL, NULL} | ||
988 | }; | ||
989 | 984 | ||
990 | /** | 985 | /** |
991 | * Hide "https-client" proxy options if proxy is not in use. | 986 | * Hide "https-client" proxy options if proxy is not in use. |
992 | */ | 987 | */ |
993 | static struct GNUNET_SETUP_VisibilitySpecification | 988 | static struct GNUNET_SETUP_VisibilitySpecification hide_https_proxy_options[] = |
994 | hide_https_proxy_options[] = { | 989 | {{"GNUNET_setup_transport_https_client_proxy_hostname_hbox", NULL, "NONE"}, |
995 | {"GNUNET_setup_transport_https_client_proxy_hostname_hbox", NULL, "NONE"}, | 990 | {"GNUNET_setup_transport_https_client_proxy_username_hbox", NULL, "NONE"}, |
996 | {"GNUNET_setup_transport_https_client_proxy_username_hbox", NULL, "NONE"}, | 991 | {"GNUNET_setup_transport_https_client_proxy_password_hbox", NULL, "NONE"}, |
997 | {"GNUNET_setup_transport_https_client_proxy_password_hbox", NULL, "NONE"}, | 992 | {NULL, NULL, NULL}}; |
998 | {NULL, NULL, NULL} | ||
999 | }; | ||
1000 | 993 | ||
1001 | /** | 994 | /** |
1002 | * Hide "fs" tab if FS not active. | 995 | * Hide "fs" tab if FS not active. |
1003 | */ | 996 | */ |
1004 | static struct GNUNET_SETUP_VisibilitySpecification hide_fs_tab[] = { | 997 | static struct GNUNET_SETUP_VisibilitySpecification hide_fs_tab[] = |
1005 | {"GNUNET_setup_fs_main_vbox", "YES", NULL}, | 998 | {{"GNUNET_setup_fs_main_vbox", "YES", NULL}, {NULL, NULL, NULL}}; |
1006 | {NULL, NULL, NULL} | ||
1007 | }; | ||
1008 | 999 | ||
1009 | 1000 | ||
1010 | /** | 1001 | /** |
1011 | * Hide "vpn" tab and "pt" checkbutton if VPN is not active. | 1002 | * Hide "vpn" tab and "pt" checkbutton if VPN is not active. |
1012 | */ | 1003 | */ |
1013 | static struct GNUNET_SETUP_VisibilitySpecification hide_vpn_options[] = { | 1004 | static struct GNUNET_SETUP_VisibilitySpecification hide_vpn_options[] = |
1014 | {"GNUNET_setup_general_services_pt_checkbutton", "YES", NULL}, | 1005 | {{"GNUNET_setup_general_services_pt_checkbutton", "YES", NULL}, |
1015 | {"GNUNET_setup_vpn_vbox", "YES", NULL}, | 1006 | {"GNUNET_setup_vpn_vbox", "YES", NULL}, |
1016 | {"GNUNET_setup_vpn_label", "YES", NULL}, | 1007 | {"GNUNET_setup_vpn_label", "YES", NULL}, |
1017 | {NULL, NULL, NULL} | 1008 | {NULL, NULL, NULL}}; |
1018 | }; | ||
1019 | 1009 | ||
1020 | 1010 | ||
1021 | /** | 1011 | /** |
1022 | * Hides "vpn" option if PT is active (so that it cannot be disabled), | 1012 | * Hides "vpn" option if PT is active (so that it cannot be disabled), |
1023 | * and shows PT-specific options. | 1013 | * and shows PT-specific options. |
1024 | */ | 1014 | */ |
1025 | static struct GNUNET_SETUP_VisibilitySpecification hide_pt_options[] = { | 1015 | static struct GNUNET_SETUP_VisibilitySpecification hide_pt_options[] = |
1026 | {"GNUNET_setup_pt_frame", "YES", NULL}, | 1016 | {{"GNUNET_setup_pt_frame", "YES", NULL}, |
1027 | {"GNUNET_setup_general_services_vpn_checkbutton", "NO", NULL}, | 1017 | {"GNUNET_setup_general_services_vpn_checkbutton", "NO", NULL}, |
1028 | {NULL, NULL, NULL} | 1018 | {NULL, NULL, NULL}}; |
1029 | }; | ||
1030 | 1019 | ||
1031 | 1020 | ||
1032 | /** | 1021 | /** |
1033 | * Hide "namestore" tab if GNS not active. | 1022 | * Hide "namestore" tab if GNS not active. |
1034 | */ | 1023 | */ |
1035 | static struct GNUNET_SETUP_VisibilitySpecification hide_gns_tabs[] = { | 1024 | static struct GNUNET_SETUP_VisibilitySpecification hide_gns_tabs[] = |
1036 | {"GNUNET_setup_namestore_vbox", "YES", NULL}, | 1025 | {{"GNUNET_setup_namestore_vbox", "YES", NULL}, |
1037 | {"GNUNET_setup_namestore_label", "YES", NULL}, | 1026 | {"GNUNET_setup_namestore_label", "YES", NULL}, |
1038 | {NULL, NULL, NULL} | 1027 | {NULL, NULL, NULL}}; |
1039 | }; | ||
1040 | 1028 | ||
1041 | 1029 | ||
1042 | /** | 1030 | /** |
1043 | * Hide "tcp" tab if TCP not active. | 1031 | * Hide "tcp" tab if TCP not active. |
1044 | */ | 1032 | */ |
1045 | static struct GNUNET_SETUP_VisibilitySpecification hide_tcp_tab[] = { | 1033 | static struct GNUNET_SETUP_VisibilitySpecification hide_tcp_tab[] = |
1046 | {"GNUNET_setup_transport_tcp_vbox", "(^| )tcp($| )", NULL}, | 1034 | {{"GNUNET_setup_transport_tcp_vbox", "(^| )tcp($| )", NULL}, |
1047 | {NULL, NULL, NULL} | 1035 | {NULL, NULL, NULL}}; |
1048 | }; | ||
1049 | 1036 | ||
1050 | 1037 | ||
1051 | /** | 1038 | /** |
1052 | * Hide "udp" tab if UDP not active. | 1039 | * Hide "udp" tab if UDP not active. |
1053 | */ | 1040 | */ |
1054 | static struct GNUNET_SETUP_VisibilitySpecification hide_udp_tab[] = { | 1041 | static struct GNUNET_SETUP_VisibilitySpecification hide_udp_tab[] = |
1055 | {"GNUNET_setup_transport_udp_vbox", "(^| )udp($| )", NULL}, | 1042 | {{"GNUNET_setup_transport_udp_vbox", "(^| )udp($| )", NULL}, |
1056 | {NULL, NULL, NULL} | 1043 | {NULL, NULL, NULL}}; |
1057 | }; | ||
1058 | 1044 | ||
1059 | 1045 | ||
1060 | /** | 1046 | /** |
1061 | * Hide "http-client" tab if HTTP client not active. | 1047 | * Hide "http-client" tab if HTTP client not active. |
1062 | */ | 1048 | */ |
1063 | static struct GNUNET_SETUP_VisibilitySpecification hide_http_client_tab[] = { | 1049 | static struct GNUNET_SETUP_VisibilitySpecification hide_http_client_tab[] = |
1064 | {"GNUNET_setup_transport_http_client_vbox", "(^| )http_client($| )", NULL}, | 1050 | {{"GNUNET_setup_transport_http_client_vbox", "(^| )http_client($| )", NULL}, |
1065 | {NULL, NULL, NULL} | 1051 | {NULL, NULL, NULL}}; |
1066 | }; | ||
1067 | 1052 | ||
1068 | /** | 1053 | /** |
1069 | * Hide "http server" tab if HTTP server not active. | 1054 | * Hide "http server" tab if HTTP server not active. |
1070 | */ | 1055 | */ |
1071 | static struct GNUNET_SETUP_VisibilitySpecification hide_http_server_tab[] = { | 1056 | static struct GNUNET_SETUP_VisibilitySpecification hide_http_server_tab[] = |
1072 | {"GNUNET_setup_transport_http_server_vbox", "(^| )http_server($| )", NULL}, | 1057 | {{"GNUNET_setup_transport_http_server_vbox", "(^| )http_server($| )", NULL}, |
1073 | {NULL, NULL, NULL} | 1058 | {NULL, NULL, NULL}}; |
1074 | }; | ||
1075 | 1059 | ||
1076 | /** | 1060 | /** |
1077 | * Hide "https-client" tab if HTTPS client not active. | 1061 | * Hide "https-client" tab if HTTPS client not active. |
1078 | */ | 1062 | */ |
1079 | static struct GNUNET_SETUP_VisibilitySpecification hide_https_client_tab[] = { | 1063 | static struct GNUNET_SETUP_VisibilitySpecification hide_https_client_tab[] = |
1080 | {"GNUNET_setup_transport_https_client_vbox", "(^| )https_client($| )", NULL}, | 1064 | {{"GNUNET_setup_transport_https_client_vbox", "(^| )https_client($| )", NULL}, |
1081 | {NULL, NULL, NULL} | 1065 | {NULL, NULL, NULL}}; |
1082 | }; | ||
1083 | 1066 | ||
1084 | /** | 1067 | /** |
1085 | * Hide "https server" tab if HTTPS server not active. | 1068 | * Hide "https server" tab if HTTPS server not active. |
1086 | */ | 1069 | */ |
1087 | static struct GNUNET_SETUP_VisibilitySpecification hide_https_server_tab[] = { | 1070 | static struct GNUNET_SETUP_VisibilitySpecification hide_https_server_tab[] = |
1088 | {"GNUNET_setup_transport_https_server_vbox", "(^| )https_server($| )", NULL}, | 1071 | {{"GNUNET_setup_transport_https_server_vbox", "(^| )https_server($| )", NULL}, |
1089 | {NULL, NULL, NULL} | 1072 | {NULL, NULL, NULL}}; |
1090 | }; | ||
1091 | 1073 | ||
1092 | 1074 | ||
1093 | /** | 1075 | /** |
1094 | * Hide "dv" tab if DV not active. | 1076 | * Hide "dv" tab if DV not active. |
1095 | */ | 1077 | */ |
1096 | static struct GNUNET_SETUP_VisibilitySpecification hide_dv_tab[] = { | 1078 | static struct GNUNET_SETUP_VisibilitySpecification hide_dv_tab[] = |
1097 | {"GNUNET_setup_transport_dv_vbox", "(^| )dv($| )", NULL}, | 1079 | {{"GNUNET_setup_transport_dv_vbox", "(^| )dv($| )", NULL}, |
1098 | {NULL, NULL, NULL} | 1080 | {NULL, NULL, NULL}}; |
1099 | }; | ||
1100 | 1081 | ||
1101 | 1082 | ||
1102 | /** | 1083 | /** |
1103 | * Hide "wlan" tab if WLAN not active. | 1084 | * Hide "wlan" tab if WLAN not active. |
1104 | */ | 1085 | */ |
1105 | static struct GNUNET_SETUP_VisibilitySpecification hide_wlan_tab[] = { | 1086 | static struct GNUNET_SETUP_VisibilitySpecification hide_wlan_tab[] = |
1106 | {"GNUNET_setup_transport_wlan_vbox", "(^| )wlan($| )", NULL}, | 1087 | {{"GNUNET_setup_transport_wlan_vbox", "(^| )wlan($| )", NULL}, |
1107 | {NULL, NULL, NULL} | 1088 | {NULL, NULL, NULL}}; |
1108 | }; | ||
1109 | 1089 | ||
1110 | 1090 | ||
1111 | /** | 1091 | /** |
1112 | * Hide "sqlite datastore" tab if sqlite not active. | 1092 | * Hide "sqlite datastore" tab if sqlite not active. |
1113 | */ | 1093 | */ |
1114 | static struct GNUNET_SETUP_VisibilitySpecification hide_sqlite_datastore_tab[] = { | 1094 | static struct GNUNET_SETUP_VisibilitySpecification hide_sqlite_datastore_tab[] = |
1115 | {"GNUNET_setup_fs_datastore_sqlite_label", "^sqlite$", NULL}, | 1095 | {{"GNUNET_setup_fs_datastore_sqlite_label", "^sqlite$", NULL}, |
1116 | {NULL, NULL, NULL} | 1096 | {NULL, NULL, NULL}}; |
1117 | }; | ||
1118 | 1097 | ||
1119 | 1098 | ||
1120 | /** | 1099 | /** |
1121 | * Hide "mysql datastore" tab if mysql not active. | 1100 | * Hide "mysql datastore" tab if mysql not active. |
1122 | */ | 1101 | */ |
1123 | static struct GNUNET_SETUP_VisibilitySpecification hide_mysql_datastore_tab[] = { | 1102 | static struct GNUNET_SETUP_VisibilitySpecification hide_mysql_datastore_tab[] = |
1124 | {"GNUNET_setup_datastore_mysql_vbox", "^mysql$", NULL}, | 1103 | {{"GNUNET_setup_datastore_mysql_vbox", "^mysql$", NULL}, {NULL, NULL, NULL}}; |
1125 | {NULL, NULL, NULL} | ||
1126 | }; | ||
1127 | 1104 | ||
1128 | 1105 | ||
1129 | /** | 1106 | /** |
1130 | * Hide "postgres datastore" tab if postgres not active. | 1107 | * Hide "postgres datastore" tab if postgres not active. |
1131 | */ | 1108 | */ |
1132 | static struct GNUNET_SETUP_VisibilitySpecification hide_postgres_datastore_tab[] = { | 1109 | static struct GNUNET_SETUP_VisibilitySpecification |
1133 | {"GNUNET_setup_datastore_postgres_config_hbox", "^postgres$", NULL}, | 1110 | hide_postgres_datastore_tab[] = |
1134 | {NULL, NULL, NULL} | 1111 | {{"GNUNET_setup_datastore_postgres_config_hbox", "^postgres$", NULL}, |
1135 | }; | 1112 | {NULL, NULL, NULL}}; |
1136 | 1113 | ||
1137 | 1114 | ||
1138 | /** | 1115 | /** |
1139 | * Hide "sqlite datacache" tab if sqlite not active. | 1116 | * Hide "sqlite datacache" tab if sqlite not active. |
1140 | */ | 1117 | */ |
1141 | static struct GNUNET_SETUP_VisibilitySpecification hide_sqlite_datacache_tab[] = { | 1118 | static struct GNUNET_SETUP_VisibilitySpecification hide_sqlite_datacache_tab[] = |
1142 | {"GNUNET_setup_fs_datacache_sqlite_body_label", "^sqlite$", NULL}, | 1119 | {{"GNUNET_setup_fs_datacache_sqlite_body_label", "^sqlite$", NULL}, |
1143 | {NULL, NULL, NULL} | 1120 | {NULL, NULL, NULL}}; |
1144 | }; | ||
1145 | 1121 | ||
1146 | 1122 | ||
1147 | /** | 1123 | /** |
1148 | * Hide "heap datacache" tab if heap not active. | 1124 | * Hide "heap datacache" tab if heap not active. |
1149 | */ | 1125 | */ |
1150 | static struct GNUNET_SETUP_VisibilitySpecification hide_heap_datacache_tab[] = { | 1126 | static struct GNUNET_SETUP_VisibilitySpecification hide_heap_datacache_tab[] = |
1151 | {"GNUNET_setup_datacache_heap_vbox", "^heap$", NULL}, | 1127 | {{"GNUNET_setup_datacache_heap_vbox", "^heap$", NULL}, {NULL, NULL, NULL}}; |
1152 | {NULL, NULL, NULL} | ||
1153 | }; | ||
1154 | 1128 | ||
1155 | 1129 | ||
1156 | /** | 1130 | /** |
1157 | * Hide "postgres datacache" tab if postgres not active. | 1131 | * Hide "postgres datacache" tab if postgres not active. |
1158 | */ | 1132 | */ |
1159 | static struct GNUNET_SETUP_VisibilitySpecification hide_postgres_datacache_tab[] = { | 1133 | static struct GNUNET_SETUP_VisibilitySpecification |
1160 | {"GNUNET_setup_datacache_postgres_hbox", "^postgres$", NULL}, | 1134 | hide_postgres_datacache_tab[] = {{"GNUNET_setup_datacache_postgres_hbox", |
1161 | {NULL, NULL, NULL} | 1135 | "^postgres$", |
1162 | }; | 1136 | NULL}, |
1137 | {NULL, NULL, NULL}}; | ||
1163 | 1138 | ||
1164 | 1139 | ||
1165 | /** | 1140 | /** |
1166 | * Hide "sqlite namestore" tab if sqlite not active. | 1141 | * Hide "sqlite namestore" tab if sqlite not active. |
1167 | */ | 1142 | */ |
1168 | static struct GNUNET_SETUP_VisibilitySpecification hide_sqlite_namestore_tab[] = { | 1143 | static struct GNUNET_SETUP_VisibilitySpecification hide_sqlite_namestore_tab[] = |
1169 | {"GNUNET_setup_namestore_sqlite_label", "^sqlite$", NULL}, | 1144 | {{"GNUNET_setup_namestore_sqlite_label", "^sqlite$", NULL}, |
1170 | {NULL, NULL, NULL} | 1145 | {NULL, NULL, NULL}}; |
1171 | }; | ||
1172 | 1146 | ||
1173 | 1147 | ||
1174 | /** | 1148 | /** |
1175 | * Hide "postgres datastore" tab if postgres not active. | 1149 | * Hide "postgres datastore" tab if postgres not active. |
1176 | */ | 1150 | */ |
1177 | static struct GNUNET_SETUP_VisibilitySpecification hide_postgres_namestore_tab[] = { | 1151 | static struct GNUNET_SETUP_VisibilitySpecification |
1178 | {"GNUNET_setup_namestore_postgres_hbox", "^postgres$", NULL}, | 1152 | hide_postgres_namestore_tab[] = {{"GNUNET_setup_namestore_postgres_hbox", |
1179 | {NULL, NULL, NULL} | 1153 | "^postgres$", |
1180 | }; | 1154 | NULL}, |
1155 | {NULL, NULL, NULL}}; | ||
1181 | 1156 | ||
1182 | 1157 | ||
1183 | /** | 1158 | /** |
1184 | * Hide advertised TCP port if port is zero. | 1159 | * Hide advertised TCP port if port is zero. |
1185 | */ | 1160 | */ |
1186 | static struct GNUNET_SETUP_VisibilitySpecification hide_all_tcp_options[] = { | 1161 | static struct GNUNET_SETUP_VisibilitySpecification hide_all_tcp_options[] = |
1187 | {"GNUNET_setup_transport_tcp_adv_port_hbox", NULL, "^0$"}, | 1162 | {{"GNUNET_setup_transport_tcp_adv_port_hbox", NULL, "^0$"}, |
1188 | {NULL, NULL, NULL} | 1163 | {NULL, NULL, NULL}}; |
1189 | }; | ||
1190 | 1164 | ||
1191 | 1165 | ||
1192 | /** | 1166 | /** |
@@ -1196,1328 +1170,1412 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = { | |||
1196 | 1170 | ||
1197 | /* GENERAL TAB */ | 1171 | /* GENERAL TAB */ |
1198 | 1172 | ||
1199 | { | 1173 | {"GNUNET_setup_friends_only_checkbutton", |
1200 | "GNUNET_setup_friends_only_checkbutton", | ||
1201 | "toggled", | 1174 | "toggled", |
1202 | "topology", | 1175 | "topology", |
1203 | "FRIENDS-ONLY", | 1176 | "FRIENDS-ONLY", |
1204 | gettext_noop ("Should GNUnet exclusively connect to friends?"), | 1177 | gettext_noop ("Should GNUnet exclusively connect to friends?"), |
1205 | "https://old.gnunet.org/configuration-f2f", | 1178 | "https://old.gnunet.org/configuration-f2f", |
1206 | &load_yes_no, | 1179 | &load_yes_no, |
1207 | &save_yes_no, NULL, | 1180 | &save_yes_no, |
1208 | NULL, NULL, | 1181 | NULL, |
1182 | NULL, | ||
1183 | NULL, | ||
1209 | hide_min_connected_friends}, | 1184 | hide_min_connected_friends}, |
1210 | 1185 | ||
1211 | { | 1186 | {"GNUNET_setup_minimum_friends_spinbutton", |
1212 | "GNUNET_setup_minimum_friends_spinbutton", | ||
1213 | "value-changed", | 1187 | "value-changed", |
1214 | "topology", | 1188 | "topology", |
1215 | "MINIMUM-FRIENDS", | 1189 | "MINIMUM-FRIENDS", |
1216 | gettext_noop ("Minimum number of friendly connections"), | 1190 | gettext_noop ("Minimum number of friendly connections"), |
1217 | "https://old.gnunet.org/configuration-f2f", | 1191 | "https://old.gnunet.org/configuration-f2f", |
1218 | &load_number, | 1192 | &load_number, |
1219 | &save_number, NULL, | 1193 | &save_number, |
1220 | NULL, NULL, | 1194 | NULL, |
1195 | NULL, | ||
1196 | NULL, | ||
1221 | NULL}, | 1197 | NULL}, |
1222 | 1198 | ||
1223 | { | 1199 | {"GNUNET_setup_general_services_topology_checkbutton", |
1224 | "GNUNET_setup_general_services_topology_checkbutton", | ||
1225 | "toggled", | 1200 | "toggled", |
1226 | "topology", | 1201 | "topology", |
1227 | "FORCESTART", | 1202 | "FORCESTART", |
1228 | gettext_noop ("Topology should always be loaded"), | 1203 | gettext_noop ("Topology should always be loaded"), |
1229 | "https://old.gnunet.org/configuration-topology", | 1204 | "https://old.gnunet.org/configuration-topology", |
1230 | &load_yes_no, | 1205 | &load_yes_no, |
1231 | &save_yes_no, NULL, | 1206 | &save_yes_no, |
1232 | NULL, NULL, | 1207 | NULL, |
1208 | NULL, | ||
1209 | NULL, | ||
1233 | NULL}, | 1210 | NULL}, |
1234 | 1211 | ||
1235 | { | 1212 | {"GNUNET_setup_general_services_hostlist_checkbutton", |
1236 | "GNUNET_setup_general_services_hostlist_checkbutton", | ||
1237 | "toggled", | 1213 | "toggled", |
1238 | "hostlist", | 1214 | "hostlist", |
1239 | "FORCESTART", | 1215 | "FORCESTART", |
1240 | gettext_noop | 1216 | gettext_noop ( |
1241 | ("Should hostlist support be started automatically on startup?"), | 1217 | "Should hostlist support be started automatically on startup?"), |
1242 | "https://old.gnunet.org/configuration-hostlist", | 1218 | "https://old.gnunet.org/configuration-hostlist", |
1243 | &load_yes_no, | 1219 | &load_yes_no, |
1244 | &save_yes_no, NULL, | 1220 | &save_yes_no, |
1245 | NULL, NULL, | 1221 | NULL, |
1222 | NULL, | ||
1223 | NULL, | ||
1246 | hide_hostlist_tab}, | 1224 | hide_hostlist_tab}, |
1247 | 1225 | ||
1248 | { | 1226 | {"GNUNET_setup_general_services_fs_checkbutton", |
1249 | "GNUNET_setup_general_services_fs_checkbutton", | ||
1250 | "toggled", | 1227 | "toggled", |
1251 | "fs", | 1228 | "fs", |
1252 | "FORCESTART", | 1229 | "FORCESTART", |
1253 | gettext_noop ("Should file-sharing be started automatically on startup?"), | 1230 | gettext_noop ("Should file-sharing be started automatically on startup?"), |
1254 | "https://old.gnunet.org/configuration-fs", | 1231 | "https://old.gnunet.org/configuration-fs", |
1255 | &load_yes_no, | 1232 | &load_yes_no, |
1256 | &save_yes_no, NULL, | 1233 | &save_yes_no, |
1257 | NULL, NULL, | 1234 | NULL, |
1235 | NULL, | ||
1236 | NULL, | ||
1258 | hide_fs_tab}, | 1237 | hide_fs_tab}, |
1259 | 1238 | ||
1260 | { | 1239 | {"GNUNET_setup_hostlist_client_enable_checkbutton", |
1261 | "GNUNET_setup_hostlist_client_enable_checkbutton", | ||
1262 | "toggled", | 1240 | "toggled", |
1263 | "hostlist", | 1241 | "hostlist", |
1264 | "OPTIONS", | 1242 | "OPTIONS", |
1265 | gettext_noop ("Should GNUnet learn about other peers using hostlists"), | 1243 | gettext_noop ("Should GNUnet learn about other peers using hostlists"), |
1266 | "https://old.gnunet.org/configuration-hostlist", | 1244 | "https://old.gnunet.org/configuration-hostlist", |
1267 | &load_option_list, | 1245 | &load_option_list, |
1268 | &save_option_list, "-b", | 1246 | &save_option_list, |
1269 | NULL, NULL, | 1247 | "-b", |
1248 | NULL, | ||
1249 | NULL, | ||
1270 | NULL}, | 1250 | NULL}, |
1271 | 1251 | ||
1272 | { | 1252 | {"GNUNET_setup_hostlist_client_learn_checkbutton", |
1273 | "GNUNET_setup_hostlist_client_learn_checkbutton", | ||
1274 | "toggled", | 1253 | "toggled", |
1275 | "hostlist", | 1254 | "hostlist", |
1276 | "OPTIONS", | 1255 | "OPTIONS", |
1277 | gettext_noop ("Should GNUnet learn hostlists from other peers"), | 1256 | gettext_noop ("Should GNUnet learn hostlists from other peers"), |
1278 | "https://old.gnunet.org/configuration-hostlist", | 1257 | "https://old.gnunet.org/configuration-hostlist", |
1279 | &load_option_list, | 1258 | &load_option_list, |
1280 | &save_option_list, "-e", | 1259 | &save_option_list, |
1281 | NULL, NULL, | 1260 | "-e", |
1261 | NULL, | ||
1262 | NULL, | ||
1282 | NULL}, | 1263 | NULL}, |
1283 | 1264 | ||
1284 | { | 1265 | {"GNUNET_setup_hostlist_offer_hostlist_checkbutton", |
1285 | "GNUNET_setup_hostlist_offer_hostlist_checkbutton", | ||
1286 | "toggled", | 1266 | "toggled", |
1287 | "hostlist", | 1267 | "hostlist", |
1288 | "OPTIONS", | 1268 | "OPTIONS", |
1289 | gettext_noop ("Should this peer offer a hostlist to other peers"), | 1269 | gettext_noop ("Should this peer offer a hostlist to other peers"), |
1290 | "https://old.gnunet.org/configuring-hostlist-bootstrap", | 1270 | "https://old.gnunet.org/configuring-hostlist-bootstrap", |
1291 | &load_option_list, | 1271 | &load_option_list, |
1292 | &save_option_list, "-p", | 1272 | &save_option_list, |
1293 | &highlight_port_collisions, NULL, | 1273 | "-p", |
1274 | &highlight_port_collisions, | ||
1275 | NULL, | ||
1294 | hide_hostlist_server_options}, | 1276 | hide_hostlist_server_options}, |
1295 | 1277 | ||
1296 | { | 1278 | {"GNUNET_setup_hostlist_advertise_checkbutton", |
1297 | "GNUNET_setup_hostlist_advertise_checkbutton", | ||
1298 | "toggled", | 1279 | "toggled", |
1299 | "hostlist", | 1280 | "hostlist", |
1300 | "OPTIONS", | 1281 | "OPTIONS", |
1301 | gettext_noop ("Should this peer advertise its hostlist to other peers"), | 1282 | gettext_noop ("Should this peer advertise its hostlist to other peers"), |
1302 | "https://old.gnunet.org/configuring-hostlist-bootstrap", | 1283 | "https://old.gnunet.org/configuring-hostlist-bootstrap", |
1303 | &load_option_list, | 1284 | &load_option_list, |
1304 | &save_option_list, "-a", | 1285 | &save_option_list, |
1305 | NULL, NULL, | 1286 | "-a", |
1287 | NULL, | ||
1288 | NULL, | ||
1306 | NULL}, | 1289 | NULL}, |
1307 | 1290 | ||
1308 | { | 1291 | {"GNUNET_setup_hostlist_server_port_spin_button", |
1309 | "GNUNET_setup_hostlist_server_port_spin_button", | ||
1310 | "value-changed", | 1292 | "value-changed", |
1311 | "hostlist", | 1293 | "hostlist", |
1312 | "HTTPPORT", | 1294 | "HTTPPORT", |
1313 | gettext_noop ("Port this peers hostlist should be offered on"), | 1295 | gettext_noop ("Port this peers hostlist should be offered on"), |
1314 | "https://old.gnunet.org/configuring-hostlist-bootstrap", | 1296 | "https://old.gnunet.org/configuring-hostlist-bootstrap", |
1315 | &load_number, | 1297 | &load_number, |
1316 | &save_number, NULL, | 1298 | &save_number, |
1317 | &highlight_port_collisions, NULL, | 1299 | NULL, |
1300 | &highlight_port_collisions, | ||
1301 | NULL, | ||
1318 | NULL}, | 1302 | NULL}, |
1319 | 1303 | ||
1320 | { | 1304 | {"GNUNET_setup_hostlist_url_liststore", |
1321 | "GNUNET_setup_hostlist_url_liststore", | ||
1322 | "row-changed", | 1305 | "row-changed", |
1323 | "hostlist", | 1306 | "hostlist", |
1324 | "SERVERS", | 1307 | "SERVERS", |
1325 | NULL, NULL, | 1308 | NULL, |
1309 | NULL, | ||
1326 | &load_string_list_store, | 1310 | &load_string_list_store, |
1327 | &save_string_list_store, NULL, | 1311 | &save_string_list_store, |
1328 | NULL, NULL, | 1312 | NULL, |
1313 | NULL, | ||
1314 | NULL, | ||
1329 | NULL}, | 1315 | NULL}, |
1330 | 1316 | ||
1331 | { | 1317 | {"GNUNET_setup_hostlist_url_liststore", |
1332 | "GNUNET_setup_hostlist_url_liststore", | ||
1333 | "row-deleted", | 1318 | "row-deleted", |
1334 | "hostlist", | 1319 | "hostlist", |
1335 | "SERVERS", | 1320 | "SERVERS", |
1336 | NULL, NULL, | ||
1337 | NULL, | 1321 | NULL, |
1338 | &save_string_list_store, NULL, | 1322 | NULL, |
1339 | NULL, NULL, | 1323 | NULL, |
1324 | &save_string_list_store, | ||
1325 | NULL, | ||
1326 | NULL, | ||
1327 | NULL, | ||
1340 | NULL}, | 1328 | NULL}, |
1341 | 1329 | ||
1342 | { | 1330 | {"GNUNET_setup_hostlist_url_treeview", |
1343 | "GNUNET_setup_hostlist_url_treeview", | 1331 | NULL, |
1344 | NULL, NULL, NULL, /* FIXME */ | 1332 | NULL, |
1333 | NULL, /* FIXME */ | ||
1345 | gettext_noop ("Known hostlist URLs"), | 1334 | gettext_noop ("Known hostlist URLs"), |
1346 | "https://old.gnunet.org/configuration-hostlist", | 1335 | "https://old.gnunet.org/configuration-hostlist", |
1347 | NULL, NULL, NULL, /* FIXME */ | 1336 | NULL, |
1348 | NULL, NULL, | 1337 | NULL, |
1338 | NULL, /* FIXME */ | ||
1339 | NULL, | ||
1340 | NULL, | ||
1349 | NULL}, | 1341 | NULL}, |
1350 | 1342 | ||
1351 | { | 1343 | {"GNUNET_setup_hostlist_proxy_type_none_radiobutton", |
1352 | "GNUNET_setup_hostlist_proxy_type_none_radiobutton", | ||
1353 | "toggled", | 1344 | "toggled", |
1354 | "hostlist", | 1345 | "hostlist", |
1355 | "PROXY_TYPE", | 1346 | "PROXY_TYPE", |
1356 | gettext_noop ("Do not use a proxy to download hostlists"), | 1347 | gettext_noop ("Do not use a proxy to download hostlists"), |
1357 | "https://old.gnunet.org/configuration-hostlist-proxy", | 1348 | "https://old.gnunet.org/configuration-hostlist-proxy", |
1358 | &load_option_list /* abuse! */ , | 1349 | &load_option_list /* abuse! */, |
1359 | &save_option_list /* abuse! */ , "NONE", | 1350 | &save_option_list /* abuse! */, |
1360 | NULL, NULL, | 1351 | "NONE", |
1361 | hide_hostlist_proxy_options | 1352 | NULL, |
1362 | }, | 1353 | NULL, |
1354 | hide_hostlist_proxy_options}, | ||
1363 | 1355 | ||
1364 | { | 1356 | {"GNUNET_setup_hostlist_proxy_type_http_radiobutton", |
1365 | "GNUNET_setup_hostlist_proxy_type_http_radiobutton", | ||
1366 | "toggled", | 1357 | "toggled", |
1367 | "hostlist", | 1358 | "hostlist", |
1368 | "PROXY_TYPE", | 1359 | "PROXY_TYPE", |
1369 | gettext_noop ("Use an HTTP proxy"), | 1360 | gettext_noop ("Use an HTTP proxy"), |
1370 | "https://old.gnunet.org/configuration-hostlist-proxy", | 1361 | "https://old.gnunet.org/configuration-hostlist-proxy", |
1371 | &load_option_list /* abuse! */ , | 1362 | &load_option_list /* abuse! */, |
1372 | &save_option_list /* abuse! */ , "HTTP", | 1363 | &save_option_list /* abuse! */, |
1373 | NULL, NULL, | 1364 | "HTTP", |
1374 | hide_hostlist_proxy_options | 1365 | NULL, |
1375 | }, | 1366 | NULL, |
1367 | hide_hostlist_proxy_options}, | ||
1376 | 1368 | ||
1377 | { | 1369 | {"GNUNET_setup_hostlist_proxy_type_http_10_radiobutton", |
1378 | "GNUNET_setup_hostlist_proxy_type_http_10_radiobutton", | ||
1379 | "toggled", | 1370 | "toggled", |
1380 | "hostlist", | 1371 | "hostlist", |
1381 | "PROXY_TYPE", | 1372 | "PROXY_TYPE", |
1382 | gettext_noop ("Use an HTTP v1.0 (only) proxy"), | 1373 | gettext_noop ("Use an HTTP v1.0 (only) proxy"), |
1383 | "https://old.gnunet.org/configuration-hostlist-proxy", | 1374 | "https://old.gnunet.org/configuration-hostlist-proxy", |
1384 | &load_option_list /* abuse! */ , | 1375 | &load_option_list /* abuse! */, |
1385 | &save_option_list /* abuse! */ , "HTTP_1_0", | 1376 | &save_option_list /* abuse! */, |
1386 | NULL, NULL, | 1377 | "HTTP_1_0", |
1387 | hide_hostlist_proxy_options | 1378 | NULL, |
1388 | }, | 1379 | NULL, |
1380 | hide_hostlist_proxy_options}, | ||
1389 | 1381 | ||
1390 | { | 1382 | {"GNUNET_setup_hostlist_proxy_type_socks4_radiobutton", |
1391 | "GNUNET_setup_hostlist_proxy_type_socks4_radiobutton", | ||
1392 | "toggled", | 1383 | "toggled", |
1393 | "hostlist", | 1384 | "hostlist", |
1394 | "PROXY_TYPE", | 1385 | "PROXY_TYPE", |
1395 | gettext_noop ("Use a SOCKS v4 proxy"), | 1386 | gettext_noop ("Use a SOCKS v4 proxy"), |
1396 | "https://old.gnunet.org/configuration-hostlist-proxy", | 1387 | "https://old.gnunet.org/configuration-hostlist-proxy", |
1397 | &load_option_list /* abuse! */ , | 1388 | &load_option_list /* abuse! */, |
1398 | &save_option_list /* abuse! */ , "SOCKS4", | 1389 | &save_option_list /* abuse! */, |
1399 | NULL, NULL, | 1390 | "SOCKS4", |
1400 | hide_hostlist_proxy_options | 1391 | NULL, |
1401 | }, | 1392 | NULL, |
1393 | hide_hostlist_proxy_options}, | ||
1402 | 1394 | ||
1403 | { | 1395 | {"GNUNET_setup_hostlist_proxy_type_socks4a_radiobutton", |
1404 | "GNUNET_setup_hostlist_proxy_type_socks4a_radiobutton", | ||
1405 | "toggled", | 1396 | "toggled", |
1406 | "hostlist", | 1397 | "hostlist", |
1407 | "PROXY_TYPE", | 1398 | "PROXY_TYPE", |
1408 | gettext_noop ("Use a SOCKS v4a proxy"), | 1399 | gettext_noop ("Use a SOCKS v4a proxy"), |
1409 | "https://old.gnunet.org/configuration-hostlist-proxy", | 1400 | "https://old.gnunet.org/configuration-hostlist-proxy", |
1410 | &load_option_list /* abuse! */ , | 1401 | &load_option_list /* abuse! */, |
1411 | &save_option_list /* abuse! */ , "SOCKS4a", | 1402 | &save_option_list /* abuse! */, |
1412 | NULL, NULL, | 1403 | "SOCKS4a", |
1413 | hide_hostlist_proxy_options | 1404 | NULL, |
1414 | }, | 1405 | NULL, |
1406 | hide_hostlist_proxy_options}, | ||
1415 | 1407 | ||
1416 | { | 1408 | {"GNUNET_setup_hostlist_proxy_type_socks5_radiobutton", |
1417 | "GNUNET_setup_hostlist_proxy_type_socks5_radiobutton", | ||
1418 | "toggled", | 1409 | "toggled", |
1419 | "hostlist", | 1410 | "hostlist", |
1420 | "PROXY_TYPE", | 1411 | "PROXY_TYPE", |
1421 | gettext_noop ("Use a SOCKS v5 proxy"), | 1412 | gettext_noop ("Use a SOCKS v5 proxy"), |
1422 | "https://old.gnunet.org/configuration-hostlist-proxy", | 1413 | "https://old.gnunet.org/configuration-hostlist-proxy", |
1423 | &load_option_list /* abuse! */ , | 1414 | &load_option_list /* abuse! */, |
1424 | &save_option_list /* abuse! */ , "SOCKS5", | 1415 | &save_option_list /* abuse! */, |
1425 | NULL, NULL, | 1416 | "SOCKS5", |
1426 | hide_hostlist_proxy_options | 1417 | NULL, |
1427 | }, | 1418 | NULL, |
1419 | hide_hostlist_proxy_options}, | ||
1428 | 1420 | ||
1429 | { | 1421 | {"GNUNET_setup_hostlist_proxy_type_socks5_hostname_radiobutton", |
1430 | "GNUNET_setup_hostlist_proxy_type_socks5_hostname_radiobutton", | ||
1431 | "toggled", | 1422 | "toggled", |
1432 | "hostlist", | 1423 | "hostlist", |
1433 | "PROXY_TYPE", | 1424 | "PROXY_TYPE", |
1434 | gettext_noop ("Use a SOCKS v5 proxy with hostname"), | 1425 | gettext_noop ("Use a SOCKS v5 proxy with hostname"), |
1435 | "https://old.gnunet.org/configuration-hostlist-proxy", | 1426 | "https://old.gnunet.org/configuration-hostlist-proxy", |
1436 | &load_option_list /* abuse! */ , | 1427 | &load_option_list /* abuse! */, |
1437 | &save_option_list /* abuse! */ , "SOCKS5_HOSTNAME", | 1428 | &save_option_list /* abuse! */, |
1438 | NULL, NULL, | 1429 | "SOCKS5_HOSTNAME", |
1439 | hide_hostlist_proxy_options | 1430 | NULL, |
1440 | }, | 1431 | NULL, |
1432 | hide_hostlist_proxy_options}, | ||
1441 | 1433 | ||
1442 | { | 1434 | {"GNUNET_setup_hostlist_proxy_hostname_entry", |
1443 | "GNUNET_setup_hostlist_proxy_hostname_entry", | ||
1444 | "changed", | 1435 | "changed", |
1445 | "hostlist", | 1436 | "hostlist", |
1446 | "PROXY", | 1437 | "PROXY", |
1447 | gettext_noop ("Specify hostname or IP (and optionally) port of the proxy"), | 1438 | gettext_noop ("Specify hostname or IP (and optionally) port of the proxy"), |
1448 | "https://old.gnunet.org/configuration-hostlist-proxy", | 1439 | "https://old.gnunet.org/configuration-hostlist-proxy", |
1449 | &load_text, | 1440 | &load_text, |
1450 | &save_text, NULL, | 1441 | &save_text, |
1451 | NULL, NULL, | 1442 | NULL, |
1443 | NULL, | ||
1444 | NULL, | ||
1452 | NULL}, | 1445 | NULL}, |
1453 | 1446 | ||
1454 | { | 1447 | {"GNUNET_setup_hostlist_proxy_username_entry", |
1455 | "GNUNET_setup_hostlist_proxy_username_entry", | ||
1456 | "changed", | 1448 | "changed", |
1457 | "hostlist", | 1449 | "hostlist", |
1458 | "PROXY_USERNAME", | 1450 | "PROXY_USERNAME", |
1459 | gettext_noop ("Specify username for the proxy (if needed)"), | 1451 | gettext_noop ("Specify username for the proxy (if needed)"), |
1460 | "https://old.gnunet.org/configuration-hostlist-proxy", | 1452 | "https://old.gnunet.org/configuration-hostlist-proxy", |
1461 | &load_text, | 1453 | &load_text, |
1462 | &save_text, NULL, | 1454 | &save_text, |
1463 | NULL, NULL, | 1455 | NULL, |
1456 | NULL, | ||
1457 | NULL, | ||
1464 | NULL}, | 1458 | NULL}, |
1465 | 1459 | ||
1466 | { | 1460 | {"GNUNET_setup_hostlist_proxy_password_entry", |
1467 | "GNUNET_setup_hostlist_proxy_password_entry", | ||
1468 | "changed", | 1461 | "changed", |
1469 | "hostlist", | 1462 | "hostlist", |
1470 | "PROXY_PASSWORD", | 1463 | "PROXY_PASSWORD", |
1471 | gettext_noop ("Specify password for the proxy (if needed)"), | 1464 | gettext_noop ("Specify password for the proxy (if needed)"), |
1472 | "https://old.gnunet.org/configuration-hostlist-proxy", | 1465 | "https://old.gnunet.org/configuration-hostlist-proxy", |
1473 | &load_text, | 1466 | &load_text, |
1474 | &save_text, NULL, | 1467 | &save_text, |
1475 | NULL, NULL, | 1468 | NULL, |
1469 | NULL, | ||
1470 | NULL, | ||
1476 | NULL}, | 1471 | NULL}, |
1477 | 1472 | ||
1478 | { | 1473 | {"GNUNET_setup_bandwidth_out_spinbutton", |
1479 | "GNUNET_setup_bandwidth_out_spinbutton", | ||
1480 | "value-changed", | 1474 | "value-changed", |
1481 | "ats", | 1475 | "ats", |
1482 | "WAN_QUOTA_OUT", | 1476 | "WAN_QUOTA_OUT", |
1483 | gettext_noop ("How many bytes per second are we allowed to transmit?"), | 1477 | gettext_noop ("How many bytes per second are we allowed to transmit?"), |
1484 | "https://old.gnunet.org/configuration-bandwidth", | 1478 | "https://old.gnunet.org/configuration-bandwidth", |
1485 | &load_number, | 1479 | &load_number, |
1486 | &save_number, NULL, | 1480 | &save_number, |
1487 | NULL, NULL, | 1481 | NULL, |
1482 | NULL, | ||
1483 | NULL, | ||
1488 | NULL}, | 1484 | NULL}, |
1489 | 1485 | ||
1490 | { | 1486 | {"GNUNET_setup_bandwidth_in_spinbutton", |
1491 | "GNUNET_setup_bandwidth_in_spinbutton", | ||
1492 | "value-changed", | 1487 | "value-changed", |
1493 | "ats", | 1488 | "ats", |
1494 | "WAN_QUOTA_IN", | 1489 | "WAN_QUOTA_IN", |
1495 | gettext_noop ("How many bytes per second are we allowed to receive?"), | 1490 | gettext_noop ("How many bytes per second are we allowed to receive?"), |
1496 | "https://old.gnunet.org/configuration-bandwidth", | 1491 | "https://old.gnunet.org/configuration-bandwidth", |
1497 | &load_number, | 1492 | &load_number, |
1498 | &save_number, NULL, | 1493 | &save_number, |
1499 | NULL, NULL, | 1494 | NULL, |
1495 | NULL, | ||
1496 | NULL, | ||
1500 | NULL}, | 1497 | NULL}, |
1501 | 1498 | ||
1502 | /* Transport TAB */ | 1499 | /* Transport TAB */ |
1503 | 1500 | ||
1504 | { | 1501 | {"GNUNET_setup_transport_tcp_checkbutton", |
1505 | "GNUNET_setup_transport_tcp_checkbutton", | ||
1506 | "toggled", | 1502 | "toggled", |
1507 | "transport", | 1503 | "transport", |
1508 | "PLUGINS", | 1504 | "PLUGINS", |
1509 | gettext_noop ("Enable communication via TCP"), | 1505 | gettext_noop ("Enable communication via TCP"), |
1510 | "https://old.gnunet.org/configuration-tcp", | 1506 | "https://old.gnunet.org/configuration-tcp", |
1511 | &load_option_list, | 1507 | &load_option_list, |
1512 | &save_option_list, "tcp", | 1508 | &save_option_list, |
1513 | &highlight_port_collisions, NULL, | 1509 | "tcp", |
1510 | &highlight_port_collisions, | ||
1511 | NULL, | ||
1514 | hide_tcp_tab}, | 1512 | hide_tcp_tab}, |
1515 | 1513 | ||
1516 | { | 1514 | {"GNUNET_setup_transport_udp_checkbutton", |
1517 | "GNUNET_setup_transport_udp_checkbutton", | ||
1518 | "toggled", | 1515 | "toggled", |
1519 | "transport", | 1516 | "transport", |
1520 | "PLUGINS", | 1517 | "PLUGINS", |
1521 | gettext_noop ("Enable communication via UDP"), | 1518 | gettext_noop ("Enable communication via UDP"), |
1522 | "https://old.gnunet.org/configuration-udp", | 1519 | "https://old.gnunet.org/configuration-udp", |
1523 | &load_option_list, | 1520 | &load_option_list, |
1524 | &save_option_list, "udp", | 1521 | &save_option_list, |
1525 | NULL, NULL, | 1522 | "udp", |
1523 | NULL, | ||
1524 | NULL, | ||
1526 | hide_udp_tab}, | 1525 | hide_udp_tab}, |
1527 | 1526 | ||
1528 | { | 1527 | {"GNUNET_setup_transport_http_server_checkbutton", |
1529 | "GNUNET_setup_transport_http_server_checkbutton", | ||
1530 | "toggled", | 1528 | "toggled", |
1531 | "transport", | 1529 | "transport", |
1532 | "PLUGINS", | 1530 | "PLUGINS", |
1533 | gettext_noop ("Enable communication via HTTP as a server"), | 1531 | gettext_noop ("Enable communication via HTTP as a server"), |
1534 | "https://old.gnunet.org/configuration-http", | 1532 | "https://old.gnunet.org/configuration-http", |
1535 | &load_option_list, | 1533 | &load_option_list, |
1536 | &save_option_list, "http_server", | 1534 | &save_option_list, |
1537 | &highlight_port_collisions, NULL, | 1535 | "http_server", |
1536 | &highlight_port_collisions, | ||
1537 | NULL, | ||
1538 | hide_http_server_tab}, | 1538 | hide_http_server_tab}, |
1539 | 1539 | ||
1540 | { | 1540 | {"GNUNET_setup_transport_http_client_checkbutton", |
1541 | "GNUNET_setup_transport_http_client_checkbutton", | ||
1542 | "toggled", | 1541 | "toggled", |
1543 | "transport", | 1542 | "transport", |
1544 | "PLUGINS", | 1543 | "PLUGINS", |
1545 | gettext_noop ("Enable communication via HTTP as a client"), | 1544 | gettext_noop ("Enable communication via HTTP as a client"), |
1546 | "https://old.gnunet.org/configuration-http", | 1545 | "https://old.gnunet.org/configuration-http", |
1547 | &load_option_list, | 1546 | &load_option_list, |
1548 | &save_option_list, "http_client", | 1547 | &save_option_list, |
1549 | &highlight_port_collisions, NULL, | 1548 | "http_client", |
1549 | &highlight_port_collisions, | ||
1550 | NULL, | ||
1550 | hide_http_client_tab}, | 1551 | hide_http_client_tab}, |
1551 | 1552 | ||
1552 | { | 1553 | {"GNUNET_setup_transport_https_server_checkbutton", |
1553 | "GNUNET_setup_transport_https_server_checkbutton", | ||
1554 | "toggled", | 1554 | "toggled", |
1555 | "transport", | 1555 | "transport", |
1556 | "PLUGINS", | 1556 | "PLUGINS", |
1557 | gettext_noop ("Enable communication via HTTPS as a server"), | 1557 | gettext_noop ("Enable communication via HTTPS as a server"), |
1558 | "https://old.gnunet.org/configuration-https", | 1558 | "https://old.gnunet.org/configuration-https", |
1559 | &load_option_list, | 1559 | &load_option_list, |
1560 | &save_option_list, "https_server", | 1560 | &save_option_list, |
1561 | &highlight_port_collisions, NULL, | 1561 | "https_server", |
1562 | &highlight_port_collisions, | ||
1563 | NULL, | ||
1562 | hide_https_server_tab}, | 1564 | hide_https_server_tab}, |
1563 | 1565 | ||
1564 | { | 1566 | {"GNUNET_setup_transport_https_client_checkbutton", |
1565 | "GNUNET_setup_transport_https_client_checkbutton", | ||
1566 | "toggled", | 1567 | "toggled", |
1567 | "transport", | 1568 | "transport", |
1568 | "PLUGINS", | 1569 | "PLUGINS", |
1569 | gettext_noop ("Enable communication via HTTPS as a client"), | 1570 | gettext_noop ("Enable communication via HTTPS as a client"), |
1570 | "https://old.gnunet.org/configuration-https", | 1571 | "https://old.gnunet.org/configuration-https", |
1571 | &load_option_list, | 1572 | &load_option_list, |
1572 | &save_option_list, "https_client", | 1573 | &save_option_list, |
1573 | &highlight_port_collisions, NULL, | 1574 | "https_client", |
1575 | &highlight_port_collisions, | ||
1576 | NULL, | ||
1574 | hide_https_client_tab}, | 1577 | hide_https_client_tab}, |
1575 | 1578 | ||
1576 | { | 1579 | {"GNUNET_setup_transport_dv_checkbutton", |
1577 | "GNUNET_setup_transport_dv_checkbutton", | ||
1578 | "toggled", | 1580 | "toggled", |
1579 | "transport", | 1581 | "transport", |
1580 | "PLUGINS", | 1582 | "PLUGINS", |
1581 | gettext_noop ("Enable communication via DV"), | 1583 | gettext_noop ("Enable communication via DV"), |
1582 | "https://old.gnunet.org/configuration-dv", | 1584 | "https://old.gnunet.org/configuration-dv", |
1583 | &load_option_list, | 1585 | &load_option_list, |
1584 | &save_option_list, "dv", | 1586 | &save_option_list, |
1585 | NULL, NULL, | 1587 | "dv", |
1588 | NULL, | ||
1589 | NULL, | ||
1586 | hide_dv_tab}, | 1590 | hide_dv_tab}, |
1587 | 1591 | ||
1588 | { | 1592 | {"GNUNET_setup_transport_wlan_checkbutton", |
1589 | "GNUNET_setup_transport_wlan_checkbutton", | ||
1590 | "toggled", | 1593 | "toggled", |
1591 | "transport", | 1594 | "transport", |
1592 | "PLUGINS", | 1595 | "PLUGINS", |
1593 | gettext_noop ("Enable communication via WLAN"), | 1596 | gettext_noop ("Enable communication via WLAN"), |
1594 | "https://old.gnunet.org/configuration-wlan", | 1597 | "https://old.gnunet.org/configuration-wlan", |
1595 | &load_option_list, | 1598 | &load_option_list, |
1596 | &save_option_list, "wlan", | 1599 | &save_option_list, |
1597 | NULL, NULL, | 1600 | "wlan", |
1601 | NULL, | ||
1602 | NULL, | ||
1598 | hide_wlan_tab}, | 1603 | hide_wlan_tab}, |
1599 | 1604 | ||
1600 | { | 1605 | {"GNUNET_setup_transport_tcp_port_spinbutton", |
1601 | "GNUNET_setup_transport_tcp_port_spinbutton", | ||
1602 | "value-changed", | 1606 | "value-changed", |
1603 | "transport-tcp", | 1607 | "transport-tcp", |
1604 | "PORT", | 1608 | "PORT", |
1605 | gettext_noop ("Port we bind to for TCP"), | 1609 | gettext_noop ("Port we bind to for TCP"), |
1606 | "https://old.gnunet.org/configuration-tcp", | 1610 | "https://old.gnunet.org/configuration-tcp", |
1607 | &load_number, | 1611 | &load_number, |
1608 | &save_number, NULL, | 1612 | &save_number, |
1609 | &highlight_port_collisions, NULL, | 1613 | NULL, |
1614 | &highlight_port_collisions, | ||
1615 | NULL, | ||
1610 | hide_all_tcp_options}, | 1616 | hide_all_tcp_options}, |
1611 | 1617 | ||
1612 | { | 1618 | {"GNUNET_setup_transport_tcp_adv_port_spinbutton", |
1613 | "GNUNET_setup_transport_tcp_adv_port_spinbutton", | ||
1614 | "value-changed", | 1619 | "value-changed", |
1615 | "transport-tcp", | 1620 | "transport-tcp", |
1616 | "ADVERTISED_PORT", | 1621 | "ADVERTISED_PORT", |
1617 | gettext_noop ("Port visible to other peers"), | 1622 | gettext_noop ("Port visible to other peers"), |
1618 | "https://old.gnunet.org/configuration-tcp", | 1623 | "https://old.gnunet.org/configuration-tcp", |
1619 | &load_number, | 1624 | &load_number, |
1620 | &save_number, NULL, | 1625 | &save_number, |
1621 | NULL, NULL, | 1626 | NULL, |
1627 | NULL, | ||
1628 | NULL, | ||
1622 | NULL}, | 1629 | NULL}, |
1623 | 1630 | ||
1624 | { | 1631 | {"GNUNET_setup_transport_udp_port_spinbutton", |
1625 | "GNUNET_setup_transport_udp_port_spinbutton", | ||
1626 | "value-changed", | 1632 | "value-changed", |
1627 | "transport-udp", | 1633 | "transport-udp", |
1628 | "PORT", | 1634 | "PORT", |
1629 | gettext_noop ("Port for inbound UDP packets, use 0 if behind NAT"), | 1635 | gettext_noop ("Port for inbound UDP packets, use 0 if behind NAT"), |
1630 | "https://old.gnunet.org/configuration-udp", | 1636 | "https://old.gnunet.org/configuration-udp", |
1631 | &load_number, | 1637 | &load_number, |
1632 | &save_number, NULL, | 1638 | &save_number, |
1633 | NULL, NULL, | 1639 | NULL, |
1640 | NULL, | ||
1641 | NULL, | ||
1634 | NULL}, | 1642 | NULL}, |
1635 | 1643 | ||
1636 | { | 1644 | {"GNUNET_setup_transport_udp_advertised_port_spinbutton", |
1637 | "GNUNET_setup_transport_udp_advertised_port_spinbutton", | ||
1638 | "value-changed", | 1645 | "value-changed", |
1639 | "transport-udp", | 1646 | "transport-udp", |
1640 | "ADVERTISED_PORT", | 1647 | "ADVERTISED_PORT", |
1641 | gettext_noop ("Port visible to other peers"), | 1648 | gettext_noop ("Port visible to other peers"), |
1642 | "https://old.gnunet.org/configuration-udp", | 1649 | "https://old.gnunet.org/configuration-udp", |
1643 | &load_number, | 1650 | &load_number, |
1644 | &save_number, NULL, | 1651 | &save_number, |
1645 | NULL, NULL, | 1652 | NULL, |
1653 | NULL, | ||
1654 | NULL, | ||
1646 | NULL}, | 1655 | NULL}, |
1647 | 1656 | ||
1648 | { | 1657 | {"GNUNET_setup_transport_http_port_spinbutton", |
1649 | "GNUNET_setup_transport_http_port_spinbutton", | ||
1650 | "value-changed", | 1658 | "value-changed", |
1651 | "transport-http_server", | 1659 | "transport-http_server", |
1652 | "PORT", | 1660 | "PORT", |
1653 | gettext_noop ("Port for inbound HTTP connections, use 0 if behind NAT"), | 1661 | gettext_noop ("Port for inbound HTTP connections, use 0 if behind NAT"), |
1654 | "https://old.gnunet.org/configuration-http", | 1662 | "https://old.gnunet.org/configuration-http", |
1655 | &load_number, | 1663 | &load_number, |
1656 | &save_number, NULL, | 1664 | &save_number, |
1657 | &highlight_port_collisions, NULL, | 1665 | NULL, |
1666 | &highlight_port_collisions, | ||
1667 | NULL, | ||
1658 | NULL}, | 1668 | NULL}, |
1659 | 1669 | ||
1660 | { | 1670 | {"GNUNET_setup_transport_http_advertised_port_spinbutton", |
1661 | "GNUNET_setup_transport_http_advertised_port_spinbutton", | ||
1662 | "value-changed", | 1671 | "value-changed", |
1663 | "transport-http_server", | 1672 | "transport-http_server", |
1664 | "ADVERTISED_PORT", | 1673 | "ADVERTISED_PORT", |
1665 | gettext_noop ("Port visible to other peers"), | 1674 | gettext_noop ("Port visible to other peers"), |
1666 | "https://old.gnunet.org/configuration-http", | 1675 | "https://old.gnunet.org/configuration-http", |
1667 | &load_number, | 1676 | &load_number, |
1668 | &save_number, NULL, | 1677 | &save_number, |
1669 | NULL, NULL, | 1678 | NULL, |
1679 | NULL, | ||
1680 | NULL, | ||
1670 | NULL}, | 1681 | NULL}, |
1671 | 1682 | ||
1672 | { | 1683 | {"GNUNET_setup_transport_https_port_spinbutton", |
1673 | "GNUNET_setup_transport_https_port_spinbutton", | ||
1674 | "value-changed", | 1684 | "value-changed", |
1675 | "transport-https_server", | 1685 | "transport-https_server", |
1676 | "PORT", | 1686 | "PORT", |
1677 | gettext_noop ("Port for inbound HTTPS connections, use 0 if behind NAT"), | 1687 | gettext_noop ("Port for inbound HTTPS connections, use 0 if behind NAT"), |
1678 | "https://old.gnunet.org/configuration-https", | 1688 | "https://old.gnunet.org/configuration-https", |
1679 | &load_number, | 1689 | &load_number, |
1680 | &save_number, NULL, | 1690 | &save_number, |
1681 | &highlight_port_collisions, NULL, | 1691 | NULL, |
1692 | &highlight_port_collisions, | ||
1693 | NULL, | ||
1682 | NULL}, | 1694 | NULL}, |
1683 | 1695 | ||
1684 | { | 1696 | {"GNUNET_setup_transport_https_advertised_port_spinbutton", |
1685 | "GNUNET_setup_transport_https_advertised_port_spinbutton", | ||
1686 | "value-changed", | 1697 | "value-changed", |
1687 | "transport-https_server", | 1698 | "transport-https_server", |
1688 | "ADVERTISED_PORT", | 1699 | "ADVERTISED_PORT", |
1689 | gettext_noop ("Port visible to other peers"), | 1700 | gettext_noop ("Port visible to other peers"), |
1690 | "https://old.gnunet.org/configuration-https", | 1701 | "https://old.gnunet.org/configuration-https", |
1691 | &load_number, | 1702 | &load_number, |
1692 | &save_number, NULL, | 1703 | &save_number, |
1693 | NULL, NULL, | 1704 | NULL, |
1705 | NULL, | ||
1706 | NULL, | ||
1694 | NULL}, | 1707 | NULL}, |
1695 | 1708 | ||
1696 | { | 1709 | {"GNUNET_setup_transport_http_client_proxy_type_none_radiobutton", |
1697 | "GNUNET_setup_transport_http_client_proxy_type_none_radiobutton", | 1710 | "toggled", |
1698 | "toggled", | 1711 | "transport-http_client", |
1699 | "transport-http_client", | 1712 | "PROXY_TYPE", |
1700 | "PROXY_TYPE", | 1713 | gettext_noop ("Do not use a proxy with the HTTP plugin"), |
1701 | gettext_noop ("Do not use a proxy with the HTTP plugin"), | 1714 | "https://old.gnunet.org/configuration-http", |
1702 | "https://old.gnunet.org/configuration-http", | 1715 | &load_option_list /* abuse! */, |
1703 | &load_option_list /* abuse! */ , | 1716 | &save_option_list /* abuse! */, |
1704 | &save_option_list /* abuse! */ , "NONE", | 1717 | "NONE", |
1705 | NULL, NULL, | 1718 | NULL, |
1706 | hide_http_proxy_options | 1719 | NULL, |
1707 | }, | 1720 | hide_http_proxy_options}, |
1708 | 1721 | ||
1709 | { | 1722 | {"GNUNET_setup_transport_http_client_proxy_type_http_radiobutton", |
1710 | "GNUNET_setup_transport_http_client_proxy_type_http_radiobutton", | 1723 | "toggled", |
1711 | "toggled", | 1724 | "transport-http_client", |
1712 | "transport-http_client", | 1725 | "PROXY_TYPE", |
1713 | "PROXY_TYPE", | 1726 | gettext_noop ("Use an HTTP proxy"), |
1714 | gettext_noop ("Use an HTTP proxy"), | 1727 | "https://old.gnunet.org/configuration-http", |
1715 | "https://old.gnunet.org/configuration-http", | 1728 | &load_option_list /* abuse! */, |
1716 | &load_option_list /* abuse! */ , | 1729 | &save_option_list /* abuse! */, |
1717 | &save_option_list /* abuse! */ , "HTTP", | 1730 | "HTTP", |
1718 | NULL, NULL, | 1731 | NULL, |
1719 | hide_http_proxy_options | 1732 | NULL, |
1720 | }, | 1733 | hide_http_proxy_options}, |
1721 | |||
1722 | { | ||
1723 | "GNUNET_setup_transport_http_client_proxy_type_socks4_radiobutton", | ||
1724 | "toggled", | ||
1725 | "transport-http_client", | ||
1726 | "PROXY_TYPE", | ||
1727 | gettext_noop ("Use a SOCKS v4 proxy"), | ||
1728 | "https://old.gnunet.org/configuration-http", | ||
1729 | &load_option_list /* abuse! */ , | ||
1730 | &save_option_list /* abuse! */ , "SOCKS4", | ||
1731 | NULL, NULL, | ||
1732 | hide_http_proxy_options | ||
1733 | }, | ||
1734 | |||
1735 | { | ||
1736 | "GNUNET_setup_transport_http_client_proxy_type_socks4a_radiobutton", | ||
1737 | "toggled", | ||
1738 | "transport-http_client", | ||
1739 | "PROXY_TYPE", | ||
1740 | gettext_noop ("Use a SOCKS v4a proxy"), | ||
1741 | "https://old.gnunet.org/configuration-http", | ||
1742 | &load_option_list /* abuse! */ , | ||
1743 | &save_option_list /* abuse! */ , "SOCKS4a", | ||
1744 | NULL, NULL, | ||
1745 | hide_http_proxy_options | ||
1746 | }, | ||
1747 | |||
1748 | { | ||
1749 | "GNUNET_setup_transport_http_client_proxy_type_socks5_radiobutton", | ||
1750 | "toggled", | ||
1751 | "transport-http_client", | ||
1752 | "PROXY_TYPE", | ||
1753 | gettext_noop ("Use a SOCKS v5 proxy"), | ||
1754 | "https://old.gnunet.org/configuration-http", | ||
1755 | &load_option_list /* abuse! */ , | ||
1756 | &save_option_list /* abuse! */ , "SOCKS5", | ||
1757 | NULL, NULL, | ||
1758 | hide_http_proxy_options | ||
1759 | }, | ||
1760 | |||
1761 | { | ||
1762 | "GNUNET_setup_transport_http_client_proxy_type_socks5_hostname_radiobutton", | ||
1763 | "toggled", | ||
1764 | "transport-http_client", | ||
1765 | "PROXY_TYPE", | ||
1766 | gettext_noop ("Use a SOCKS v5 proxy with hostname"), | ||
1767 | "https://old.gnunet.org/configuration-http", | ||
1768 | &load_option_list /* abuse! */ , | ||
1769 | &save_option_list /* abuse! */ , "SOCKS5_HOSTNAME", | ||
1770 | NULL, NULL, | ||
1771 | hide_http_proxy_options | ||
1772 | }, | ||
1773 | |||
1774 | { | ||
1775 | "GNUNET_setup_transport_http_client_proxy_hostname_entry", | ||
1776 | "changed", | ||
1777 | "transport-http_client", | ||
1778 | "PROXY", | ||
1779 | gettext_noop ("Specify hostname or IP (and optionally) port of the proxy"), | ||
1780 | "https://old.gnunet.org/configuration-http", | ||
1781 | &load_text, | ||
1782 | &save_text, NULL, | ||
1783 | NULL, NULL, | ||
1784 | NULL}, | ||
1785 | |||
1786 | { | ||
1787 | "GNUNET_setup_transport_http_client_proxy_username_entry", | ||
1788 | "changed", | ||
1789 | "transport-http_client", | ||
1790 | "PROXY_USERNAME", | ||
1791 | gettext_noop ("Specify username for the proxy (if needed)"), | ||
1792 | "https://old.gnunet.org/configuration-http", | ||
1793 | &load_text, | ||
1794 | &save_text, NULL, | ||
1795 | NULL, NULL, | ||
1796 | NULL}, | ||
1797 | |||
1798 | { | ||
1799 | "GNUNET_setup_transport_http_client_proxy_password_entry", | ||
1800 | "changed", | ||
1801 | "transport-http_client", | ||
1802 | "PROXY_PASSWORD", | ||
1803 | gettext_noop ("Specify password for the proxy (if needed)"), | ||
1804 | "https://old.gnunet.org/configuration-http", | ||
1805 | &load_text, | ||
1806 | &save_text, NULL, | ||
1807 | NULL, NULL, | ||
1808 | NULL}, | ||
1809 | 1734 | ||
1735 | {"GNUNET_setup_transport_http_client_proxy_type_socks4_radiobutton", | ||
1736 | "toggled", | ||
1737 | "transport-http_client", | ||
1738 | "PROXY_TYPE", | ||
1739 | gettext_noop ("Use a SOCKS v4 proxy"), | ||
1740 | "https://old.gnunet.org/configuration-http", | ||
1741 | &load_option_list /* abuse! */, | ||
1742 | &save_option_list /* abuse! */, | ||
1743 | "SOCKS4", | ||
1744 | NULL, | ||
1745 | NULL, | ||
1746 | hide_http_proxy_options}, | ||
1747 | |||
1748 | {"GNUNET_setup_transport_http_client_proxy_type_socks4a_radiobutton", | ||
1749 | "toggled", | ||
1750 | "transport-http_client", | ||
1751 | "PROXY_TYPE", | ||
1752 | gettext_noop ("Use a SOCKS v4a proxy"), | ||
1753 | "https://old.gnunet.org/configuration-http", | ||
1754 | &load_option_list /* abuse! */, | ||
1755 | &save_option_list /* abuse! */, | ||
1756 | "SOCKS4a", | ||
1757 | NULL, | ||
1758 | NULL, | ||
1759 | hide_http_proxy_options}, | ||
1760 | |||
1761 | {"GNUNET_setup_transport_http_client_proxy_type_socks5_radiobutton", | ||
1762 | "toggled", | ||
1763 | "transport-http_client", | ||
1764 | "PROXY_TYPE", | ||
1765 | gettext_noop ("Use a SOCKS v5 proxy"), | ||
1766 | "https://old.gnunet.org/configuration-http", | ||
1767 | &load_option_list /* abuse! */, | ||
1768 | &save_option_list /* abuse! */, | ||
1769 | "SOCKS5", | ||
1770 | NULL, | ||
1771 | NULL, | ||
1772 | hide_http_proxy_options}, | ||
1773 | |||
1774 | {"GNUNET_setup_transport_http_client_proxy_type_socks5_hostname_radiobutton", | ||
1775 | "toggled", | ||
1776 | "transport-http_client", | ||
1777 | "PROXY_TYPE", | ||
1778 | gettext_noop ("Use a SOCKS v5 proxy with hostname"), | ||
1779 | "https://old.gnunet.org/configuration-http", | ||
1780 | &load_option_list /* abuse! */, | ||
1781 | &save_option_list /* abuse! */, | ||
1782 | "SOCKS5_HOSTNAME", | ||
1783 | NULL, | ||
1784 | NULL, | ||
1785 | hide_http_proxy_options}, | ||
1786 | |||
1787 | {"GNUNET_setup_transport_http_client_proxy_hostname_entry", | ||
1788 | "changed", | ||
1789 | "transport-http_client", | ||
1790 | "PROXY", | ||
1791 | gettext_noop ("Specify hostname or IP (and optionally) port of the proxy"), | ||
1792 | "https://old.gnunet.org/configuration-http", | ||
1793 | &load_text, | ||
1794 | &save_text, | ||
1795 | NULL, | ||
1796 | NULL, | ||
1797 | NULL, | ||
1798 | NULL}, | ||
1799 | |||
1800 | {"GNUNET_setup_transport_http_client_proxy_username_entry", | ||
1801 | "changed", | ||
1802 | "transport-http_client", | ||
1803 | "PROXY_USERNAME", | ||
1804 | gettext_noop ("Specify username for the proxy (if needed)"), | ||
1805 | "https://old.gnunet.org/configuration-http", | ||
1806 | &load_text, | ||
1807 | &save_text, | ||
1808 | NULL, | ||
1809 | NULL, | ||
1810 | NULL, | ||
1811 | NULL}, | ||
1812 | |||
1813 | {"GNUNET_setup_transport_http_client_proxy_password_entry", | ||
1814 | "changed", | ||
1815 | "transport-http_client", | ||
1816 | "PROXY_PASSWORD", | ||
1817 | gettext_noop ("Specify password for the proxy (if needed)"), | ||
1818 | "https://old.gnunet.org/configuration-http", | ||
1819 | &load_text, | ||
1820 | &save_text, | ||
1821 | NULL, | ||
1822 | NULL, | ||
1823 | NULL, | ||
1824 | NULL}, | ||
1810 | 1825 | ||
1811 | 1826 | ||
1812 | /* HTTPS client */ | 1827 | /* HTTPS client */ |
1813 | 1828 | ||
1814 | { | 1829 | {"GNUNET_setup_transport_https_client_proxy_type_none_radiobutton", |
1815 | "GNUNET_setup_transport_https_client_proxy_type_none_radiobutton", | ||
1816 | "toggled", | 1830 | "toggled", |
1817 | "transport-https_client", | 1831 | "transport-https_client", |
1818 | "PROXY_TYPE", | 1832 | "PROXY_TYPE", |
1819 | gettext_noop ("Do not use a proxy for HTTPS plugin"), | 1833 | gettext_noop ("Do not use a proxy for HTTPS plugin"), |
1820 | "https://old.gnunet.org/configuration-http", | 1834 | "https://old.gnunet.org/configuration-http", |
1821 | &load_option_list /* abuse! */ , | 1835 | &load_option_list /* abuse! */, |
1822 | &save_option_list /* abuse! */ , "NONE", | 1836 | &save_option_list /* abuse! */, |
1823 | NULL, NULL, | 1837 | "NONE", |
1824 | hide_https_proxy_options | 1838 | NULL, |
1825 | }, | 1839 | NULL, |
1840 | hide_https_proxy_options}, | ||
1826 | 1841 | ||
1827 | { | 1842 | {"GNUNET_setup_transport_https_client_proxy_type_http_radiobutton", |
1828 | "GNUNET_setup_transport_https_client_proxy_type_http_radiobutton", | ||
1829 | "toggled", | 1843 | "toggled", |
1830 | "transport-https_client", | 1844 | "transport-https_client", |
1831 | "PROXY_TYPE", | 1845 | "PROXY_TYPE", |
1832 | gettext_noop ("Use an HTTP proxy"), | 1846 | gettext_noop ("Use an HTTP proxy"), |
1833 | "https://old.gnunet.org/configuration-http", | 1847 | "https://old.gnunet.org/configuration-http", |
1834 | &load_option_list /* abuse! */ , | 1848 | &load_option_list /* abuse! */, |
1835 | &save_option_list /* abuse! */ , "HTTP", | 1849 | &save_option_list /* abuse! */, |
1836 | NULL, NULL, | 1850 | "HTTP", |
1837 | hide_https_proxy_options | 1851 | NULL, |
1838 | }, | 1852 | NULL, |
1853 | hide_https_proxy_options}, | ||
1839 | 1854 | ||
1840 | { | 1855 | {"GNUNET_setup_transport_https_client_proxy_type_socks4_radiobutton", |
1841 | "GNUNET_setup_transport_https_client_proxy_type_socks4_radiobutton", | ||
1842 | "toggled", | 1856 | "toggled", |
1843 | "transport-https_client", | 1857 | "transport-https_client", |
1844 | "PROXY_TYPE", | 1858 | "PROXY_TYPE", |
1845 | gettext_noop ("Use a SOCKS v4 proxy"), | 1859 | gettext_noop ("Use a SOCKS v4 proxy"), |
1846 | "https://old.gnunet.org/configuration-http", | 1860 | "https://old.gnunet.org/configuration-http", |
1847 | &load_option_list /* abuse! */ , | 1861 | &load_option_list /* abuse! */, |
1848 | &save_option_list /* abuse! */ , "SOCKS4", | 1862 | &save_option_list /* abuse! */, |
1849 | NULL, NULL, | 1863 | "SOCKS4", |
1850 | hide_https_proxy_options | 1864 | NULL, |
1851 | }, | 1865 | NULL, |
1866 | hide_https_proxy_options}, | ||
1852 | 1867 | ||
1853 | { | 1868 | {"GNUNET_setup_transport_https_client_proxy_type_socks4a_radiobutton", |
1854 | "GNUNET_setup_transport_https_client_proxy_type_socks4a_radiobutton", | ||
1855 | "toggled", | 1869 | "toggled", |
1856 | "transport-https_client", | 1870 | "transport-https_client", |
1857 | "PROXY_TYPE", | 1871 | "PROXY_TYPE", |
1858 | gettext_noop ("Use a SOCKS v4a proxy"), | 1872 | gettext_noop ("Use a SOCKS v4a proxy"), |
1859 | "https://old.gnunet.org/configuration-http", | 1873 | "https://old.gnunet.org/configuration-http", |
1860 | &load_option_list /* abuse! */ , | 1874 | &load_option_list /* abuse! */, |
1861 | &save_option_list /* abuse! */ , "SOCKS4a", | 1875 | &save_option_list /* abuse! */, |
1862 | NULL, NULL, | 1876 | "SOCKS4a", |
1863 | hide_https_proxy_options | 1877 | NULL, |
1864 | }, | 1878 | NULL, |
1879 | hide_https_proxy_options}, | ||
1865 | 1880 | ||
1866 | { | 1881 | {"GNUNET_setup_transport_https_client_proxy_type_socks5_radiobutton", |
1867 | "GNUNET_setup_transport_https_client_proxy_type_socks5_radiobutton", | ||
1868 | "toggled", | 1882 | "toggled", |
1869 | "transport-https_client", | 1883 | "transport-https_client", |
1870 | "PROXY_TYPE", | 1884 | "PROXY_TYPE", |
1871 | gettext_noop ("Use a SOCKS v5 proxy"), | 1885 | gettext_noop ("Use a SOCKS v5 proxy"), |
1872 | "https://old.gnunet.org/configuration-http", | 1886 | "https://old.gnunet.org/configuration-http", |
1873 | &load_option_list /* abuse! */ , | 1887 | &load_option_list /* abuse! */, |
1874 | &save_option_list /* abuse! */ , "SOCKS5", | 1888 | &save_option_list /* abuse! */, |
1875 | NULL, NULL, | 1889 | "SOCKS5", |
1876 | hide_https_proxy_options | 1890 | NULL, |
1877 | }, | 1891 | NULL, |
1892 | hide_https_proxy_options}, | ||
1878 | 1893 | ||
1879 | { | 1894 | {"GNUNET_setup_transport_https_client_proxy_type_socks5_hostname_radiobutton", |
1880 | "GNUNET_setup_transport_https_client_proxy_type_socks5_hostname_radiobutton", | ||
1881 | "toggled", | 1895 | "toggled", |
1882 | "transport-https_client", | 1896 | "transport-https_client", |
1883 | "PROXY_TYPE", | 1897 | "PROXY_TYPE", |
1884 | gettext_noop ("Use a SOCKS v5 proxy with hostname"), | 1898 | gettext_noop ("Use a SOCKS v5 proxy with hostname"), |
1885 | "https://old.gnunet.org/configuration-http", | 1899 | "https://old.gnunet.org/configuration-http", |
1886 | &load_option_list /* abuse! */ , | 1900 | &load_option_list /* abuse! */, |
1887 | &save_option_list /* abuse! */ , "SOCKS5_HOSTNAME", | 1901 | &save_option_list /* abuse! */, |
1888 | NULL, NULL, | 1902 | "SOCKS5_HOSTNAME", |
1889 | hide_https_proxy_options | 1903 | NULL, |
1890 | }, | 1904 | NULL, |
1905 | hide_https_proxy_options}, | ||
1891 | 1906 | ||
1892 | { | 1907 | {"GNUNET_setup_transport_https_client_proxy_hostname_entry", |
1893 | "GNUNET_setup_transport_https_client_proxy_hostname_entry", | ||
1894 | "changed", | 1908 | "changed", |
1895 | "transport-https_client", | 1909 | "transport-https_client", |
1896 | "PROXY", | 1910 | "PROXY", |
1897 | gettext_noop ("Specify hostname or IP (and optionally) port of the proxy"), | 1911 | gettext_noop ("Specify hostname or IP (and optionally) port of the proxy"), |
1898 | "https://old.gnunet.org/configuration-http", | 1912 | "https://old.gnunet.org/configuration-http", |
1899 | &load_text, | 1913 | &load_text, |
1900 | &save_text, NULL, | 1914 | &save_text, |
1901 | NULL, NULL, | 1915 | NULL, |
1916 | NULL, | ||
1917 | NULL, | ||
1902 | NULL}, | 1918 | NULL}, |
1903 | 1919 | ||
1904 | { | 1920 | {"GNUNET_setup_transport_https_client_proxy_username_entry", |
1905 | "GNUNET_setup_transport_https_client_proxy_username_entry", | ||
1906 | "changed", | 1921 | "changed", |
1907 | "transport-https_client", | 1922 | "transport-https_client", |
1908 | "PROXY_USERNAME", | 1923 | "PROXY_USERNAME", |
1909 | gettext_noop ("Specify username for the proxy (if needed)"), | 1924 | gettext_noop ("Specify username for the proxy (if needed)"), |
1910 | "https://old.gnunet.org/configuration-http", | 1925 | "https://old.gnunet.org/configuration-http", |
1911 | &load_text, | 1926 | &load_text, |
1912 | &save_text, NULL, | 1927 | &save_text, |
1913 | NULL, NULL, | 1928 | NULL, |
1929 | NULL, | ||
1930 | NULL, | ||
1914 | NULL}, | 1931 | NULL}, |
1915 | 1932 | ||
1916 | { | 1933 | {"GNUNET_setup_transport_https_client_proxy_password_entry", |
1917 | "GNUNET_setup_transport_https_client_proxy_password_entry", | ||
1918 | "changed", | 1934 | "changed", |
1919 | "transport-https_client", | 1935 | "transport-https_client", |
1920 | "PROXY_PASSWORD", | 1936 | "PROXY_PASSWORD", |
1921 | gettext_noop ("Specify password for the proxy (if needed)"), | 1937 | gettext_noop ("Specify password for the proxy (if needed)"), |
1922 | "https://old.gnunet.org/configuration-http", | 1938 | "https://old.gnunet.org/configuration-http", |
1923 | &load_text, | 1939 | &load_text, |
1924 | &save_text, NULL, | 1940 | &save_text, |
1925 | NULL, NULL, | 1941 | NULL, |
1942 | NULL, | ||
1943 | NULL, | ||
1926 | NULL}, | 1944 | NULL}, |
1927 | 1945 | ||
1928 | /* FS TAB */ | 1946 | /* FS TAB */ |
1929 | 1947 | ||
1930 | { | 1948 | {"GNUNET_setup_fs_datastore_quota_spinbutton", |
1931 | "GNUNET_setup_fs_datastore_quota_spinbutton", | ||
1932 | "value-changed", | 1949 | "value-changed", |
1933 | "datastore", | 1950 | "datastore", |
1934 | "QUOTA", | 1951 | "QUOTA", |
1935 | gettext_noop ("How many bytes are we allowed to store in the local datastore?"), | 1952 | gettext_noop ( |
1953 | "How many bytes are we allowed to store in the local datastore?"), | ||
1936 | "https://old.gnunet.org/datastore-quota", | 1954 | "https://old.gnunet.org/datastore-quota", |
1937 | &load_number, | 1955 | &load_number, |
1938 | &save_number, NULL, | 1956 | &save_number, |
1939 | NULL, NULL, | 1957 | NULL, |
1958 | NULL, | ||
1959 | NULL, | ||
1940 | NULL}, | 1960 | NULL}, |
1941 | 1961 | ||
1942 | { | 1962 | {"GNUNET_setup_fs_datastore_sqlite_radiobutton", |
1943 | "GNUNET_setup_fs_datastore_sqlite_radiobutton", | ||
1944 | "toggled", | 1963 | "toggled", |
1945 | "datastore", | 1964 | "datastore", |
1946 | "DATABASE", | 1965 | "DATABASE", |
1947 | gettext_noop ("Use sqLite to store file-sharing content"), | 1966 | gettext_noop ("Use sqLite to store file-sharing content"), |
1948 | "https://old.gnunet.org/configuration-datastore", | 1967 | "https://old.gnunet.org/configuration-datastore", |
1949 | &load_option_list /* abuse! */ , | 1968 | &load_option_list /* abuse! */, |
1950 | &save_option_list /* abuse! */ , "sqlite", | 1969 | &save_option_list /* abuse! */, |
1951 | NULL, NULL, | 1970 | "sqlite", |
1971 | NULL, | ||
1972 | NULL, | ||
1952 | hide_sqlite_datastore_tab}, | 1973 | hide_sqlite_datastore_tab}, |
1953 | 1974 | ||
1954 | { | 1975 | {"GNUNET_setup_fs_datastore_mysql_radiobutton", |
1955 | "GNUNET_setup_fs_datastore_mysql_radiobutton", | ||
1956 | "toggled", | 1976 | "toggled", |
1957 | "datastore", | 1977 | "datastore", |
1958 | "DATABASE", | 1978 | "DATABASE", |
1959 | gettext_noop ("Use MySQL to store file-sharing content"), | 1979 | gettext_noop ("Use MySQL to store file-sharing content"), |
1960 | "https://old.gnunet.org/configuration-datastore", | 1980 | "https://old.gnunet.org/configuration-datastore", |
1961 | &load_option_list /* abuse! */ , | 1981 | &load_option_list /* abuse! */, |
1962 | &save_option_list /* abuse! */ , "mysql", | 1982 | &save_option_list /* abuse! */, |
1963 | NULL, NULL, | 1983 | "mysql", |
1984 | NULL, | ||
1985 | NULL, | ||
1964 | hide_mysql_datastore_tab}, | 1986 | hide_mysql_datastore_tab}, |
1965 | 1987 | ||
1966 | { | 1988 | {"GNUNET_setup_fs_datastore_postgres_radiobutton", |
1967 | "GNUNET_setup_fs_datastore_postgres_radiobutton", | ||
1968 | "toggled", | 1989 | "toggled", |
1969 | "datastore", | 1990 | "datastore", |
1970 | "DATABASE", | 1991 | "DATABASE", |
1971 | gettext_noop ("Use Postgres to store file-sharing content"), | 1992 | gettext_noop ("Use Postgres to store file-sharing content"), |
1972 | "https://old.gnunet.org/configuration-datastore", | 1993 | "https://old.gnunet.org/configuration-datastore", |
1973 | &load_option_list /* abuse! */ , | 1994 | &load_option_list /* abuse! */, |
1974 | &save_option_list /* abuse! */ , "postgres", | 1995 | &save_option_list /* abuse! */, |
1975 | NULL, NULL, | 1996 | "postgres", |
1997 | NULL, | ||
1998 | NULL, | ||
1976 | hide_postgres_datastore_tab}, | 1999 | hide_postgres_datastore_tab}, |
1977 | 2000 | ||
1978 | { | 2001 | {"GNUNET_setup_datastore_mysql_database_name_entry", |
1979 | "GNUNET_setup_datastore_mysql_database_name_entry", | ||
1980 | "changed", | 2002 | "changed", |
1981 | "datastore-mysql", | 2003 | "datastore-mysql", |
1982 | "DATABASE", | 2004 | "DATABASE", |
1983 | gettext_noop ("Name for the MySQL database"), | 2005 | gettext_noop ("Name for the MySQL database"), |
1984 | "https://old.gnunet.org/configuration-datastore", | 2006 | "https://old.gnunet.org/configuration-datastore", |
1985 | &load_text, | 2007 | &load_text, |
1986 | &save_text, NULL, | 2008 | &save_text, |
1987 | NULL, NULL, | 2009 | NULL, |
2010 | NULL, | ||
2011 | NULL, | ||
1988 | NULL}, | 2012 | NULL}, |
1989 | 2013 | ||
1990 | { | 2014 | {"GNUNET_setup_datastore_mysql_config_file_filechooserbutton", |
1991 | "GNUNET_setup_datastore_mysql_config_file_filechooserbutton", | ||
1992 | "selection-changed", | 2015 | "selection-changed", |
1993 | "datastore-mysql", | 2016 | "datastore-mysql", |
1994 | "CONFIG", | 2017 | "CONFIG", |
1995 | gettext_noop ("Configuration file for MySQL access"), | 2018 | gettext_noop ("Configuration file for MySQL access"), |
1996 | "http://dev.mysql.com/doc/refman/5.5/en/option-files.html", | 2019 | "http://dev.mysql.com/doc/refman/5.5/en/option-files.html", |
1997 | &load_filename, | 2020 | &load_filename, |
1998 | &save_filename, NULL, | 2021 | &save_filename, |
1999 | NULL, NULL, | 2022 | NULL, |
2023 | NULL, | ||
2024 | NULL, | ||
2000 | NULL}, | 2025 | NULL}, |
2001 | 2026 | ||
2002 | { | 2027 | {"GNUNET_setup_datastore_mysql_username_entry", |
2003 | "GNUNET_setup_datastore_mysql_username_entry", | ||
2004 | "changed", | 2028 | "changed", |
2005 | "datastore-mysql", | 2029 | "datastore-mysql", |
2006 | "USER", | 2030 | "USER", |
2007 | gettext_noop ("Username for MySQL access"), | 2031 | gettext_noop ("Username for MySQL access"), |
2008 | "https://old.gnunet.org/configuration-datastore", | 2032 | "https://old.gnunet.org/configuration-datastore", |
2009 | &load_text, | 2033 | &load_text, |
2010 | &save_text, NULL, | 2034 | &save_text, |
2011 | NULL, NULL, | 2035 | NULL, |
2036 | NULL, | ||
2037 | NULL, | ||
2012 | NULL}, | 2038 | NULL}, |
2013 | 2039 | ||
2014 | { | 2040 | {"GNUNET_setup_datastore_mysql_password_entry", |
2015 | "GNUNET_setup_datastore_mysql_password_entry", | ||
2016 | "changed", | 2041 | "changed", |
2017 | "datastore-mysql", | 2042 | "datastore-mysql", |
2018 | "PASSWORD", | 2043 | "PASSWORD", |
2019 | gettext_noop ("Password for MySQL access"), | 2044 | gettext_noop ("Password for MySQL access"), |
2020 | "https://old.gnunet.org/configuration-datastore", | 2045 | "https://old.gnunet.org/configuration-datastore", |
2021 | &load_text, | 2046 | &load_text, |
2022 | &save_text, NULL, | 2047 | &save_text, |
2023 | NULL, NULL, | 2048 | NULL, |
2049 | NULL, | ||
2050 | NULL, | ||
2024 | NULL}, | 2051 | NULL}, |
2025 | 2052 | ||
2026 | { | 2053 | {"GNUNET_setup_datastore_mysql_hostname_entry", |
2027 | "GNUNET_setup_datastore_mysql_hostname_entry", | ||
2028 | "changed", | 2054 | "changed", |
2029 | "datastore-mysql", | 2055 | "datastore-mysql", |
2030 | "HOST", | 2056 | "HOST", |
2031 | gettext_noop ("Name of host running MySQL database"), | 2057 | gettext_noop ("Name of host running MySQL database"), |
2032 | "https://old.gnunet.org/configuration-datastore", | 2058 | "https://old.gnunet.org/configuration-datastore", |
2033 | &load_text, | 2059 | &load_text, |
2034 | &save_text, NULL, | 2060 | &save_text, |
2035 | NULL, NULL, | 2061 | NULL, |
2062 | NULL, | ||
2063 | NULL, | ||
2036 | NULL}, | 2064 | NULL}, |
2037 | 2065 | ||
2038 | { | 2066 | {"GNUNET_setup_datastore_mysql_port_spinbutton", |
2039 | "GNUNET_setup_datastore_mysql_port_spinbutton", | ||
2040 | "value-changed", | 2067 | "value-changed", |
2041 | "datastore-mysql", | 2068 | "datastore-mysql", |
2042 | "PORT", | 2069 | "PORT", |
2043 | gettext_noop ("Port of MySQL database"), | 2070 | gettext_noop ("Port of MySQL database"), |
2044 | "https://old.gnunet.org/configuration-datastore", | 2071 | "https://old.gnunet.org/configuration-datastore", |
2045 | &load_number, | 2072 | &load_number, |
2046 | &save_number, NULL, | 2073 | &save_number, |
2047 | NULL, NULL, | 2074 | NULL, |
2075 | NULL, | ||
2076 | NULL, | ||
2048 | NULL}, | 2077 | NULL}, |
2049 | 2078 | ||
2050 | { | 2079 | {"GNUNET_setup_datastore_postgres_config_entry", |
2051 | "GNUNET_setup_datastore_postgres_config_entry", | ||
2052 | "changed", | 2080 | "changed", |
2053 | "datastore-postgres", | 2081 | "datastore-postgres", |
2054 | "CONFIG", | 2082 | "CONFIG", |
2055 | gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"), | 2083 | gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"), |
2056 | "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT", | 2084 | "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT", |
2057 | &load_text, | 2085 | &load_text, |
2058 | &save_text, NULL, | 2086 | &save_text, |
2059 | NULL, NULL, | 2087 | NULL, |
2088 | NULL, | ||
2089 | NULL, | ||
2060 | NULL}, | 2090 | NULL}, |
2061 | 2091 | ||
2062 | 2092 | ||
2063 | { | 2093 | {"GNUNET_setup_fs_migration_from_checkbutton", |
2064 | "GNUNET_setup_fs_migration_from_checkbutton", | ||
2065 | "toggled", | 2094 | "toggled", |
2066 | "fs", | 2095 | "fs", |
2067 | "CONTENT_PUSHING", | 2096 | "CONTENT_PUSHING", |
2068 | gettext_noop ("Should we try to push our content to other peers?"), | 2097 | gettext_noop ("Should we try to push our content to other peers?"), |
2069 | "https://old.gnunet.org/configuration-fs", | 2098 | "https://old.gnunet.org/configuration-fs", |
2070 | &load_yes_no, | 2099 | &load_yes_no, |
2071 | &save_yes_no, NULL, | 2100 | &save_yes_no, |
2072 | NULL, NULL, | 2101 | NULL, |
2102 | NULL, | ||
2103 | NULL, | ||
2073 | NULL}, | 2104 | NULL}, |
2074 | 2105 | ||
2075 | { | 2106 | {"GNUNET_setup_fs_migration_to_checkbutton", |
2076 | "GNUNET_setup_fs_migration_to_checkbutton", | ||
2077 | "toggled", | 2107 | "toggled", |
2078 | "fs", | 2108 | "fs", |
2079 | "CONTENT_CACHING", | 2109 | "CONTENT_CACHING", |
2080 | gettext_noop ("Are we allowed to cache content received from other peers?"), | 2110 | gettext_noop ("Are we allowed to cache content received from other peers?"), |
2081 | "https://old.gnunet.org/configuration-fs", | 2111 | "https://old.gnunet.org/configuration-fs", |
2082 | &load_yes_no, | 2112 | &load_yes_no, |
2083 | &save_yes_no, NULL, | 2113 | &save_yes_no, |
2084 | NULL, NULL, | 2114 | NULL, |
2115 | NULL, | ||
2116 | NULL, | ||
2085 | NULL}, | 2117 | NULL}, |
2086 | 2118 | ||
2087 | 2119 | ||
2088 | { | 2120 | {"GNUNET_setup_fs_datacache_quota_spinbutton", |
2089 | "GNUNET_setup_fs_datacache_quota_spinbutton", | ||
2090 | "value-changed", | 2121 | "value-changed", |
2091 | "dhtcache", | 2122 | "dhtcache", |
2092 | "QUOTA", | 2123 | "QUOTA", |
2093 | gettext_noop ("How many bytes are we allowed to store in the local datacache?"), | 2124 | gettext_noop ( |
2125 | "How many bytes are we allowed to store in the local datacache?"), | ||
2094 | "https://old.gnunet.org/datacache-quota", | 2126 | "https://old.gnunet.org/datacache-quota", |
2095 | &load_number, | 2127 | &load_number, |
2096 | &save_number, NULL, | 2128 | &save_number, |
2097 | NULL, NULL, | 2129 | NULL, |
2130 | NULL, | ||
2131 | NULL, | ||
2098 | NULL}, | 2132 | NULL}, |
2099 | 2133 | ||
2100 | 2134 | ||
2101 | { | 2135 | {"GNUNET_setup_fs_datacache_sqlite_radiobutton", |
2102 | "GNUNET_setup_fs_datacache_sqlite_radiobutton", | ||
2103 | "toggled", | 2136 | "toggled", |
2104 | "dhtcache", | 2137 | "dhtcache", |
2105 | "DATABASE", | 2138 | "DATABASE", |
2106 | gettext_noop ("Use sqLite to cache DHT data"), | 2139 | gettext_noop ("Use sqLite to cache DHT data"), |
2107 | "https://old.gnunet.org/configuration-datacache", | 2140 | "https://old.gnunet.org/configuration-datacache", |
2108 | &load_option_list /* abuse! */ , | 2141 | &load_option_list /* abuse! */, |
2109 | &save_option_list /* abuse! */ , "sqlite", | 2142 | &save_option_list /* abuse! */, |
2110 | NULL, NULL, | 2143 | "sqlite", |
2144 | NULL, | ||
2145 | NULL, | ||
2111 | hide_sqlite_datacache_tab}, | 2146 | hide_sqlite_datacache_tab}, |
2112 | 2147 | ||
2113 | { | 2148 | {"GNUNET_setup_fs_datacache_heap_radiobutton", |
2114 | "GNUNET_setup_fs_datacache_heap_radiobutton", | ||
2115 | "toggled", | 2149 | "toggled", |
2116 | "dhtcache", | 2150 | "dhtcache", |
2117 | "DATABASE", | 2151 | "DATABASE", |
2118 | gettext_noop ("Use memory to cache DHT data"), | 2152 | gettext_noop ("Use memory to cache DHT data"), |
2119 | "https://old.gnunet.org/configuration-datacache", | 2153 | "https://old.gnunet.org/configuration-datacache", |
2120 | &load_option_list /* abuse! */ , | 2154 | &load_option_list /* abuse! */, |
2121 | &save_option_list /* abuse! */ , "heap", | 2155 | &save_option_list /* abuse! */, |
2122 | NULL, NULL, | 2156 | "heap", |
2157 | NULL, | ||
2158 | NULL, | ||
2123 | hide_heap_datacache_tab}, | 2159 | hide_heap_datacache_tab}, |
2124 | 2160 | ||
2125 | { | 2161 | {"GNUNET_setup_fs_datacache_postgres_radiobutton", |
2126 | "GNUNET_setup_fs_datacache_postgres_radiobutton", | ||
2127 | "toggled", | 2162 | "toggled", |
2128 | "dhtcache", | 2163 | "dhtcache", |
2129 | "DATABASE", | 2164 | "DATABASE", |
2130 | gettext_noop ("Use Postgres to cache DHT data"), | 2165 | gettext_noop ("Use Postgres to cache DHT data"), |
2131 | "https://old.gnunet.org/configuration-datacache", | 2166 | "https://old.gnunet.org/configuration-datacache", |
2132 | &load_option_list /* abuse! */ , | 2167 | &load_option_list /* abuse! */, |
2133 | &save_option_list /* abuse! */ , "postgres", | 2168 | &save_option_list /* abuse! */, |
2134 | NULL, NULL, | 2169 | "postgres", |
2170 | NULL, | ||
2171 | NULL, | ||
2135 | hide_postgres_datacache_tab}, | 2172 | hide_postgres_datacache_tab}, |
2136 | 2173 | ||
2137 | { | 2174 | {"GNUNET_setup_transport_wlan_interface_entry", |
2138 | "GNUNET_setup_transport_wlan_interface_entry", | ||
2139 | "changed", | 2175 | "changed", |
2140 | "transport-wlan", | 2176 | "transport-wlan", |
2141 | "INTERFACE", | 2177 | "INTERFACE", |
2142 | gettext_noop ("Name of monitoring interface to use (monX)"), | 2178 | gettext_noop ("Name of monitoring interface to use (monX)"), |
2143 | "https://old.gnunet.org/configuration-wlan", | 2179 | "https://old.gnunet.org/configuration-wlan", |
2144 | &load_text, | 2180 | &load_text, |
2145 | &save_text, NULL, | 2181 | &save_text, |
2146 | NULL, NULL, | 2182 | NULL, |
2183 | NULL, | ||
2184 | NULL, | ||
2147 | NULL}, | 2185 | NULL}, |
2148 | 2186 | ||
2149 | { | 2187 | {"GNUNET_setup_datacache_postgres_config_entry", |
2150 | "GNUNET_setup_datacache_postgres_config_entry", | ||
2151 | "changed", | 2188 | "changed", |
2152 | "datacache-postgres", | 2189 | "datacache-postgres", |
2153 | "CONFIG", | 2190 | "CONFIG", |
2154 | gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"), | 2191 | gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"), |
2155 | "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT", | 2192 | "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT", |
2156 | &load_text, | 2193 | &load_text, |
2157 | &save_text, NULL, | 2194 | &save_text, |
2158 | NULL, NULL, | 2195 | NULL, |
2196 | NULL, | ||
2197 | NULL, | ||
2159 | NULL}, | 2198 | NULL}, |
2160 | 2199 | ||
2161 | /* VPN/PT service */ | 2200 | /* VPN/PT service */ |
2162 | 2201 | ||
2163 | { | 2202 | {"GNUNET_setup_general_services_vpn_checkbutton", |
2164 | "GNUNET_setup_general_services_vpn_checkbutton", | ||
2165 | "toggled", | 2203 | "toggled", |
2166 | "vpn", | 2204 | "vpn", |
2167 | "FORCESTART", | 2205 | "FORCESTART", |
2168 | gettext_noop ("Should the VPN be started automatically on startup?"), | 2206 | gettext_noop ("Should the VPN be started automatically on startup?"), |
2169 | "https://old.gnunet.org/configuration-vpn", | 2207 | "https://old.gnunet.org/configuration-vpn", |
2170 | &load_yes_no, | 2208 | &load_yes_no, |
2171 | &save_yes_no, NULL, | 2209 | &save_yes_no, |
2172 | NULL, NULL, | 2210 | NULL, |
2211 | NULL, | ||
2212 | NULL, | ||
2173 | hide_vpn_options}, | 2213 | hide_vpn_options}, |
2174 | 2214 | ||
2175 | { | 2215 | {"GNUNET_setup_general_services_pt_checkbutton", |
2176 | "GNUNET_setup_general_services_pt_checkbutton", | ||
2177 | "toggled", | 2216 | "toggled", |
2178 | "pt", | 2217 | "pt", |
2179 | "FORCESTART", | 2218 | "FORCESTART", |
2180 | gettext_noop ("Should the PT be started automatically on startup?"), | 2219 | gettext_noop ("Should the PT be started automatically on startup?"), |
2181 | "https://old.gnunet.org/configuration-vpn", | 2220 | "https://old.gnunet.org/configuration-vpn", |
2182 | &load_yes_no, | 2221 | &load_yes_no, |
2183 | &save_yes_no, NULL, | 2222 | &save_yes_no, |
2184 | NULL, NULL, | 2223 | NULL, |
2224 | NULL, | ||
2225 | NULL, | ||
2185 | hide_pt_options}, | 2226 | hide_pt_options}, |
2186 | 2227 | ||
2187 | 2228 | ||
2188 | { | 2229 | {"GNUNET_setup_pt_ipv4_checkbutton", |
2189 | "GNUNET_setup_pt_ipv4_checkbutton", | ||
2190 | "toggled", | 2230 | "toggled", |
2191 | "pt", | 2231 | "pt", |
2192 | "TUNNEL_IPV4", | 2232 | "TUNNEL_IPV4", |
2193 | gettext_noop | 2233 | gettext_noop ("Tunnel IPv4 traffic over GNUnet"), |
2194 | ("Tunnel IPv4 traffic over GNUnet"), | ||
2195 | "https://old.gnunet.org/configuration-vpn", | 2234 | "https://old.gnunet.org/configuration-vpn", |
2196 | &load_yes_no, | 2235 | &load_yes_no, |
2197 | &save_yes_no, NULL, | 2236 | &save_yes_no, |
2198 | NULL, NULL, | 2237 | NULL, |
2199 | NULL }, | 2238 | NULL, |
2239 | NULL, | ||
2240 | NULL}, | ||
2200 | 2241 | ||
2201 | 2242 | ||
2202 | { | 2243 | {"GNUNET_setup_pt_ipv6_checkbutton", |
2203 | "GNUNET_setup_pt_ipv6_checkbutton", | ||
2204 | "toggled", | 2244 | "toggled", |
2205 | "pt", | 2245 | "pt", |
2206 | "TUNNEL_IPV6", | 2246 | "TUNNEL_IPV6", |
2207 | gettext_noop | 2247 | gettext_noop ("Tunnel IPv6 traffic over GNUnet"), |
2208 | ("Tunnel IPv6 traffic over GNUnet"), | ||
2209 | "https://old.gnunet.org/configuration-vpn", | 2248 | "https://old.gnunet.org/configuration-vpn", |
2210 | &load_yes_no, | 2249 | &load_yes_no, |
2211 | &save_yes_no, NULL, | 2250 | &save_yes_no, |
2212 | NULL, NULL, | 2251 | NULL, |
2213 | NULL }, | 2252 | NULL, |
2253 | NULL, | ||
2254 | NULL}, | ||
2214 | 2255 | ||
2215 | { | 2256 | {"GNUNET_setup_pt_dns_checkbutton", |
2216 | "GNUNET_setup_pt_dns_checkbutton", | ||
2217 | "toggled", | 2257 | "toggled", |
2218 | "pt", | 2258 | "pt", |
2219 | "TUNNEL_DNS", | 2259 | "TUNNEL_DNS", |
2220 | gettext_noop | 2260 | gettext_noop ("Tunnel DNS traffic over GNUnet"), |
2221 | ("Tunnel DNS traffic over GNUnet"), | ||
2222 | "https://old.gnunet.org/configuration-vpn", | 2261 | "https://old.gnunet.org/configuration-vpn", |
2223 | &load_yes_no, | 2262 | &load_yes_no, |
2224 | &save_yes_no, NULL, | 2263 | &save_yes_no, |
2225 | NULL, NULL, | 2264 | NULL, |
2226 | NULL }, | 2265 | NULL, |
2266 | NULL, | ||
2267 | NULL}, | ||
2227 | 2268 | ||
2228 | { | 2269 | {"GNUNET_setup_vpn_interface_entry", |
2229 | "GNUNET_setup_vpn_interface_entry", | ||
2230 | "changed", | 2270 | "changed", |
2231 | "vpn", | 2271 | "vpn", |
2232 | "IFNAME", | 2272 | "IFNAME", |
2233 | gettext_noop ("Name of the virtual interface the GNUnet VPN should create"), | 2273 | gettext_noop ("Name of the virtual interface the GNUnet VPN should create"), |
2234 | "https://old.gnunet.org/configuration-vpn", | 2274 | "https://old.gnunet.org/configuration-vpn", |
2235 | &load_text, | 2275 | &load_text, |
2236 | &save_text, NULL, | 2276 | &save_text, |
2237 | NULL, NULL, | 2277 | NULL, |
2278 | NULL, | ||
2279 | NULL, | ||
2238 | NULL}, | 2280 | NULL}, |
2239 | 2281 | ||
2240 | { | 2282 | {"GNUNET_setup_vpn_interface_v4_ip_entry", |
2241 | "GNUNET_setup_vpn_interface_v4_ip_entry", | ||
2242 | "changed", | 2283 | "changed", |
2243 | "vpn", | 2284 | "vpn", |
2244 | "IPV4ADDR", | 2285 | "IPV4ADDR", |
2245 | gettext_noop ("IPv4 address to use for the VPN interface"), | 2286 | gettext_noop ("IPv4 address to use for the VPN interface"), |
2246 | "https://old.gnunet.org/configuration-vpn", | 2287 | "https://old.gnunet.org/configuration-vpn", |
2247 | &load_text, | 2288 | &load_text, |
2248 | &save_text, NULL, | 2289 | &save_text, |
2249 | NULL, NULL, | 2290 | NULL, |
2291 | NULL, | ||
2292 | NULL, | ||
2250 | NULL}, | 2293 | NULL}, |
2251 | 2294 | ||
2252 | { | 2295 | {"GNUNET_setup_vpn_interface_v4_mask_entry", |
2253 | "GNUNET_setup_vpn_interface_v4_mask_entry", | ||
2254 | "changed", | 2296 | "changed", |
2255 | "vpn", | 2297 | "vpn", |
2256 | "IPV4MASK", | 2298 | "IPV4MASK", |
2257 | gettext_noop ("IPv4 network mask to use for the VPN interface"), | 2299 | gettext_noop ("IPv4 network mask to use for the VPN interface"), |
2258 | "https://old.gnunet.org/configuration-vpn", | 2300 | "https://old.gnunet.org/configuration-vpn", |
2259 | &load_text, | 2301 | &load_text, |
2260 | &save_text, NULL, | 2302 | &save_text, |
2261 | NULL, NULL, | 2303 | NULL, |
2304 | NULL, | ||
2305 | NULL, | ||
2262 | NULL}, | 2306 | NULL}, |
2263 | 2307 | ||
2264 | { | 2308 | {"GNUNET_setup_vpn_interface_v6_ip_entry", |
2265 | "GNUNET_setup_vpn_interface_v6_ip_entry", | ||
2266 | "changed", | 2309 | "changed", |
2267 | "vpn", | 2310 | "vpn", |
2268 | "IPV6ADDR", | 2311 | "IPV6ADDR", |
2269 | gettext_noop ("IPv6 address to use for the VPN interface"), | 2312 | gettext_noop ("IPv6 address to use for the VPN interface"), |
2270 | "https://old.gnunet.org/configuration-vpn", | 2313 | "https://old.gnunet.org/configuration-vpn", |
2271 | &load_text, | 2314 | &load_text, |
2272 | &save_text, NULL, | 2315 | &save_text, |
2273 | NULL, NULL, | 2316 | NULL, |
2317 | NULL, | ||
2318 | NULL, | ||
2274 | NULL}, | 2319 | NULL}, |
2275 | 2320 | ||
2276 | { | 2321 | {"GNUNET_setup_vpn_interface_v6_mask_spinbutton", |
2277 | "GNUNET_setup_vpn_interface_v6_mask_spinbutton", | ||
2278 | "value-changed", | 2322 | "value-changed", |
2279 | "vpn", | 2323 | "vpn", |
2280 | "IPV6PREFIX", | 2324 | "IPV6PREFIX", |
2281 | gettext_noop ("IPv6 network prefix length to use for the VPN interface"), | 2325 | gettext_noop ("IPv6 network prefix length to use for the VPN interface"), |
2282 | "https://old.gnunet.org/configuration-vpn", | 2326 | "https://old.gnunet.org/configuration-vpn", |
2283 | &load_number, | 2327 | &load_number, |
2284 | &save_number, NULL, | 2328 | &save_number, |
2285 | NULL, NULL, | 2329 | NULL, |
2330 | NULL, | ||
2331 | NULL, | ||
2286 | NULL}, | 2332 | NULL}, |
2287 | 2333 | ||
2288 | 2334 | ||
2289 | /* exit daemon */ | 2335 | /* exit daemon */ |
2290 | 2336 | ||
2291 | { | 2337 | {"GNUNET_setup_general_services_exit_checkbutton", |
2292 | "GNUNET_setup_general_services_exit_checkbutton", | ||
2293 | "toggled", | 2338 | "toggled", |
2294 | "exit", | 2339 | "exit", |
2295 | "FORCESTART", | 2340 | "FORCESTART", |
2296 | gettext_noop | 2341 | gettext_noop ( |
2297 | ("Activate the VPN exit to provide services and/or to enable others to use your Internet connection"), | 2342 | "Activate the VPN exit to provide services and/or to enable others to use your Internet connection"), |
2298 | "https://old.gnunet.org/configuration-exit", | 2343 | "https://old.gnunet.org/configuration-exit", |
2299 | &load_yes_no, | 2344 | &load_yes_no, |
2300 | &save_yes_no, NULL, | 2345 | &save_yes_no, |
2301 | NULL, NULL, | 2346 | NULL, |
2347 | NULL, | ||
2348 | NULL, | ||
2302 | hide_exit_options}, | 2349 | hide_exit_options}, |
2303 | 2350 | ||
2304 | { | 2351 | {"GNUNET_setup_dns_resolver_ip_entry", |
2305 | "GNUNET_setup_dns_resolver_ip_entry", | ||
2306 | "changed", | 2352 | "changed", |
2307 | "exit", | 2353 | "exit", |
2308 | "DNS_RESOLVER", | 2354 | "DNS_RESOLVER", |
2309 | gettext_noop | 2355 | gettext_noop ( |
2310 | ("IP address of the external DNS resolver to use (values from your resolve.conf are usually appropriate))"), | 2356 | "IP address of the external DNS resolver to use (values from your resolve.conf are usually appropriate))"), |
2311 | "https://old.gnunet.org/configuration-exit", | 2357 | "https://old.gnunet.org/configuration-exit", |
2312 | &load_text, | 2358 | &load_text, |
2313 | &save_text, NULL, | 2359 | &save_text, |
2314 | NULL, NULL, | 2360 | NULL, |
2361 | NULL, | ||
2362 | NULL, | ||
2315 | NULL}, | 2363 | NULL}, |
2316 | 2364 | ||
2317 | { | 2365 | {"GNUNET_setup_dns_enable_exit_checkbutton", |
2318 | "GNUNET_setup_dns_enable_exit_checkbutton", | ||
2319 | "toggled", | 2366 | "toggled", |
2320 | "exit", | 2367 | "exit", |
2321 | "EXIT_DNS", | 2368 | "EXIT_DNS", |
2322 | gettext_noop | 2369 | gettext_noop ( |
2323 | ("Allow other peers to perform DNS resolutions using your Internet connection"), | 2370 | "Allow other peers to perform DNS resolutions using your Internet connection"), |
2324 | "https://old.gnunet.org/configuration-dns", | 2371 | "https://old.gnunet.org/configuration-dns", |
2325 | &load_yes_no, | 2372 | &load_yes_no, |
2326 | &save_yes_no, NULL, | 2373 | &save_yes_no, |
2327 | NULL, NULL, | 2374 | NULL, |
2375 | NULL, | ||
2376 | NULL, | ||
2328 | hide_dns_exit_options}, | 2377 | hide_dns_exit_options}, |
2329 | 2378 | ||
2330 | { | 2379 | {"GNUNET_setup_exit_interface_name_entry", |
2331 | "GNUNET_setup_exit_interface_name_entry", | ||
2332 | "changed", | 2380 | "changed", |
2333 | "exit", | 2381 | "exit", |
2334 | "TUN_IFNAME", | 2382 | "TUN_IFNAME", |
2335 | gettext_noop | 2383 | gettext_noop ( |
2336 | ("Name of the virtual interface the GNUnet exit service should create for traffic exiting the VPN to the Internet"), | 2384 | "Name of the virtual interface the GNUnet exit service should create for traffic exiting the VPN to the Internet"), |
2337 | "https://old.gnunet.org/configuration-exit", | 2385 | "https://old.gnunet.org/configuration-exit", |
2338 | &load_text, | 2386 | &load_text, |
2339 | &save_text, NULL, | 2387 | &save_text, |
2340 | NULL, NULL, | 2388 | NULL, |
2389 | NULL, | ||
2390 | NULL, | ||
2341 | NULL}, | 2391 | NULL}, |
2342 | 2392 | ||
2343 | { | 2393 | {"GNUNET_setup_exit_interface_v4_ip_entry", |
2344 | "GNUNET_setup_exit_interface_v4_ip_entry", | ||
2345 | "changed", | 2394 | "changed", |
2346 | "exit", | 2395 | "exit", |
2347 | "IPV4ADDR", | 2396 | "IPV4ADDR", |
2348 | gettext_noop ("IPv4 address to use for the Exit interface"), | 2397 | gettext_noop ("IPv4 address to use for the Exit interface"), |
2349 | "https://old.gnunet.org/configuration-exit", | 2398 | "https://old.gnunet.org/configuration-exit", |
2350 | &load_text, | 2399 | &load_text, |
2351 | &save_text, NULL, | 2400 | &save_text, |
2352 | NULL, NULL, | 2401 | NULL, |
2402 | NULL, | ||
2403 | NULL, | ||
2353 | NULL}, | 2404 | NULL}, |
2354 | 2405 | ||
2355 | { | 2406 | {"GNUNET_setup_exit_interface_v4_mask_entry", |
2356 | "GNUNET_setup_exit_interface_v4_mask_entry", | ||
2357 | "changed", | 2407 | "changed", |
2358 | "exit", | 2408 | "exit", |
2359 | "IPV4MASK", | 2409 | "IPV4MASK", |
2360 | gettext_noop ("IPv4 network mask to use for the Exit interface"), | 2410 | gettext_noop ("IPv4 network mask to use for the Exit interface"), |
2361 | "https://old.gnunet.org/configuration-exit", | 2411 | "https://old.gnunet.org/configuration-exit", |
2362 | &load_text, | 2412 | &load_text, |
2363 | &save_text, NULL, | 2413 | &save_text, |
2364 | NULL, NULL, | 2414 | NULL, |
2415 | NULL, | ||
2416 | NULL, | ||
2365 | NULL}, | 2417 | NULL}, |
2366 | 2418 | ||
2367 | { | 2419 | {"GNUNET_setup_exit_interface_v6_ip_entry", |
2368 | "GNUNET_setup_exit_interface_v6_ip_entry", | ||
2369 | "changed", | 2420 | "changed", |
2370 | "exit", | 2421 | "exit", |
2371 | "IPV6ADDR", | 2422 | "IPV6ADDR", |
2372 | gettext_noop ("IPv6 address to use for the Exit interface"), | 2423 | gettext_noop ("IPv6 address to use for the Exit interface"), |
2373 | "https://old.gnunet.org/configuration-exit", | 2424 | "https://old.gnunet.org/configuration-exit", |
2374 | &load_text, | 2425 | &load_text, |
2375 | &save_text, NULL, | 2426 | &save_text, |
2376 | NULL, NULL, | 2427 | NULL, |
2428 | NULL, | ||
2429 | NULL, | ||
2377 | NULL}, | 2430 | NULL}, |
2378 | 2431 | ||
2379 | { | 2432 | {"GNUNET_setup_exit_interface_v6_mask_spinbutton", |
2380 | "GNUNET_setup_exit_interface_v6_mask_spinbutton", | ||
2381 | "value-changed", | 2433 | "value-changed", |
2382 | "exit", | 2434 | "exit", |
2383 | "IPV6PREFIX", | 2435 | "IPV6PREFIX", |
2384 | gettext_noop | 2436 | gettext_noop ("IPv6 network prefix length to use for the Exit interface"), |
2385 | ("IPv6 network prefix length to use for the Exit interface"), | ||
2386 | "https://old.gnunet.org/configuration-exit", | 2437 | "https://old.gnunet.org/configuration-exit", |
2387 | &load_number, | 2438 | &load_number, |
2388 | &save_number, NULL, | 2439 | &save_number, |
2389 | NULL, NULL, | 2440 | NULL, |
2441 | NULL, | ||
2442 | NULL, | ||
2390 | NULL}, | 2443 | NULL}, |
2391 | 2444 | ||
2392 | 2445 | ||
2393 | { | 2446 | {"GNUNET_setup_exit_enable_ipv4_exit_checkbutton", |
2394 | "GNUNET_setup_exit_enable_ipv4_exit_checkbutton", | ||
2395 | "toggled", | 2447 | "toggled", |
2396 | "exit", | 2448 | "exit", |
2397 | "EXIT_IPV4", | 2449 | "EXIT_IPV4", |
2398 | gettext_noop | 2450 | gettext_noop ( |
2399 | ("Allow other users to use your Internet connection for UDP traffic (via the Exit interface)"), | 2451 | "Allow other users to use your Internet connection for UDP traffic (via the Exit interface)"), |
2400 | "https://old.gnunet.org/configuration-exit", | 2452 | "https://old.gnunet.org/configuration-exit", |
2401 | &load_yes_no, | 2453 | &load_yes_no, |
2402 | &save_yes_no, NULL, | 2454 | &save_yes_no, |
2403 | NULL, NULL, | 2455 | NULL, |
2456 | NULL, | ||
2457 | NULL, | ||
2404 | hide_v4_exit_options}, | 2458 | hide_v4_exit_options}, |
2405 | 2459 | ||
2406 | { | 2460 | {"GNUNET_setup_exit_enable_ipv6_exit_checkbutton", |
2407 | "GNUNET_setup_exit_enable_ipv6_exit_checkbutton", | ||
2408 | "toggled", | 2461 | "toggled", |
2409 | "exit", | 2462 | "exit", |
2410 | "EXIT_IPV6", | 2463 | "EXIT_IPV6", |
2411 | gettext_noop | 2464 | gettext_noop ( |
2412 | ("Allow other users to use your Internet connection for TCP traffic (via the Exit interface)"), | 2465 | "Allow other users to use your Internet connection for TCP traffic (via the Exit interface)"), |
2413 | "https://old.gnunet.org/configuration-exit", | 2466 | "https://old.gnunet.org/configuration-exit", |
2414 | &load_yes_no, | 2467 | &load_yes_no, |
2415 | &save_yes_no, NULL, | 2468 | &save_yes_no, |
2416 | NULL, NULL, | 2469 | NULL, |
2470 | NULL, | ||
2471 | NULL, | ||
2417 | hide_v6_exit_options}, | 2472 | hide_v6_exit_options}, |
2418 | 2473 | ||
2419 | 2474 | ||
2420 | { | 2475 | {"GNUNET_SETUP_exit_policy_v4_entry", |
2421 | "GNUNET_SETUP_exit_policy_v4_entry", | ||
2422 | "changed", | 2476 | "changed", |
2423 | "exit", | 2477 | "exit", |
2424 | "EXIT_RANGE_IPV4_POLICY", | 2478 | "EXIT_RANGE_IPV4_POLICY", |
2425 | gettext_noop | 2479 | gettext_noop ( |
2426 | ("Which IPv4 addresses and ports do you allow other users to send traffic towards (via the Exit interface)"), | 2480 | "Which IPv4 addresses and ports do you allow other users to send traffic towards (via the Exit interface)"), |
2427 | "https://old.gnunet.org/configuration-exit", | 2481 | "https://old.gnunet.org/configuration-exit", |
2428 | &load_text, | 2482 | &load_text, |
2429 | &save_text, NULL, | 2483 | &save_text, |
2430 | &validate_v4_policy, NULL, | 2484 | NULL, |
2485 | &validate_v4_policy, | ||
2486 | NULL, | ||
2431 | NULL}, | 2487 | NULL}, |
2432 | 2488 | ||
2433 | 2489 | ||
2434 | { | 2490 | {"GNUNET_SETUP_exit_policy_v6_entry", |
2435 | "GNUNET_SETUP_exit_policy_v6_entry", | ||
2436 | "changed", | 2491 | "changed", |
2437 | "exit", | 2492 | "exit", |
2438 | "EXIT_RANGE_IPV6_POLICY", | 2493 | "EXIT_RANGE_IPV6_POLICY", |
2439 | gettext_noop | 2494 | gettext_noop ( |
2440 | ("Which IPv6 addresses and ports do you allow other users to send traffic towards (via the Exit interface)"), | 2495 | "Which IPv6 addresses and ports do you allow other users to send traffic towards (via the Exit interface)"), |
2441 | "https://old.gnunet.org/configuration-exit", | 2496 | "https://old.gnunet.org/configuration-exit", |
2442 | &load_text, | 2497 | &load_text, |
2443 | &save_text, NULL, | 2498 | &save_text, |
2444 | &validate_v6_policy, NULL, | 2499 | NULL, |
2500 | &validate_v6_policy, | ||
2501 | NULL, | ||
2445 | NULL}, | 2502 | NULL}, |
2446 | 2503 | ||
2447 | 2504 | ||
2448 | |||
2449 | |||
2450 | /* Namestore TAB */ | 2505 | /* Namestore TAB */ |
2451 | 2506 | ||
2452 | { | 2507 | {"GNUNET_setup_namestore_sqlite_radiobutton", |
2453 | "GNUNET_setup_namestore_sqlite_radiobutton", | ||
2454 | "toggled", | 2508 | "toggled", |
2455 | "namestore", | 2509 | "namestore", |
2456 | "DATABASE", | 2510 | "DATABASE", |
2457 | gettext_noop ("Use sqLite to store names"), | 2511 | gettext_noop ("Use sqLite to store names"), |
2458 | "https://old.gnunet.org/configuration-namestore", | 2512 | "https://old.gnunet.org/configuration-namestore", |
2459 | &load_option_list /* abuse! */ , | 2513 | &load_option_list /* abuse! */, |
2460 | &save_option_list /* abuse! */ , "sqlite", | 2514 | &save_option_list /* abuse! */, |
2461 | NULL, NULL, | 2515 | "sqlite", |
2516 | NULL, | ||
2517 | NULL, | ||
2462 | hide_sqlite_namestore_tab}, | 2518 | hide_sqlite_namestore_tab}, |
2463 | 2519 | ||
2464 | { | 2520 | {"GNUNET_setup_namestore_postgres_radiobutton", |
2465 | "GNUNET_setup_namestore_postgres_radiobutton", | ||
2466 | "toggled", | 2521 | "toggled", |
2467 | "namestore", | 2522 | "namestore", |
2468 | "DATABASE", | 2523 | "DATABASE", |
2469 | gettext_noop ("Use PostGres to store names"), | 2524 | gettext_noop ("Use PostGres to store names"), |
2470 | "https://old.gnunet.org/configuration-namestore", | 2525 | "https://old.gnunet.org/configuration-namestore", |
2471 | &load_option_list /* abuse! */ , | 2526 | &load_option_list /* abuse! */, |
2472 | &save_option_list /* abuse! */ , "postgres", | 2527 | &save_option_list /* abuse! */, |
2473 | NULL, NULL, | 2528 | "postgres", |
2529 | NULL, | ||
2530 | NULL, | ||
2474 | hide_postgres_namestore_tab}, | 2531 | hide_postgres_namestore_tab}, |
2475 | 2532 | ||
2476 | { | 2533 | {"GNUNET_setup_namestore_postgres_config_entry", |
2477 | "GNUNET_setup_namestore_postgres_config_entry", | ||
2478 | "changed", | 2534 | "changed", |
2479 | "namestore-postgres", | 2535 | "namestore-postgres", |
2480 | "CONFIG", | 2536 | "CONFIG", |
2481 | gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"), | 2537 | gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"), |
2482 | "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT", | 2538 | "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT", |
2483 | &load_text, | 2539 | &load_text, |
2484 | &save_text, NULL, | 2540 | &save_text, |
2485 | NULL, NULL, | 2541 | NULL, |
2542 | NULL, | ||
2543 | NULL, | ||
2486 | NULL}, | 2544 | NULL}, |
2487 | 2545 | ||
2488 | 2546 | ||
2489 | /* GNS */ | 2547 | /* GNS */ |
2490 | 2548 | ||
2491 | { | 2549 | {"GNUNET_setup_general_services_gns_checkbutton", |
2492 | "GNUNET_setup_general_services_gns_checkbutton", | ||
2493 | "toggled", | 2550 | "toggled", |
2494 | "gns", | 2551 | "gns", |
2495 | "FORCESTART", | 2552 | "FORCESTART", |
2496 | gettext_noop ("Should the GNS be started automatically on startup?"), | 2553 | gettext_noop ("Should the GNS be started automatically on startup?"), |
2497 | "https://old.gnunet.org/configuration-gns", | 2554 | "https://old.gnunet.org/configuration-gns", |
2498 | &load_yes_no, | 2555 | &load_yes_no, |
2499 | &save_yes_no, NULL, | 2556 | &save_yes_no, |
2500 | NULL, NULL, | 2557 | NULL, |
2558 | NULL, | ||
2559 | NULL, | ||
2501 | hide_gns_tabs}, | 2560 | hide_gns_tabs}, |
2502 | 2561 | ||
2503 | 2562 | ||
2504 | /* EXIT services */ | 2563 | /* EXIT services */ |
2505 | 2564 | ||
2506 | { | 2565 | {"GNUNET_setup_hosted_service_treeview", |
2507 | "GNUNET_setup_hosted_service_treeview", | ||
2508 | NULL, | 2566 | NULL, |
2509 | NULL, | 2567 | NULL, |
2510 | NULL, | 2568 | NULL, |
2511 | gettext_noop | 2569 | gettext_noop ("Specification of .gnunet hosted services"), |
2512 | ("Specification of .gnunet hosted services"), | ||
2513 | "https://old.gnunet.org/configuration-dns", | 2570 | "https://old.gnunet.org/configuration-dns", |
2514 | &load_hosted_service_configuration, | 2571 | &load_hosted_service_configuration, |
2515 | NULL, NULL, | 2572 | NULL, |
2516 | NULL, NULL, | 2573 | NULL, |
2574 | NULL, | ||
2575 | NULL, | ||
2517 | NULL}, | 2576 | NULL}, |
2518 | 2577 | ||
2519 | { | 2578 | {"GNUNET_SETUP_hosted_service_identifier_cellrenderertext", |
2520 | "GNUNET_SETUP_hosted_service_identifier_cellrenderertext", | ||
2521 | "editing-started", | 2579 | "editing-started", |
2522 | NULL, | 2580 | NULL, |
2523 | NULL, | 2581 | NULL, |
@@ -2530,8 +2588,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = { | |||
2530 | NULL, | 2588 | NULL, |
2531 | NULL}, | 2589 | NULL}, |
2532 | 2590 | ||
2533 | { | 2591 | {"GNUNET_SETUP_hosted_service_is_udp_cellrenderertoggle", |
2534 | "GNUNET_SETUP_hosted_service_is_udp_cellrenderertoggle", | ||
2535 | "toggled", | 2592 | "toggled", |
2536 | NULL, | 2593 | NULL, |
2537 | NULL, | 2594 | NULL, |
@@ -2544,8 +2601,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = { | |||
2544 | NULL, | 2601 | NULL, |
2545 | NULL}, | 2602 | NULL}, |
2546 | 2603 | ||
2547 | { | 2604 | {"GNUNET_SETUP_hosted_service_port_cellrenderertext", |
2548 | "GNUNET_SETUP_hosted_service_port_cellrenderertext", | ||
2549 | "editing-started", | 2605 | "editing-started", |
2550 | NULL, | 2606 | NULL, |
2551 | NULL, | 2607 | NULL, |
@@ -2558,8 +2614,7 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = { | |||
2558 | NULL, | 2614 | NULL, |
2559 | NULL}, | 2615 | NULL}, |
2560 | 2616 | ||
2561 | { | 2617 | {"GNUNET_SETUP_hosted_service_destination_cellrenderertext", |
2562 | "GNUNET_SETUP_hosted_service_destination_cellrenderertext", | ||
2563 | "editing-started", | 2618 | "editing-started", |
2564 | NULL, | 2619 | NULL, |
2565 | NULL, | 2620 | NULL, |
@@ -2573,13 +2628,9 @@ const struct GNUNET_SETUP_OptionSpecification option_specifications[] = { | |||
2573 | NULL}, | 2628 | NULL}, |
2574 | 2629 | ||
2575 | 2630 | ||
2576 | |||
2577 | /* END of list */ | 2631 | /* END of list */ |
2578 | 2632 | ||
2579 | {NULL, NULL, NULL, NULL, NULL, | 2633 | {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}}; |
2580 | NULL, NULL, NULL, NULL, NULL, | ||
2581 | NULL} | ||
2582 | }; | ||
2583 | 2634 | ||
2584 | 2635 | ||
2585 | /* end of gnunet-setup-options.c */ | 2636 | /* end of gnunet-setup-options.c */ |
diff --git a/src/setup/gnunet-setup-options.h b/src/setup/gnunet-setup-options.h index 5b94d0c3..fc60941f 100644 --- a/src/setup/gnunet-setup-options.h +++ b/src/setup/gnunet-setup-options.h | |||
@@ -40,11 +40,13 @@ | |||
40 | * @param cfg configuration handle | 40 | * @param cfg configuration handle |
41 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 41 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
42 | */ | 42 | */ |
43 | typedef int (*GNUNET_SETUP_LoadFunction) (const void *cls, const char *section, | 43 | typedef int (*GNUNET_SETUP_LoadFunction) ( |
44 | const char *option, const char *value, | 44 | const void *cls, |
45 | GObject * widget, | 45 | const char *section, |
46 | const struct | 46 | const char *option, |
47 | GNUNET_CONFIGURATION_Handle * cfg); | 47 | const char *value, |
48 | GObject *widget, | ||
49 | const struct GNUNET_CONFIGURATION_Handle *cfg); | ||
48 | 50 | ||
49 | 51 | ||
50 | /** | 52 | /** |
@@ -58,10 +60,12 @@ typedef int (*GNUNET_SETUP_LoadFunction) (const void *cls, const char *section, | |||
58 | * @param cfg configuration handle to update | 60 | * @param cfg configuration handle to update |
59 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 61 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
60 | */ | 62 | */ |
61 | typedef int (*GNUNET_SETUP_SaveFunction) (const void *cls, const char *section, | 63 | typedef int (*GNUNET_SETUP_SaveFunction) ( |
62 | const char *option, GObject * widget, | 64 | const void *cls, |
63 | struct GNUNET_CONFIGURATION_Handle * | 65 | const char *section, |
64 | cfg); | 66 | const char *option, |
67 | GObject *widget, | ||
68 | struct GNUNET_CONFIGURATION_Handle *cfg); | ||
65 | 69 | ||
66 | 70 | ||
67 | /** | 71 | /** |
@@ -98,7 +102,6 @@ struct GNUNET_SETUP_VisibilitySpecification | |||
98 | * hidden. If NULL, the "show_value" controls visibility. | 102 | * hidden. If NULL, the "show_value" controls visibility. |
99 | */ | 103 | */ |
100 | const char *hide_value; | 104 | const char *hide_value; |
101 | |||
102 | }; | 105 | }; |
103 | 106 | ||
104 | 107 | ||
@@ -168,7 +171,6 @@ struct GNUNET_SETUP_OptionSpecification | |||
168 | * NULL-terminated). | 171 | * NULL-terminated). |
169 | */ | 172 | */ |
170 | const struct GNUNET_SETUP_VisibilitySpecification *visibility; | 173 | const struct GNUNET_SETUP_VisibilitySpecification *visibility; |
171 | |||
172 | }; | 174 | }; |
173 | 175 | ||
174 | 176 | ||
diff --git a/src/setup/gnunet-setup-transport-plugins.c b/src/setup/gnunet-setup-transport-plugins.c index 68eb1d7a..5a5a14ff 100644 --- a/src/setup/gnunet-setup-transport-plugins.c +++ b/src/setup/gnunet-setup-transport-plugins.c | |||
@@ -34,7 +34,7 @@ | |||
34 | * @param name name of the plugin to check | 34 | * @param name name of the plugin to check |
35 | */ | 35 | */ |
36 | static void | 36 | static void |
37 | test_plugin (GtkWidget * widget, const char *name) | 37 | test_plugin (GtkWidget *widget, const char *name) |
38 | { | 38 | { |
39 | if (GNUNET_YES == GNUNET_PLUGIN_test (name)) | 39 | if (GNUNET_YES == GNUNET_PLUGIN_test (name)) |
40 | { | 40 | { |
@@ -48,9 +48,8 @@ test_plugin (GtkWidget * widget, const char *name) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | 50 | ||
51 | |||
52 | void | 51 | void |
53 | GNUNET_setup_transport_tcp_checkbutton_realize_cb (GtkWidget * widget, | 52 | GNUNET_setup_transport_tcp_checkbutton_realize_cb (GtkWidget *widget, |
54 | gpointer user_data) | 53 | gpointer user_data) |
55 | { | 54 | { |
56 | test_plugin (widget, "libgnunet_plugin_transport_tcp"); | 55 | test_plugin (widget, "libgnunet_plugin_transport_tcp"); |
@@ -58,7 +57,7 @@ GNUNET_setup_transport_tcp_checkbutton_realize_cb (GtkWidget * widget, | |||
58 | 57 | ||
59 | 58 | ||
60 | void | 59 | void |
61 | GNUNET_setup_transport_udp_checkbutton_realize_cb (GtkWidget * widget, | 60 | GNUNET_setup_transport_udp_checkbutton_realize_cb (GtkWidget *widget, |
62 | gpointer user_data) | 61 | gpointer user_data) |
63 | { | 62 | { |
64 | test_plugin (widget, "libgnunet_plugin_transport_udp"); | 63 | test_plugin (widget, "libgnunet_plugin_transport_udp"); |
@@ -66,39 +65,39 @@ GNUNET_setup_transport_udp_checkbutton_realize_cb (GtkWidget * widget, | |||
66 | 65 | ||
67 | 66 | ||
68 | void | 67 | void |
69 | GNUNET_setup_transport_http_server_checkbutton_realize_cb (GtkWidget * widget, | 68 | GNUNET_setup_transport_http_server_checkbutton_realize_cb (GtkWidget *widget, |
70 | gpointer user_data) | 69 | gpointer user_data) |
71 | { | 70 | { |
72 | test_plugin (widget, "libgnunet_plugin_transport_http_server"); | 71 | test_plugin (widget, "libgnunet_plugin_transport_http_server"); |
73 | } | 72 | } |
74 | 73 | ||
75 | 74 | ||
76 | void | 75 | void |
77 | GNUNET_setup_transport_http_client_checkbutton_realize_cb (GtkWidget * widget, | 76 | GNUNET_setup_transport_http_client_checkbutton_realize_cb (GtkWidget *widget, |
78 | gpointer user_data) | 77 | gpointer user_data) |
79 | { | 78 | { |
80 | test_plugin (widget, "libgnunet_plugin_transport_http_client"); | 79 | test_plugin (widget, "libgnunet_plugin_transport_http_client"); |
81 | } | 80 | } |
82 | 81 | ||
83 | 82 | ||
84 | void | 83 | void |
85 | GNUNET_setup_transport_https_server_checkbutton_realize_cb (GtkWidget * widget, | 84 | GNUNET_setup_transport_https_server_checkbutton_realize_cb (GtkWidget *widget, |
86 | gpointer user_data) | 85 | gpointer user_data) |
87 | { | 86 | { |
88 | test_plugin (widget, "libgnunet_plugin_transport_https_server"); | 87 | test_plugin (widget, "libgnunet_plugin_transport_https_server"); |
89 | } | 88 | } |
90 | 89 | ||
91 | 90 | ||
92 | void | 91 | void |
93 | GNUNET_setup_transport_https_client_checkbutton_realize_cb (GtkWidget * widget, | 92 | GNUNET_setup_transport_https_client_checkbutton_realize_cb (GtkWidget *widget, |
94 | gpointer user_data) | 93 | gpointer user_data) |
95 | { | 94 | { |
96 | test_plugin (widget, "libgnunet_plugin_transport_https_client"); | 95 | test_plugin (widget, "libgnunet_plugin_transport_https_client"); |
97 | } | 96 | } |
98 | 97 | ||
99 | 98 | ||
100 | void | 99 | void |
101 | GNUNET_setup_transport_dv_checkbutton_realize_cb (GtkWidget * widget, | 100 | GNUNET_setup_transport_dv_checkbutton_realize_cb (GtkWidget *widget, |
102 | gpointer user_data) | 101 | gpointer user_data) |
103 | { | 102 | { |
104 | test_plugin (widget, "libgnunet_plugin_transport_dv"); | 103 | test_plugin (widget, "libgnunet_plugin_transport_dv"); |
@@ -106,7 +105,7 @@ GNUNET_setup_transport_dv_checkbutton_realize_cb (GtkWidget * widget, | |||
106 | 105 | ||
107 | 106 | ||
108 | void | 107 | void |
109 | GNUNET_setup_transport_wlan_checkbutton_realize_cb (GtkWidget * widget, | 108 | GNUNET_setup_transport_wlan_checkbutton_realize_cb (GtkWidget *widget, |
110 | gpointer user_data) | 109 | gpointer user_data) |
111 | { | 110 | { |
112 | test_plugin (widget, "libgnunet_plugin_transport_wlan"); | 111 | test_plugin (widget, "libgnunet_plugin_transport_wlan"); |
diff --git a/src/setup/gnunet-setup-transport-test.c b/src/setup/gnunet-setup-transport-test.c index e46b9ef4..fd08c633 100644 --- a/src/setup/gnunet-setup-transport-test.c +++ b/src/setup/gnunet-setup-transport-test.c | |||
@@ -64,7 +64,6 @@ struct TestContext | |||
64 | * Name of widget to show on failure. | 64 | * Name of widget to show on failure. |
65 | */ | 65 | */ |
66 | const char *failure_image; | 66 | const char *failure_image; |
67 | |||
68 | }; | 67 | }; |
69 | 68 | ||
70 | 69 | ||
@@ -99,11 +98,8 @@ stop_service (struct GNUNET_OS_Process *proc) | |||
99 | { | 98 | { |
100 | if (NULL == proc) | 99 | if (NULL == proc) |
101 | return; | 100 | return; |
102 | GNUNET_break (0 == | 101 | GNUNET_break (0 == GNUNET_OS_process_kill (proc, SIGTERM)); |
103 | GNUNET_OS_process_kill (proc, | 102 | GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (proc)); |
104 | SIGTERM)); | ||
105 | GNUNET_break (GNUNET_OK == | ||
106 | GNUNET_OS_process_wait (proc)); | ||
107 | GNUNET_OS_process_destroy (proc); | 103 | GNUNET_OS_process_destroy (proc); |
108 | } | 104 | } |
109 | 105 | ||
@@ -122,14 +118,9 @@ start_service (const char *name) | |||
122 | char *filename; | 118 | char *filename; |
123 | char *path; | 119 | char *path; |
124 | 120 | ||
125 | GNUNET_asprintf (&binary, | 121 | GNUNET_asprintf (&binary, "gnunet-service-%s", name); |
126 | "gnunet-service-%s", | ||
127 | name); | ||
128 | path = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_LIBEXECDIR); | 122 | path = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_LIBEXECDIR); |
129 | GNUNET_asprintf (&filename, | 123 | GNUNET_asprintf (&filename, "%s/%s", path, binary); |
130 | "%s/%s", | ||
131 | path, | ||
132 | binary); | ||
133 | GNUNET_free (path); | 124 | GNUNET_free (path); |
134 | proc = GNUNET_OS_start_process (GNUNET_NO, | 125 | proc = GNUNET_OS_start_process (GNUNET_NO, |
135 | GNUNET_OS_INHERIT_STD_ERR, | 126 | GNUNET_OS_INHERIT_STD_ERR, |
@@ -142,9 +133,7 @@ start_service (const char *name) | |||
142 | option_cfg_name, | 133 | option_cfg_name, |
143 | NULL); | 134 | NULL); |
144 | if (NULL == proc) | 135 | if (NULL == proc) |
145 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, | 136 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "exec", filename); |
146 | "exec", | ||
147 | filename); | ||
148 | GNUNET_free (binary); | 137 | GNUNET_free (binary); |
149 | GNUNET_free (filename); | 138 | GNUNET_free (filename); |
150 | return proc; | 139 | return proc; |
@@ -185,8 +174,7 @@ start_services () | |||
185 | * @param result #GNUNET_YES on success | 174 | * @param result #GNUNET_YES on success |
186 | */ | 175 | */ |
187 | static void | 176 | static void |
188 | display_test_result (struct TestContext *tc, | 177 | display_test_result (struct TestContext *tc, int result) |
189 | int result) | ||
190 | { | 178 | { |
191 | GObject *w; | 179 | GObject *w; |
192 | 180 | ||
@@ -233,8 +221,7 @@ timeout_task (void *cls) | |||
233 | tc->tt = NULL; | 221 | tc->tt = NULL; |
234 | GNUNET_SCHEDULER_cancel (tc->st); | 222 | GNUNET_SCHEDULER_cancel (tc->st); |
235 | tc->st = NULL; | 223 | tc->st = NULL; |
236 | display_test_result (tc, | 224 | display_test_result (tc, GNUNET_SYSERR); |
237 | GNUNET_SYSERR); | ||
238 | } | 225 | } |
239 | 226 | ||
240 | 227 | ||
@@ -266,8 +253,7 @@ shutdown_task (void *cls) | |||
266 | * @param result status code for the NAT test | 253 | * @param result status code for the NAT test |
267 | */ | 254 | */ |
268 | static void | 255 | static void |
269 | result_callback (void *cls, | 256 | result_callback (void *cls, enum GNUNET_NAT_StatusCode result) |
270 | enum GNUNET_NAT_StatusCode result) | ||
271 | { | 257 | { |
272 | struct TestContext *tc = cls; | 258 | struct TestContext *tc = cls; |
273 | 259 | ||
@@ -276,9 +262,8 @@ result_callback (void *cls, | |||
276 | GNUNET_SCHEDULER_cancel (tc->st); | 262 | GNUNET_SCHEDULER_cancel (tc->st); |
277 | tc->st = NULL; | 263 | tc->st = NULL; |
278 | display_test_result (tc, | 264 | display_test_result (tc, |
279 | (GNUNET_NAT_ERROR_SUCCESS == result) | 265 | (GNUNET_NAT_ERROR_SUCCESS == result) ? GNUNET_OK |
280 | ? GNUNET_OK | 266 | : GNUNET_SYSERR); |
281 | : GNUNET_SYSERR); | ||
282 | } | 267 | } |
283 | 268 | ||
284 | 269 | ||
@@ -310,16 +295,10 @@ GNUNET_setup_transport_test (const char *section_name, | |||
310 | gtk_widget_hide (w); | 295 | gtk_widget_hide (w); |
311 | GNUNET_assert (NULL != cfg); | 296 | GNUNET_assert (NULL != cfg); |
312 | GNUNET_RESOLVER_connect (cfg); | 297 | GNUNET_RESOLVER_connect (cfg); |
313 | tc->tt = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 298 | tc->tt = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &timeout_task, tc); |
314 | &timeout_task, | 299 | tc->st = GNUNET_SCHEDULER_add_shutdown (&shutdown_task, tc); |
315 | tc); | 300 | tc->tst = |
316 | tc->st = GNUNET_SCHEDULER_add_shutdown (&shutdown_task, | 301 | GNUNET_NAT_AUTO_test_start (cfg, proto, section_name, &result_callback, tc); |
317 | tc); | ||
318 | tc->tst = GNUNET_NAT_AUTO_test_start (cfg, | ||
319 | proto, | ||
320 | section_name, | ||
321 | &result_callback, | ||
322 | tc); | ||
323 | } | 302 | } |
324 | 303 | ||
325 | /* end of gnunet-setup-transport-test.c */ | 304 | /* end of gnunet-setup-transport-test.c */ |
diff --git a/src/setup/gnunet-setup-transport-udp.c b/src/setup/gnunet-setup-transport-udp.c index 14bb546e..e89ebf94 100644 --- a/src/setup/gnunet-setup-transport-udp.c +++ b/src/setup/gnunet-setup-transport-udp.c | |||
@@ -38,7 +38,6 @@ GNUNET_setup_transport_udp_test_button_clicked_cb () | |||
38 | IPPROTO_UDP, | 38 | IPPROTO_UDP, |
39 | "GNUNET_setup_transport_udp_test_success_image", | 39 | "GNUNET_setup_transport_udp_test_success_image", |
40 | "GNUNET_setup_transport_udp_test_fail_image"); | 40 | "GNUNET_setup_transport_udp_test_fail_image"); |
41 | |||
42 | } | 41 | } |
43 | 42 | ||
44 | 43 | ||
diff --git a/src/setup/gnunet-setup.c b/src/setup/gnunet-setup.c index d60c3211..84e55aaa 100644 --- a/src/setup/gnunet-setup.c +++ b/src/setup/gnunet-setup.c | |||
@@ -84,7 +84,8 @@ GNUNET_SETUP_get_object (const char *name) | |||
84 | * @return FALSE (continue event handling) | 84 | * @return FALSE (continue event handling) |
85 | */ | 85 | */ |
86 | static gboolean | 86 | static gboolean |
87 | help_click_callback (GtkWidget * widget, GdkEventButton * event, | 87 | help_click_callback (GtkWidget *widget, |
88 | GdkEventButton *event, | ||
88 | gpointer user_data) | 89 | gpointer user_data) |
89 | { | 90 | { |
90 | const struct GNUNET_SETUP_OptionSpecification *os = user_data; | 91 | const struct GNUNET_SETUP_OptionSpecification *os = user_data; |
@@ -105,9 +106,9 @@ help_click_callback (GtkWidget * widget, GdkEventButton * event, | |||
105 | */ | 106 | */ |
106 | void | 107 | void |
107 | GNUNET_setup_notebook_switch_page_cb (GtkNotebook *notebook, | 108 | GNUNET_setup_notebook_switch_page_cb (GtkNotebook *notebook, |
108 | GtkWidget *page, | 109 | GtkWidget *page, |
109 | guint page_num, | 110 | guint page_num, |
110 | gpointer user_data) | 111 | gpointer user_data) |
111 | { | 112 | { |
112 | GtkWidget *help; | 113 | GtkWidget *help; |
113 | GtkWidget *gnu; | 114 | GtkWidget *gnu; |
@@ -146,7 +147,8 @@ update_visibility (const struct GNUNET_SETUP_OptionSpecification *os, | |||
146 | widget = GTK_WIDGET (GNUNET_SETUP_get_object (vs->widget_name)); | 147 | widget = GTK_WIDGET (GNUNET_SETUP_get_object (vs->widget_name)); |
147 | if (NULL == widget) | 148 | if (NULL == widget) |
148 | { | 149 | { |
149 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("Widget `%s' not found\n"), | 150 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
151 | _ ("Widget `%s' not found\n"), | ||
150 | vs->widget_name); | 152 | vs->widget_name); |
151 | } | 153 | } |
152 | if (NULL != vs->show_value) | 154 | if (NULL != vs->show_value) |
@@ -155,7 +157,8 @@ update_visibility (const struct GNUNET_SETUP_OptionSpecification *os, | |||
155 | regcomp (&r, vs->show_value, REG_EXTENDED | REG_ICASE | REG_NOSUB)) | 157 | regcomp (&r, vs->show_value, REG_EXTENDED | REG_ICASE | REG_NOSUB)) |
156 | { | 158 | { |
157 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 159 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
158 | _("Invalid regular expression `%s'\n"), vs->show_value); | 160 | _ ("Invalid regular expression `%s'\n"), |
161 | vs->show_value); | ||
159 | i++; | 162 | i++; |
160 | continue; | 163 | continue; |
161 | } | 164 | } |
@@ -170,7 +173,8 @@ update_visibility (const struct GNUNET_SETUP_OptionSpecification *os, | |||
170 | if (0 != regcomp (&r, vs->hide_value, REG_ICASE | REG_NOSUB)) | 173 | if (0 != regcomp (&r, vs->hide_value, REG_ICASE | REG_NOSUB)) |
171 | { | 174 | { |
172 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 175 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
173 | _("Invalid regular expression `%s'\n"), vs->show_value); | 176 | _ ("Invalid regular expression `%s'\n"), |
177 | vs->show_value); | ||
174 | i++; | 178 | i++; |
175 | continue; | 179 | continue; |
176 | } | 180 | } |
@@ -198,27 +202,25 @@ widget_state_change_callback (const struct GNUNET_SETUP_OptionSpecification *os) | |||
198 | 202 | ||
199 | widget = GNUNET_SETUP_get_object (os->widget_name); | 203 | widget = GNUNET_SETUP_get_object (os->widget_name); |
200 | GNUNET_assert (NULL != os->save_function); | 204 | GNUNET_assert (NULL != os->save_function); |
201 | if (GNUNET_OK != | 205 | if (GNUNET_OK != os->save_function (os->load_save_cls, |
202 | os->save_function (os->load_save_cls, | 206 | os->section, |
203 | os->section, | 207 | os->option, |
204 | os->option, | 208 | widget, |
205 | widget, | 209 | cfg)) |
206 | cfg)) | ||
207 | { | 210 | { |
208 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 211 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
209 | _("Failed to obtain option value from widget `%s'\n"), | 212 | _ ("Failed to obtain option value from widget `%s'\n"), |
210 | os->widget_name); | 213 | os->widget_name); |
211 | return; | 214 | return; |
212 | } | 215 | } |
213 | if (NULL != os->input_validation_function) | 216 | if (NULL != os->input_validation_function) |
214 | os->input_validation_function (os->input_validation_function_cls, widget); | 217 | os->input_validation_function (os->input_validation_function_cls, widget); |
215 | if ( (NULL != os->section) && | 218 | if ((NULL != os->section) && (NULL != os->option)) |
216 | (NULL != os->option) ) | ||
217 | { | 219 | { |
218 | if (GNUNET_OK != | 220 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, |
219 | GNUNET_CONFIGURATION_get_value_string (cfg, os->section, | 221 | os->section, |
220 | os->option, | 222 | os->option, |
221 | &value)) | 223 | &value)) |
222 | { | 224 | { |
223 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, | 225 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, |
224 | os->section, | 226 | os->section, |
@@ -245,7 +247,8 @@ load_options () | |||
245 | char *value; | 247 | char *value; |
246 | 248 | ||
247 | #ifndef LINUX | 249 | #ifndef LINUX |
248 | gtk_widget_hide (GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_gns_hijack_checkbutton"))); | 250 | gtk_widget_hide (GTK_WIDGET ( |
251 | GNUNET_SETUP_get_object ("GNUNET_setup_gns_hijack_checkbutton"))); | ||
249 | #endif | 252 | #endif |
250 | i = 0; | 253 | i = 0; |
251 | while (NULL != option_specifications[i].widget_name) | 254 | while (NULL != option_specifications[i].widget_name) |
@@ -254,7 +257,8 @@ load_options () | |||
254 | widget = GNUNET_SETUP_get_object (os->widget_name); | 257 | widget = GNUNET_SETUP_get_object (os->widget_name); |
255 | if (NULL == widget) | 258 | if (NULL == widget) |
256 | { | 259 | { |
257 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, _("Widget `%s' not found\n"), | 260 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
261 | _ ("Widget `%s' not found\n"), | ||
258 | os->widget_name); | 262 | os->widget_name); |
259 | i++; | 263 | i++; |
260 | continue; | 264 | continue; |
@@ -263,34 +267,45 @@ load_options () | |||
263 | { | 267 | { |
264 | if ((NULL == os->section) || (NULL == os->option)) | 268 | if ((NULL == os->section) || (NULL == os->option)) |
265 | { | 269 | { |
266 | if (GNUNET_OK != | 270 | if (GNUNET_OK != os->load_function (os->load_save_cls, |
267 | os->load_function (os->load_save_cls, NULL, NULL, NULL, widget, | 271 | NULL, |
268 | cfg)) | 272 | NULL, |
273 | NULL, | ||
274 | widget, | ||
275 | cfg)) | ||
269 | { | 276 | { |
270 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 277 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
271 | _("Failed to initialize widget `%s'\n"), os->widget_name); | 278 | _ ("Failed to initialize widget `%s'\n"), |
279 | os->widget_name); | ||
272 | } | 280 | } |
273 | } | 281 | } |
274 | else | 282 | else |
275 | { | 283 | { |
276 | if (GNUNET_OK != | 284 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, |
277 | GNUNET_CONFIGURATION_get_value_string (cfg, os->section, os->option, | 285 | os->section, |
278 | &value)) | 286 | os->option, |
287 | &value)) | ||
279 | { | 288 | { |
280 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 289 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
281 | _ | 290 | _ ( |
282 | ("No default value known for option `%s' in section `%s'\n"), | 291 | "No default value known for option `%s' in section `%s'\n"), |
283 | os->option, os->section); | 292 | os->option, |
293 | os->section); | ||
284 | } | 294 | } |
285 | else | 295 | else |
286 | { | 296 | { |
287 | if (GNUNET_OK != | 297 | if (GNUNET_OK != os->load_function (os->load_save_cls, |
288 | os->load_function (os->load_save_cls, os->section, os->option, | 298 | os->section, |
289 | value, widget, cfg)) | 299 | os->option, |
300 | value, | ||
301 | widget, | ||
302 | cfg)) | ||
290 | { | 303 | { |
291 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 304 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
292 | _("Failed to initialize widget `%s' with value `%s'\n"), | 305 | _ ( |
293 | os->widget_name, value); | 306 | "Failed to initialize widget `%s' with value `%s'\n"), |
307 | os->widget_name, | ||
308 | value); | ||
294 | } | 309 | } |
295 | else | 310 | else |
296 | { | 311 | { |
@@ -304,13 +319,16 @@ load_options () | |||
304 | os->input_validation_function (os->input_validation_function_cls, widget); | 319 | os->input_validation_function (os->input_validation_function_cls, widget); |
305 | if (os->help_text != NULL) | 320 | if (os->help_text != NULL) |
306 | { | 321 | { |
307 | g_signal_connect (widget, "button-press-event", | 322 | g_signal_connect (widget, |
308 | G_CALLBACK (&help_click_callback), (void *) os); | 323 | "button-press-event", |
324 | G_CALLBACK (&help_click_callback), | ||
325 | (void *) os); | ||
309 | } | 326 | } |
310 | if (NULL != os->change_signal) | 327 | if (NULL != os->change_signal) |
311 | { | 328 | { |
312 | GNUNET_assert (NULL != os->save_function); | 329 | GNUNET_assert (NULL != os->save_function); |
313 | g_signal_connect_swapped (widget, os->change_signal, | 330 | g_signal_connect_swapped (widget, |
331 | os->change_signal, | ||
314 | G_CALLBACK (&widget_state_change_callback), | 332 | G_CALLBACK (&widget_state_change_callback), |
315 | (void *) os); | 333 | (void *) os); |
316 | } | 334 | } |
@@ -331,10 +349,8 @@ write_configuration () | |||
331 | int ret; | 349 | int ret; |
332 | 350 | ||
333 | cfgDefault = GNUNET_CONFIGURATION_create (); | 351 | cfgDefault = GNUNET_CONFIGURATION_create (); |
334 | (void) GNUNET_CONFIGURATION_load (cfgDefault, NULL); /* load defaults only */ | 352 | (void) GNUNET_CONFIGURATION_load (cfgDefault, NULL); /* load defaults only */ |
335 | ret = GNUNET_CONFIGURATION_write_diffs (cfgDefault, | 353 | ret = GNUNET_CONFIGURATION_write_diffs (cfgDefault, cfg, option_cfg_name); |
336 | cfg, | ||
337 | option_cfg_name); | ||
338 | GNUNET_CONFIGURATION_destroy (cfgDefault); | 354 | GNUNET_CONFIGURATION_destroy (cfgDefault); |
339 | return ret; | 355 | return ret; |
340 | } | 356 | } |
@@ -365,7 +381,7 @@ cleanup_task (void *cls) | |||
365 | * Callback invoked if the application is supposed to exit. | 381 | * Callback invoked if the application is supposed to exit. |
366 | */ | 382 | */ |
367 | void | 383 | void |
368 | GNUNET_SETUP_quit_cb (GObject * object, gpointer user_data) | 384 | GNUNET_SETUP_quit_cb (GObject *object, gpointer user_data) |
369 | { | 385 | { |
370 | GNUNET_SCHEDULER_shutdown (); | 386 | GNUNET_SCHEDULER_shutdown (); |
371 | } | 387 | } |
@@ -383,14 +399,22 @@ try_gksu (const char *username) | |||
383 | { | 399 | { |
384 | struct GNUNET_OS_Process *proc; | 400 | struct GNUNET_OS_Process *proc; |
385 | 401 | ||
386 | proc = GNUNET_OS_start_process (GNUNET_NO, | 402 | proc = GNUNET_OS_start_process ( |
387 | GNUNET_OS_INHERIT_STD_ALL, | 403 | GNUNET_NO, |
388 | NULL, NULL, NULL, | 404 | GNUNET_OS_INHERIT_STD_ALL, |
389 | "gksu", | 405 | NULL, |
390 | "-u", username, | 406 | NULL, |
391 | "-m", _("Enter YOUR password to run gnunet-setup as user 'gnunet' (assuming 'sudo' allows it)"), | 407 | NULL, |
392 | "-D", _("Enter YOUR password to run gnunet-setup as user 'gnunet' (assuming 'sudo' allows it)"), | 408 | "gksu", |
393 | NULL); | 409 | "-u", |
410 | username, | ||
411 | "-m", | ||
412 | _ ( | ||
413 | "Enter YOUR password to run gnunet-setup as user 'gnunet' (assuming 'sudo' allows it)"), | ||
414 | "-D", | ||
415 | _ ( | ||
416 | "Enter YOUR password to run gnunet-setup as user 'gnunet' (assuming 'sudo' allows it)"), | ||
417 | NULL); | ||
394 | if (NULL == proc) | 418 | if (NULL == proc) |
395 | return GNUNET_SYSERR; | 419 | return GNUNET_SYSERR; |
396 | GNUNET_OS_process_wait (proc); | 420 | GNUNET_OS_process_wait (proc); |
@@ -411,15 +435,18 @@ GNUNET_setup_launch_edit_friends_button_clicked_cb (GtkButton *button, | |||
411 | struct GNUNET_OS_Process *proc; | 435 | struct GNUNET_OS_Process *proc; |
412 | 436 | ||
413 | proc = GNUNET_OS_start_process (GNUNET_NO, | 437 | proc = GNUNET_OS_start_process (GNUNET_NO, |
414 | GNUNET_OS_INHERIT_STD_ALL, | 438 | GNUNET_OS_INHERIT_STD_ALL, |
415 | NULL, NULL, NULL, | 439 | NULL, |
416 | "gnunet-peerinfo-gtk", | 440 | NULL, |
417 | "-c", option_cfg_name, | 441 | NULL, |
442 | "gnunet-peerinfo-gtk", | ||
443 | "-c", | ||
444 | option_cfg_name, | ||
418 | NULL); | 445 | NULL); |
419 | if (NULL == proc) | 446 | if (NULL == proc) |
420 | { | 447 | { |
421 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 448 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
422 | _("Failed to launch gnunet-peerinfo-gtk\n")); | 449 | _ ("Failed to launch gnunet-peerinfo-gtk\n")); |
423 | return; | 450 | return; |
424 | } | 451 | } |
425 | /* simply yield control, let it run */ | 452 | /* simply yield control, let it run */ |
@@ -442,11 +469,8 @@ run (void *cls) | |||
442 | 469 | ||
443 | my_uid = getuid (); | 470 | my_uid = getuid (); |
444 | gnunet_pw = getpwnam ("gnunet"); | 471 | gnunet_pw = getpwnam ("gnunet"); |
445 | if ( (0 != do_gksu) && | 472 | if ((0 != do_gksu) && (0 != my_uid) && (NULL != gnunet_pw) && |
446 | (0 != my_uid) && | 473 | (my_uid != gnunet_pw->pw_uid) && (GNUNET_OK == try_gksu ("gnunet"))) |
447 | (NULL != gnunet_pw) && | ||
448 | (my_uid != gnunet_pw->pw_uid) && | ||
449 | (GNUNET_OK == try_gksu ("gnunet"))) | ||
450 | { | 474 | { |
451 | GNUNET_GTK_main_loop_quit (cls); | 475 | GNUNET_GTK_main_loop_quit (cls); |
452 | return; | 476 | return; |
@@ -459,13 +483,11 @@ run (void *cls) | |||
459 | 483 | ||
460 | option_cfg_name = GNUNET_GTK_main_loop_get_configuration_file (ml); | 484 | option_cfg_name = GNUNET_GTK_main_loop_get_configuration_file (ml); |
461 | cfg = GNUNET_CONFIGURATION_create (); | 485 | cfg = GNUNET_CONFIGURATION_create (); |
462 | if (GNUNET_YES == | 486 | if (GNUNET_YES == GNUNET_DISK_file_test (option_cfg_name)) |
463 | GNUNET_DISK_file_test (option_cfg_name)) | ||
464 | (void) GNUNET_CONFIGURATION_load (cfg, option_cfg_name); | 487 | (void) GNUNET_CONFIGURATION_load (cfg, option_cfg_name); |
465 | else | 488 | else |
466 | (void) GNUNET_CONFIGURATION_load (cfg, NULL); | 489 | (void) GNUNET_CONFIGURATION_load (cfg, NULL); |
467 | if (0 != ACCESS (option_cfg_name, | 490 | if (0 != ACCESS (option_cfg_name, W_OK)) |
468 | W_OK)) | ||
469 | { | 491 | { |
470 | if (ENOENT == errno) | 492 | if (ENOENT == errno) |
471 | { | 493 | { |
@@ -478,8 +500,7 @@ run (void *cls) | |||
478 | while ((len > 0) && (dirname[len] != DIR_SEPARATOR)) | 500 | while ((len > 0) && (dirname[len] != DIR_SEPARATOR)) |
479 | len--; | 501 | len--; |
480 | dirname[len] = '\0'; | 502 | dirname[len] = '\0'; |
481 | if (0 != ACCESS (dirname, | 503 | if (0 != ACCESS (dirname, X_OK | W_OK | R_OK)) |
482 | X_OK | W_OK | R_OK)) | ||
483 | { | 504 | { |
484 | if (ENOENT == errno) | 505 | if (ENOENT == errno) |
485 | errno = EACCES; /* really means somewhere access was denied */ | 506 | errno = EACCES; /* really means somewhere access was denied */ |
@@ -489,17 +510,17 @@ run (void *cls) | |||
489 | } | 510 | } |
490 | if (ENOENT != errno) | 511 | if (ENOENT != errno) |
491 | { | 512 | { |
492 | fprintf (stderr, | 513 | fprintf ( |
493 | "Refusing to start as I will be unable to write configuration file `%s': %s\n", | 514 | stderr, |
494 | option_cfg_name, | 515 | "Refusing to start as I will be unable to write configuration file `%s': %s\n", |
495 | STRERROR (errno)); | 516 | option_cfg_name, |
517 | STRERROR (errno)); | ||
496 | GNUNET_GTK_main_loop_quit (ml); | 518 | GNUNET_GTK_main_loop_quit (ml); |
497 | return; | 519 | return; |
498 | } | 520 | } |
499 | } | 521 | } |
500 | main_window = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_dialog")); | 522 | main_window = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_dialog")); |
501 | main_window = GNUNET_GTK_plug_me ("GNUNET_FS_GTK_PLUG", | 523 | main_window = GNUNET_GTK_plug_me ("GNUNET_FS_GTK_PLUG", main_window); |
502 | main_window); | ||
503 | load_options (); | 524 | load_options (); |
504 | GNUNET_SCHEDULER_add_shutdown (&cleanup_task, NULL); | 525 | GNUNET_SCHEDULER_add_shutdown (&cleanup_task, NULL); |
505 | gtk_widget_show (main_window); | 526 | gtk_widget_show (main_window); |
@@ -519,22 +540,23 @@ main (int argc, char *const *argv) | |||
519 | { | 540 | { |
520 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 541 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
521 | #ifndef MINGW | 542 | #ifndef MINGW |
522 | GNUNET_GETOPT_option_flag ('e', | 543 | GNUNET_GETOPT_option_flag ( |
523 | "elevate-priviledges", | 544 | 'e', |
524 | gettext_noop ("run as user 'gnunet', if necessary by executing gksu to elevate rights"), | 545 | "elevate-priviledges", |
525 | &do_gksu), | 546 | gettext_noop ( |
547 | "run as user 'gnunet', if necessary by executing gksu to elevate rights"), | ||
548 | &do_gksu), | ||
526 | #endif | 549 | #endif |
527 | GNUNET_GETOPT_OPTION_END | 550 | GNUNET_GETOPT_OPTION_END}; |
528 | }; | ||
529 | int ret; | 551 | int ret; |
530 | 552 | ||
531 | if (GNUNET_OK == | 553 | if (GNUNET_OK == GNUNET_GTK_main_loop_start ("gnunet-setup", |
532 | GNUNET_GTK_main_loop_start ("gnunet-setup", | 554 | "gnunet-setup", |
533 | "gnunet-setup", | 555 | argc, |
534 | argc, argv, | 556 | argv, |
535 | options, | 557 | options, |
536 | "gnunet_setup_main_window.glade", | 558 | "gnunet_setup_main_window.glade", |
537 | &run)) | 559 | &run)) |
538 | ret = gret; | 560 | ret = gret; |
539 | else | 561 | else |
540 | ret = 1; | 562 | ret = 1; |
diff --git a/src/setup/gnunet-setup.h b/src/setup/gnunet-setup.h index 59682fc0..c4f54f1c 100644 --- a/src/setup/gnunet-setup.h +++ b/src/setup/gnunet-setup.h | |||
@@ -42,17 +42,17 @@ extern const char *option_cfg_name; | |||
42 | * Columns in the gns setup model. | 42 | * Columns in the gns setup model. |
43 | */ | 43 | */ |
44 | enum GNUNET_GTK_SETUP_HostlistUrlModelColumns | 44 | enum GNUNET_GTK_SETUP_HostlistUrlModelColumns |
45 | { | 45 | { |
46 | /** | 46 | /** |
47 | * A gchararray | 47 | * A gchararray |
48 | */ | 48 | */ |
49 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL = 0, | 49 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_URL = 0, |
50 | 50 | ||
51 | /** | 51 | /** |
52 | * A gboolean | 52 | * A gboolean |
53 | */ | 53 | */ |
54 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE = 1, | 54 | GNUNET_GTK_SETUP_HOSTLIST_URL_MC_EDITABLE = 1, |
55 | }; | 55 | }; |
56 | 56 | ||
57 | 57 | ||
58 | /** | 58 | /** |