Freeciv-3.3
Loading...
Searching...
No Matches
optiondlg.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18#include <stdlib.h>
19
20#include <gtk/gtk.h>
21
22/* utility */
23#include "log.h"
24#include "mem.h"
25#include "string_vector.h"
26
27/* client */
28#include "options.h"
29
30/* client/gui-gtk-3.22 */
31#include "colors.h"
32#include "dialogs.h"
33#include "gui_main.h"
34#include "gui_stuff.h"
35#include "pages.h"
36
37#include "optiondlg.h"
38
39
40/* The option dialog data. */
42 const struct option_set *poptset; /* The option set. */
43 GtkWidget *shell; /* The main widget. */
44 GtkWidget *notebook; /* The notebook. */
45 GtkWidget **vboxes; /* Category boxes. */
46 int *box_children; /* The number of children for
47 * each category. */
48};
49
50#define SPECLIST_TAG option_dialog
51#define SPECLIST_TYPE struct option_dialog
52#include "speclist.h"
53#define option_dialogs_iterate(pdialog) \
54 TYPED_LIST_ITERATE(struct option_dialog, option_dialogs, pdialog)
55#define option_dialogs_iterate_end LIST_ITERATE_END
56
57/* All option dialog are set on this list. */
59
60enum {
67};
68
69
70/* Option dialog main functions. */
71static struct option_dialog *
73static struct option_dialog *
74option_dialog_new(const char *name, const struct option_set *poptset);
75static void option_dialog_destroy(struct option_dialog *pdialog);
76
77static void option_dialog_reorder_notebook(struct option_dialog *pdialog);
78static inline void option_dialog_foreach(struct option_dialog *pdialog,
79 void (*option_action)
80 (struct option *));
81
82/* Option dialog option-specific functions. */
83static void option_dialog_option_add(struct option_dialog *pdialog,
84 struct option *poption,
85 bool reorder_notebook);
86static void option_dialog_option_remove(struct option_dialog *pdialog,
87 struct option *poption);
88
90static void option_dialog_option_reset(struct option *poption);
91static void option_dialog_option_apply(struct option *poption);
92
93
94/************************************************************************/
99{
100 struct option_dialog *pdialog = (struct option_dialog *) data;
101
102 switch (response_id) {
103 case RESPONSE_CANCEL:
105 break;
106 case RESPONSE_OK:
109 break;
110 case RESPONSE_APPLY:
112 break;
113 case RESPONSE_RESET:
115 break;
116 case RESPONSE_REFRESH:
118 break;
119 case RESPONSE_SAVE:
122 break;
123 }
124}
125
126/************************************************************************/
130{
131 struct option_dialog *pdialog = (struct option_dialog *) data;
132
133 if (NULL != pdialog->shell) {
134 /* Mark as destroyed, see also option_dialog_destroy(). */
135 pdialog->shell = NULL;
136 option_dialog_destroy(pdialog);
137 }
138}
139
140/************************************************************************/
144{
145 struct option *poption = (struct option *) data;
147
148 if (NULL != pdialog) {
150 }
151}
152
153/************************************************************************/
157{
158 struct option *poption = (struct option *) data;
160
161 if (NULL != pdialog) {
163 }
164}
165
166/************************************************************************/
170{
171 struct option *poption = (struct option *) data;
173
174 if (NULL != pdialog) {
176 }
177}
178
179/************************************************************************/
184 gpointer data)
185{
186 struct option *poption = (struct option *) data;
187 GtkWidget *menu, *item;
188
189 if (3 != event->button || !option_is_changeable(poption)) {
190 /* Only right button please! */
191 return FALSE;
192 }
193
194 menu = gtk_menu_new();
195
196 item = gtk_menu_item_new_with_label(_("Refresh this option"));
198 g_signal_connect(item, "activate",
200
201 item = gtk_menu_item_new_with_label(_("Reset this option"));
203 g_signal_connect(item, "activate",
205
206 item = gtk_menu_item_new_with_label(_("Apply the changes for this option"));
208 g_signal_connect(item, "activate",
210
213
214 return TRUE;
215}
216
217/************************************************************************/
220static struct option_dialog *
222{
223 if (NULL != option_dialogs) {
224 option_dialogs_iterate(pdialog) {
225 if (pdialog->poptset == poptset) {
226 return pdialog;
227 }
229 }
230 return NULL;
231}
232
233/************************************************************************/
237{
238 GdkRGBA *color = (GdkRGBA *) data;
239
240 if (NULL != color) {
242 }
243}
244
245/************************************************************************/
249 const GdkRGBA *new_color)
250{
251 GdkRGBA *current_color = g_object_get_data(G_OBJECT(button), "color");
252 GtkWidget *child;
253
254 if (NULL == new_color) {
255 if (NULL != current_color) {
256 g_object_set_data(G_OBJECT(button), "color", NULL);
257 if ((child = gtk_bin_get_child(GTK_BIN(button)))) {
258 gtk_widget_destroy(child);
259 }
260 }
261 } else {
263
264 /* Apply the new color. */
265 if (NULL != current_color) {
266 /* We already have a GdkRGBA pointer. */
268 } else {
269 /* We need to make a GdkRGBA pointer. */
273 }
274 if ((child = gtk_bin_get_child(GTK_BIN(button)))) {
275 gtk_widget_destroy(child);
276 }
277
278 /* Update the button. */
279 {
281 CAIRO_FORMAT_RGB24, 16, 16);
282 cairo_t *cr = cairo_create(surface);
284 cairo_paint(cr);
285 cairo_destroy(cr);
286 pixbuf = gdk_pixbuf_get_from_surface(surface, 0, 0, 16, 16);
287 cairo_surface_destroy(surface);
288 }
290 gtk_container_add(GTK_CONTAINER(button), child);
291 gtk_widget_show(child);
293 }
294}
295
296/************************************************************************/
300 gint res, gpointer data)
301{
302 if (res == GTK_RESPONSE_REJECT) {
303 /* Clears the current color. */
305 } else if (res == GTK_RESPONSE_OK) {
306 /* Apply the new color. */
308 GTK_COLOR_CHOOSER(g_object_get_data(G_OBJECT(dialog), "chooser"));
310
313 }
314
316}
317
318/************************************************************************/
322{
323 GtkWidget *dialog, *chooser;
324 GdkRGBA *current_color = g_object_get_data(G_OBJECT(button), "color");
325
326 dialog = gtk_dialog_new_with_buttons(_("Select a color"), NULL,
328 _("_Cancel"), GTK_RESPONSE_CANCEL,
329 _("C_lear"), GTK_RESPONSE_REJECT,
330 _("_OK"), GTK_RESPONSE_OK, NULL);
331 setup_dialog(dialog, toplevel);
332 g_signal_connect(dialog, "response",
334
336 g_object_set_data(G_OBJECT(dialog), "chooser", chooser);
338 FALSE, FALSE, 0);
339 if (current_color) {
341 }
342
343 gtk_widget_show_all(dialog);
344}
345
346
347/************************************************************************/
350static struct option_dialog *
351option_dialog_new(const char *name, const struct option_set *poptset)
352{
353 struct option_dialog *pdialog;
355
356 /* Create the dialog structure. */
357 pdialog = fc_malloc(sizeof(*pdialog));
358 pdialog->poptset = poptset;
360 _("_Cancel"), RESPONSE_CANCEL,
361 _("_Save"), RESPONSE_SAVE,
362 _("_Refresh"), RESPONSE_REFRESH,
363 _("Reset"), RESPONSE_RESET,
364 _("_Apply"), RESPONSE_APPLY,
365 _("_OK"), RESPONSE_OK, NULL);
366 pdialog->notebook = gtk_notebook_new();
367 pdialog->vboxes = fc_calloc(CATEGORY_NUM, sizeof(*pdialog->vboxes));
369 sizeof(*pdialog->box_children));
370
371 /* Append to the option dialog list. */
372 if (NULL == option_dialogs) {
374 }
376
377 /* Shell */
378 setup_dialog(pdialog->shell, toplevel);
380 gtk_window_set_default_size(GTK_WINDOW(pdialog->shell), -1, 480);
381 g_signal_connect(pdialog->shell, "response",
383 g_signal_connect(pdialog->shell, "destroy",
385
387 pdialog->notebook, TRUE, TRUE, 0);
388
389 /* Add the options. */
393
395
396 /* Show the widgets. */
397 gtk_widget_show_all(pdialog->shell);
398
399 return pdialog;
400}
401
402/************************************************************************/
405static void option_dialog_destroy(struct option_dialog *pdialog)
406{
407 GtkWidget *shell = pdialog->shell;
408
409 if (NULL != option_dialogs) {
411 }
412
413 options_iterate(pdialog->poptset, poption) {
416
417 if (NULL != shell) {
418 /* Maybe already destroyed, see also option_dialog_destroy_callback(). */
419 pdialog->shell = NULL;
421 }
422
423 free(pdialog->vboxes);
424 free(pdialog->box_children);
425 free(pdialog);
426}
427
428/************************************************************************/
431static int option_dialog_pages_sort_func(const void *w1, const void *w2)
432{
433 GObject *obj1 = G_OBJECT(*(GtkWidget **) w1);
434 GObject *obj2 = G_OBJECT(*(GtkWidget **) w2);
435
436 return (GPOINTER_TO_INT(g_object_get_data(obj1, "category"))
437 - GPOINTER_TO_INT(g_object_get_data(obj2, "category")));
438}
439
440/************************************************************************/
444{
447
448 if (0 < pages_num) {
449 GtkWidget *pages[pages_num];
450 int i;
451
452 for (i = 0; i < pages_num; i++) {
454 }
455 qsort(pages, pages_num, sizeof(*pages), option_dialog_pages_sort_func);
456 for (i = 0; i < pages_num; i++) {
458 }
459 }
460}
461
462/************************************************************************/
465static inline void option_dialog_foreach(struct option_dialog *pdialog,
466 void (*option_action)
467 (struct option *))
468{
469 fc_assert_ret(NULL != pdialog);
470
471 options_iterate(pdialog->poptset, poption) {
474}
475
476/************************************************************************/
479static void option_dialog_option_add(struct option_dialog *pdialog,
480 struct option *poption,
481 bool reorder_notebook)
482{
483 const int category = option_category(poption);
484 GtkWidget *main_hbox, *label, *ebox, *w = NULL;
485
487
488 /* Add category if needed. */
489 if (NULL == pdialog->vboxes[category]) {
490 GtkWidget *sw;
491
496 g_object_set_data(G_OBJECT(sw), "category", GINT_TO_POINTER(category));
500
501 if (reorder_notebook) {
503 }
504
505 pdialog->vboxes[category] = gtk_grid_new();
508 g_object_set(pdialog->vboxes[category], "margin", 8, NULL);
509 gtk_widget_set_hexpand(pdialog->vboxes[category], TRUE);
510 gtk_container_add(GTK_CONTAINER(sw), pdialog->vboxes[category]);
511
513 }
514 pdialog->box_children[category]++;
515
516 ebox = gtk_event_box_new();
518 gtk_container_add(GTK_CONTAINER(pdialog->vboxes[category]), ebox);
519 g_signal_connect(ebox, "button_press_event",
521
524 g_object_set(label, "margin", 2, NULL);
527
528 switch (option_type(poption)) {
529 case OT_BOOLEAN:
531 break;
532
533 case OT_INTEGER:
534 {
535 int min = option_int_min(poption), max = option_int_max(poption);
536
537 w = gtk_spin_button_new_with_range(min, max, MAX((max - min) / 50, 1));
538 }
539 break;
540
541 case OT_STRING:
542 {
543 const struct strvec *values = option_str_values(poption);
544
545 if (NULL != values) {
547 strvec_iterate(values, value) {
550 } else {
551 w = gtk_entry_new();
552 }
553 }
554 break;
555
556 case OT_ENUM:
557 {
558 int i;
559 const char *str;
560 GtkListStore *model;
561 GtkCellRenderer *renderer;
563
564 /* 0: enum index, 1: translated enum name. */
567 g_object_unref(model);
568
569 renderer = gtk_cell_renderer_text_new();
572 "text", 1, NULL);
573 for (i = 0; (str = option_enum_int_to_str(poption, i)); i++) {
575 gtk_list_store_set(model, &iter, 0, i, 1, _(str), -1);
576 }
577 }
578 break;
579
580 case OT_BITWISE:
581 {
582 GList *list = NULL;
583 GtkWidget *grid, *check;
584 const struct strvec *values = option_bitwise_values(poption);
585 int i;
586
587 w = gtk_frame_new(NULL);
588 grid = gtk_grid_new();
592 for (i = 0; i < strvec_size(values); i++) {
594 gtk_grid_attach(GTK_GRID(grid), check, 0, i, 1, 1);
595 label = gtk_label_new(_(strvec_get(values, i)));
596 gtk_grid_attach(GTK_GRID(grid), label, 1, i, 1, 1);
598 }
599 g_object_set_data_full(G_OBJECT(w), "check_buttons", list,
601 }
602 break;
603
604 case OT_FONT:
606 g_object_set(G_OBJECT(w), "use-font", TRUE, NULL);
607 break;
608
609 case OT_COLOR:
610 {
611 GtkWidget *button;
612
613 w = gtk_grid_new();
616
617 /* Foreground color selector button. */
618 button = gtk_button_new();
621 _("Select the text color"));
622 g_object_set_data(G_OBJECT(w), "fg_button", button);
623 g_signal_connect(button, "clicked",
625
626 /* Background color selector button. */
627 button = gtk_button_new();
630 _("Select the background color"));
631 g_object_set_data(G_OBJECT(w), "bg_button", button);
632 g_signal_connect(button, "clicked",
634 }
635 break;
636
637 case OT_VIDEO_MODE:
638 log_error("Option type %s (%d) not supported yet.",
641 break;
642 }
643
645 if (NULL == w) {
646 log_error("Failed to create a widget for option %d \"%s\".",
648 } else {
649 g_object_set_data(G_OBJECT(w), "main_widget", ebox);
653 }
654
656
657 /* Set as current value. */
659}
660
661/************************************************************************/
664static void option_dialog_option_remove(struct option_dialog *pdialog,
665 struct option *poption)
666{
668
669 if (NULL != object) {
670 const int category = option_category(poption);
671
673 gtk_widget_destroy(GTK_WIDGET(g_object_get_data(object, "main_widget")));
674
675 /* Remove category if needed. */
676 if (0 == --pdialog->box_children[category]) {
678 pdialog->vboxes[category] = NULL;
679 }
680 }
681}
682
683/************************************************************************/
687 bool value)
688{
691 value);
692}
693
694/************************************************************************/
697static inline void option_dialog_option_int_set(struct option *poption,
698 int value)
699{
701 value);
702}
703
704/************************************************************************/
707static inline void option_dialog_option_str_set(struct option *poption,
708 const char *string)
709{
712 (option_get_gui_data(poption)))), string);
713 } else {
715 }
716}
717
718/************************************************************************/
722 int value)
723{
727 int i;
728
729 if (gtk_tree_model_get_iter_first(model, &iter)) {
730 do {
731 gtk_tree_model_get(model, &iter, 0, &i, -1);
732 if (i == value) {
734 return;
735 }
736 } while (gtk_tree_model_iter_next(model, &iter));
737 }
738
739 log_error("Didn't find the value %d for option \"%s\" (nb %d).",
741}
742
743/************************************************************************/
747 unsigned value)
748{
750 GList *iter = g_object_get_data(data, "check_buttons");
751 int bit;
752
753 for (bit = 0; NULL != iter; iter = g_list_next(iter), bit++) {
755 value & (1 << bit));
756 }
757}
758
759/************************************************************************/
763 const char *font)
764{
767}
768
769/************************************************************************/
773 struct ft_color color)
774{
777
778 /* Update the foreground button. */
779 if (NULL != color.foreground
780 && '\0' != color.foreground[0]
781 && gdk_rgba_parse(&gdk_color, color.foreground)) {
783 "fg_button"),
784 &gdk_color);
785 } else {
787 "fg_button"), NULL);
788 }
789
790 /* Update the background button. */
791 if (NULL != color.background
792 && '\0' != color.background[0]
793 && gdk_rgba_parse(&gdk_color, color.background)) {
795 "bg_button"),
796 &gdk_color);
797 } else {
799 "bg_button"), NULL);
800 }
801}
802
803/************************************************************************/
840
841/************************************************************************/
875
876/************************************************************************/
880{
882
883 switch (option_type(poption)) {
884 case OT_BOOLEAN:
886 (GTK_TOGGLE_BUTTON(w)));
887 break;
888
889 case OT_INTEGER:
891 (GTK_SPIN_BUTTON(w)));
892 break;
893
894 case OT_STRING:
898 } else {
900 }
901 break;
902
903 case OT_ENUM:
904 {
906 int value;
907
909 break;
910 }
911
913 &iter, 0, &value, -1);
915 }
916 break;
917
918 case OT_BITWISE:
919 {
920 GList *iter = g_object_get_data(G_OBJECT(w), "check_buttons");
921 unsigned value = 0;
922 int bit;
923
924 for (bit = 0; NULL != iter; iter = g_list_next(iter), bit++) {
926 value |= 1 << bit;
927 }
928 }
930 }
931 break;
932
933 case OT_FONT:
935 (GTK_FONT_CHOOSER(w)));
936 break;
937
938 case OT_COLOR:
939 {
941 GObject *button;
942 GdkRGBA *color;
943
944 /* Get foreground color. */
945 button = g_object_get_data(G_OBJECT(w), "fg_button");
946 color = g_object_get_data(button, "color");
948
949 /* Get background color. */
950 button = g_object_get_data(G_OBJECT(w), "bg_button");
951 color = g_object_get_data(button, "color");
953
958 }
959 break;
960
961 case OT_VIDEO_MODE:
962 log_error("Option type %s (%d) not supported yet.",
965 break;
966 }
967}
968
969/************************************************************************/
972void option_dialog_popup(const char *name, const struct option_set *poptset)
973{
974 struct option_dialog *pdialog = option_dialog_get(poptset);
975
976 if (NULL != pdialog) {
978 } else {
980 }
981}
982
983/************************************************************************/
987{
988 struct option_dialog *pdialog = option_dialog_get(poptset);
989
990 if (NULL != pdialog) {
991 option_dialog_destroy(pdialog);
992 }
993}
994
995/************************************************************************/
1000{
1002 if (strcmp(option_name(poption), "aifill") == 0) {
1004 } else if (strcmp(option_name(poption), "nationset") == 0) {
1006 }
1007 }
1008}
1009
1010/************************************************************************/
1014{
1016
1017 if (NULL != pdialog) {
1019 }
1020
1022}
1023
1024/************************************************************************/
1028{
1030
1031 if (NULL != pdialog) {
1033 }
1034
1036}
1037
1038/************************************************************************/
1042{
1044
1045 if (NULL != pdialog) {
1047 }
1048}
#define str
Definition astring.c:76
static struct fc_sockaddr_list * list
Definition clinet.c:102
char * incite_cost
Definition comments.c:76
enum event_type event
Definition events.c:81
#define _(String)
Definition fcintl.h:67
static struct ft_color ft_color_construct(const char *foreground, const char *background)
void nationset_sync_to_server(const char *nationset)
Definition dialogs.c:801
GtkWidget * toplevel
Definition gui_main.c:126
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
Definition gui_stuff.c:287
static struct gui_dialog * shell
Definition messagedlg.c:39
static void option_dialog_destroy_callback(GtkWidget *object, gpointer data)
Definition optiondlg.c:129
static void color_selector_response_callback(GtkDialog *dialog, gint res, gpointer data)
Definition optiondlg.c:299
static struct option_dialog * option_dialog_get(const struct option_set *poptset)
Definition optiondlg.c:221
void option_gui_remove(struct option *poption)
Definition optiondlg.c:1041
static void option_dialog_option_refresh(struct option *poption)
Definition optiondlg.c:806
void option_dialog_popdown(const struct option_set *poptset)
Definition optiondlg.c:986
static void option_dialog_option_color_set(struct option *poption, struct ft_color color)
Definition optiondlg.c:772
static void option_color_set_button_color(GtkButton *button, const GdkRGBA *new_color)
Definition optiondlg.c:248
static void option_dialog_option_add(struct option_dialog *pdialog, struct option *poption, bool reorder_notebook)
Definition optiondlg.c:479
#define option_dialogs_iterate_end
Definition optiondlg.c:55
static void option_dialog_option_bitwise_set(struct option *poption, unsigned value)
Definition optiondlg.c:746
static void option_dialog_destroy(struct option_dialog *pdialog)
Definition optiondlg.c:405
static void option_dialog_option_bool_set(struct option *poption, bool value)
Definition optiondlg.c:686
@ RESPONSE_SAVE
Definition optiondlg.c:66
@ RESPONSE_APPLY
Definition optiondlg.c:63
@ RESPONSE_CANCEL
Definition optiondlg.c:61
@ RESPONSE_OK
Definition optiondlg.c:62
@ RESPONSE_RESET
Definition optiondlg.c:64
@ RESPONSE_REFRESH
Definition optiondlg.c:65
static void option_dialog_option_remove(struct option_dialog *pdialog, struct option *poption)
Definition optiondlg.c:664
void option_gui_add(struct option *poption)
Definition optiondlg.c:1027
static void option_color_select_callback(GtkButton *button, gpointer data)
Definition optiondlg.c:321
static void option_dialog_option_int_set(struct option *poption, int value)
Definition optiondlg.c:697
static void option_dialog_reponse_callback(GtkDialog *dialog, gint response_id, gpointer data)
Definition optiondlg.c:97
#define option_dialogs_iterate(pdialog)
Definition optiondlg.c:53
static void option_gui_update_extra(struct option *poption)
Definition optiondlg.c:999
static void option_apply_callback(GtkMenuItem *menuitem, gpointer data)
Definition optiondlg.c:169
static void option_color_destroy_notify(gpointer data)
Definition optiondlg.c:236
static void option_dialog_option_font_set(struct option *poption, const char *font)
Definition optiondlg.c:762
void option_gui_update(struct option *poption)
Definition optiondlg.c:1013
static int option_dialog_pages_sort_func(const void *w1, const void *w2)
Definition optiondlg.c:431
void option_dialog_popup(const char *name, const struct option_set *poptset)
Definition optiondlg.c:972
static void option_dialog_reorder_notebook(struct option_dialog *pdialog)
Definition optiondlg.c:443
static void option_dialog_option_apply(struct option *poption)
Definition optiondlg.c:879
static gboolean option_button_press_callback(GtkWidget *widget, GdkEventButton *event, gpointer data)
Definition optiondlg.c:182
static void option_dialog_option_reset(struct option *poption)
Definition optiondlg.c:844
static void option_reset_callback(GtkMenuItem *menuitem, gpointer data)
Definition optiondlg.c:156
static void option_dialog_foreach(struct option_dialog *pdialog, void(*option_action)(struct option *))
Definition optiondlg.c:465
static void option_dialog_option_str_set(struct option *poption, const char *string)
Definition optiondlg.c:707
static struct option_dialog_list * option_dialogs
Definition optiondlg.c:58
static void option_dialog_option_enum_set(struct option *poption, int value)
Definition optiondlg.c:721
static void option_refresh_callback(GtkMenuItem *menuitem, gpointer data)
Definition optiondlg.c:143
void ai_fill_changed_by_server(int aifill)
Definition pages.c:1653
static struct option_dialog * option_dialog_new(void)
Definition optiondlg.c:788
const char * name
Definition inputfile.c:127
#define fc_assert_ret(condition)
Definition log.h:192
#define fc_assert(condition)
Definition log.h:177
#define log_error(message,...)
Definition log.h:104
#define fc_calloc(n, esz)
Definition mem.h:38
#define fc_malloc(sz)
Definition mem.h:34
const struct strvec * option_str_values(const struct option *poption)
Definition options.c:951
unsigned option_bitwise_def(const struct option *poption)
Definition options.c:1121
int option_int_min(const struct option *poption)
Definition options.c:892
bool option_bool_def(const struct option *poption)
Definition options.c:844
const char * option_font_def(const struct option *poption)
Definition options.c:1188
const struct option_set * server_optset
Definition options.c:4278
const char * option_description(const struct option *poption)
Definition options.c:674
const char * option_help_text(const struct option *poption)
Definition options.c:684
struct ft_color option_color_get(const struct option *poption)
Definition options.c:1226
int option_enum_get_int(const struct option *poption)
Definition options.c:1016
int option_number(const struct option *poption)
Definition options.c:654
int option_category(const struct option *poption)
Definition options.c:704
bool option_str_set(struct option *poption, const char *str)
Definition options.c:962
const char * option_name(const struct option *poption)
Definition options.c:664
int option_int_get(const struct option *poption)
Definition options.c:870
bool option_color_set(struct option *poption, struct ft_color color)
Definition options.c:1249
bool option_bool_set(struct option *poption, bool val)
Definition options.c:855
bool option_is_changeable(const struct option *poption)
Definition options.c:725
void option_set_gui_data(struct option *poption, void *data)
Definition options.c:803
const char * option_str_get(const struct option *poption)
Definition options.c:929
void * option_get_gui_data(const struct option *poption)
Definition options.c:813
bool option_enum_set_int(struct option *poption, int val)
Definition options.c:1076
bool option_bool_get(const struct option *poption)
Definition options.c:833
int optset_category_number(const struct option_set *poptset)
Definition options.c:493
enum option_type option_type(const struct option *poption)
Definition options.c:694
const char * option_enum_int_to_str(const struct option *poption, int val)
Definition options.c:1001
const struct option_set * option_optset(const struct option *poption)
Definition options.c:644
const char * option_str_def(const struct option *poption)
Definition options.c:940
int option_int_max(const struct option *poption)
Definition options.c:903
bool option_font_set(struct option *poption, const char *font)
Definition options.c:1210
void options_save(option_save_log_callback log_cb)
Definition options.c:6340
const struct strvec * option_bitwise_values(const struct option *poption)
Definition options.c:1149
bool option_bitwise_set(struct option *poption, unsigned val)
Definition options.c:1160
const char * option_font_get(const struct option *poption)
Definition options.c:1177
void desired_settable_options_update(void)
Definition options.c:5791
struct ft_color option_color_def(const struct option *poption)
Definition options.c:1237
unsigned option_bitwise_get(const struct option *poption)
Definition options.c:1110
int option_enum_def_int(const struct option *poption)
Definition options.c:1040
bool option_int_set(struct option *poption, int val)
Definition options.c:914
const char * option_category_name(const struct option *poption)
Definition options.c:714
int option_int_def(const struct option *poption)
Definition options.c:881
#define options_iterate(poptset, poption)
Definition options.h:587
#define options_iterate_end
Definition options.h:592
#define MAX(x, y)
Definition shared.h:54
const char * strvec_get(const struct strvec *psv, size_t svindex)
size_t strvec_size(const struct strvec *psv)
#define strvec_iterate(psv, str)
#define strvec_iterate_end
Definition colors.h:21
Definition climisc.h:82
int * box_children
Definition optiondlg.c:46
GtkWidget ** vboxes
Definition optiondlg.c:45
GtkWidget * shell
Definition optiondlg.c:43
const struct option_set * poptset
Definition optiondlg.c:42
GtkWidget * notebook
Definition optiondlg.c:44
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47