diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-15 22:37:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-15 22:37:19 +0000 |
commit | 4bd2dd5f82dceecd597b5829bf43b2dda9ebb505 (patch) | |
tree | eefec7343dcafac33c1f5bd36cef628229211741 /src/setup/gnunet-setup-options.c | |
parent | 91e7c712a11e09ad4849f6272fd79abe3505dec2 (diff) | |
download | gnunet-gtk-4bd2dd5f82dceecd597b5829bf43b2dda9ebb505.tar.gz gnunet-gtk-4bd2dd5f82dceecd597b5829bf43b2dda9ebb505.zip |
indent
Diffstat (limited to 'src/setup/gnunet-setup-options.c')
-rw-r--r-- | src/setup/gnunet-setup-options.c | 2854 |
1 files changed, 1313 insertions, 1541 deletions
diff --git a/src/setup/gnunet-setup-options.c b/src/setup/gnunet-setup-options.c index fe896892..d031f46c 100644 --- a/src/setup/gnunet-setup-options.c +++ b/src/setup/gnunet-setup-options.c | |||
@@ -50,12 +50,9 @@ | |||
50 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 50 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
51 | */ | 51 | */ |
52 | static int | 52 | static int |
53 | load_yes_no (const void *cls, | 53 | load_yes_no (const void *cls, const char *section, const char *option, |
54 | const char *section, | 54 | const char *value, GObject * widget, |
55 | const char *option, | 55 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
56 | const char *value, | ||
57 | GObject *widget, | ||
58 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
59 | { | 56 | { |
60 | GtkToggleButton *button; | 57 | GtkToggleButton *button; |
61 | 58 | ||
@@ -63,7 +60,8 @@ load_yes_no (const void *cls, | |||
63 | if (button == NULL) | 60 | if (button == NULL) |
64 | return GNUNET_SYSERR; | 61 | return GNUNET_SYSERR; |
65 | gtk_toggle_button_set_active (button, | 62 | gtk_toggle_button_set_active (button, |
66 | (0 == strcasecmp (value, "YES")) ? TRUE : FALSE); | 63 | (0 == |
64 | strcasecmp (value, "YES")) ? TRUE : FALSE); | ||
67 | return GNUNET_OK; | 65 | return GNUNET_OK; |
68 | } | 66 | } |
69 | 67 | ||
@@ -79,22 +77,18 @@ load_yes_no (const void *cls, | |||
79 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 77 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
80 | */ | 78 | */ |
81 | static int | 79 | static int |
82 | save_yes_no (const void *cls, | 80 | save_yes_no (const void *cls, const char *section, const char *option, |
83 | const char *section, | 81 | GObject * widget, struct GNUNET_CONFIGURATION_Handle *cfg) |
84 | const char *option, | ||
85 | GObject *widget, | ||
86 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
87 | { | 82 | { |
88 | GtkToggleButton *button; | 83 | GtkToggleButton *button; |
89 | gboolean mode; | 84 | gboolean mode; |
90 | 85 | ||
91 | button = GTK_TOGGLE_BUTTON (widget); | 86 | button = GTK_TOGGLE_BUTTON (widget); |
92 | if (button == NULL) | 87 | if (button == NULL) |
93 | return GNUNET_SYSERR; | 88 | return GNUNET_SYSERR; |
94 | mode = gtk_toggle_button_get_active (button); | 89 | mode = gtk_toggle_button_get_active (button); |
95 | GNUNET_CONFIGURATION_set_value_string (cfg, | 90 | GNUNET_CONFIGURATION_set_value_string (cfg, section, option, |
96 | section, option, | 91 | mode == TRUE ? "YES" : "NO"); |
97 | mode == TRUE ? "YES" : "NO"); | ||
98 | return GNUNET_OK; | 92 | return GNUNET_OK; |
99 | } | 93 | } |
100 | 94 | ||
@@ -111,20 +105,16 @@ save_yes_no (const void *cls, | |||
111 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 105 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
112 | */ | 106 | */ |
113 | static int | 107 | static int |
114 | load_filename (const void *cls, | 108 | load_filename (const void *cls, const char *section, const char *option, |
115 | const char *section, | 109 | const char *value, GObject * widget, |
116 | const char *option, | 110 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
117 | const char *value, | ||
118 | GObject *widget, | ||
119 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
120 | { | 111 | { |
121 | GtkFileChooser *chooser; | 112 | GtkFileChooser *chooser; |
122 | 113 | ||
123 | chooser = GTK_FILE_CHOOSER (widget); | 114 | chooser = GTK_FILE_CHOOSER (widget); |
124 | if (chooser == NULL) | 115 | if (chooser == NULL) |
125 | return GNUNET_SYSERR; | 116 | return GNUNET_SYSERR; |
126 | gtk_file_chooser_set_filename (chooser, | 117 | gtk_file_chooser_set_filename (chooser, value); |
127 | value); | ||
128 | return GNUNET_OK; | 118 | return GNUNET_OK; |
129 | } | 119 | } |
130 | 120 | ||
@@ -140,11 +130,8 @@ load_filename (const void *cls, | |||
140 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 130 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
141 | */ | 131 | */ |
142 | static int | 132 | static int |
143 | save_filename (const void *cls, | 133 | save_filename (const void *cls, const char *section, const char *option, |
144 | const char *section, | 134 | GObject * widget, struct GNUNET_CONFIGURATION_Handle *cfg) |
145 | const char *option, | ||
146 | GObject *widget, | ||
147 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
148 | { | 135 | { |
149 | GtkFileChooser *chooser; | 136 | GtkFileChooser *chooser; |
150 | gchar *fn; | 137 | gchar *fn; |
@@ -155,9 +142,7 @@ save_filename (const void *cls, | |||
155 | fn = gtk_file_chooser_get_filename (chooser); | 142 | fn = gtk_file_chooser_get_filename (chooser); |
156 | if (fn == NULL) | 143 | if (fn == NULL) |
157 | fn = g_strdup (""); | 144 | fn = g_strdup (""); |
158 | GNUNET_CONFIGURATION_set_value_string (cfg, | 145 | GNUNET_CONFIGURATION_set_value_string (cfg, section, option, fn); |
159 | section, option, | ||
160 | fn); | ||
161 | g_free (fn); | 146 | g_free (fn); |
162 | return GNUNET_OK; | 147 | return GNUNET_OK; |
163 | } | 148 | } |
@@ -175,20 +160,16 @@ save_filename (const void *cls, | |||
175 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 160 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
176 | */ | 161 | */ |
177 | static int | 162 | static int |
178 | load_text (const void *cls, | 163 | load_text (const void *cls, const char *section, const char *option, |
179 | const char *section, | 164 | const char *value, GObject * widget, |
180 | const char *option, | 165 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
181 | const char *value, | ||
182 | GObject *widget, | ||
183 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
184 | { | 166 | { |
185 | GtkEntry *entry; | 167 | GtkEntry *entry; |
186 | 168 | ||
187 | entry = GTK_ENTRY (widget); | 169 | entry = GTK_ENTRY (widget); |
188 | if (entry == NULL) | 170 | if (entry == NULL) |
189 | return GNUNET_SYSERR; | 171 | return GNUNET_SYSERR; |
190 | gtk_entry_set_text (entry, | 172 | gtk_entry_set_text (entry, value); |
191 | value); | ||
192 | return GNUNET_OK; | 173 | return GNUNET_OK; |
193 | } | 174 | } |
194 | 175 | ||
@@ -204,11 +185,8 @@ load_text (const void *cls, | |||
204 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 185 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
205 | */ | 186 | */ |
206 | static int | 187 | static int |
207 | save_text (const void *cls, | 188 | save_text (const void *cls, const char *section, const char *option, |
208 | const char *section, | 189 | GObject * widget, struct GNUNET_CONFIGURATION_Handle *cfg) |
209 | const char *option, | ||
210 | GObject *widget, | ||
211 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
212 | { | 190 | { |
213 | GtkEntry *entry; | 191 | GtkEntry *entry; |
214 | const gchar *txt; | 192 | const gchar *txt; |
@@ -217,9 +195,7 @@ save_text (const void *cls, | |||
217 | if (entry == NULL) | 195 | if (entry == NULL) |
218 | return GNUNET_SYSERR; | 196 | return GNUNET_SYSERR; |
219 | txt = gtk_entry_get_text (entry); | 197 | txt = gtk_entry_get_text (entry); |
220 | GNUNET_CONFIGURATION_set_value_string (cfg, | 198 | GNUNET_CONFIGURATION_set_value_string (cfg, section, option, txt); |
221 | section, option, | ||
222 | txt); | ||
223 | return GNUNET_OK; | 199 | return GNUNET_OK; |
224 | } | 200 | } |
225 | 201 | ||
@@ -237,12 +213,9 @@ save_text (const void *cls, | |||
237 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 213 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
238 | */ | 214 | */ |
239 | static int | 215 | static int |
240 | load_combo_text (const void *cls, | 216 | load_combo_text (const void *cls, const char *section, const char *option, |
241 | const char *section, | 217 | const char *value, GObject * widget, |
242 | const char *option, | 218 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
243 | const char *value, | ||
244 | GObject *widget, | ||
245 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
246 | { | 219 | { |
247 | GtkComboBoxText *cb; | 220 | GtkComboBoxText *cb; |
248 | 221 | ||
@@ -265,11 +238,8 @@ load_combo_text (const void *cls, | |||
265 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 238 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
266 | */ | 239 | */ |
267 | static int | 240 | static int |
268 | save_combo_text (const void *cls, | 241 | save_combo_text (const void *cls, const char *section, const char *option, |
269 | const char *section, | 242 | GObject * widget, struct GNUNET_CONFIGURATION_Handle *cfg) |
270 | const char *option, | ||
271 | GObject *widget, | ||
272 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
273 | { | 243 | { |
274 | GtkComboBox *cb; | 244 | GtkComboBox *cb; |
275 | gchar *c; | 245 | gchar *c; |
@@ -297,12 +267,9 @@ save_combo_text (const void *cls, | |||
297 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 267 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
298 | */ | 268 | */ |
299 | static int | 269 | static int |
300 | load_number (const void *cls, | 270 | load_number (const void *cls, const char *section, const char *option, |
301 | const char *section, | 271 | const char *value, GObject * widget, |
302 | const char *option, | 272 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
303 | const char *value, | ||
304 | GObject *widget, | ||
305 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
306 | { | 273 | { |
307 | GtkSpinButton *spin; | 274 | GtkSpinButton *spin; |
308 | unsigned int number; | 275 | unsigned int number; |
@@ -312,8 +279,7 @@ load_number (const void *cls, | |||
312 | return GNUNET_SYSERR; | 279 | return GNUNET_SYSERR; |
313 | if (1 != sscanf (value, "%u", &number)) | 280 | if (1 != sscanf (value, "%u", &number)) |
314 | return GNUNET_SYSERR; | 281 | return GNUNET_SYSERR; |
315 | gtk_spin_button_set_value (spin, | 282 | gtk_spin_button_set_value (spin, number); |
316 | number); | ||
317 | return GNUNET_OK; | 283 | return GNUNET_OK; |
318 | } | 284 | } |
319 | 285 | ||
@@ -329,20 +295,17 @@ load_number (const void *cls, | |||
329 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 295 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
330 | */ | 296 | */ |
331 | static int | 297 | static int |
332 | save_number (const void *cls, | 298 | save_number (const void *cls, const char *section, const char *option, |
333 | const char *section, | 299 | GObject * widget, struct GNUNET_CONFIGURATION_Handle *cfg) |
334 | const char *option, | ||
335 | GObject *widget, | ||
336 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
337 | { | 300 | { |
338 | GtkSpinButton *spin; | 301 | GtkSpinButton *spin; |
339 | 302 | ||
340 | spin = GTK_SPIN_BUTTON (widget); | 303 | spin = GTK_SPIN_BUTTON (widget); |
341 | if (spin == NULL) | 304 | if (spin == NULL) |
342 | return GNUNET_SYSERR; | 305 | return GNUNET_SYSERR; |
343 | GNUNET_CONFIGURATION_set_value_number (cfg, | 306 | GNUNET_CONFIGURATION_set_value_number (cfg, section, option, |
344 | section, option, | 307 | gtk_spin_button_get_value_as_int |
345 | gtk_spin_button_get_value_as_int (spin)); | 308 | (spin)); |
346 | return GNUNET_OK; | 309 | return GNUNET_OK; |
347 | } | 310 | } |
348 | 311 | ||
@@ -360,12 +323,9 @@ save_number (const void *cls, | |||
360 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 323 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
361 | */ | 324 | */ |
362 | static int | 325 | static int |
363 | load_option_list (const void *cls, | 326 | load_option_list (const void *cls, const char *section, const char *option, |
364 | const char *section, | 327 | const char *value, GObject * widget, |
365 | const char *option, | 328 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
366 | const char *value, | ||
367 | GObject *widget, | ||
368 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
369 | { | 329 | { |
370 | const char *word = cls; | 330 | const char *word = cls; |
371 | char *t; | 331 | char *t; |
@@ -380,17 +340,16 @@ load_option_list (const void *cls, | |||
380 | t = GNUNET_strdup (value); | 340 | t = GNUNET_strdup (value); |
381 | w = strtok (t, " "); | 341 | w = strtok (t, " "); |
382 | while (w != NULL) | 342 | while (w != NULL) |
343 | { | ||
344 | if (0 == strcmp (w, word)) | ||
383 | { | 345 | { |
384 | if (0 == strcmp (w, word)) | 346 | found = GNUNET_YES; |
385 | { | 347 | break; |
386 | found = GNUNET_YES; | ||
387 | break; | ||
388 | } | ||
389 | w = strtok (NULL, " "); | ||
390 | } | 348 | } |
349 | w = strtok (NULL, " "); | ||
350 | } | ||
391 | GNUNET_free (t); | 351 | GNUNET_free (t); |
392 | gtk_toggle_button_set_active (button, | 352 | gtk_toggle_button_set_active (button, found); |
393 | found); | ||
394 | return GNUNET_OK; | 353 | return GNUNET_OK; |
395 | } | 354 | } |
396 | 355 | ||
@@ -406,11 +365,8 @@ load_option_list (const void *cls, | |||
406 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 365 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
407 | */ | 366 | */ |
408 | static int | 367 | static int |
409 | save_option_list (const void *cls, | 368 | save_option_list (const void *cls, const char *section, const char *option, |
410 | const char *section, | 369 | GObject * widget, struct GNUNET_CONFIGURATION_Handle *cfg) |
411 | const char *option, | ||
412 | GObject *widget, | ||
413 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
414 | { | 370 | { |
415 | const char *word = cls; | 371 | const char *word = cls; |
416 | GtkToggleButton *button; | 372 | GtkToggleButton *button; |
@@ -421,15 +377,9 @@ save_option_list (const void *cls, | |||
421 | return GNUNET_SYSERR; | 377 | return GNUNET_SYSERR; |
422 | mode = gtk_toggle_button_get_active (button); | 378 | mode = gtk_toggle_button_get_active (button); |
423 | if (mode == TRUE) | 379 | if (mode == TRUE) |
424 | GNUNET_CONFIGURATION_append_value_filename (cfg, | 380 | GNUNET_CONFIGURATION_append_value_filename (cfg, section, option, word); |
425 | section, | ||
426 | option, | ||
427 | word); | ||
428 | else | 381 | else |
429 | GNUNET_CONFIGURATION_remove_value_filename (cfg, | 382 | GNUNET_CONFIGURATION_remove_value_filename (cfg, section, option, word); |
430 | section, | ||
431 | option, | ||
432 | word); | ||
433 | return GNUNET_OK; | 383 | return GNUNET_OK; |
434 | } | 384 | } |
435 | 385 | ||
@@ -445,9 +395,8 @@ save_option_list (const void *cls, | |||
445 | * @return TRUE to stop other handlers from being invoked | 395 | * @return TRUE to stop other handlers from being invoked |
446 | */ | 396 | */ |
447 | gboolean | 397 | gboolean |
448 | GNUNET_setup_treeview_key_press_event_cb (GtkTreeView *tv, | 398 | GNUNET_setup_treeview_key_press_event_cb (GtkTreeView * tv, GdkEventKey * event, |
449 | GdkEventKey *event, | 399 | gpointer user_data) |
450 | gpointer user_data) | ||
451 | { | 400 | { |
452 | GtkListStore *ls; | 401 | GtkListStore *ls; |
453 | GtkTreeModel *tm; | 402 | GtkTreeModel *tm; |
@@ -455,25 +404,21 @@ GNUNET_setup_treeview_key_press_event_cb (GtkTreeView *tv, | |||
455 | GtkTreeIter iter; | 404 | GtkTreeIter iter; |
456 | gboolean editable; | 405 | gboolean editable; |
457 | 406 | ||
458 | if ( (event->type != GDK_KEY_PRESS) || | 407 | if ((event->type != GDK_KEY_PRESS) || (event->state != 0) || |
459 | (event->state != 0) || | 408 | (event->keyval != GDK_Delete)) |
460 | (event->keyval != GDK_Delete) ) | ||
461 | return FALSE; | 409 | return FALSE; |
462 | ls = GTK_LIST_STORE (gtk_tree_view_get_model (tv)); | 410 | ls = GTK_LIST_STORE (gtk_tree_view_get_model (tv)); |
463 | if (ls == NULL) | 411 | if (ls == NULL) |
464 | { | 412 | { |
465 | GNUNET_break (0); | 413 | GNUNET_break (0); |
466 | return FALSE; | 414 | return FALSE; |
467 | } | 415 | } |
468 | sel = gtk_tree_view_get_selection (tv); | 416 | sel = gtk_tree_view_get_selection (tv); |
469 | if (TRUE != | 417 | if (TRUE != gtk_tree_selection_get_selected (sel, &tm, &iter)) |
470 | gtk_tree_selection_get_selected (sel, | ||
471 | &tm, | ||
472 | &iter)) | ||
473 | return FALSE; | 418 | return FALSE; |
474 | gtk_tree_model_get (tm, &iter, 1, &editable, -1); | 419 | gtk_tree_model_get (tm, &iter, 1, &editable, -1); |
475 | if (TRUE == editable) | 420 | if (TRUE == editable) |
476 | return FALSE; /* likely currently editing... */ | 421 | return FALSE; /* likely currently editing... */ |
477 | gtk_list_store_remove (ls, &iter); | 422 | gtk_list_store_remove (ls, &iter); |
478 | gtk_tree_model_get_iter_first (tm, &iter); | 423 | gtk_tree_model_get_iter_first (tm, &iter); |
479 | gtk_tree_selection_select_iter (sel, &iter); | 424 | gtk_tree_selection_select_iter (sel, &iter); |
@@ -493,12 +438,9 @@ GNUNET_setup_treeview_key_press_event_cb (GtkTreeView *tv, | |||
493 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 438 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
494 | */ | 439 | */ |
495 | static int | 440 | static int |
496 | load_string_list_store (const void *cls, | 441 | load_string_list_store (const void *cls, const char *section, |
497 | const char *section, | 442 | const char *option, const char *value, GObject * widget, |
498 | const char *option, | 443 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
499 | const char *value, | ||
500 | GObject *widget, | ||
501 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
502 | { | 444 | { |
503 | char *t; | 445 | char *t; |
504 | char *w; | 446 | char *w; |
@@ -511,22 +453,12 @@ load_string_list_store (const void *cls, | |||
511 | t = GNUNET_strdup (value); | 453 | t = GNUNET_strdup (value); |
512 | w = strtok (t, " "); | 454 | w = strtok (t, " "); |
513 | while (w != NULL) | 455 | while (w != NULL) |
514 | { | 456 | { |
515 | gtk_list_store_insert_with_values (ls, | 457 | gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, w, 1, FALSE, -1); |
516 | &iter, | 458 | w = strtok (NULL, " "); |
517 | G_MAXINT, | 459 | } |
518 | 0, w, | ||
519 | 1, FALSE, | ||
520 | -1); | ||
521 | w = strtok (NULL, " "); | ||
522 | } | ||
523 | GNUNET_free (t); | 460 | GNUNET_free (t); |
524 | gtk_list_store_insert_with_values (ls, | 461 | gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, "", 1, TRUE, -1); |
525 | &iter, | ||
526 | G_MAXINT, | ||
527 | 0, "", | ||
528 | 1, TRUE, | ||
529 | -1); | ||
530 | return GNUNET_OK; | 462 | return GNUNET_OK; |
531 | } | 463 | } |
532 | 464 | ||
@@ -543,11 +475,9 @@ load_string_list_store (const void *cls, | |||
543 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 475 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
544 | */ | 476 | */ |
545 | static int | 477 | static int |
546 | save_string_list_store (const void *cls, | 478 | save_string_list_store (const void *cls, const char *section, |
547 | const char *section, | 479 | const char *option, GObject * widget, |
548 | const char *option, | 480 | struct GNUNET_CONFIGURATION_Handle *cfg) |
549 | GObject *widget, | ||
550 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
551 | { | 481 | { |
552 | GtkTreeModel *tm; | 482 | GtkTreeModel *tm; |
553 | GtkTreeIter iter; | 483 | GtkTreeIter iter; |
@@ -560,37 +490,28 @@ save_string_list_store (const void *cls, | |||
560 | return GNUNET_SYSERR; | 490 | return GNUNET_SYSERR; |
561 | value = NULL; | 491 | value = NULL; |
562 | if (TRUE == gtk_tree_model_get_iter_first (tm, &iter)) | 492 | if (TRUE == gtk_tree_model_get_iter_first (tm, &iter)) |
493 | { | ||
494 | do | ||
563 | { | 495 | { |
564 | do | 496 | gtk_tree_model_get (tm, &iter, 0, &val, -1); |
565 | { | 497 | if (value == NULL) |
566 | gtk_tree_model_get (tm, | 498 | { |
567 | &iter, | 499 | value = GNUNET_strdup (val); |
568 | 0, &val, | 500 | } |
569 | -1); | 501 | else |
570 | if (value == NULL) | 502 | { |
571 | { | 503 | GNUNET_asprintf (&n, "%s %s", value, val); |
572 | value = GNUNET_strdup (val); | 504 | GNUNET_free (value); |
573 | } | 505 | value = n; |
574 | else | 506 | } |
575 | { | 507 | g_free (val); |
576 | GNUNET_asprintf (&n, | ||
577 | "%s %s", | ||
578 | value, | ||
579 | val); | ||
580 | GNUNET_free (value); | ||
581 | value = n; | ||
582 | } | ||
583 | g_free (val); | ||
584 | } | ||
585 | while (TRUE == gtk_tree_model_iter_next (tm, &iter)); | ||
586 | } | 508 | } |
509 | while (TRUE == gtk_tree_model_iter_next (tm, &iter)); | ||
510 | } | ||
587 | if (value == NULL) | 511 | if (value == NULL) |
588 | value = GNUNET_strdup (""); | 512 | value = GNUNET_strdup (""); |
589 | GNUNET_CONFIGURATION_set_value_string (cfg, | 513 | GNUNET_CONFIGURATION_set_value_string (cfg, section, option, value); |
590 | section, | 514 | GNUNET_free (value); |
591 | option, | ||
592 | value); | ||
593 | GNUNET_free (value); | ||
594 | return GNUNET_OK; | 515 | return GNUNET_OK; |
595 | } | 516 | } |
596 | 517 | ||
@@ -613,88 +534,74 @@ add_dns_entry_to_list_store (void *cls, const char *section) | |||
613 | char *redirect; | 534 | char *redirect; |
614 | char *cpy; | 535 | char *cpy; |
615 | gboolean udp; | 536 | gboolean udp; |
616 | 537 | ||
617 | if (NULL == section) | 538 | if (NULL == section) |
618 | { | 539 | { |
619 | gtk_list_store_insert_with_values (ls, | 540 | gtk_list_store_insert_with_values (ls, &iter, G_MAXINT, 0, "", 1, |
620 | &iter, | 541 | (guint) 80, 2, (guint) 8080, 3, |
621 | G_MAXINT, | 542 | "localhost", 4, "tcp", -1); |
622 | 0, "", | 543 | return; |
623 | 1, (guint) 80, | 544 | } |
624 | 2, (guint) 8080, | ||
625 | 3, "localhost", | ||
626 | 4, "tcp", | ||
627 | -1); | ||
628 | return; | ||
629 | } | ||
630 | 545 | ||
631 | if ( (8 > strlen (section)) || | 546 | if ((8 > strlen (section)) || |
632 | (0 != strcmp (".gnunet.", section + ((strlen (section) - 8)))) ) | 547 | (0 != strcmp (".gnunet.", section + ((strlen (section) - 8))))) |
633 | return; | 548 | return; |
634 | sld = GNUNET_strdup (section); | 549 | sld = GNUNET_strdup (section); |
635 | sld[strlen (section) - 8] = '\0'; | 550 | sld[strlen (section) - 8] = '\0'; |
636 | udp = FALSE; | 551 | udp = FALSE; |
637 | do | 552 | do |
638 | { | 553 | { |
639 | if (GNUNET_OK == | 554 | if (GNUNET_OK == |
640 | GNUNET_CONFIGURATION_get_value_string (cfg, section, | 555 | GNUNET_CONFIGURATION_get_value_string (cfg, section, |
641 | (TRUE == udp) | 556 | (TRUE == |
642 | ? "UDP_REDIRECTS" | 557 | udp) ? "UDP_REDIRECTS" : |
643 | : "TCP_REDIRECTS", | 558 | "TCP_REDIRECTS", &cpy)) |
644 | &cpy)) | 559 | { |
645 | { | 560 | for (redirect = strtok (cpy, " "); redirect != NULL; |
646 | for (redirect = strtok (cpy, " "); redirect != NULL; | 561 | redirect = strtok (NULL, " ")) |
647 | redirect = strtok (NULL, " ")) | 562 | { |
648 | { | 563 | if (NULL == (hostname = strstr (redirect, ":"))) |
649 | if (NULL == (hostname = strstr (redirect, ":"))) | 564 | { |
650 | { | 565 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
651 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 566 | _("Option `%s' is not formatted correctly!\n"), redirect); |
652 | _("Option `%s' is not formatted correctly!\n"), | 567 | continue; |
653 | redirect); | 568 | } |
654 | continue; | 569 | hostname[0] = '\0'; |
655 | } | 570 | hostname++; |
656 | hostname[0] = '\0'; | 571 | if (NULL == (hostport = strstr (hostname, ":"))) |
657 | hostname++; | 572 | { |
658 | if (NULL == (hostport = strstr (hostname, ":"))) | 573 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
659 | { | 574 | _("Option `%s' is not formatted correctly!\n"), redirect); |
660 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 575 | continue; |
661 | _("Option `%s' is not formatted correctly!\n"), | 576 | } |
662 | redirect); | 577 | hostport[0] = '\0'; |
663 | continue; | 578 | hostport++; |
664 | } | 579 | |
665 | hostport[0] = '\0'; | 580 | int local_port = atoi (redirect); |
666 | hostport++; | 581 | |
667 | 582 | if (!((local_port > 0) && (local_port < 65536))) | |
668 | int local_port = atoi (redirect); | 583 | { |
669 | if (!((local_port > 0) && (local_port < 65536))) | 584 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
670 | { | 585 | _("`%s' is not a valid port number!\n"), redirect); |
671 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 586 | continue; |
672 | _("`%s' is not a valid port number!\n"), | 587 | } |
673 | redirect); | 588 | int host_port = atoi (hostport); |
674 | continue; | 589 | |
675 | } | 590 | if (!((host_port > 0) && (host_port < 65536))) |
676 | int host_port = atoi (hostport); | 591 | { |
677 | if (!((host_port > 0) && (host_port < 65536))) | 592 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
678 | { | 593 | _("`%s' is not a valid port number!\n"), hostport); |
679 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 594 | continue; |
680 | _("`%s' is not a valid port number!\n"), | 595 | } |
681 | hostport); | 596 | gtk_list_store_insert_with_values (ls, &iter, 0, 0, sld, 1, |
682 | continue; | 597 | (guint) local_port, 2, |
683 | } | 598 | (guint) host_port, 3, hostname, 4, |
684 | gtk_list_store_insert_with_values (ls, | 599 | (TRUE == udp) ? "udp" : "tcp", -1); |
685 | &iter, | 600 | } |
686 | 0, | 601 | GNUNET_free (cpy); |
687 | 0, sld, | ||
688 | 1, (guint) local_port, | ||
689 | 2, (guint) host_port, | ||
690 | 3, hostname, | ||
691 | 4, (TRUE == udp) ? "udp" : "tcp", | ||
692 | -1); | ||
693 | } | ||
694 | GNUNET_free (cpy); | ||
695 | } | ||
696 | udp = !udp; | ||
697 | } | 602 | } |
603 | udp = !udp; | ||
604 | } | ||
698 | while (udp != FALSE); | 605 | while (udp != FALSE); |
699 | GNUNET_free (sld); | 606 | GNUNET_free (sld); |
700 | } | 607 | } |
@@ -712,26 +619,22 @@ add_dns_entry_to_list_store (void *cls, const char *section) | |||
712 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem | 619 | * @return GNUNET_OK on success, GNUNET_SYSERR if there was a problem |
713 | */ | 620 | */ |
714 | static int | 621 | static int |
715 | load_vpn_dns_configuration (const void *cls, | 622 | load_vpn_dns_configuration (const void *cls, const char *section, |
716 | const char *section, | 623 | const char *option, const char *value, |
717 | const char *option, | 624 | GObject * widget, |
718 | const char *value, | 625 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
719 | GObject *widget, | ||
720 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
721 | { | 626 | { |
722 | GtkTreeView *tv; | 627 | GtkTreeView *tv; |
723 | GtkListStore *ls; | 628 | GtkListStore *ls; |
724 | 629 | ||
725 | tv = GTK_TREE_VIEW (widget); | 630 | tv = GTK_TREE_VIEW (widget); |
726 | if (tv == NULL) | 631 | if (tv == NULL) |
727 | { | 632 | { |
728 | GNUNET_break (0); | 633 | GNUNET_break (0); |
729 | return GNUNET_SYSERR; | 634 | return GNUNET_SYSERR; |
730 | } | 635 | } |
731 | ls = GTK_LIST_STORE (gtk_tree_view_get_model (tv)); | 636 | ls = GTK_LIST_STORE (gtk_tree_view_get_model (tv)); |
732 | GNUNET_CONFIGURATION_iterate_sections (cfg, | 637 | GNUNET_CONFIGURATION_iterate_sections (cfg, &add_dns_entry_to_list_store, ls); |
733 | &add_dns_entry_to_list_store, | ||
734 | ls); | ||
735 | /* finally, add empty entry */ | 638 | /* finally, add empty entry */ |
736 | add_dns_entry_to_list_store (ls, NULL); | 639 | add_dns_entry_to_list_store (ls, NULL); |
737 | return GNUNET_OK; | 640 | return GNUNET_OK; |
@@ -741,14 +644,14 @@ load_vpn_dns_configuration (const void *cls, | |||
741 | /** | 644 | /** |
742 | * Records we use to build DNS information lists. | 645 | * Records we use to build DNS information lists. |
743 | */ | 646 | */ |
744 | struct DnsInfo | 647 | struct DnsInfo |
745 | { | 648 | { |
746 | struct DnsInfo *next; | 649 | struct DnsInfo *next; |
747 | char *section; | 650 | char *section; |
748 | char *altnames; | 651 | char *altnames; |
749 | char *tcpred; | 652 | char *tcpred; |
750 | char *udpred; | 653 | char *udpred; |
751 | unsigned long long ttl; | 654 | unsigned long long ttl; |
752 | }; | 655 | }; |
753 | 656 | ||
754 | 657 | ||
@@ -760,14 +663,13 @@ struct DnsInfo | |||
760 | * @param section name of a section in the configuration | 663 | * @param section name of a section in the configuration |
761 | */ | 664 | */ |
762 | static void | 665 | static void |
763 | collect_dns_sections (void *cls, | 666 | collect_dns_sections (void *cls, const char *section) |
764 | const char *section) | ||
765 | { | 667 | { |
766 | struct DnsInfo **base = cls; | 668 | struct DnsInfo **base = cls; |
767 | struct DnsInfo *pos; | 669 | struct DnsInfo *pos; |
768 | 670 | ||
769 | if ( (8 > strlen (section)) || | 671 | if ((8 > strlen (section)) || |
770 | (0 != strcmp (".gnunet.", section + ((strlen (section) - 8)))) ) | 672 | (0 != strcmp (".gnunet.", section + ((strlen (section) - 8))))) |
771 | return; | 673 | return; |
772 | pos = GNUNET_malloc (sizeof (struct DnsInfo)); | 674 | pos = GNUNET_malloc (sizeof (struct DnsInfo)); |
773 | pos->section = GNUNET_strdup (section); | 675 | pos->section = GNUNET_strdup (section); |
@@ -775,7 +677,8 @@ collect_dns_sections (void *cls, | |||
775 | GNUNET_CONFIGURATION_get_value_number (cfg, section, "TTL", &pos->ttl)) | 677 | GNUNET_CONFIGURATION_get_value_number (cfg, section, "TTL", &pos->ttl)) |
776 | pos->ttl = 3600000; | 678 | pos->ttl = 3600000; |
777 | if (GNUNET_OK != | 679 | if (GNUNET_OK != |
778 | GNUNET_CONFIGURATION_get_value_string (cfg, section, "ALTERNATIVE_NAMES", &pos->altnames)) | 680 | GNUNET_CONFIGURATION_get_value_string (cfg, section, "ALTERNATIVE_NAMES", |
681 | &pos->altnames)) | ||
779 | pos->altnames = NULL; | 682 | pos->altnames = NULL; |
780 | pos->tcpred = GNUNET_strdup (""); | 683 | pos->tcpred = GNUNET_strdup (""); |
781 | pos->udpred = GNUNET_strdup (""); | 684 | pos->udpred = GNUNET_strdup (""); |
@@ -792,11 +695,10 @@ collect_dns_sections (void *cls, | |||
792 | * @param section name of a section in the configuration | 695 | * @param section name of a section in the configuration |
793 | */ | 696 | */ |
794 | static void | 697 | static void |
795 | remove_dns_sections (void *cls, | 698 | remove_dns_sections (void *cls, const char *section) |
796 | const char *section) | ||
797 | { | 699 | { |
798 | if ( (8 > strlen (section)) || | 700 | if ((8 > strlen (section)) || |
799 | (0 != strcmp (".gnunet.", section + ((strlen (section) - 8)))) ) | 701 | (0 != strcmp (".gnunet.", section + ((strlen (section) - 8))))) |
800 | return; | 702 | return; |
801 | GNUNET_CONFIGURATION_remove_section (cfg, section); | 703 | GNUNET_CONFIGURATION_remove_section (cfg, section); |
802 | } | 704 | } |
@@ -809,7 +711,7 @@ remove_dns_sections (void *cls, | |||
809 | * @param tm model to use | 711 | * @param tm model to use |
810 | */ | 712 | */ |
811 | static void | 713 | static void |
812 | update_vpn_dns_configuration (GtkTreeModel *tm) | 714 | update_vpn_dns_configuration (GtkTreeModel * tm) |
813 | { | 715 | { |
814 | GtkTreeIter iter; | 716 | GtkTreeIter iter; |
815 | gchar *hostname; | 717 | gchar *hostname; |
@@ -822,99 +724,76 @@ update_vpn_dns_configuration (GtkTreeModel *tm) | |||
822 | struct DnsInfo *pos; | 724 | struct DnsInfo *pos; |
823 | 725 | ||
824 | head = NULL; | 726 | head = NULL; |
825 | GNUNET_CONFIGURATION_iterate_sections (cfg, | 727 | GNUNET_CONFIGURATION_iterate_sections (cfg, &collect_dns_sections, &head); |
826 | &collect_dns_sections, | 728 | if (TRUE == gtk_tree_model_get_iter_first (tm, &iter)) |
827 | &head); | ||
828 | if (TRUE == | ||
829 | gtk_tree_model_get_iter_first (tm, &iter)) | ||
830 | do | 729 | do |
831 | { | 730 | { |
832 | gtk_tree_model_get (tm, &iter, | 731 | gtk_tree_model_get (tm, &iter, 0, &hostname, 1, &srcport, 2, &targetport, |
833 | 0, &hostname, | 732 | 3, &targethost, 4, &tcpudp, -1); |
834 | 1, &srcport, | 733 | if (0 != strlen (hostname)) |
835 | 2, &targetport, | 734 | { |
836 | 3, &targethost, | 735 | pos = head; |
837 | 4, &tcpudp, | 736 | GNUNET_asprintf (&tmp, "%s.gnunet.", hostname); |
838 | -1); | 737 | while ((NULL != pos) && (0 != strcasecmp (tmp, pos->section))) |
839 | if (0 != strlen (hostname)) | 738 | pos = pos->next; |
840 | { | 739 | if (pos == NULL) |
841 | pos = head; | 740 | { |
842 | GNUNET_asprintf (&tmp, | 741 | pos = GNUNET_malloc (sizeof (struct DnsInfo)); |
843 | "%s.gnunet.", | 742 | pos->section = tmp; |
844 | hostname); | 743 | pos->ttl = 3600000; |
845 | while ( (NULL != pos) && | 744 | pos->altnames = NULL; |
846 | (0 != strcasecmp (tmp, pos->section)) ) | 745 | pos->tcpred = GNUNET_strdup (""); |
847 | pos = pos->next; | 746 | pos->udpred = GNUNET_strdup (""); |
848 | if (pos == NULL) | 747 | pos->next = head; |
849 | { | 748 | head = pos; |
850 | pos = GNUNET_malloc (sizeof (struct DnsInfo)); | 749 | } |
851 | pos->section = tmp; | 750 | else |
852 | pos->ttl = 3600000; | 751 | { |
853 | pos->altnames = NULL; | 752 | GNUNET_free (tmp); |
854 | pos->tcpred = GNUNET_strdup (""); | 753 | } |
855 | pos->udpred = GNUNET_strdup (""); | 754 | |
856 | pos->next = head; | 755 | GNUNET_asprintf (&tmp, "%u:%s:%u %s", srcport, targethost, targetport, |
857 | head = pos; | 756 | (0 == |
858 | } | 757 | strcasecmp ("tcp", |
859 | else | 758 | tcpudp)) ? pos->tcpred : pos->udpred); |
860 | { | 759 | if (0 == strcasecmp ("tcp", tcpudp)) |
861 | GNUNET_free (tmp); | 760 | { |
862 | } | 761 | GNUNET_free (pos->tcpred); |
863 | 762 | pos->tcpred = tmp; | |
864 | GNUNET_asprintf (&tmp, | 763 | } |
865 | "%u:%s:%u %s", | 764 | else |
866 | srcport, | 765 | { |
867 | targethost, | 766 | GNUNET_free (pos->udpred); |
868 | targetport, | 767 | pos->udpred = tmp; |
869 | (0 == strcasecmp ("tcp", tcpudp)) ? pos->tcpred : pos->udpred); | 768 | } |
870 | if (0 == strcasecmp ("tcp", tcpudp)) | ||
871 | { | ||
872 | GNUNET_free (pos->tcpred); | ||
873 | pos->tcpred = tmp; | ||
874 | } | ||
875 | else | ||
876 | { | ||
877 | GNUNET_free (pos->udpred); | ||
878 | pos->udpred = tmp; | ||
879 | } | ||
880 | } | ||
881 | g_free (tcpudp); | ||
882 | g_free (hostname); | ||
883 | g_free (targethost); | ||
884 | } | 769 | } |
770 | g_free (tcpudp); | ||
771 | g_free (hostname); | ||
772 | g_free (targethost); | ||
773 | } | ||
885 | while (TRUE == gtk_tree_model_iter_next (tm, &iter)); | 774 | while (TRUE == gtk_tree_model_iter_next (tm, &iter)); |
886 | GNUNET_CONFIGURATION_iterate_sections (cfg, | 775 | GNUNET_CONFIGURATION_iterate_sections (cfg, &remove_dns_sections, NULL); |
887 | &remove_dns_sections, | ||
888 | NULL); | ||
889 | while (NULL != head) | 776 | while (NULL != head) |
890 | { | 777 | { |
891 | pos = head; | 778 | pos = head; |
892 | head = pos->next; | 779 | head = pos->next; |
893 | if (pos->altnames != NULL) | 780 | if (pos->altnames != NULL) |
894 | GNUNET_CONFIGURATION_set_value_string (cfg, | 781 | GNUNET_CONFIGURATION_set_value_string (cfg, pos->section, |
895 | pos->section, | 782 | "ALTERNATIVE_NAMES", |
896 | "ALTERNATIVE_NAMES", | 783 | pos->altnames); |
897 | pos->altnames); | 784 | if (strlen (pos->udpred) > 0) |
898 | if (strlen (pos->udpred) > 0) | 785 | GNUNET_CONFIGURATION_set_value_string (cfg, pos->section, "UDP_REDIRECTS", |
899 | GNUNET_CONFIGURATION_set_value_string (cfg, | 786 | pos->udpred); |
900 | pos->section, | 787 | if (strlen (pos->tcpred) > 0) |
901 | "UDP_REDIRECTS", | 788 | GNUNET_CONFIGURATION_set_value_string (cfg, pos->section, "TCP_REDIRECTS", |
902 | pos->udpred); | 789 | pos->tcpred); |
903 | if (strlen (pos->tcpred) > 0) | 790 | GNUNET_CONFIGURATION_set_value_number (cfg, pos->section, "TTL", pos->ttl); |
904 | GNUNET_CONFIGURATION_set_value_string (cfg, | 791 | GNUNET_free_non_null (pos->altnames); |
905 | pos->section, | 792 | GNUNET_free (pos->tcpred); |
906 | "TCP_REDIRECTS", | 793 | GNUNET_free (pos->udpred); |
907 | pos->tcpred); | 794 | GNUNET_free (pos->section); |
908 | GNUNET_CONFIGURATION_set_value_number (cfg, | 795 | GNUNET_free (pos); |
909 | pos->section, | 796 | } |
910 | "TTL", | ||
911 | pos->ttl); | ||
912 | GNUNET_free_non_null (pos->altnames); | ||
913 | GNUNET_free (pos->tcpred); | ||
914 | GNUNET_free (pos->udpred); | ||
915 | GNUNET_free (pos->section); | ||
916 | GNUNET_free (pos); | ||
917 | } | ||
918 | } | 797 | } |
919 | 798 | ||
920 | 799 | ||
@@ -932,10 +811,8 @@ update_vpn_dns_configuration (GtkTreeModel *tm) | |||
932 | * @param user_data NULL | 811 | * @param user_data NULL |
933 | */ | 812 | */ |
934 | static void | 813 | static void |
935 | save_vpn_dns_service_dnsname (GtkCellRendererText *renderer, | 814 | save_vpn_dns_service_dnsname (GtkCellRendererText * renderer, gchar * path, |
936 | gchar *path, | 815 | gchar * new_text, gpointer user_data) |
937 | gchar *new_text, | ||
938 | gpointer user_data) | ||
939 | { | 816 | { |
940 | GtkTreeModel *tm; | 817 | GtkTreeModel *tm; |
941 | GtkListStore *ls; | 818 | GtkListStore *ls; |
@@ -944,44 +821,38 @@ save_vpn_dns_service_dnsname (GtkCellRendererText *renderer, | |||
944 | 821 | ||
945 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("vpn_dns_config_liststore")); | 822 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("vpn_dns_config_liststore")); |
946 | if (NULL == tm) | 823 | if (NULL == tm) |
947 | { | 824 | { |
948 | GNUNET_break (0); | 825 | GNUNET_break (0); |
949 | return; | 826 | return; |
950 | } | 827 | } |
951 | ls = GTK_LIST_STORE (tm); | 828 | ls = GTK_LIST_STORE (tm); |
952 | if (NULL == ls) | 829 | if (NULL == ls) |
953 | { | 830 | { |
954 | GNUNET_break (0); | 831 | GNUNET_break (0); |
955 | return; | 832 | return; |
956 | } | 833 | } |
957 | if (TRUE != gtk_tree_model_get_iter_from_string (tm, &iter, path)) | 834 | if (TRUE != gtk_tree_model_get_iter_from_string (tm, &iter, path)) |
958 | { | 835 | { |
959 | GNUNET_break (0); | 836 | GNUNET_break (0); |
960 | return; | 837 | return; |
961 | } | 838 | } |
962 | gtk_tree_model_get (tm, &iter, | 839 | gtk_tree_model_get (tm, &iter, 0, &old, -1); |
963 | 0, &old, | 840 | if ((0 != strlen (old)) && (0 == strlen (new_text))) |
964 | -1); | 841 | { |
965 | if ( (0 != strlen (old)) && | 842 | /* deletion */ |
966 | (0 == strlen (new_text)) ) | 843 | gtk_list_store_remove (ls, &iter); |
967 | { | 844 | g_free (old); |
968 | /* deletion */ | 845 | return; |
969 | gtk_list_store_remove (ls, &iter); | 846 | } |
970 | g_free (old); | ||
971 | return; | ||
972 | } | ||
973 | /* update model */ | 847 | /* update model */ |
974 | gtk_list_store_set (ls, &iter, | 848 | gtk_list_store_set (ls, &iter, 0, new_text, -1); |
975 | 0, new_text, | ||
976 | -1); | ||
977 | /* update configuration */ | 849 | /* update configuration */ |
978 | update_vpn_dns_configuration (tm); | 850 | update_vpn_dns_configuration (tm); |
979 | if ( (0 == strlen (old)) && | 851 | if ((0 == strlen (old)) && (0 != strlen (new_text))) |
980 | (0 != strlen (new_text)) ) | 852 | { |
981 | { | 853 | /* need another empty entry at the end for future expansion */ |
982 | /* need another empty entry at the end for future expansion */ | 854 | add_dns_entry_to_list_store (GTK_LIST_STORE (tm), NULL); |
983 | add_dns_entry_to_list_store (GTK_LIST_STORE (tm), NULL); | 855 | } |
984 | } | ||
985 | g_free (old); | 856 | g_free (old); |
986 | } | 857 | } |
987 | 858 | ||
@@ -998,23 +869,23 @@ save_vpn_dns_service_dnsname (GtkCellRendererText *renderer, | |||
998 | */ | 869 | */ |
999 | static int | 870 | static int |
1000 | vpn_dns_service_dnsname_install_edited_handler (const void *cls, | 871 | vpn_dns_service_dnsname_install_edited_handler (const void *cls, |
1001 | const char *section, | 872 | const char *section, |
1002 | const char *option, | 873 | const char *option, |
1003 | GObject *widget, | 874 | GObject * widget, |
1004 | struct GNUNET_CONFIGURATION_Handle *cfg) | 875 | struct |
876 | GNUNET_CONFIGURATION_Handle | ||
877 | *cfg) | ||
1005 | { | 878 | { |
1006 | static int once; | 879 | static int once; |
1007 | GtkCellRendererText *rt; | 880 | GtkCellRendererText *rt; |
1008 | 881 | ||
1009 | rt = GTK_CELL_RENDERER_TEXT(widget); | 882 | rt = GTK_CELL_RENDERER_TEXT (widget); |
1010 | if (NULL == rt) | 883 | if (NULL == rt) |
1011 | return GNUNET_SYSERR; | 884 | return GNUNET_SYSERR; |
1012 | if (0 != once++) | 885 | if (0 != once++) |
1013 | return GNUNET_OK; | 886 | return GNUNET_OK; |
1014 | g_signal_connect (rt, | 887 | g_signal_connect (rt, "edited", G_CALLBACK (&save_vpn_dns_service_dnsname), |
1015 | "edited", | 888 | NULL); |
1016 | G_CALLBACK (&save_vpn_dns_service_dnsname), | ||
1017 | NULL); | ||
1018 | return GNUNET_OK; | 889 | return GNUNET_OK; |
1019 | } | 890 | } |
1020 | 891 | ||
@@ -1033,42 +904,38 @@ vpn_dns_service_dnsname_install_edited_handler (const void *cls, | |||
1033 | * @param user_data NULL | 904 | * @param user_data NULL |
1034 | */ | 905 | */ |
1035 | static void | 906 | static void |
1036 | save_vpn_dns_service_tcpudp (GtkCellRendererText *renderer, | 907 | save_vpn_dns_service_tcpudp (GtkCellRendererText * renderer, gchar * path, |
1037 | gchar *path, | 908 | gchar * new_text, gpointer user_data) |
1038 | gchar *new_text, | ||
1039 | gpointer user_data) | ||
1040 | { | 909 | { |
1041 | GtkTreeModel *tm; | 910 | GtkTreeModel *tm; |
1042 | GtkListStore *ls; | 911 | GtkListStore *ls; |
1043 | GtkTreeIter iter; | 912 | GtkTreeIter iter; |
1044 | 913 | ||
1045 | if ( (0 != strcasecmp ("tcp", new_text)) && | 914 | if ((0 != strcasecmp ("tcp", new_text)) && |
1046 | (0 != strcasecmp ("udp", new_text)) ) | 915 | (0 != strcasecmp ("udp", new_text))) |
1047 | { | 916 | { |
1048 | /* FIXME: warn... */ | 917 | /* FIXME: warn... */ |
1049 | return; | 918 | return; |
1050 | } | 919 | } |
1051 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("vpn_dns_config_liststore")); | 920 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("vpn_dns_config_liststore")); |
1052 | if (NULL == tm) | 921 | if (NULL == tm) |
1053 | { | 922 | { |
1054 | GNUNET_break (0); | 923 | GNUNET_break (0); |
1055 | return; | 924 | return; |
1056 | } | 925 | } |
1057 | ls = GTK_LIST_STORE (tm); | 926 | ls = GTK_LIST_STORE (tm); |
1058 | if (NULL == ls) | 927 | if (NULL == ls) |
1059 | { | 928 | { |
1060 | GNUNET_break (0); | 929 | GNUNET_break (0); |
1061 | return; | 930 | return; |
1062 | } | 931 | } |
1063 | if (TRUE != gtk_tree_model_get_iter_from_string (tm, &iter, path)) | 932 | if (TRUE != gtk_tree_model_get_iter_from_string (tm, &iter, path)) |
1064 | { | 933 | { |
1065 | GNUNET_break (0); | 934 | GNUNET_break (0); |
1066 | return; | 935 | return; |
1067 | } | 936 | } |
1068 | /* update model */ | 937 | /* update model */ |
1069 | gtk_list_store_set (ls, &iter, | 938 | gtk_list_store_set (ls, &iter, 4, new_text, -1); |
1070 | 4, new_text, | ||
1071 | -1); | ||
1072 | /* update configuration */ | 939 | /* update configuration */ |
1073 | update_vpn_dns_configuration (tm); | 940 | update_vpn_dns_configuration (tm); |
1074 | } | 941 | } |
@@ -1086,23 +953,22 @@ save_vpn_dns_service_tcpudp (GtkCellRendererText *renderer, | |||
1086 | */ | 953 | */ |
1087 | static int | 954 | static int |
1088 | vpn_dns_service_tcpudp_install_edited_handler (const void *cls, | 955 | vpn_dns_service_tcpudp_install_edited_handler (const void *cls, |
1089 | const char *section, | 956 | const char *section, |
1090 | const char *option, | 957 | const char *option, |
1091 | GObject *widget, | 958 | GObject * widget, |
1092 | struct GNUNET_CONFIGURATION_Handle *cfg) | 959 | struct |
960 | GNUNET_CONFIGURATION_Handle *cfg) | ||
1093 | { | 961 | { |
1094 | static int once; | 962 | static int once; |
1095 | GtkCellRendererText *rt; | 963 | GtkCellRendererText *rt; |
1096 | 964 | ||
1097 | rt = GTK_CELL_RENDERER_TEXT(widget); | 965 | rt = GTK_CELL_RENDERER_TEXT (widget); |
1098 | if (NULL == rt) | 966 | if (NULL == rt) |
1099 | return GNUNET_SYSERR; | 967 | return GNUNET_SYSERR; |
1100 | if (0 != once++) | 968 | if (0 != once++) |
1101 | return GNUNET_OK; | 969 | return GNUNET_OK; |
1102 | g_signal_connect (rt, | 970 | g_signal_connect (rt, "edited", G_CALLBACK (&save_vpn_dns_service_tcpudp), |
1103 | "edited", | 971 | NULL); |
1104 | G_CALLBACK (&save_vpn_dns_service_tcpudp), | ||
1105 | NULL); | ||
1106 | return GNUNET_OK; | 972 | return GNUNET_OK; |
1107 | } | 973 | } |
1108 | 974 | ||
@@ -1121,10 +987,8 @@ vpn_dns_service_tcpudp_install_edited_handler (const void *cls, | |||
1121 | * @param user_data NULL | 987 | * @param user_data NULL |
1122 | */ | 988 | */ |
1123 | static void | 989 | static void |
1124 | save_vpn_dns_service_sourceport (GtkCellRendererText *renderer, | 990 | save_vpn_dns_service_sourceport (GtkCellRendererText * renderer, gchar * path, |
1125 | gchar *path, | 991 | gchar * new_text, gpointer user_data) |
1126 | gchar *new_text, | ||
1127 | gpointer user_data) | ||
1128 | { | 992 | { |
1129 | GtkTreeModel *tm; | 993 | GtkTreeModel *tm; |
1130 | GtkListStore *ls; | 994 | GtkListStore *ls; |
@@ -1132,32 +996,30 @@ save_vpn_dns_service_sourceport (GtkCellRendererText *renderer, | |||
1132 | int port; | 996 | int port; |
1133 | 997 | ||
1134 | port = atoi (new_text); | 998 | port = atoi (new_text); |
1135 | if ( (port < 1) || (port > UINT16_MAX) ) | 999 | if ((port < 1) || (port > UINT16_MAX)) |
1136 | { | 1000 | { |
1137 | /* invalid port, FIXME: warn */ | 1001 | /* invalid port, FIXME: warn */ |
1138 | return; | 1002 | return; |
1139 | } | 1003 | } |
1140 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("vpn_dns_config_liststore")); | 1004 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("vpn_dns_config_liststore")); |
1141 | if (NULL == tm) | 1005 | if (NULL == tm) |
1142 | { | 1006 | { |
1143 | GNUNET_break (0); | 1007 | GNUNET_break (0); |
1144 | return; | 1008 | return; |
1145 | } | 1009 | } |
1146 | ls = GTK_LIST_STORE (tm); | 1010 | ls = GTK_LIST_STORE (tm); |
1147 | if (NULL == ls) | 1011 | if (NULL == ls) |
1148 | { | 1012 | { |
1149 | GNUNET_break (0); | 1013 | GNUNET_break (0); |
1150 | return; | 1014 | return; |
1151 | } | 1015 | } |
1152 | if (TRUE != gtk_tree_model_get_iter_from_string (tm, &iter, path)) | 1016 | if (TRUE != gtk_tree_model_get_iter_from_string (tm, &iter, path)) |
1153 | { | 1017 | { |
1154 | GNUNET_break (0); | 1018 | GNUNET_break (0); |
1155 | return; | 1019 | return; |
1156 | } | 1020 | } |
1157 | /* update model */ | 1021 | /* update model */ |
1158 | gtk_list_store_set (ls, &iter, | 1022 | gtk_list_store_set (ls, &iter, 1, (guint) port, -1); |
1159 | 1, (guint) port, | ||
1160 | -1); | ||
1161 | /* update configuration */ | 1023 | /* update configuration */ |
1162 | update_vpn_dns_configuration (tm); | 1024 | update_vpn_dns_configuration (tm); |
1163 | } | 1025 | } |
@@ -1175,23 +1037,23 @@ save_vpn_dns_service_sourceport (GtkCellRendererText *renderer, | |||
1175 | */ | 1037 | */ |
1176 | static int | 1038 | static int |
1177 | vpn_dns_service_sourceport_install_edited_handler (const void *cls, | 1039 | vpn_dns_service_sourceport_install_edited_handler (const void *cls, |
1178 | const char *section, | 1040 | const char *section, |
1179 | const char *option, | 1041 | const char *option, |
1180 | GObject *widget, | 1042 | GObject * widget, |
1181 | struct GNUNET_CONFIGURATION_Handle *cfg) | 1043 | struct |
1044 | GNUNET_CONFIGURATION_Handle | ||
1045 | *cfg) | ||
1182 | { | 1046 | { |
1183 | static int once; | 1047 | static int once; |
1184 | GtkCellRendererText *rt; | 1048 | GtkCellRendererText *rt; |
1185 | 1049 | ||
1186 | rt = GTK_CELL_RENDERER_TEXT(widget); | 1050 | rt = GTK_CELL_RENDERER_TEXT (widget); |
1187 | if (NULL == rt) | 1051 | if (NULL == rt) |
1188 | return GNUNET_SYSERR; | 1052 | return GNUNET_SYSERR; |
1189 | if (0 != once++) | 1053 | if (0 != once++) |
1190 | return GNUNET_OK; | 1054 | return GNUNET_OK; |
1191 | g_signal_connect (rt, | 1055 | g_signal_connect (rt, "edited", G_CALLBACK (&save_vpn_dns_service_sourceport), |
1192 | "edited", | 1056 | NULL); |
1193 | G_CALLBACK (&save_vpn_dns_service_sourceport), | ||
1194 | NULL); | ||
1195 | return GNUNET_OK; | 1057 | return GNUNET_OK; |
1196 | } | 1058 | } |
1197 | 1059 | ||
@@ -1210,10 +1072,9 @@ vpn_dns_service_sourceport_install_edited_handler (const void *cls, | |||
1210 | * @param user_data NULL | 1072 | * @param user_data NULL |
1211 | */ | 1073 | */ |
1212 | static void | 1074 | static void |
1213 | save_vpn_dns_service_targethostname (GtkCellRendererText *renderer, | 1075 | save_vpn_dns_service_targethostname (GtkCellRendererText * renderer, |
1214 | gchar *path, | 1076 | gchar * path, gchar * new_text, |
1215 | gchar *new_text, | 1077 | gpointer user_data) |
1216 | gpointer user_data) | ||
1217 | { | 1078 | { |
1218 | GtkTreeModel *tm; | 1079 | GtkTreeModel *tm; |
1219 | GtkListStore *ls; | 1080 | GtkListStore *ls; |
@@ -1221,25 +1082,23 @@ save_vpn_dns_service_targethostname (GtkCellRendererText *renderer, | |||
1221 | 1082 | ||
1222 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("vpn_dns_config_liststore")); | 1083 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("vpn_dns_config_liststore")); |
1223 | if (NULL == tm) | 1084 | if (NULL == tm) |
1224 | { | 1085 | { |
1225 | GNUNET_break (0); | 1086 | GNUNET_break (0); |
1226 | return; | 1087 | return; |
1227 | } | 1088 | } |
1228 | ls = GTK_LIST_STORE (tm); | 1089 | ls = GTK_LIST_STORE (tm); |
1229 | if (NULL == ls) | 1090 | if (NULL == ls) |
1230 | { | 1091 | { |
1231 | GNUNET_break (0); | 1092 | GNUNET_break (0); |
1232 | return; | 1093 | return; |
1233 | } | 1094 | } |
1234 | if (TRUE != gtk_tree_model_get_iter_from_string (tm, &iter, path)) | 1095 | if (TRUE != gtk_tree_model_get_iter_from_string (tm, &iter, path)) |
1235 | { | 1096 | { |
1236 | GNUNET_break (0); | 1097 | GNUNET_break (0); |
1237 | return; | 1098 | return; |
1238 | } | 1099 | } |
1239 | /* update model */ | 1100 | /* update model */ |
1240 | gtk_list_store_set (ls, &iter, | 1101 | gtk_list_store_set (ls, &iter, 3, new_text, -1); |
1241 | 3, new_text, | ||
1242 | -1); | ||
1243 | /* update configuration */ | 1102 | /* update configuration */ |
1244 | update_vpn_dns_configuration (tm); | 1103 | update_vpn_dns_configuration (tm); |
1245 | } | 1104 | } |
@@ -1257,23 +1116,23 @@ save_vpn_dns_service_targethostname (GtkCellRendererText *renderer, | |||
1257 | */ | 1116 | */ |
1258 | static int | 1117 | static int |
1259 | vpn_dns_service_targethostname_install_edited_handler (const void *cls, | 1118 | vpn_dns_service_targethostname_install_edited_handler (const void *cls, |
1260 | const char *section, | 1119 | const char *section, |
1261 | const char *option, | 1120 | const char *option, |
1262 | GObject *widget, | 1121 | GObject * widget, |
1263 | struct GNUNET_CONFIGURATION_Handle *cfg) | 1122 | struct |
1123 | GNUNET_CONFIGURATION_Handle | ||
1124 | *cfg) | ||
1264 | { | 1125 | { |
1265 | static int once; | 1126 | static int once; |
1266 | GtkCellRendererText *rt; | 1127 | GtkCellRendererText *rt; |
1267 | 1128 | ||
1268 | rt = GTK_CELL_RENDERER_TEXT(widget); | 1129 | rt = GTK_CELL_RENDERER_TEXT (widget); |
1269 | if (NULL == rt) | 1130 | if (NULL == rt) |
1270 | return GNUNET_SYSERR; | 1131 | return GNUNET_SYSERR; |
1271 | if (0 != once++) | 1132 | if (0 != once++) |
1272 | return GNUNET_OK; | 1133 | return GNUNET_OK; |
1273 | g_signal_connect (rt, | 1134 | g_signal_connect (rt, "edited", |
1274 | "edited", | 1135 | G_CALLBACK (&save_vpn_dns_service_targethostname), NULL); |
1275 | G_CALLBACK (&save_vpn_dns_service_targethostname), | ||
1276 | NULL); | ||
1277 | return GNUNET_OK; | 1136 | return GNUNET_OK; |
1278 | } | 1137 | } |
1279 | 1138 | ||
@@ -1292,10 +1151,8 @@ vpn_dns_service_targethostname_install_edited_handler (const void *cls, | |||
1292 | * @param user_data NULL | 1151 | * @param user_data NULL |
1293 | */ | 1152 | */ |
1294 | static void | 1153 | static void |
1295 | save_vpn_dns_service_targetport (GtkCellRendererText *renderer, | 1154 | save_vpn_dns_service_targetport (GtkCellRendererText * renderer, gchar * path, |
1296 | gchar *path, | 1155 | gchar * new_text, gpointer user_data) |
1297 | gchar *new_text, | ||
1298 | gpointer user_data) | ||
1299 | { | 1156 | { |
1300 | GtkTreeModel *tm; | 1157 | GtkTreeModel *tm; |
1301 | GtkListStore *ls; | 1158 | GtkListStore *ls; |
@@ -1303,32 +1160,30 @@ save_vpn_dns_service_targetport (GtkCellRendererText *renderer, | |||
1303 | int port; | 1160 | int port; |
1304 | 1161 | ||
1305 | port = atoi (new_text); | 1162 | port = atoi (new_text); |
1306 | if ( (port < 1) || (port > UINT16_MAX) ) | 1163 | if ((port < 1) || (port > UINT16_MAX)) |
1307 | { | 1164 | { |
1308 | /* invalid port, FIXME: warn */ | 1165 | /* invalid port, FIXME: warn */ |
1309 | return; | 1166 | return; |
1310 | } | 1167 | } |
1311 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("vpn_dns_config_liststore")); | 1168 | tm = GTK_TREE_MODEL (GNUNET_SETUP_get_object ("vpn_dns_config_liststore")); |
1312 | if (NULL == tm) | 1169 | if (NULL == tm) |
1313 | { | 1170 | { |
1314 | GNUNET_break (0); | 1171 | GNUNET_break (0); |
1315 | return; | 1172 | return; |
1316 | } | 1173 | } |
1317 | ls = GTK_LIST_STORE (tm); | 1174 | ls = GTK_LIST_STORE (tm); |
1318 | if (NULL == ls) | 1175 | if (NULL == ls) |
1319 | { | 1176 | { |
1320 | GNUNET_break (0); | 1177 | GNUNET_break (0); |
1321 | return; | 1178 | return; |
1322 | } | 1179 | } |
1323 | if (TRUE != gtk_tree_model_get_iter_from_string (tm, &iter, path)) | 1180 | if (TRUE != gtk_tree_model_get_iter_from_string (tm, &iter, path)) |
1324 | { | 1181 | { |
1325 | GNUNET_break (0); | 1182 | GNUNET_break (0); |
1326 | return; | 1183 | return; |
1327 | } | 1184 | } |
1328 | /* update model */ | 1185 | /* update model */ |
1329 | gtk_list_store_set (ls, &iter, | 1186 | gtk_list_store_set (ls, &iter, 2, (guint) port, -1); |
1330 | 2, (guint) port, | ||
1331 | -1); | ||
1332 | /* update configuration */ | 1187 | /* update configuration */ |
1333 | update_vpn_dns_configuration (tm); | 1188 | update_vpn_dns_configuration (tm); |
1334 | } | 1189 | } |
@@ -1346,23 +1201,23 @@ save_vpn_dns_service_targetport (GtkCellRendererText *renderer, | |||
1346 | */ | 1201 | */ |
1347 | static int | 1202 | static int |
1348 | vpn_dns_service_targetport_install_edited_handler (const void *cls, | 1203 | vpn_dns_service_targetport_install_edited_handler (const void *cls, |
1349 | const char *section, | 1204 | const char *section, |
1350 | const char *option, | 1205 | const char *option, |
1351 | GObject *widget, | 1206 | GObject * widget, |
1352 | struct GNUNET_CONFIGURATION_Handle *cfg) | 1207 | struct |
1208 | GNUNET_CONFIGURATION_Handle | ||
1209 | *cfg) | ||
1353 | { | 1210 | { |
1354 | static int once; | 1211 | static int once; |
1355 | GtkCellRendererText *rt; | 1212 | GtkCellRendererText *rt; |
1356 | 1213 | ||
1357 | rt = GTK_CELL_RENDERER_TEXT(widget); | 1214 | rt = GTK_CELL_RENDERER_TEXT (widget); |
1358 | if (NULL == rt) | 1215 | if (NULL == rt) |
1359 | return GNUNET_SYSERR; | 1216 | return GNUNET_SYSERR; |
1360 | if (0 != once++) | 1217 | if (0 != once++) |
1361 | return GNUNET_OK; | 1218 | return GNUNET_OK; |
1362 | g_signal_connect (rt, | 1219 | g_signal_connect (rt, "edited", G_CALLBACK (&save_vpn_dns_service_targetport), |
1363 | "edited", | 1220 | NULL); |
1364 | G_CALLBACK (&save_vpn_dns_service_targetport), | ||
1365 | NULL); | ||
1366 | return GNUNET_OK; | 1221 | return GNUNET_OK; |
1367 | } | 1222 | } |
1368 | 1223 | ||
@@ -1370,47 +1225,47 @@ vpn_dns_service_targetport_install_edited_handler (const void *cls, | |||
1370 | /** | 1225 | /** |
1371 | * Hide "min connected friends" option if in F2F-only mode. | 1226 | * Hide "min connected friends" option if in F2F-only mode. |
1372 | */ | 1227 | */ |
1373 | static struct GNUNET_SETUP_VisibilitySpecification hide_min_connected_friends[] = | 1228 | static struct GNUNET_SETUP_VisibilitySpecification hide_min_connected_friends[] |
1374 | { | 1229 | = { |
1375 | { "GNUNET_setup_minimum_friends_label", NULL, REX_YES }, | 1230 | {"GNUNET_setup_minimum_friends_label", NULL, REX_YES}, |
1376 | { "GNUNET_setup_minimum_friends_spinbutton", NULL, REX_YES }, | 1231 | {"GNUNET_setup_minimum_friends_spinbutton", NULL, REX_YES}, |
1377 | { NULL, NULL, NULL } | 1232 | {NULL, NULL, NULL} |
1378 | }; | 1233 | }; |
1379 | 1234 | ||
1380 | 1235 | ||
1381 | /** | 1236 | /** |
1382 | * Hide "hostlist" options if hostlist is not in use. | 1237 | * Hide "hostlist" options if hostlist is not in use. |
1383 | */ | 1238 | */ |
1384 | static struct GNUNET_SETUP_VisibilitySpecification hide_hostlist_options[] = | 1239 | static struct GNUNET_SETUP_VisibilitySpecification hide_hostlist_options[] = { |
1385 | { | 1240 | {"GNUNET_setup_hostlist_client_enable_checkbutton", "(^| )hostlist($| )", |
1386 | { "GNUNET_setup_hostlist_client_enable_checkbutton", "(^| )hostlist($| )", NULL }, | 1241 | NULL}, |
1387 | { "GNUNET_setup_hostlist_client_learn_checkbutton", "(^| )hostlist($| )", NULL }, | 1242 | {"GNUNET_setup_hostlist_client_learn_checkbutton", "(^| )hostlist($| )", |
1388 | { "GNUNET_setup_hostlist_options_hbox", "(^| )hostlist($| )", NULL }, | 1243 | NULL}, |
1389 | { "GNUNET_setup_hostlist_frame", "(^| )hostlist($| )", NULL }, | 1244 | {"GNUNET_setup_hostlist_options_hbox", "(^| )hostlist($| )", NULL}, |
1390 | { NULL, NULL, NULL } | 1245 | {"GNUNET_setup_hostlist_frame", "(^| )hostlist($| )", NULL}, |
1246 | {NULL, NULL, NULL} | ||
1391 | }; | 1247 | }; |
1392 | 1248 | ||
1393 | 1249 | ||
1394 | /** | 1250 | /** |
1395 | * Hide "exit" options if VPN exit is not in use. | 1251 | * Hide "exit" options if VPN exit is not in use. |
1396 | */ | 1252 | */ |
1397 | static struct GNUNET_SETUP_VisibilitySpecification hide_exit_options[] = | 1253 | static struct GNUNET_SETUP_VisibilitySpecification hide_exit_options[] = { |
1398 | { | 1254 | {"GNUNET_setup_vpn_exit_frame", "(^| )exit($| )", NULL}, |
1399 | { "GNUNET_setup_vpn_exit_frame", "(^| )exit($| )", NULL }, | 1255 | {"GNUNET_setup_vpn_service_configuration_frame", "(^| )exit($| )", NULL}, |
1400 | { "GNUNET_setup_vpn_service_configuration_frame", "(^| )exit($| )", NULL }, | 1256 | {NULL, NULL, NULL} |
1401 | { NULL, NULL, NULL } | ||
1402 | }; | 1257 | }; |
1403 | 1258 | ||
1404 | 1259 | ||
1405 | /** | 1260 | /** |
1406 | * Hide "hostlist" server options if hostlist server is not in use. | 1261 | * Hide "hostlist" server options if hostlist server is not in use. |
1407 | */ | 1262 | */ |
1408 | static struct GNUNET_SETUP_VisibilitySpecification hide_hostlist_server_options[] = | 1263 | static struct GNUNET_SETUP_VisibilitySpecification |
1409 | { | 1264 | hide_hostlist_server_options[] = { |
1410 | { "GNUNET_setup_hostlist_advertise_checkbutton", "(^| )-p($| )", NULL }, | 1265 | {"GNUNET_setup_hostlist_advertise_checkbutton", "(^| )-p($| )", NULL}, |
1411 | { "GNUNET_setup_hostlist_port_label", "(^| )-p($| )", NULL }, | 1266 | {"GNUNET_setup_hostlist_port_label", "(^| )-p($| )", NULL}, |
1412 | { "GNUNET_setup_hostlist_server_port_spin_button", "(^| )-p($| )", NULL }, | 1267 | {"GNUNET_setup_hostlist_server_port_spin_button", "(^| )-p($| )", NULL}, |
1413 | { NULL, NULL, NULL } | 1268 | {NULL, NULL, NULL} |
1414 | }; | 1269 | }; |
1415 | 1270 | ||
1416 | 1271 | ||
@@ -1418,10 +1273,9 @@ static struct GNUNET_SETUP_VisibilitySpecification hide_hostlist_server_options[ | |||
1418 | /** | 1273 | /** |
1419 | * Hide "fs tab" if FS not active. | 1274 | * Hide "fs tab" if FS not active. |
1420 | */ | 1275 | */ |
1421 | static struct GNUNET_SETUP_VisibilitySpecification hide_fs_tab[] = | 1276 | static struct GNUNET_SETUP_VisibilitySpecification hide_fs_tab[] = { |
1422 | { | 1277 | {"GNUNET_setup_fs_main_vbox", "(^| )fs($| )", NULL}, |
1423 | { "GNUNET_setup_fs_main_vbox", "(^| )fs($| )", NULL }, | 1278 | {NULL, NULL, NULL} |
1424 | { NULL, NULL, NULL } | ||
1425 | }; | 1279 | }; |
1426 | 1280 | ||
1427 | 1281 | ||
@@ -1429,10 +1283,9 @@ static struct GNUNET_SETUP_VisibilitySpecification hide_fs_tab[] = | |||
1429 | /** | 1283 | /** |
1430 | * Hide "vpn tab" if VPN not active. | 1284 | * Hide "vpn tab" if VPN not active. |
1431 | */ | 1285 | */ |
1432 | static struct GNUNET_SETUP_VisibilitySpecification hide_vpn_tab[] = | 1286 | static struct GNUNET_SETUP_VisibilitySpecification hide_vpn_tab[] = { |
1433 | { | 1287 | {"GNUNET_setup_vpn_vbox", "(^| )vpn($| )", NULL}, |
1434 | { "GNUNET_setup_vpn_vbox", "(^| )vpn($| )", NULL }, | 1288 | {NULL, NULL, NULL} |
1435 | { NULL, NULL, NULL } | ||
1436 | }; | 1289 | }; |
1437 | 1290 | ||
1438 | 1291 | ||
@@ -1440,1136 +1293,1055 @@ static struct GNUNET_SETUP_VisibilitySpecification hide_vpn_tab[] = | |||
1440 | /** | 1293 | /** |
1441 | * Hide "tcp tab" if TCP not active. | 1294 | * Hide "tcp tab" if TCP not active. |
1442 | */ | 1295 | */ |
1443 | static struct GNUNET_SETUP_VisibilitySpecification hide_tcp_tab[] = | 1296 | static struct GNUNET_SETUP_VisibilitySpecification hide_tcp_tab[] = { |
1444 | { | 1297 | {"GNUNET_setup_transport_tcp_vbox", "(^| )tcp($| )", NULL}, |
1445 | { "GNUNET_setup_transport_tcp_vbox", "(^| )tcp($| )", NULL }, | 1298 | {NULL, NULL, NULL} |
1446 | { NULL, NULL, NULL } | ||
1447 | }; | 1299 | }; |
1448 | 1300 | ||
1449 | 1301 | ||
1450 | /** | 1302 | /** |
1451 | * Hide "udp tab" if UDP not active. | 1303 | * Hide "udp tab" if UDP not active. |
1452 | */ | 1304 | */ |
1453 | static struct GNUNET_SETUP_VisibilitySpecification hide_udp_tab[] = | 1305 | static struct GNUNET_SETUP_VisibilitySpecification hide_udp_tab[] = { |
1454 | { | 1306 | {"GNUNET_setup_transport_udp_vbox", "(^| )udp($| )", NULL}, |
1455 | { "GNUNET_setup_transport_udp_vbox", "(^| )udp($| )", NULL }, | 1307 | {NULL, NULL, NULL} |
1456 | { NULL, NULL, NULL } | ||
1457 | }; | 1308 | }; |
1458 | 1309 | ||
1459 | 1310 | ||
1460 | /** | 1311 | /** |
1461 | * Hide "http tab" if HTTP not active. | 1312 | * Hide "http tab" if HTTP not active. |
1462 | */ | 1313 | */ |
1463 | static struct GNUNET_SETUP_VisibilitySpecification hide_http_tab[] = | 1314 | static struct GNUNET_SETUP_VisibilitySpecification hide_http_tab[] = { |
1464 | { | 1315 | {"GNUNET_setup_transport_http_vbox", "(^| )http($| )", NULL}, |
1465 | { "GNUNET_setup_transport_http_vbox", "(^| )http($| )", NULL }, | 1316 | {NULL, NULL, NULL} |
1466 | { NULL, NULL, NULL } | ||
1467 | }; | 1317 | }; |
1468 | 1318 | ||
1469 | 1319 | ||
1470 | /** | 1320 | /** |
1471 | * Hide "https tab" if HTTPS not active. | 1321 | * Hide "https tab" if HTTPS not active. |
1472 | */ | 1322 | */ |
1473 | static struct GNUNET_SETUP_VisibilitySpecification hide_https_tab[] = | 1323 | static struct GNUNET_SETUP_VisibilitySpecification hide_https_tab[] = { |
1474 | { | 1324 | {"GNUNET_setup_transport_https_vbox", "(^| )https($| )", NULL}, |
1475 | { "GNUNET_setup_transport_https_vbox", "(^| )https($| )", NULL }, | 1325 | {NULL, NULL, NULL} |
1476 | { NULL, NULL, NULL } | ||
1477 | }; | 1326 | }; |
1478 | 1327 | ||
1479 | 1328 | ||
1480 | /** | 1329 | /** |
1481 | * Hide "dv tab" if DV not active. | 1330 | * Hide "dv tab" if DV not active. |
1482 | */ | 1331 | */ |
1483 | static struct GNUNET_SETUP_VisibilitySpecification hide_dv_tab[] = | 1332 | static struct GNUNET_SETUP_VisibilitySpecification hide_dv_tab[] = { |
1484 | { | 1333 | {"GNUNET_setup_transport_dv_vbox", "(^| )dv($| )", NULL}, |
1485 | { "GNUNET_setup_transport_dv_vbox", "(^| )dv($| )", NULL }, | 1334 | {NULL, NULL, NULL} |
1486 | { NULL, NULL, NULL } | ||
1487 | }; | 1335 | }; |
1488 | 1336 | ||
1489 | 1337 | ||
1490 | /** | 1338 | /** |
1491 | * Hide "wlan tab" if WLAN not active. | 1339 | * Hide "wlan tab" if WLAN not active. |
1492 | */ | 1340 | */ |
1493 | static struct GNUNET_SETUP_VisibilitySpecification hide_wlan_tab[] = | 1341 | static struct GNUNET_SETUP_VisibilitySpecification hide_wlan_tab[] = { |
1494 | { | 1342 | {"GNUNET_setup_transport_wlan_vbox", "(^| )wlan($| )", NULL}, |
1495 | { "GNUNET_setup_transport_wlan_vbox", "(^| )wlan($| )", NULL }, | 1343 | {NULL, NULL, NULL} |
1496 | { NULL, NULL, NULL } | ||
1497 | }; | 1344 | }; |
1498 | 1345 | ||
1499 | 1346 | ||
1500 | /** | 1347 | /** |
1501 | * Hide "sqlite datastore" tab if sqlite not active. | 1348 | * Hide "sqlite datastore" tab if sqlite not active. |
1502 | */ | 1349 | */ |
1503 | static struct GNUNET_SETUP_VisibilitySpecification hide_sqlite_datastore_tab[] = | 1350 | static struct GNUNET_SETUP_VisibilitySpecification hide_sqlite_datastore_tab[] = { |
1504 | { | 1351 | {"GNUNET_setup_fs_datastore_sqlite_label", "^sqlite$", NULL}, |
1505 | { "GNUNET_setup_fs_datastore_sqlite_label", "^sqlite$", NULL }, | 1352 | {NULL, NULL, NULL} |
1506 | { NULL, NULL, NULL } | ||
1507 | }; | 1353 | }; |
1508 | 1354 | ||
1509 | 1355 | ||
1510 | /** | 1356 | /** |
1511 | * Hide "mysql datastore" tab if mysql not active. | 1357 | * Hide "mysql datastore" tab if mysql not active. |
1512 | */ | 1358 | */ |
1513 | static struct GNUNET_SETUP_VisibilitySpecification hide_mysql_datastore_tab[] = | 1359 | static struct GNUNET_SETUP_VisibilitySpecification hide_mysql_datastore_tab[] = { |
1514 | { | 1360 | {"GNUNET_setup_datastore_mysql_vbox", "^mysql$", NULL}, |
1515 | { "GNUNET_setup_datastore_mysql_vbox", "^mysql$", NULL }, | 1361 | {NULL, NULL, NULL} |
1516 | { NULL, NULL, NULL } | ||
1517 | }; | 1362 | }; |
1518 | 1363 | ||
1519 | 1364 | ||
1520 | /** | 1365 | /** |
1521 | * Hide "postgres datastore" tab if postgres not active. | 1366 | * Hide "postgres datastore" tab if postgres not active. |
1522 | */ | 1367 | */ |
1523 | static struct GNUNET_SETUP_VisibilitySpecification hide_postgres_datastore_tab[] = | 1368 | static struct GNUNET_SETUP_VisibilitySpecification hide_postgres_datastore_tab[] |
1524 | { | 1369 | = { |
1525 | { "GNUNET_setup_datastore_postgres_hbox", "^postgres$", NULL }, | 1370 | {"GNUNET_setup_datastore_postgres_hbox", "^postgres$", NULL}, |
1526 | { NULL, NULL, NULL } | 1371 | {NULL, NULL, NULL} |
1527 | }; | 1372 | }; |
1528 | 1373 | ||
1529 | 1374 | ||
1530 | /** | 1375 | /** |
1531 | * Hide "sqlite datacache" tab if sqlite not active. | 1376 | * Hide "sqlite datacache" tab if sqlite not active. |
1532 | */ | 1377 | */ |
1533 | static struct GNUNET_SETUP_VisibilitySpecification hide_sqlite_datacache_tab[] = | 1378 | static struct GNUNET_SETUP_VisibilitySpecification hide_sqlite_datacache_tab[] = { |
1534 | { | 1379 | {"GNUNET_setup_fs_datacache_sqlite_label", "^sqlite$", NULL}, |
1535 | { "GNUNET_setup_fs_datacache_sqlite_label", "^sqlite$", NULL }, | 1380 | {NULL, NULL, NULL} |
1536 | { NULL, NULL, NULL } | ||
1537 | }; | 1381 | }; |
1538 | 1382 | ||
1539 | 1383 | ||
1540 | /** | 1384 | /** |
1541 | * Hide "mysql datacache" tab if mysql not active. | 1385 | * Hide "mysql datacache" tab if mysql not active. |
1542 | */ | 1386 | */ |
1543 | static struct GNUNET_SETUP_VisibilitySpecification hide_mysql_datacache_tab[] = | 1387 | static struct GNUNET_SETUP_VisibilitySpecification hide_mysql_datacache_tab[] = { |
1544 | { | 1388 | {"GNUNET_setup_datacache_mysql_vbox", "^mysql$", NULL}, |
1545 | { "GNUNET_setup_datacache_mysql_vbox", "^mysql$", NULL }, | 1389 | {NULL, NULL, NULL} |
1546 | { NULL, NULL, NULL } | ||
1547 | }; | 1390 | }; |
1548 | 1391 | ||
1549 | 1392 | ||
1550 | /** | 1393 | /** |
1551 | * Hide "postgres datacache" tab if postgres not active. | 1394 | * Hide "postgres datacache" tab if postgres not active. |
1552 | */ | 1395 | */ |
1553 | static struct GNUNET_SETUP_VisibilitySpecification hide_postgres_datacache_tab[] = | 1396 | static struct GNUNET_SETUP_VisibilitySpecification hide_postgres_datacache_tab[] |
1554 | { | 1397 | = { |
1555 | { "GNUNET_setup_datacache_postgres_hbox", "^postgres$", NULL }, | 1398 | {"GNUNET_setup_datacache_postgres_hbox", "^postgres$", NULL}, |
1556 | { NULL, NULL, NULL } | 1399 | {NULL, NULL, NULL} |
1557 | }; | 1400 | }; |
1558 | 1401 | ||
1559 | 1402 | ||
1560 | /** | 1403 | /** |
1561 | * Hide advertised TCP port if port is zero. | 1404 | * Hide advertised TCP port if port is zero. |
1562 | */ | 1405 | */ |
1563 | static struct GNUNET_SETUP_VisibilitySpecification hide_all_tcp_options[] = | 1406 | static struct GNUNET_SETUP_VisibilitySpecification hide_all_tcp_options[] = { |
1564 | { | 1407 | {"GNUNET_setup_transport_tcp_adv_port_hbox", NULL, "^0$"}, |
1565 | { "GNUNET_setup_transport_tcp_adv_port_hbox", NULL, "^0$" }, | 1408 | {NULL, NULL, NULL} |
1566 | { NULL, NULL, NULL } | ||
1567 | }; | 1409 | }; |
1568 | 1410 | ||
1569 | 1411 | ||
1570 | /** | 1412 | /** |
1571 | * Hide NATed peer options. | 1413 | * Hide NATed peer options. |
1572 | */ | 1414 | */ |
1573 | static struct GNUNET_SETUP_VisibilitySpecification toggle_nat_options[] = | 1415 | static struct GNUNET_SETUP_VisibilitySpecification toggle_nat_options[] = { |
1574 | { | 1416 | {"GNUNET_setup_transport_hole_punched_checkbutton", "^YES$", NULL}, |
1575 | { "GNUNET_setup_transport_hole_punched_checkbutton", "^YES$", NULL }, | 1417 | {"GNUNET_setup_transport_upnp_enable_checkbutton", "^YES$", NULL}, |
1576 | { "GNUNET_setup_transport_upnp_enable_checkbutton", "^YES$", NULL }, | 1418 | {"GNUNET_setup_transport_icmp_server_enable_checkbutton", "^YES$", NULL}, |
1577 | { "GNUNET_setup_transport_icmp_server_enable_checkbutton", "^YES$", NULL }, | 1419 | {"GNUNET_setup_transport_external_ip_hbox", "^YES$", NULL}, |
1578 | { "GNUNET_setup_transport_external_ip_hbox", "^YES$", NULL }, | 1420 | {NULL, NULL, NULL} |
1579 | { NULL, NULL, NULL } | ||
1580 | }; | 1421 | }; |
1581 | 1422 | ||
1582 | /** | 1423 | /** |
1583 | * Hide hole-punched NATed peer options. | 1424 | * Hide hole-punched NATed peer options. |
1584 | */ | 1425 | */ |
1585 | static struct GNUNET_SETUP_VisibilitySpecification toggle_nat_punched_options[] = | 1426 | static struct GNUNET_SETUP_VisibilitySpecification toggle_nat_punched_options[] |
1586 | { | 1427 | = { |
1587 | { "GNUNET_setup_transport_upnp_enable_checkbutton", "^NO$", NULL }, | 1428 | {"GNUNET_setup_transport_upnp_enable_checkbutton", "^NO$", NULL}, |
1588 | { "GNUNET_setup_transport_icmp_server_enable_checkbutton", "^NO$", NULL }, | 1429 | {"GNUNET_setup_transport_icmp_server_enable_checkbutton", "^NO$", NULL}, |
1589 | { NULL, NULL, NULL } | 1430 | {NULL, NULL, NULL} |
1590 | }; | 1431 | }; |
1591 | 1432 | ||
1592 | 1433 | ||
1593 | /** | 1434 | /** |
1594 | * Hide internal IP options. | 1435 | * Hide internal IP options. |
1595 | */ | 1436 | */ |
1596 | static struct GNUNET_SETUP_VisibilitySpecification toggle_internal_ip[] = | 1437 | static struct GNUNET_SETUP_VisibilitySpecification toggle_internal_ip[] = { |
1597 | { | 1438 | {"GNUNET_setup_transport_internal_ip_hbox", "^YES$", NULL}, |
1598 | { "GNUNET_setup_transport_internal_ip_hbox", "^YES$", NULL }, | 1439 | {NULL, NULL, NULL} |
1599 | { NULL, NULL, NULL } | ||
1600 | }; | 1440 | }; |
1601 | 1441 | ||
1602 | 1442 | ||
1603 | /** | 1443 | /** |
1604 | * Option specification data. | 1444 | * Option specification data. |
1605 | */ | 1445 | */ |
1606 | const struct GNUNET_SETUP_OptionSpecification option_specifications[] = | 1446 | const struct GNUNET_SETUP_OptionSpecification option_specifications[] = { |
1607 | { | ||
1608 | |||
1609 | /* GENERAL TAB */ | ||
1610 | |||
1611 | { | ||
1612 | "GNUNET_setup_friends_only_checkbutton", | ||
1613 | "toggled", | ||
1614 | "topology", | ||
1615 | "FRIENDS-ONLY", | ||
1616 | gettext_noop ("Should GNUnet exclusively connect to friends?"), | ||
1617 | "https://gnunet.org/configuration-f2f", | ||
1618 | &load_yes_no, | ||
1619 | &save_yes_no, NULL, | ||
1620 | hide_min_connected_friends | ||
1621 | }, | ||
1622 | |||
1623 | { | ||
1624 | "GNUNET_setup_friends_filechooserbutton", | ||
1625 | "selection-changed", | ||
1626 | "topology", | ||
1627 | "FRIENDS", | ||
1628 | gettext_noop ("Friends file containing the list of friendly peers"), | ||
1629 | "https://gnunet.org/configuration-f2f", | ||
1630 | &load_filename, | ||
1631 | &save_filename, NULL, | ||
1632 | NULL | ||
1633 | }, | ||
1634 | |||
1635 | { | ||
1636 | "GNUNET_setup_minimum_friends_spinbutton", | ||
1637 | "value-changed", | ||
1638 | "topology", | ||
1639 | "MINIMUM-FRIENDS", | ||
1640 | gettext_noop ("Minimum number of friendly connections"), | ||
1641 | "https://gnunet.org/configuration-f2f", | ||
1642 | &load_number, | ||
1643 | &save_number, NULL, | ||
1644 | NULL | ||
1645 | }, | ||
1646 | 1447 | ||
1647 | { | 1448 | /* GENERAL TAB */ |
1648 | "GNUNET_setup_general_services_topology_checkbutton", | ||
1649 | "toggled", | ||
1650 | "arm", | ||
1651 | "DEFAULTSERVICES", | ||
1652 | gettext_noop ("Topology should always be loaded"), | ||
1653 | "https://gnunet.org/configuration-topology", | ||
1654 | &load_option_list, | ||
1655 | &save_option_list, "topology", | ||
1656 | NULL | ||
1657 | }, | ||
1658 | 1449 | ||
1659 | { | 1450 | { |
1660 | "GNUNET_setup_general_services_hostlist_checkbutton", | 1451 | "GNUNET_setup_friends_only_checkbutton", |
1661 | "toggled", | 1452 | "toggled", |
1662 | "arm", | 1453 | "topology", |
1663 | "DEFAULTSERVICES", | 1454 | "FRIENDS-ONLY", |
1664 | gettext_noop ("Should hostlist support be started automatically on startup?"), | 1455 | gettext_noop ("Should GNUnet exclusively connect to friends?"), |
1665 | "https://gnunet.org/configuration-hostlist", | 1456 | "https://gnunet.org/configuration-f2f", |
1666 | &load_option_list, | 1457 | &load_yes_no, |
1667 | &save_option_list, "hostlist", | 1458 | &save_yes_no, NULL, |
1668 | hide_hostlist_options | 1459 | hide_min_connected_friends}, |
1669 | }, | ||
1670 | 1460 | ||
1461 | { | ||
1462 | "GNUNET_setup_friends_filechooserbutton", | ||
1463 | "selection-changed", | ||
1464 | "topology", | ||
1465 | "FRIENDS", | ||
1466 | gettext_noop ("Friends file containing the list of friendly peers"), | ||
1467 | "https://gnunet.org/configuration-f2f", | ||
1468 | &load_filename, | ||
1469 | &save_filename, NULL, | ||
1470 | NULL}, | ||
1671 | 1471 | ||
1672 | { | 1472 | { |
1673 | "GNUNET_setup_general_services_fs_checkbutton", | 1473 | "GNUNET_setup_minimum_friends_spinbutton", |
1674 | "toggled", | 1474 | "value-changed", |
1675 | "arm", | 1475 | "topology", |
1676 | "DEFAULTSERVICES", | 1476 | "MINIMUM-FRIENDS", |
1677 | gettext_noop ("Should file-sharing be started automatically on startup?"), | 1477 | gettext_noop ("Minimum number of friendly connections"), |
1678 | "https://gnunet.org/configuration-fs", | 1478 | "https://gnunet.org/configuration-f2f", |
1679 | &load_option_list, | 1479 | &load_number, |
1680 | &save_option_list, "fs", | 1480 | &save_number, NULL, |
1681 | hide_fs_tab | 1481 | NULL}, |
1682 | }, | ||
1683 | 1482 | ||
1684 | { | 1483 | { |
1685 | "GNUNET_setup_general_services_vpn_checkbutton", | 1484 | "GNUNET_setup_general_services_topology_checkbutton", |
1686 | "toggled", | 1485 | "toggled", |
1687 | "arm", | 1486 | "arm", |
1688 | "DEFAULTSERVICES", | 1487 | "DEFAULTSERVICES", |
1689 | gettext_noop ("Should the VPN be started automatically on startup?"), | 1488 | gettext_noop ("Topology should always be loaded"), |
1690 | "https://gnunet.org/configuration-vpn", | 1489 | "https://gnunet.org/configuration-topology", |
1691 | &load_option_list, | 1490 | &load_option_list, |
1692 | &save_option_list, "vpn", | 1491 | &save_option_list, "topology", |
1693 | hide_vpn_tab | 1492 | NULL}, |
1694 | }, | ||
1695 | 1493 | ||
1696 | { | 1494 | { |
1697 | "GNUNET_setup_hostlist_client_enable_checkbutton", | 1495 | "GNUNET_setup_general_services_hostlist_checkbutton", |
1698 | "toggled", | 1496 | "toggled", |
1699 | "hostlist", | 1497 | "arm", |
1700 | "OPTIONS", | 1498 | "DEFAULTSERVICES", |
1701 | gettext_noop ("Should GNUnet learn about other peers using hostlists"), | 1499 | gettext_noop |
1702 | "https://gnunet.org/configuration-hostlist", | 1500 | ("Should hostlist support be started automatically on startup?"), |
1703 | &load_option_list, | 1501 | "https://gnunet.org/configuration-hostlist", |
1704 | &save_option_list, "-b", | 1502 | &load_option_list, |
1705 | NULL | 1503 | &save_option_list, "hostlist", |
1706 | }, | 1504 | hide_hostlist_options}, |
1707 | 1505 | ||
1708 | { | ||
1709 | "GNUNET_setup_hostlist_client_learn_checkbutton", | ||
1710 | "toggled", | ||
1711 | "hostlist", | ||
1712 | "OPTIONS", | ||
1713 | gettext_noop ("Should GNUnet learn hostlists from other peers"), | ||
1714 | "https://gnunet.org/configuration-hostlist", | ||
1715 | &load_option_list, | ||
1716 | &save_option_list, "-e", | ||
1717 | NULL | ||
1718 | }, | ||
1719 | 1506 | ||
1720 | { | 1507 | { |
1721 | "GNUNET_setup_hostlist_offer_hostlist_checkbutton", | 1508 | "GNUNET_setup_general_services_fs_checkbutton", |
1722 | "toggled", | 1509 | "toggled", |
1723 | "hostlist", | 1510 | "arm", |
1724 | "OPTIONS", | 1511 | "DEFAULTSERVICES", |
1725 | gettext_noop ("Should this peer offer a hostlist to other peers"), | 1512 | gettext_noop ("Should file-sharing be started automatically on startup?"), |
1726 | "https://gnunet.org/configuration-hostlist-server", | 1513 | "https://gnunet.org/configuration-fs", |
1727 | &load_option_list, | 1514 | &load_option_list, |
1728 | &save_option_list, "-p", | 1515 | &save_option_list, "fs", |
1729 | hide_hostlist_server_options | 1516 | hide_fs_tab}, |
1730 | }, | ||
1731 | 1517 | ||
1732 | { | 1518 | { |
1733 | "GNUNET_setup_hostlist_advertise_checkbutton", | 1519 | "GNUNET_setup_general_services_vpn_checkbutton", |
1734 | "toggled", | 1520 | "toggled", |
1735 | "hostlist", | 1521 | "arm", |
1736 | "OPTIONS", | 1522 | "DEFAULTSERVICES", |
1737 | gettext_noop ("Should this peer advertise its hostlist to other peers"), | 1523 | gettext_noop ("Should the VPN be started automatically on startup?"), |
1738 | "https://gnunet.org/configuration-hostlist-server", | 1524 | "https://gnunet.org/configuration-vpn", |
1739 | &load_option_list, | 1525 | &load_option_list, |
1740 | &save_option_list, "-a", | 1526 | &save_option_list, "vpn", |
1741 | NULL | 1527 | hide_vpn_tab}, |
1742 | }, | ||
1743 | 1528 | ||
1744 | { | 1529 | { |
1745 | "GNUNET_setup_hostlist_server_port_spin_button", | 1530 | "GNUNET_setup_hostlist_client_enable_checkbutton", |
1746 | "value-changed", | 1531 | "toggled", |
1747 | "hostlist", | 1532 | "hostlist", |
1748 | "HTTPPORT", | 1533 | "OPTIONS", |
1749 | gettext_noop ("Port this peers hostlist should be offered on"), | 1534 | gettext_noop ("Should GNUnet learn about other peers using hostlists"), |
1750 | "https://gnunet.org/configuration-hostlist-server", | 1535 | "https://gnunet.org/configuration-hostlist", |
1751 | &load_number, | 1536 | &load_option_list, |
1752 | &save_number, NULL, | 1537 | &save_option_list, "-b", |
1753 | NULL | 1538 | NULL}, |
1754 | }, | ||
1755 | 1539 | ||
1756 | { | 1540 | { |
1757 | "GNUNET_setup_hostlist_url_liststore", | 1541 | "GNUNET_setup_hostlist_client_learn_checkbutton", |
1758 | "row-changed", | 1542 | "toggled", |
1759 | "hostlist", | 1543 | "hostlist", |
1760 | "SERVERS", | 1544 | "OPTIONS", |
1761 | NULL, NULL, | 1545 | gettext_noop ("Should GNUnet learn hostlists from other peers"), |
1762 | &load_string_list_store, | 1546 | "https://gnunet.org/configuration-hostlist", |
1763 | &save_string_list_store, NULL, | 1547 | &load_option_list, |
1764 | NULL | 1548 | &save_option_list, "-e", |
1765 | }, | 1549 | NULL}, |
1766 | 1550 | ||
1767 | { | 1551 | { |
1768 | "GNUNET_setup_hostlist_url_treeview", | 1552 | "GNUNET_setup_hostlist_offer_hostlist_checkbutton", |
1769 | NULL, NULL, NULL, /* FIXME */ | 1553 | "toggled", |
1770 | gettext_noop ("Known hostlist URLs"), | 1554 | "hostlist", |
1771 | "https://gnunet.org/configuration-hostlist", | 1555 | "OPTIONS", |
1772 | NULL, NULL, NULL, /* FIXME */ | 1556 | gettext_noop ("Should this peer offer a hostlist to other peers"), |
1773 | NULL | 1557 | "https://gnunet.org/configuration-hostlist-server", |
1774 | }, | 1558 | &load_option_list, |
1559 | &save_option_list, "-p", | ||
1560 | hide_hostlist_server_options}, | ||
1775 | 1561 | ||
1776 | { | 1562 | { |
1777 | "GNUNET_setup_bandwidth_out_spinbutton", | 1563 | "GNUNET_setup_hostlist_advertise_checkbutton", |
1778 | "value-changed", | 1564 | "toggled", |
1779 | "core", | 1565 | "hostlist", |
1780 | "TOTAL_QUOTA_OUT", | 1566 | "OPTIONS", |
1781 | gettext_noop ("How many bytes per second are we allowed to transmit?"), | 1567 | gettext_noop ("Should this peer advertise its hostlist to other peers"), |
1782 | "https://gnunet.org/configuration-bandwidth", | 1568 | "https://gnunet.org/configuration-hostlist-server", |
1783 | &load_number, | 1569 | &load_option_list, |
1784 | &save_number, NULL, | 1570 | &save_option_list, "-a", |
1785 | NULL | 1571 | NULL}, |
1786 | }, | ||
1787 | 1572 | ||
1788 | { | 1573 | { |
1789 | "GNUNET_setup_bandwidth_in_spinbutton", | 1574 | "GNUNET_setup_hostlist_server_port_spin_button", |
1790 | "value-changed", | 1575 | "value-changed", |
1791 | "core", | 1576 | "hostlist", |
1792 | "TOTAL_QUOTA_IN", | 1577 | "HTTPPORT", |
1793 | gettext_noop ("How many bytes per second are we allowed to receive?"), | 1578 | gettext_noop ("Port this peers hostlist should be offered on"), |
1794 | "https://gnunet.org/configuration-bandwidth", | 1579 | "https://gnunet.org/configuration-hostlist-server", |
1795 | &load_number, | 1580 | &load_number, |
1796 | &save_number, NULL, | 1581 | &save_number, NULL, |
1797 | NULL | 1582 | NULL}, |
1798 | }, | ||
1799 | |||
1800 | /* Transport TAB */ | ||
1801 | 1583 | ||
1802 | { | 1584 | { |
1803 | "GNUNET_setup_transport_tcp_checkbutton", | 1585 | "GNUNET_setup_hostlist_url_liststore", |
1804 | "toggled", | 1586 | "row-changed", |
1805 | "transport", | 1587 | "hostlist", |
1806 | "PLUGINS", | 1588 | "SERVERS", |
1807 | gettext_noop ("Enable communication via TCP"), | 1589 | NULL, NULL, |
1808 | "https://gnunet.org/configuration-tcp", | 1590 | &load_string_list_store, |
1809 | &load_option_list, | 1591 | &save_string_list_store, NULL, |
1810 | &save_option_list, "tcp", | 1592 | NULL}, |
1811 | hide_tcp_tab | ||
1812 | }, | ||
1813 | 1593 | ||
1814 | { | 1594 | { |
1815 | "GNUNET_setup_transport_udp_checkbutton", | 1595 | "GNUNET_setup_hostlist_url_treeview", |
1816 | "toggled", | 1596 | NULL, NULL, NULL, /* FIXME */ |
1817 | "transport", | 1597 | gettext_noop ("Known hostlist URLs"), |
1818 | "PLUGINS", | 1598 | "https://gnunet.org/configuration-hostlist", |
1819 | gettext_noop ("Enable communication via UDP"), | 1599 | NULL, NULL, NULL, /* FIXME */ |
1820 | "https://gnunet.org/configuration-udp", | 1600 | NULL}, |
1821 | &load_option_list, | ||
1822 | &save_option_list, "udp", | ||
1823 | hide_udp_tab | ||
1824 | }, | ||
1825 | 1601 | ||
1826 | { | 1602 | { |
1827 | "GNUNET_setup_transport_http_checkbutton", | 1603 | "GNUNET_setup_bandwidth_out_spinbutton", |
1828 | "toggled", | 1604 | "value-changed", |
1829 | "transport", | 1605 | "core", |
1830 | "PLUGINS", | 1606 | "TOTAL_QUOTA_OUT", |
1831 | gettext_noop ("Enable communication via HTTP"), | 1607 | gettext_noop ("How many bytes per second are we allowed to transmit?"), |
1832 | "https://gnunet.org/configuration-http", | 1608 | "https://gnunet.org/configuration-bandwidth", |
1833 | &load_option_list, | 1609 | &load_number, |
1834 | &save_option_list, "http", | 1610 | &save_number, NULL, |
1835 | hide_http_tab | 1611 | NULL}, |
1836 | }, | ||
1837 | 1612 | ||
1838 | { | 1613 | { |
1839 | "GNUNET_setup_transport_https_checkbutton", | 1614 | "GNUNET_setup_bandwidth_in_spinbutton", |
1840 | "toggled", | 1615 | "value-changed", |
1841 | "transport", | 1616 | "core", |
1842 | "PLUGINS", | 1617 | "TOTAL_QUOTA_IN", |
1843 | gettext_noop ("Enable communication via HTTPS"), | 1618 | gettext_noop ("How many bytes per second are we allowed to receive?"), |
1844 | "https://gnunet.org/configuration-https", | 1619 | "https://gnunet.org/configuration-bandwidth", |
1845 | &load_option_list, | 1620 | &load_number, |
1846 | &save_option_list, "https", | 1621 | &save_number, NULL, |
1847 | hide_https_tab | 1622 | NULL}, |
1848 | }, | 1623 | |
1624 | /* Transport TAB */ | ||
1849 | 1625 | ||
1850 | { | 1626 | { |
1851 | "GNUNET_setup_transport_dv_checkbutton", | 1627 | "GNUNET_setup_transport_tcp_checkbutton", |
1852 | "toggled", | 1628 | "toggled", |
1853 | "transport", | 1629 | "transport", |
1854 | "PLUGINS", | 1630 | "PLUGINS", |
1855 | gettext_noop ("Enable communication via DV"), | 1631 | gettext_noop ("Enable communication via TCP"), |
1856 | "https://gnunet.org/configuration-dv", | 1632 | "https://gnunet.org/configuration-tcp", |
1857 | &load_option_list, | 1633 | &load_option_list, |
1858 | &save_option_list, "dv", | 1634 | &save_option_list, "tcp", |
1859 | hide_dv_tab | 1635 | hide_tcp_tab}, |
1860 | }, | ||
1861 | 1636 | ||
1862 | { | 1637 | { |
1863 | "GNUNET_setup_transport_wlan_checkbutton", | 1638 | "GNUNET_setup_transport_udp_checkbutton", |
1864 | "toggled", | 1639 | "toggled", |
1865 | "transport", | 1640 | "transport", |
1866 | "PLUGINS", | 1641 | "PLUGINS", |
1867 | gettext_noop ("Enable communication via WLAN"), | 1642 | gettext_noop ("Enable communication via UDP"), |
1868 | "https://gnunet.org/configuration-wlan", | 1643 | "https://gnunet.org/configuration-udp", |
1869 | &load_option_list, | 1644 | &load_option_list, |
1870 | &save_option_list, "wlan", | 1645 | &save_option_list, "udp", |
1871 | hide_wlan_tab | 1646 | hide_udp_tab}, |
1872 | }, | ||
1873 | 1647 | ||
1874 | { | 1648 | { |
1875 | "GNUNET_setup_transport_tcp_port_spinbutton", | 1649 | "GNUNET_setup_transport_http_checkbutton", |
1876 | "value-changed", | 1650 | "toggled", |
1877 | "transport-tcp", | 1651 | "transport", |
1878 | "PORT", | 1652 | "PLUGINS", |
1879 | gettext_noop ("Port we bind to for TCP"), | 1653 | gettext_noop ("Enable communication via HTTP"), |
1880 | "https://gnunet.org/configuration-tcp", | 1654 | "https://gnunet.org/configuration-http", |
1881 | &load_number, | 1655 | &load_option_list, |
1882 | &save_number, NULL, | 1656 | &save_option_list, "http", |
1883 | hide_all_tcp_options | 1657 | hide_http_tab}, |
1884 | }, | ||
1885 | 1658 | ||
1886 | { | 1659 | { |
1887 | "GNUNET_setup_transport_tcp_adv_port_spinbutton", | 1660 | "GNUNET_setup_transport_https_checkbutton", |
1888 | "value-changed", | 1661 | "toggled", |
1889 | "transport-tcp", | 1662 | "transport", |
1890 | "ADVERTISED_PORT", | 1663 | "PLUGINS", |
1891 | gettext_noop ("Port visible to other peers"), | 1664 | gettext_noop ("Enable communication via HTTPS"), |
1892 | "https://gnunet.org/configuration-tcp", | 1665 | "https://gnunet.org/configuration-https", |
1893 | &load_number, | 1666 | &load_option_list, |
1894 | &save_number, NULL, | 1667 | &save_option_list, "https", |
1895 | NULL | 1668 | hide_https_tab}, |
1896 | }, | ||
1897 | 1669 | ||
1898 | { | 1670 | { |
1899 | "GNUNET_setup_transport_nat_checkbutton", | 1671 | "GNUNET_setup_transport_dv_checkbutton", |
1900 | "toggled", | 1672 | "toggled", |
1901 | "nat", | 1673 | "transport", |
1902 | "BEHIND_NAT", | 1674 | "PLUGINS", |
1903 | gettext_noop ("Check if this peer is behind a NAT"), | 1675 | gettext_noop ("Enable communication via DV"), |
1904 | "https://gnunet.org/configuration-nat", | 1676 | "https://gnunet.org/configuration-dv", |
1905 | &load_yes_no, | 1677 | &load_option_list, |
1906 | &save_yes_no, NULL, | 1678 | &save_option_list, "dv", |
1907 | toggle_nat_options | 1679 | hide_dv_tab}, |
1908 | }, | ||
1909 | 1680 | ||
1910 | { | 1681 | { |
1911 | "GNUNET_setup_transport_hole_punched_checkbutton", | 1682 | "GNUNET_setup_transport_wlan_checkbutton", |
1912 | "toggled", | 1683 | "toggled", |
1913 | "nat", | 1684 | "transport", |
1914 | "PUNCHED_NAT", | 1685 | "PLUGINS", |
1915 | gettext_noop ("Check if the NAT has been hole-punched manually"), | 1686 | gettext_noop ("Enable communication via WLAN"), |
1916 | "https://gnunet.org/configuration-nat", | 1687 | "https://gnunet.org/configuration-wlan", |
1917 | &load_yes_no, | 1688 | &load_option_list, |
1918 | &save_yes_no, NULL, | 1689 | &save_option_list, "wlan", |
1919 | toggle_nat_punched_options | 1690 | hide_wlan_tab}, |
1920 | }, | ||
1921 | 1691 | ||
1922 | { | 1692 | { |
1923 | "GNUNET_setup_transport_upnp_enable_checkbutton", | 1693 | "GNUNET_setup_transport_tcp_port_spinbutton", |
1924 | "toggled", | 1694 | "value-changed", |
1925 | "nat", | 1695 | "transport-tcp", |
1926 | "ENABLE_UPNP", | 1696 | "PORT", |
1927 | gettext_noop ("Enable NAT traversal with UPnP/PMP"), | 1697 | gettext_noop ("Port we bind to for TCP"), |
1928 | "https://gnunet.org/configuration-nat", | 1698 | "https://gnunet.org/configuration-tcp", |
1929 | &load_yes_no, | 1699 | &load_number, |
1930 | &save_yes_no, NULL, | 1700 | &save_number, NULL, |
1931 | NULL, | 1701 | hide_all_tcp_options}, |
1932 | }, | ||
1933 | 1702 | ||
1934 | { | 1703 | { |
1935 | "GNUNET_setup_transport_icmp_server_enable_checkbutton", | 1704 | "GNUNET_setup_transport_tcp_adv_port_spinbutton", |
1936 | "toggled", | 1705 | "value-changed", |
1937 | "nat", | 1706 | "transport-tcp", |
1938 | "ENABLE_ICMP_SERVER", | 1707 | "ADVERTISED_PORT", |
1939 | gettext_noop ("Enable NAT traversal with ICMP as server"), | 1708 | gettext_noop ("Port visible to other peers"), |
1940 | "https://gnunet.org/configuration-nat", | 1709 | "https://gnunet.org/configuration-tcp", |
1941 | &load_yes_no, | 1710 | &load_number, |
1942 | &save_yes_no, NULL, | 1711 | &save_number, NULL, |
1943 | NULL, | 1712 | NULL}, |
1944 | }, | ||
1945 | 1713 | ||
1946 | { | 1714 | { |
1947 | "GNUNET_setup_transport_external_ip_address_entry", | 1715 | "GNUNET_setup_transport_nat_checkbutton", |
1948 | "changed", | 1716 | "toggled", |
1949 | "nat", | 1717 | "nat", |
1950 | "EXTERNAL_ADDRESS", | 1718 | "BEHIND_NAT", |
1951 | gettext_noop ("External (public) IP address of the NAT"), | 1719 | gettext_noop ("Check if this peer is behind a NAT"), |
1952 | "https://gnunet.org/configuration-nat", | 1720 | "https://gnunet.org/configuration-nat", |
1953 | &load_text, | 1721 | &load_yes_no, |
1954 | &save_text, NULL, | 1722 | &save_yes_no, NULL, |
1955 | NULL | 1723 | toggle_nat_options}, |
1956 | }, | ||
1957 | 1724 | ||
1958 | { | 1725 | { |
1959 | "GNUNET_setup_transport_icmp_client_enable_checkbutton", | 1726 | "GNUNET_setup_transport_hole_punched_checkbutton", |
1960 | "toggled", | 1727 | "toggled", |
1961 | "nat", | 1728 | "nat", |
1962 | "ENABLE_ICMP_CLIENT", | 1729 | "PUNCHED_NAT", |
1963 | gettext_noop ("Enable NAT traversal with ICMP as client"), | 1730 | gettext_noop ("Check if the NAT has been hole-punched manually"), |
1964 | "https://gnunet.org/configuration-nat", | 1731 | "https://gnunet.org/configuration-nat", |
1965 | &load_yes_no, | 1732 | &load_yes_no, |
1966 | &save_yes_no, NULL, | 1733 | &save_yes_no, NULL, |
1967 | toggle_internal_ip | 1734 | toggle_nat_punched_options}, |
1968 | }, | ||
1969 | 1735 | ||
1970 | { | 1736 | { |
1971 | "GNUNET_setup_transport_internal_ip_entry", | 1737 | "GNUNET_setup_transport_upnp_enable_checkbutton", |
1972 | "changed", | 1738 | "toggled", |
1973 | "nat", | 1739 | "nat", |
1974 | "INTERNAL_ADDRESS", | 1740 | "ENABLE_UPNP", |
1975 | gettext_noop ("Internal (private) IP address of the NAT"), | 1741 | gettext_noop ("Enable NAT traversal with UPnP/PMP"), |
1976 | "https://gnunet.org/configuration-nat", | 1742 | "https://gnunet.org/configuration-nat", |
1977 | &load_text, | 1743 | &load_yes_no, |
1978 | &save_text, NULL, | 1744 | &save_yes_no, NULL, |
1979 | NULL | 1745 | NULL, |
1980 | }, | 1746 | }, |
1981 | 1747 | ||
1982 | { | 1748 | { |
1983 | "GNUNET_setup_transport_disable_ipv6_checkbutton", | 1749 | "GNUNET_setup_transport_icmp_server_enable_checkbutton", |
1984 | "toggled", | 1750 | "toggled", |
1985 | "nat", | 1751 | "nat", |
1986 | "DISABLEV6", | 1752 | "ENABLE_ICMP_SERVER", |
1987 | gettext_noop ("Disable IPv6 support"), | 1753 | gettext_noop ("Enable NAT traversal with ICMP as server"), |
1988 | "https://gnunet.org/configuration-ipv6", | 1754 | "https://gnunet.org/configuration-nat", |
1989 | &load_yes_no, | 1755 | &load_yes_no, |
1990 | &save_yes_no, NULL, | 1756 | &save_yes_no, NULL, |
1991 | NULL, | 1757 | NULL, |
1992 | }, | 1758 | }, |
1993 | 1759 | ||
1994 | { | 1760 | { |
1995 | "GNUNET_setup_transport_udp_port_spinbutton", | 1761 | "GNUNET_setup_transport_external_ip_address_entry", |
1996 | "value-changed", | 1762 | "changed", |
1997 | "transport-udp", | 1763 | "nat", |
1998 | "PORT", | 1764 | "EXTERNAL_ADDRESS", |
1999 | gettext_noop ("Port for inbound UDP packets, use 0 if behind NAT"), | 1765 | gettext_noop ("External (public) IP address of the NAT"), |
2000 | "https://gnunet.org/configuration-udp", | 1766 | "https://gnunet.org/configuration-nat", |
2001 | &load_number, | 1767 | &load_text, |
2002 | &save_number, NULL, | 1768 | &save_text, NULL, |
2003 | NULL | 1769 | NULL}, |
2004 | }, | ||
2005 | 1770 | ||
2006 | { | 1771 | { |
2007 | "GNUNET_setup_transport_http_port_spinbutton", | 1772 | "GNUNET_setup_transport_icmp_client_enable_checkbutton", |
2008 | "value-changed", | 1773 | "toggled", |
2009 | "transport-http", | 1774 | "nat", |
2010 | "PORT", | 1775 | "ENABLE_ICMP_CLIENT", |
2011 | gettext_noop ("Port for inbound HTTP connections, use 0 if behind NAT"), | 1776 | gettext_noop ("Enable NAT traversal with ICMP as client"), |
2012 | "https://gnunet.org/configuration-http", | 1777 | "https://gnunet.org/configuration-nat", |
2013 | &load_number, | 1778 | &load_yes_no, |
2014 | &save_number, NULL, | 1779 | &save_yes_no, NULL, |
2015 | NULL | 1780 | toggle_internal_ip}, |
2016 | }, | ||
2017 | 1781 | ||
2018 | { | 1782 | { |
2019 | "GNUNET_setup_transport_https_port_spinbutton", | 1783 | "GNUNET_setup_transport_internal_ip_entry", |
2020 | "value-changed", | 1784 | "changed", |
2021 | "transport-https", | 1785 | "nat", |
2022 | "PORT", | 1786 | "INTERNAL_ADDRESS", |
2023 | gettext_noop ("Port for inbound HTTPS connections, use 0 if behind NAT"), | 1787 | gettext_noop ("Internal (private) IP address of the NAT"), |
2024 | "https://gnunet.org/configuration-https", | 1788 | "https://gnunet.org/configuration-nat", |
2025 | &load_number, | 1789 | &load_text, |
2026 | &save_number, NULL, | 1790 | &save_text, NULL, |
2027 | NULL | 1791 | NULL}, |
2028 | }, | ||
2029 | |||
2030 | /* FS TAB */ | ||
2031 | |||
2032 | { | ||
2033 | "GNUNET_setup_fs_datastore_sqlite_radiobutton", | ||
2034 | "toggled", | ||
2035 | "datastore", | ||
2036 | "DATABASE", | ||
2037 | gettext_noop ("Use sqLite to store file-sharing content"), | ||
2038 | "https://gnunet.org/configuration-datastore", | ||
2039 | &load_option_list /* abuse! */, | ||
2040 | &save_option_list /* abuse! */, "sqlite", | ||
2041 | hide_sqlite_datastore_tab | ||
2042 | }, | ||
2043 | 1792 | ||
2044 | { | 1793 | { |
2045 | "GNUNET_setup_fs_datastore_mysql_radiobutton", | 1794 | "GNUNET_setup_transport_disable_ipv6_checkbutton", |
2046 | "toggled", | 1795 | "toggled", |
2047 | "datastore", | 1796 | "nat", |
2048 | "DATABASE", | 1797 | "DISABLEV6", |
2049 | gettext_noop ("Use MySQL to store file-sharing content"), | 1798 | gettext_noop ("Disable IPv6 support"), |
2050 | "https://gnunet.org/configuration-datastore", | 1799 | "https://gnunet.org/configuration-ipv6", |
2051 | &load_option_list /* abuse! */, | 1800 | &load_yes_no, |
2052 | &save_option_list /* abuse! */, "mysql", | 1801 | &save_yes_no, NULL, |
2053 | hide_mysql_datastore_tab | 1802 | NULL, |
2054 | }, | 1803 | }, |
2055 | 1804 | ||
2056 | { | 1805 | { |
2057 | "GNUNET_setup_fs_datastore_postgres_radiobutton", | 1806 | "GNUNET_setup_transport_udp_port_spinbutton", |
2058 | "toggled", | 1807 | "value-changed", |
2059 | "datastore", | 1808 | "transport-udp", |
2060 | "DATABASE", | 1809 | "PORT", |
2061 | gettext_noop ("Use Postgres to store file-sharing content"), | 1810 | gettext_noop ("Port for inbound UDP packets, use 0 if behind NAT"), |
2062 | "https://gnunet.org/configuration-datastore", | 1811 | "https://gnunet.org/configuration-udp", |
2063 | &load_option_list /* abuse! */, | 1812 | &load_number, |
2064 | &save_option_list /* abuse! */, "postgres", | 1813 | &save_number, NULL, |
2065 | hide_postgres_datastore_tab | 1814 | NULL}, |
2066 | }, | ||
2067 | 1815 | ||
2068 | { | 1816 | { |
2069 | "GNUNET_setup_datastore_mysql_database_name_entry", | 1817 | "GNUNET_setup_transport_http_port_spinbutton", |
2070 | "changed", | 1818 | "value-changed", |
2071 | "datastore-mysql", | 1819 | "transport-http", |
2072 | "DATABASE", | 1820 | "PORT", |
2073 | gettext_noop ("Name for the MySQL database"), | 1821 | gettext_noop ("Port for inbound HTTP connections, use 0 if behind NAT"), |
2074 | "https://gnunet.org/configuration-datastore", | 1822 | "https://gnunet.org/configuration-http", |
2075 | &load_text, | 1823 | &load_number, |
2076 | &save_text, NULL, | 1824 | &save_number, NULL, |
2077 | NULL | 1825 | NULL}, |
2078 | }, | ||
2079 | |||
2080 | { | ||
2081 | "GNUNET_setup_datastore_mysql_config_file_filechooserbutton", | ||
2082 | "selection-changed", | ||
2083 | "datastore-mysql", | ||
2084 | "CONFIG", | ||
2085 | gettext_noop ("Configuration file for MySQL access"), | ||
2086 | "http://dev.mysql.com/doc/refman/5.5/en/option-files.html", | ||
2087 | &load_filename, | ||
2088 | &save_filename, NULL, | ||
2089 | NULL | ||
2090 | }, | ||
2091 | 1826 | ||
2092 | { | 1827 | { |
2093 | "GNUNET_setup_datastore_mysql_username_entry", | 1828 | "GNUNET_setup_transport_https_port_spinbutton", |
2094 | "changed", | 1829 | "value-changed", |
2095 | "datastore-mysql", | 1830 | "transport-https", |
2096 | "USER", | 1831 | "PORT", |
2097 | gettext_noop ("Username for MySQL access"), | 1832 | gettext_noop ("Port for inbound HTTPS connections, use 0 if behind NAT"), |
2098 | "https://gnunet.org/configuration-datastore", | 1833 | "https://gnunet.org/configuration-https", |
2099 | &load_text, | 1834 | &load_number, |
2100 | &save_text, NULL, | 1835 | &save_number, NULL, |
2101 | NULL | 1836 | NULL}, |
2102 | }, | 1837 | |
1838 | /* FS TAB */ | ||
2103 | 1839 | ||
2104 | { | 1840 | { |
2105 | "GNUNET_setup_datastore_mysql_password_entry", | 1841 | "GNUNET_setup_fs_datastore_sqlite_radiobutton", |
2106 | "changed", | 1842 | "toggled", |
2107 | "datastore-mysql", | 1843 | "datastore", |
2108 | "PASSWORD", | 1844 | "DATABASE", |
2109 | gettext_noop ("Password for MySQL access"), | 1845 | gettext_noop ("Use sqLite to store file-sharing content"), |
2110 | "https://gnunet.org/configuration-datastore", | 1846 | "https://gnunet.org/configuration-datastore", |
2111 | &load_text, | 1847 | &load_option_list /* abuse! */ , |
2112 | &save_text, NULL, | 1848 | &save_option_list /* abuse! */ , "sqlite", |
2113 | NULL | 1849 | hide_sqlite_datastore_tab}, |
2114 | }, | ||
2115 | 1850 | ||
2116 | { | 1851 | { |
2117 | "GNUNET_setup_datastore_mysql_hostname_entry", | 1852 | "GNUNET_setup_fs_datastore_mysql_radiobutton", |
2118 | "changed", | 1853 | "toggled", |
2119 | "datastore-mysql", | 1854 | "datastore", |
2120 | "HOST", | 1855 | "DATABASE", |
2121 | gettext_noop ("Name of host running MySQL database"), | 1856 | gettext_noop ("Use MySQL to store file-sharing content"), |
2122 | "https://gnunet.org/configuration-datastore", | 1857 | "https://gnunet.org/configuration-datastore", |
2123 | &load_text, | 1858 | &load_option_list /* abuse! */ , |
2124 | &save_text, NULL, | 1859 | &save_option_list /* abuse! */ , "mysql", |
2125 | NULL | 1860 | hide_mysql_datastore_tab}, |
2126 | }, | ||
2127 | 1861 | ||
2128 | { | 1862 | { |
2129 | "GNUNET_setup_datastore_mysql_port_spinbutton", | 1863 | "GNUNET_setup_fs_datastore_postgres_radiobutton", |
2130 | "value-changed", | 1864 | "toggled", |
2131 | "datastore-mysql", | 1865 | "datastore", |
2132 | "PORT", | 1866 | "DATABASE", |
2133 | gettext_noop ("Port of MySQL database"), | 1867 | gettext_noop ("Use Postgres to store file-sharing content"), |
2134 | "https://gnunet.org/configuration-datastore", | 1868 | "https://gnunet.org/configuration-datastore", |
2135 | &load_number, | 1869 | &load_option_list /* abuse! */ , |
2136 | &save_number, NULL, | 1870 | &save_option_list /* abuse! */ , "postgres", |
2137 | NULL | 1871 | hide_postgres_datastore_tab}, |
2138 | }, | ||
2139 | 1872 | ||
2140 | { | 1873 | { |
2141 | "GNUNET_setup_datastore_postgres_config_entry", | 1874 | "GNUNET_setup_datastore_mysql_database_name_entry", |
2142 | "changed", | 1875 | "changed", |
2143 | "datastore-postgres", | 1876 | "datastore-mysql", |
2144 | "CONFIG", | 1877 | "DATABASE", |
2145 | gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"), | 1878 | gettext_noop ("Name for the MySQL database"), |
2146 | "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT", | 1879 | "https://gnunet.org/configuration-datastore", |
2147 | &load_text, | 1880 | &load_text, |
2148 | &save_text, NULL, | 1881 | &save_text, NULL, |
2149 | NULL | 1882 | NULL}, |
2150 | }, | ||
2151 | |||
2152 | |||
2153 | { | ||
2154 | "GNUNET_setup_fs_migration_from_checkbutton", | ||
2155 | "toggled", | ||
2156 | "fs", | ||
2157 | "CONTENT_PUSHING", | ||
2158 | gettext_noop ("Should we try to push our content to other peers?"), | ||
2159 | "https://gnunet.org/configuration-fs", | ||
2160 | &load_yes_no, | ||
2161 | &save_yes_no, NULL, | ||
2162 | NULL | ||
2163 | }, | ||
2164 | |||
2165 | { | ||
2166 | "GNUNET_setup_fs_migration_to_checkbutton", | ||
2167 | "toggled", | ||
2168 | "fs", | ||
2169 | "CONTENT_CACHING", | ||
2170 | gettext_noop ("Are we allowed to cache content received from other peers?"), | ||
2171 | "https://gnunet.org/configuration-fs", | ||
2172 | &load_yes_no, | ||
2173 | &save_yes_no, NULL, | ||
2174 | NULL | ||
2175 | }, | ||
2176 | |||
2177 | { | ||
2178 | "GNUNET_setup_fs_datacache_sqlite_radiobutton", | ||
2179 | "toggled", | ||
2180 | "dhtcache", | ||
2181 | "DATABASE", | ||
2182 | gettext_noop ("Use sqLite to cache DHT data"), | ||
2183 | "https://gnunet.org/configuration-datacache", | ||
2184 | &load_option_list /* abuse! */, | ||
2185 | &save_option_list /* abuse! */, "sqlite", | ||
2186 | hide_sqlite_datacache_tab | ||
2187 | }, | ||
2188 | 1883 | ||
2189 | { | 1884 | { |
2190 | "GNUNET_setup_fs_datacache_mysql_radiobutton", | 1885 | "GNUNET_setup_datastore_mysql_config_file_filechooserbutton", |
2191 | "toggled", | 1886 | "selection-changed", |
2192 | "dhtcache", | 1887 | "datastore-mysql", |
2193 | "DATABASE", | 1888 | "CONFIG", |
2194 | gettext_noop ("Use MySQL to cache DHT data"), | 1889 | gettext_noop ("Configuration file for MySQL access"), |
2195 | "https://gnunet.org/configuration-datacache", | 1890 | "http://dev.mysql.com/doc/refman/5.5/en/option-files.html", |
2196 | &load_option_list /* abuse! */, | 1891 | &load_filename, |
2197 | &save_option_list /* abuse! */, "mysql", | 1892 | &save_filename, NULL, |
2198 | hide_mysql_datacache_tab | 1893 | NULL}, |
2199 | }, | ||
2200 | 1894 | ||
2201 | { | 1895 | { |
2202 | "GNUNET_setup_fs_datacache_postgres_radiobutton", | 1896 | "GNUNET_setup_datastore_mysql_username_entry", |
2203 | "toggled", | 1897 | "changed", |
2204 | "dhtcache", | 1898 | "datastore-mysql", |
2205 | "DATABASE", | 1899 | "USER", |
2206 | gettext_noop ("Use Postgres to cache DHT data"), | 1900 | gettext_noop ("Username for MySQL access"), |
2207 | "https://gnunet.org/configuration-datacache", | 1901 | "https://gnunet.org/configuration-datastore", |
2208 | &load_option_list /* abuse! */, | 1902 | &load_text, |
2209 | &save_option_list /* abuse! */, "postgres", | 1903 | &save_text, NULL, |
2210 | hide_postgres_datacache_tab | 1904 | NULL}, |
2211 | }, | ||
2212 | |||
2213 | { | ||
2214 | "GNUNET_setup_datacache_mysql_database_name_entry", | ||
2215 | "changed", | ||
2216 | "datacache-mysql", | ||
2217 | "DATABASE", | ||
2218 | gettext_noop ("Name for the MySQL database"), | ||
2219 | "https://gnunet.org/configuration-datacache", | ||
2220 | &load_text, | ||
2221 | &save_text, NULL, | ||
2222 | NULL | ||
2223 | }, | ||
2224 | |||
2225 | { | ||
2226 | "GNUNET_setup_datacache_mysql_config_file_filechooserbutton", | ||
2227 | "selection-changed", | ||
2228 | "datacache-mysql", | ||
2229 | "CONFIG", | ||
2230 | gettext_noop ("Configuration file for MySQL access"), | ||
2231 | "http://dev.mysql.com/doc/refman/5.5/en/option-files.html", | ||
2232 | &load_filename, | ||
2233 | &save_filename, NULL, | ||
2234 | NULL | ||
2235 | }, | ||
2236 | 1905 | ||
2237 | { | 1906 | { |
2238 | "GNUNET_setup_datacache_mysql_username_entry", | 1907 | "GNUNET_setup_datastore_mysql_password_entry", |
2239 | "changed", | 1908 | "changed", |
2240 | "datacache-mysql", | 1909 | "datastore-mysql", |
2241 | "USER", | 1910 | "PASSWORD", |
2242 | gettext_noop ("Username for MySQL access"), | 1911 | gettext_noop ("Password for MySQL access"), |
2243 | "https://gnunet.org/configuration-datacache", | 1912 | "https://gnunet.org/configuration-datastore", |
2244 | &load_text, | 1913 | &load_text, |
2245 | &save_text, NULL, | 1914 | &save_text, NULL, |
2246 | NULL | 1915 | NULL}, |
2247 | }, | ||
2248 | 1916 | ||
2249 | { | 1917 | { |
2250 | "GNUNET_setup_datacache_mysql_password_entry", | 1918 | "GNUNET_setup_datastore_mysql_hostname_entry", |
2251 | "changed", | 1919 | "changed", |
2252 | "datacache-mysql", | 1920 | "datastore-mysql", |
2253 | "PASSWORD", | 1921 | "HOST", |
2254 | gettext_noop ("Password for MySQL access"), | 1922 | gettext_noop ("Name of host running MySQL database"), |
2255 | "https://gnunet.org/configuration-datacache", | 1923 | "https://gnunet.org/configuration-datastore", |
2256 | &load_text, | 1924 | &load_text, |
2257 | &save_text, NULL, | 1925 | &save_text, NULL, |
2258 | NULL | 1926 | NULL}, |
2259 | }, | ||
2260 | 1927 | ||
2261 | { | 1928 | { |
2262 | "GNUNET_setup_datacache_mysql_hostname_entry", | 1929 | "GNUNET_setup_datastore_mysql_port_spinbutton", |
2263 | "changed", | 1930 | "value-changed", |
2264 | "datacache-mysql", | 1931 | "datastore-mysql", |
2265 | "HOST", | 1932 | "PORT", |
2266 | gettext_noop ("Name of host running MySQL database"), | 1933 | gettext_noop ("Port of MySQL database"), |
2267 | "https://gnunet.org/configuration-datacache", | 1934 | "https://gnunet.org/configuration-datastore", |
2268 | &load_text, | 1935 | &load_number, |
2269 | &save_text, NULL, | 1936 | &save_number, NULL, |
2270 | NULL | 1937 | NULL}, |
2271 | }, | ||
2272 | 1938 | ||
2273 | { | 1939 | { |
2274 | "GNUNET_setup_transport_wlan_interface_entry", | 1940 | "GNUNET_setup_datastore_postgres_config_entry", |
2275 | "changed", | 1941 | "changed", |
2276 | "transport-wlan", | 1942 | "datastore-postgres", |
2277 | "INTERFACE", | 1943 | "CONFIG", |
2278 | gettext_noop ("Name of monitoring interface to use (monX)"), | 1944 | gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"), |
2279 | "https://gnunet.org/configuration-wlan", | 1945 | "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT", |
2280 | &load_text, | 1946 | &load_text, |
2281 | &save_text, NULL, | 1947 | &save_text, NULL, |
2282 | NULL | 1948 | NULL}, |
2283 | }, | ||
2284 | 1949 | ||
2285 | { | ||
2286 | "GNUNET_setup_datacache_mysql_port_spinbutton", | ||
2287 | "value-changed", | ||
2288 | "datacache-mysql", | ||
2289 | "PORT", | ||
2290 | gettext_noop ("Port of MySQL database"), | ||
2291 | "https://gnunet.org/configuration-datacache", | ||
2292 | &load_number, | ||
2293 | &save_number, NULL, | ||
2294 | NULL | ||
2295 | }, | ||
2296 | 1950 | ||
2297 | { | 1951 | { |
2298 | "GNUNET_setup_datacache_postgres_config_entry", | 1952 | "GNUNET_setup_fs_migration_from_checkbutton", |
2299 | "changed", | 1953 | "toggled", |
2300 | "datacache-postgres", | 1954 | "fs", |
2301 | "CONFIG", | 1955 | "CONTENT_PUSHING", |
2302 | gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"), | 1956 | gettext_noop ("Should we try to push our content to other peers?"), |
2303 | "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT", | 1957 | "https://gnunet.org/configuration-fs", |
2304 | &load_text, | 1958 | &load_yes_no, |
2305 | &save_text, NULL, | 1959 | &save_yes_no, NULL, |
2306 | NULL | 1960 | NULL}, |
2307 | }, | ||
2308 | |||
2309 | { | ||
2310 | "GNUNET_setup_vpn_master_interface_entry", | ||
2311 | "changed", | ||
2312 | "vpn", | ||
2313 | "IFNAME", | ||
2314 | gettext_noop ("Name of the virtual interface the GNUnet VPN should create"), | ||
2315 | "https://gnunet.org/configuration-vpn", | ||
2316 | &load_text, | ||
2317 | &save_text, NULL, | ||
2318 | NULL | ||
2319 | }, | ||
2320 | |||
2321 | { | ||
2322 | "GNUNET_setup_vpn_master_interface_v4_ip_entry", | ||
2323 | "changed", | ||
2324 | "vpn", | ||
2325 | "IPV4ADDR", | ||
2326 | gettext_noop ("IPv4 address to use for the VPN interface"), | ||
2327 | "https://gnunet.org/configuration-vpn", | ||
2328 | &load_text, | ||
2329 | &save_text, NULL, | ||
2330 | NULL | ||
2331 | }, | ||
2332 | |||
2333 | { | ||
2334 | "GNUNET_setup_vpn_master_interface_v4_mask_entry", | ||
2335 | "changed", | ||
2336 | "vpn", | ||
2337 | "IPV4MASK", | ||
2338 | gettext_noop ("IPv4 network mask to use for the VPN interface"), | ||
2339 | "https://gnunet.org/configuration-vpn", | ||
2340 | &load_text, | ||
2341 | &save_text, NULL, | ||
2342 | NULL | ||
2343 | }, | ||
2344 | |||
2345 | { | ||
2346 | "GNUNET_setup_vpn_master_interface_v6_ip_entry", | ||
2347 | "changed", | ||
2348 | "vpn", | ||
2349 | "IPV6ADDR", | ||
2350 | gettext_noop ("IPv6 address to use for the VPN interface"), | ||
2351 | "https://gnunet.org/configuration-vpn", | ||
2352 | &load_text, | ||
2353 | &save_text, NULL, | ||
2354 | NULL | ||
2355 | }, | ||
2356 | |||
2357 | { | ||
2358 | "GNUNET_setup_vpn_master_interface_v6_mask_spinbutton", | ||
2359 | "value-changed", | ||
2360 | "vpn", | ||
2361 | "IPV6MASK", | ||
2362 | gettext_noop ("IPv6 network prefix length to use for the VPN interface"), | ||
2363 | "https://gnunet.org/configuration-vpn", | ||
2364 | &load_number, | ||
2365 | &save_number, NULL, | ||
2366 | NULL | ||
2367 | }, | ||
2368 | 1961 | ||
2369 | { | 1962 | { |
2370 | "GNUNET_setup_vpn_master_vdns_server_entry", | 1963 | "GNUNET_setup_fs_migration_to_checkbutton", |
2371 | "changed", | 1964 | "toggled", |
2372 | "vpn", | 1965 | "fs", |
2373 | "VIRTDNS", | 1966 | "CONTENT_CACHING", |
2374 | gettext_noop ("IP address of the virtual DNS server that resolves through GNUnet (use in resolve.conf if you want to resolve through some GNUnet DNS Exit)"), | 1967 | gettext_noop ("Are we allowed to cache content received from other peers?"), |
2375 | "https://gnunet.org/configuration-vpn", | 1968 | "https://gnunet.org/configuration-fs", |
2376 | &load_text, | 1969 | &load_yes_no, |
2377 | &save_text, NULL, | 1970 | &save_yes_no, NULL, |
2378 | NULL | 1971 | NULL}, |
2379 | }, | ||
2380 | 1972 | ||
2381 | { | 1973 | { |
2382 | "GNUNET_setup_vpn_enable_vpn_exit_checkbutton", | 1974 | "GNUNET_setup_fs_datacache_sqlite_radiobutton", |
2383 | "toggled", | 1975 | "toggled", |
2384 | "arm", | 1976 | "dhtcache", |
2385 | "DEFAULTSERVICES", | 1977 | "DATABASE", |
2386 | gettext_noop ("Activate the VPN exit to provide services and/or to enable others to use your Internet connection"), | 1978 | gettext_noop ("Use sqLite to cache DHT data"), |
2387 | "https://gnunet.org/configuration-exit", | 1979 | "https://gnunet.org/configuration-datacache", |
2388 | &load_option_list, | 1980 | &load_option_list /* abuse! */ , |
2389 | &save_option_list, "exit", | 1981 | &save_option_list /* abuse! */ , "sqlite", |
2390 | hide_exit_options | 1982 | hide_sqlite_datacache_tab}, |
2391 | }, | ||
2392 | 1983 | ||
2393 | { | 1984 | { |
2394 | "GNUNET_setup_vpn_enable_dns_exit_checkbutton", | 1985 | "GNUNET_setup_fs_datacache_mysql_radiobutton", |
2395 | "toggled", | 1986 | "toggled", |
2396 | "dns", | 1987 | "dhtcache", |
2397 | "PROVIDE_EXIT", | 1988 | "DATABASE", |
2398 | gettext_noop ("Allow other peers to perform DNS resolutions using your Internet connection"), | 1989 | gettext_noop ("Use MySQL to cache DHT data"), |
2399 | "https://gnunet.org/configuration-dns", | 1990 | "https://gnunet.org/configuration-datacache", |
2400 | &load_yes_no, | 1991 | &load_option_list /* abuse! */ , |
2401 | &save_yes_no, NULL, | 1992 | &save_option_list /* abuse! */ , "mysql", |
2402 | NULL | 1993 | hide_mysql_datacache_tab}, |
2403 | }, | ||
2404 | 1994 | ||
2405 | { | 1995 | { |
2406 | "GNUNET_setup_vpn_exit_interface_name_entry", | 1996 | "GNUNET_setup_fs_datacache_postgres_radiobutton", |
2407 | "changed", | 1997 | "toggled", |
2408 | "exit", | 1998 | "dhtcache", |
2409 | "IFNAME", | 1999 | "DATABASE", |
2410 | gettext_noop ("Name of the virtual interface the GNUnet exit service should create for traffic exiting the VPN to the Internet"), | 2000 | gettext_noop ("Use Postgres to cache DHT data"), |
2411 | "https://gnunet.org/configuration-exit", | 2001 | "https://gnunet.org/configuration-datacache", |
2412 | &load_text, | 2002 | &load_option_list /* abuse! */ , |
2413 | &save_text, NULL, | 2003 | &save_option_list /* abuse! */ , "postgres", |
2414 | NULL | 2004 | hide_postgres_datacache_tab}, |
2415 | }, | ||
2416 | |||
2417 | { | ||
2418 | "GNUNET_setup_vpn_exit_interface_v4_ip_entry", | ||
2419 | "changed", | ||
2420 | "exit", | ||
2421 | "IPV4ADDR", | ||
2422 | gettext_noop ("IPv4 address to use for the VPN Exit interface"), | ||
2423 | "https://gnunet.org/configuration-exit", | ||
2424 | &load_text, | ||
2425 | &save_text, NULL, | ||
2426 | NULL | ||
2427 | }, | ||
2428 | |||
2429 | { | ||
2430 | "GNUNET_setup_vpn_exit_interface_v4_mask_entry", | ||
2431 | "changed", | ||
2432 | "exit", | ||
2433 | "IPV4MASK", | ||
2434 | gettext_noop ("IPv4 network mask to use for the VPN Exit interface"), | ||
2435 | "https://gnunet.org/configuration-exit", | ||
2436 | &load_text, | ||
2437 | &save_text, NULL, | ||
2438 | NULL | ||
2439 | }, | ||
2440 | |||
2441 | { | ||
2442 | "GNUNET_setup_vpn_exit_interface_v6_ip_entry", | ||
2443 | "changed", | ||
2444 | "exit", | ||
2445 | "IPV6ADDR", | ||
2446 | gettext_noop ("IPv6 address to use for the VPN Exit interface"), | ||
2447 | "https://gnunet.org/configuration-exit", | ||
2448 | &load_text, | ||
2449 | &save_text, NULL, | ||
2450 | NULL | ||
2451 | }, | ||
2452 | |||
2453 | { | ||
2454 | "GNUNET_setup_vpn_exit_interface_v6_mask_spinbutton", | ||
2455 | "value-changed", | ||
2456 | "exit", | ||
2457 | "IPV6MASK", | ||
2458 | gettext_noop ("IPv6 network prefix length to use for the VPN Exit interface"), | ||
2459 | "https://gnunet.org/configuration-exit", | ||
2460 | &load_number, | ||
2461 | &save_number, NULL, | ||
2462 | NULL | ||
2463 | }, | ||
2464 | 2005 | ||
2006 | { | ||
2007 | "GNUNET_setup_datacache_mysql_database_name_entry", | ||
2008 | "changed", | ||
2009 | "datacache-mysql", | ||
2010 | "DATABASE", | ||
2011 | gettext_noop ("Name for the MySQL database"), | ||
2012 | "https://gnunet.org/configuration-datacache", | ||
2013 | &load_text, | ||
2014 | &save_text, NULL, | ||
2015 | NULL}, | ||
2465 | 2016 | ||
2466 | { | 2017 | { |
2467 | "GNUNET_setup_vpn_exit_enable_udp_checkbutton", | 2018 | "GNUNET_setup_datacache_mysql_config_file_filechooserbutton", |
2468 | "toggled", | 2019 | "selection-changed", |
2469 | "exit", | 2020 | "datacache-mysql", |
2470 | "ENABLE_UDP", | 2021 | "CONFIG", |
2471 | gettext_noop ("Allow other users to use your Internet connection for UDP traffic (via the Exit interface)"), | 2022 | gettext_noop ("Configuration file for MySQL access"), |
2472 | "https://gnunet.org/configuration-exit", | 2023 | "http://dev.mysql.com/doc/refman/5.5/en/option-files.html", |
2473 | &load_yes_no, | 2024 | &load_filename, |
2474 | &save_yes_no, NULL, | 2025 | &save_filename, NULL, |
2475 | NULL | 2026 | NULL}, |
2476 | }, | ||
2477 | |||
2478 | { | ||
2479 | "GNUNET_setup_vpn_exit_enable_tcp_checkbutton", | ||
2480 | "toggled", | ||
2481 | "exit", | ||
2482 | "ENABLE_TCP", | ||
2483 | gettext_noop ("Allow other users to use your Internet connection for TCP traffic (via the Exit interface)"), | ||
2484 | "https://gnunet.org/configuration-exit", | ||
2485 | &load_yes_no, | ||
2486 | &save_yes_no, NULL, | ||
2487 | NULL | ||
2488 | }, | ||
2489 | |||
2490 | /* DNS treeview */ | ||
2491 | |||
2492 | { | ||
2493 | "GNUNET_setup_vpn_dns_service_treeview", | ||
2494 | NULL, | ||
2495 | NULL, | ||
2496 | NULL, | ||
2497 | gettext_noop ("Specification of .gnunet hostnames and services offered by this peer"), | ||
2498 | "https://gnunet.org/configuration-dns", | ||
2499 | &load_vpn_dns_configuration, | ||
2500 | NULL, NULL, | ||
2501 | NULL | ||
2502 | }, | ||
2503 | |||
2504 | { | ||
2505 | "GNUNET_setup_vpn_dns_service_dnsname_cellrenderertext", | ||
2506 | "editing-started", | ||
2507 | NULL, | ||
2508 | NULL, | ||
2509 | NULL, | ||
2510 | "https://gnunet.org/configuration-dns", | ||
2511 | NULL, | ||
2512 | &vpn_dns_service_dnsname_install_edited_handler, | ||
2513 | NULL, | ||
2514 | NULL | ||
2515 | }, | ||
2516 | 2027 | ||
2517 | { | 2028 | { |
2518 | "GNUNET_setup_vpn_dns_service_tcpudp_cellrenderertext", | 2029 | "GNUNET_setup_datacache_mysql_username_entry", |
2519 | "editing-started", | 2030 | "changed", |
2520 | NULL, | 2031 | "datacache-mysql", |
2521 | NULL, | 2032 | "USER", |
2522 | NULL, | 2033 | gettext_noop ("Username for MySQL access"), |
2523 | "https://gnunet.org/configuration-dns", | 2034 | "https://gnunet.org/configuration-datacache", |
2524 | NULL, | 2035 | &load_text, |
2525 | &vpn_dns_service_tcpudp_install_edited_handler, | 2036 | &save_text, NULL, |
2526 | NULL, | 2037 | NULL}, |
2527 | NULL | ||
2528 | }, | ||
2529 | 2038 | ||
2530 | { | 2039 | { |
2531 | "GNUNET_setup_vpn_dns_service_sourceport_cellrenderertext", | 2040 | "GNUNET_setup_datacache_mysql_password_entry", |
2532 | "editing-started", | 2041 | "changed", |
2533 | NULL, | 2042 | "datacache-mysql", |
2534 | NULL, | 2043 | "PASSWORD", |
2535 | NULL, | 2044 | gettext_noop ("Password for MySQL access"), |
2536 | "https://gnunet.org/configuration-dns", | 2045 | "https://gnunet.org/configuration-datacache", |
2537 | NULL, | 2046 | &load_text, |
2538 | &vpn_dns_service_sourceport_install_edited_handler, | 2047 | &save_text, NULL, |
2539 | NULL, | 2048 | NULL}, |
2540 | NULL | 2049 | |
2541 | }, | 2050 | { |
2542 | 2051 | "GNUNET_setup_datacache_mysql_hostname_entry", | |
2543 | { | 2052 | "changed", |
2544 | "GNUNET_setup_vpn_dns_service_targethostname_cellrenderertext", | 2053 | "datacache-mysql", |
2545 | "editing-started", | 2054 | "HOST", |
2546 | NULL, | 2055 | gettext_noop ("Name of host running MySQL database"), |
2547 | NULL, | 2056 | "https://gnunet.org/configuration-datacache", |
2548 | NULL, | 2057 | &load_text, |
2549 | "https://gnunet.org/configuration-dns", | 2058 | &save_text, NULL, |
2550 | NULL, | 2059 | NULL}, |
2551 | &vpn_dns_service_targethostname_install_edited_handler, | 2060 | |
2552 | NULL, | 2061 | { |
2553 | NULL | 2062 | "GNUNET_setup_transport_wlan_interface_entry", |
2554 | }, | 2063 | "changed", |
2555 | 2064 | "transport-wlan", | |
2556 | { | 2065 | "INTERFACE", |
2557 | "GNUNET_setup_vpn_dns_service_targetport_cellrenderertext", | 2066 | gettext_noop ("Name of monitoring interface to use (monX)"), |
2558 | "editing-started", | 2067 | "https://gnunet.org/configuration-wlan", |
2559 | NULL, | 2068 | &load_text, |
2560 | NULL, | 2069 | &save_text, NULL, |
2561 | NULL, | 2070 | NULL}, |
2562 | "https://gnunet.org/configuration-dns", | 2071 | |
2563 | NULL, | 2072 | { |
2564 | &vpn_dns_service_targetport_install_edited_handler, | 2073 | "GNUNET_setup_datacache_mysql_port_spinbutton", |
2565 | NULL, | 2074 | "value-changed", |
2566 | NULL | 2075 | "datacache-mysql", |
2567 | }, | 2076 | "PORT", |
2568 | 2077 | gettext_noop ("Port of MySQL database"), | |
2569 | /* END of list */ | 2078 | "https://gnunet.org/configuration-datacache", |
2570 | 2079 | &load_number, | |
2571 | { NULL, NULL, NULL, NULL, NULL, | 2080 | &save_number, NULL, |
2572 | NULL, NULL, NULL, NULL } | 2081 | NULL}, |
2573 | }; | 2082 | |
2083 | { | ||
2084 | "GNUNET_setup_datacache_postgres_config_entry", | ||
2085 | "changed", | ||
2086 | "datacache-postgres", | ||
2087 | "CONFIG", | ||
2088 | gettext_noop ("Configuration for Postgres (passed to PQconnectdb)"), | ||
2089 | "http://www.postgresql.org/docs/8.1/static/libpq.html#LIBPQ-CONNECT", | ||
2090 | &load_text, | ||
2091 | &save_text, NULL, | ||
2092 | NULL}, | ||
2093 | |||
2094 | { | ||
2095 | "GNUNET_setup_vpn_master_interface_entry", | ||
2096 | "changed", | ||
2097 | "vpn", | ||
2098 | "IFNAME", | ||
2099 | gettext_noop ("Name of the virtual interface the GNUnet VPN should create"), | ||
2100 | "https://gnunet.org/configuration-vpn", | ||
2101 | &load_text, | ||
2102 | &save_text, NULL, | ||
2103 | NULL}, | ||
2104 | |||
2105 | { | ||
2106 | "GNUNET_setup_vpn_master_interface_v4_ip_entry", | ||
2107 | "changed", | ||
2108 | "vpn", | ||
2109 | "IPV4ADDR", | ||
2110 | gettext_noop ("IPv4 address to use for the VPN interface"), | ||
2111 | "https://gnunet.org/configuration-vpn", | ||
2112 | &load_text, | ||
2113 | &save_text, NULL, | ||
2114 | NULL}, | ||
2115 | |||
2116 | { | ||
2117 | "GNUNET_setup_vpn_master_interface_v4_mask_entry", | ||
2118 | "changed", | ||
2119 | "vpn", | ||
2120 | "IPV4MASK", | ||
2121 | gettext_noop ("IPv4 network mask to use for the VPN interface"), | ||
2122 | "https://gnunet.org/configuration-vpn", | ||
2123 | &load_text, | ||
2124 | &save_text, NULL, | ||
2125 | NULL}, | ||
2126 | |||
2127 | { | ||
2128 | "GNUNET_setup_vpn_master_interface_v6_ip_entry", | ||
2129 | "changed", | ||
2130 | "vpn", | ||
2131 | "IPV6ADDR", | ||
2132 | gettext_noop ("IPv6 address to use for the VPN interface"), | ||
2133 | "https://gnunet.org/configuration-vpn", | ||
2134 | &load_text, | ||
2135 | &save_text, NULL, | ||
2136 | NULL}, | ||
2137 | |||
2138 | { | ||
2139 | "GNUNET_setup_vpn_master_interface_v6_mask_spinbutton", | ||
2140 | "value-changed", | ||
2141 | "vpn", | ||
2142 | "IPV6MASK", | ||
2143 | gettext_noop ("IPv6 network prefix length to use for the VPN interface"), | ||
2144 | "https://gnunet.org/configuration-vpn", | ||
2145 | &load_number, | ||
2146 | &save_number, NULL, | ||
2147 | NULL}, | ||
2148 | |||
2149 | { | ||
2150 | "GNUNET_setup_vpn_master_vdns_server_entry", | ||
2151 | "changed", | ||
2152 | "vpn", | ||
2153 | "VIRTDNS", | ||
2154 | gettext_noop | ||
2155 | ("IP address of the virtual DNS server that resolves through GNUnet (use in resolve.conf if you want to resolve through some GNUnet DNS Exit)"), | ||
2156 | "https://gnunet.org/configuration-vpn", | ||
2157 | &load_text, | ||
2158 | &save_text, NULL, | ||
2159 | NULL}, | ||
2160 | |||
2161 | { | ||
2162 | "GNUNET_setup_vpn_enable_vpn_exit_checkbutton", | ||
2163 | "toggled", | ||
2164 | "arm", | ||
2165 | "DEFAULTSERVICES", | ||
2166 | gettext_noop | ||
2167 | ("Activate the VPN exit to provide services and/or to enable others to use your Internet connection"), | ||
2168 | "https://gnunet.org/configuration-exit", | ||
2169 | &load_option_list, | ||
2170 | &save_option_list, "exit", | ||
2171 | hide_exit_options}, | ||
2172 | |||
2173 | { | ||
2174 | "GNUNET_setup_vpn_enable_dns_exit_checkbutton", | ||
2175 | "toggled", | ||
2176 | "dns", | ||
2177 | "PROVIDE_EXIT", | ||
2178 | gettext_noop | ||
2179 | ("Allow other peers to perform DNS resolutions using your Internet connection"), | ||
2180 | "https://gnunet.org/configuration-dns", | ||
2181 | &load_yes_no, | ||
2182 | &save_yes_no, NULL, | ||
2183 | NULL}, | ||
2184 | |||
2185 | { | ||
2186 | "GNUNET_setup_vpn_exit_interface_name_entry", | ||
2187 | "changed", | ||
2188 | "exit", | ||
2189 | "IFNAME", | ||
2190 | gettext_noop | ||
2191 | ("Name of the virtual interface the GNUnet exit service should create for traffic exiting the VPN to the Internet"), | ||
2192 | "https://gnunet.org/configuration-exit", | ||
2193 | &load_text, | ||
2194 | &save_text, NULL, | ||
2195 | NULL}, | ||
2196 | |||
2197 | { | ||
2198 | "GNUNET_setup_vpn_exit_interface_v4_ip_entry", | ||
2199 | "changed", | ||
2200 | "exit", | ||
2201 | "IPV4ADDR", | ||
2202 | gettext_noop ("IPv4 address to use for the VPN Exit interface"), | ||
2203 | "https://gnunet.org/configuration-exit", | ||
2204 | &load_text, | ||
2205 | &save_text, NULL, | ||
2206 | NULL}, | ||
2207 | |||
2208 | { | ||
2209 | "GNUNET_setup_vpn_exit_interface_v4_mask_entry", | ||
2210 | "changed", | ||
2211 | "exit", | ||
2212 | "IPV4MASK", | ||
2213 | gettext_noop ("IPv4 network mask to use for the VPN Exit interface"), | ||
2214 | "https://gnunet.org/configuration-exit", | ||
2215 | &load_text, | ||
2216 | &save_text, NULL, | ||
2217 | NULL}, | ||
2218 | |||
2219 | { | ||
2220 | "GNUNET_setup_vpn_exit_interface_v6_ip_entry", | ||
2221 | "changed", | ||
2222 | "exit", | ||
2223 | "IPV6ADDR", | ||
2224 | gettext_noop ("IPv6 address to use for the VPN Exit interface"), | ||
2225 | "https://gnunet.org/configuration-exit", | ||
2226 | &load_text, | ||
2227 | &save_text, NULL, | ||
2228 | NULL}, | ||
2229 | |||
2230 | { | ||
2231 | "GNUNET_setup_vpn_exit_interface_v6_mask_spinbutton", | ||
2232 | "value-changed", | ||
2233 | "exit", | ||
2234 | "IPV6MASK", | ||
2235 | gettext_noop | ||
2236 | ("IPv6 network prefix length to use for the VPN Exit interface"), | ||
2237 | "https://gnunet.org/configuration-exit", | ||
2238 | &load_number, | ||
2239 | &save_number, NULL, | ||
2240 | NULL}, | ||
2241 | |||
2242 | |||
2243 | { | ||
2244 | "GNUNET_setup_vpn_exit_enable_udp_checkbutton", | ||
2245 | "toggled", | ||
2246 | "exit", | ||
2247 | "ENABLE_UDP", | ||
2248 | gettext_noop | ||
2249 | ("Allow other users to use your Internet connection for UDP traffic (via the Exit interface)"), | ||
2250 | "https://gnunet.org/configuration-exit", | ||
2251 | &load_yes_no, | ||
2252 | &save_yes_no, NULL, | ||
2253 | NULL}, | ||
2254 | |||
2255 | { | ||
2256 | "GNUNET_setup_vpn_exit_enable_tcp_checkbutton", | ||
2257 | "toggled", | ||
2258 | "exit", | ||
2259 | "ENABLE_TCP", | ||
2260 | gettext_noop | ||
2261 | ("Allow other users to use your Internet connection for TCP traffic (via the Exit interface)"), | ||
2262 | "https://gnunet.org/configuration-exit", | ||
2263 | &load_yes_no, | ||
2264 | &save_yes_no, NULL, | ||
2265 | NULL}, | ||
2266 | |||
2267 | /* DNS treeview */ | ||
2268 | |||
2269 | { | ||
2270 | "GNUNET_setup_vpn_dns_service_treeview", | ||
2271 | NULL, | ||
2272 | NULL, | ||
2273 | NULL, | ||
2274 | gettext_noop | ||
2275 | ("Specification of .gnunet hostnames and services offered by this peer"), | ||
2276 | "https://gnunet.org/configuration-dns", | ||
2277 | &load_vpn_dns_configuration, | ||
2278 | NULL, NULL, | ||
2279 | NULL}, | ||
2280 | |||
2281 | { | ||
2282 | "GNUNET_setup_vpn_dns_service_dnsname_cellrenderertext", | ||
2283 | "editing-started", | ||
2284 | NULL, | ||
2285 | NULL, | ||
2286 | NULL, | ||
2287 | "https://gnunet.org/configuration-dns", | ||
2288 | NULL, | ||
2289 | &vpn_dns_service_dnsname_install_edited_handler, | ||
2290 | NULL, | ||
2291 | NULL}, | ||
2292 | |||
2293 | { | ||
2294 | "GNUNET_setup_vpn_dns_service_tcpudp_cellrenderertext", | ||
2295 | "editing-started", | ||
2296 | NULL, | ||
2297 | NULL, | ||
2298 | NULL, | ||
2299 | "https://gnunet.org/configuration-dns", | ||
2300 | NULL, | ||
2301 | &vpn_dns_service_tcpudp_install_edited_handler, | ||
2302 | NULL, | ||
2303 | NULL}, | ||
2304 | |||
2305 | { | ||
2306 | "GNUNET_setup_vpn_dns_service_sourceport_cellrenderertext", | ||
2307 | "editing-started", | ||
2308 | NULL, | ||
2309 | NULL, | ||
2310 | NULL, | ||
2311 | "https://gnunet.org/configuration-dns", | ||
2312 | NULL, | ||
2313 | &vpn_dns_service_sourceport_install_edited_handler, | ||
2314 | NULL, | ||
2315 | NULL}, | ||
2316 | |||
2317 | { | ||
2318 | "GNUNET_setup_vpn_dns_service_targethostname_cellrenderertext", | ||
2319 | "editing-started", | ||
2320 | NULL, | ||
2321 | NULL, | ||
2322 | NULL, | ||
2323 | "https://gnunet.org/configuration-dns", | ||
2324 | NULL, | ||
2325 | &vpn_dns_service_targethostname_install_edited_handler, | ||
2326 | NULL, | ||
2327 | NULL}, | ||
2328 | |||
2329 | { | ||
2330 | "GNUNET_setup_vpn_dns_service_targetport_cellrenderertext", | ||
2331 | "editing-started", | ||
2332 | NULL, | ||
2333 | NULL, | ||
2334 | NULL, | ||
2335 | "https://gnunet.org/configuration-dns", | ||
2336 | NULL, | ||
2337 | &vpn_dns_service_targetport_install_edited_handler, | ||
2338 | NULL, | ||
2339 | NULL}, | ||
2340 | |||
2341 | /* END of list */ | ||
2342 | |||
2343 | {NULL, NULL, NULL, NULL, NULL, | ||
2344 | NULL, NULL, NULL, NULL} | ||
2345 | }; | ||
2574 | 2346 | ||
2575 | /* end of gnunet-setup-options.c */ | 2347 | /* end of gnunet-setup-options.c */ |