Freeciv-3.2
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
39static int opt_dlog_width = -1, opt_dlog_height = 480;
40
41/* The option dialog data. */
43 const struct option_set *poptset; /* The option set. */
44 GtkWidget *shell; /* The main widget. */
45 GtkWidget *notebook; /* The notebook. */
46 GtkWidget **vboxes; /* Category boxes. */
47 int *box_children; /* The number of children for
48 * each category. */
49};
50
51#define SPECLIST_TAG option_dialog
52#define SPECLIST_TYPE struct option_dialog
53#include "speclist.h"
54#define option_dialogs_iterate(pdialog) \
55 TYPED_LIST_ITERATE(struct option_dialog, option_dialogs, pdialog)
56#define option_dialogs_iterate_end LIST_ITERATE_END
57
58/* All option dialog are set on this list. */
60
61enum {
68};
69
70
71/* Option dialog main functions. */
72static struct option_dialog *
74static struct option_dialog *
75option_dialog_new(const char *name, const struct option_set *poptset);
76static void option_dialog_destroy(struct option_dialog *pdialog);
77
78static void option_dialog_reorder_notebook(struct option_dialog *pdialog);
79static inline void option_dialog_foreach(struct option_dialog *pdialog,
80 void (*option_action)
81 (struct option *));
82
83/* Option dialog option-specific functions. */
84static void option_dialog_option_add(struct option_dialog *pdialog,
85 struct option *poption,
86 bool reorder_notebook);
87static void option_dialog_option_remove(struct option_dialog *pdialog,
88 struct option *poption);
89
91static void option_dialog_option_reset(struct option *poption);
92static void option_dialog_option_apply(struct option *poption);
93
94
95/************************************************************************/
100{
101 struct option_dialog *pdialog = (struct option_dialog *) data;
102
103 switch (response_id) {
104 case RESPONSE_CANCEL:
106 break;
107 case RESPONSE_OK:
110 break;
111 case RESPONSE_APPLY:
113 break;
114 case RESPONSE_RESET:
116 break;
117 case RESPONSE_REFRESH:
119 break;
120 case RESPONSE_SAVE:
123 break;
124 }
125}
126
127/************************************************************************/
131{
132 struct option_dialog *pdialog = (struct option_dialog *) data;
135 int baseline;
136
137 /* Save size of the dialog. */
143
144 if (NULL != pdialog->shell) {
145 /* Mark as destroyed, see also option_dialog_destroy(). */
146 pdialog->shell = NULL;
147 option_dialog_destroy(pdialog);
148 }
149}
150
151/************************************************************************/
155{
156 struct option *poption = (struct option *) data;
158
159 if (NULL != pdialog) {
161 }
162}
163
164/************************************************************************/
168{
169 struct option *poption = (struct option *) data;
171
172 if (NULL != pdialog) {
174 }
175}
176
177/************************************************************************/
181{
182 struct option *poption = (struct option *) data;
184
185 if (NULL != pdialog) {
187 }
188}
189
190/************************************************************************/
195 gpointer data)
196{
197 struct option *poption = (struct option *) data;
198 GtkWidget *menu, *item;
199
200 if (3 != event->button || !option_is_changeable(poption)) {
201 /* Only right button please! */
202 return FALSE;
203 }
204
205 menu = gtk_menu_new();
206
207 item = gtk_menu_item_new_with_label(_("Refresh this option"));
209 g_signal_connect(item, "activate",
211
212 item = gtk_menu_item_new_with_label(_("Reset this option"));
214 g_signal_connect(item, "activate",
216
217 item = gtk_menu_item_new_with_label(_("Apply the changes for this option"));
219 g_signal_connect(item, "activate",
221
224
225 return TRUE;
226}
227
228/************************************************************************/
231static struct option_dialog *
233{
234 if (NULL != option_dialogs) {
235 option_dialogs_iterate(pdialog) {
236 if (pdialog->poptset == poptset) {
237 return pdialog;
238 }
240 }
241 return NULL;
242}
243
244/************************************************************************/
248{
249 GdkRGBA *color = (GdkRGBA *) data;
250
251 if (NULL != color) {
253 }
254}
255
256/************************************************************************/
260 const GdkRGBA *new_color)
261{
262 GdkRGBA *current_color = g_object_get_data(G_OBJECT(button), "color");
263 GtkWidget *child;
264
265 if (NULL == new_color) {
266 if (NULL != current_color) {
267 g_object_set_data(G_OBJECT(button), "color", NULL);
268 if ((child = gtk_bin_get_child(GTK_BIN(button)))) {
269 gtk_widget_destroy(child);
270 }
271 }
272 } else {
274
275 /* Apply the new color. */
276 if (NULL != current_color) {
277 /* We already have a GdkRGBA pointer. */
279 } else {
280 /* We need to make a GdkRGBA pointer. */
284 }
285 if ((child = gtk_bin_get_child(GTK_BIN(button)))) {
286 gtk_widget_destroy(child);
287 }
288
289 /* Update the button. */
290 {
292 CAIRO_FORMAT_RGB24, 16, 16);
293 cairo_t *cr = cairo_create(surface);
295 cairo_paint(cr);
296 cairo_destroy(cr);
297 pixbuf = gdk_pixbuf_get_from_surface(surface, 0, 0, 16, 16);
298 cairo_surface_destroy(surface);
299 }
301 gtk_container_add(GTK_CONTAINER(button), child);
302 gtk_widget_show(child);
304 }
305}
306
307/************************************************************************/
311 gint res, gpointer data)
312{
313 if (res == GTK_RESPONSE_REJECT) {
314 /* Clears the current color. */
316 } else if (res == GTK_RESPONSE_OK) {
317 /* Apply the new color. */
319 GTK_COLOR_CHOOSER(g_object_get_data(G_OBJECT(dialog), "chooser"));
321
324 }
325
327}
328
329/************************************************************************/
333{
334 GtkWidget *dialog, *chooser;
335 GdkRGBA *current_color = g_object_get_data(G_OBJECT(button), "color");
336
337 dialog = gtk_dialog_new_with_buttons(_("Select a color"), NULL,
339 _("_Cancel"), GTK_RESPONSE_CANCEL,
340 _("C_lear"), GTK_RESPONSE_REJECT,
341 _("_OK"), GTK_RESPONSE_OK, NULL);
342 setup_dialog(dialog, toplevel);
343 g_signal_connect(dialog, "response",
345
347 g_object_set_data(G_OBJECT(dialog), "chooser", chooser);
349 FALSE, FALSE, 0);
350 if (current_color) {
352 }
353
354 gtk_widget_show_all(dialog);
355}
356
357
358/************************************************************************/
361static struct option_dialog *
362option_dialog_new(const char *name, const struct option_set *poptset)
363{
364 struct option_dialog *pdialog;
366
367 /* Create the dialog structure. */
368 pdialog = fc_malloc(sizeof(*pdialog));
369 pdialog->poptset = poptset;
371 _("_Cancel"), RESPONSE_CANCEL,
372 _("_Save"), RESPONSE_SAVE,
373 _("_Refresh"), RESPONSE_REFRESH,
374 _("Reset"), RESPONSE_RESET,
375 _("_Apply"), RESPONSE_APPLY,
376 _("_OK"), RESPONSE_OK, NULL);
377 pdialog->notebook = gtk_notebook_new();
378 pdialog->vboxes = fc_calloc(CATEGORY_NUM, sizeof(*pdialog->vboxes));
380 sizeof(*pdialog->box_children));
381
382 /* Append to the option dialog list. */
383 if (NULL == option_dialogs) {
385 }
387
388 /* Shell */
389 setup_dialog(pdialog->shell, toplevel);
394 g_signal_connect(pdialog->shell, "response",
396 g_signal_connect(pdialog->shell, "destroy",
398
400 pdialog->notebook, TRUE, TRUE, 0);
401
402 /* Add the options. */
406
408
409 /* Show the widgets. */
410 gtk_widget_show_all(pdialog->shell);
411
412 return pdialog;
413}
414
415/************************************************************************/
418static void option_dialog_destroy(struct option_dialog *pdialog)
419{
420 GtkWidget *shell = pdialog->shell;
421
422 if (NULL != option_dialogs) {
424 }
425
426 options_iterate(pdialog->poptset, poption) {
429
430 if (NULL != shell) {
431 /* Maybe already destroyed, see also option_dialog_destroy_callback(). */
432 pdialog->shell = NULL;
434 }
435
436 free(pdialog->vboxes);
437 free(pdialog->box_children);
438 free(pdialog);
439}
440
441/************************************************************************/
444static int option_dialog_pages_sort_func(const void *w1, const void *w2)
445{
446 GObject *obj1 = G_OBJECT(*(GtkWidget **) w1);
447 GObject *obj2 = G_OBJECT(*(GtkWidget **) w2);
448
449 return (GPOINTER_TO_INT(g_object_get_data(obj1, "category"))
450 - GPOINTER_TO_INT(g_object_get_data(obj2, "category")));
451}
452
453/************************************************************************/
457{
460
461 if (0 < pages_num) {
462 GtkWidget *pages[pages_num];
463 int i;
464
465 for (i = 0; i < pages_num; i++) {
467 }
468 qsort(pages, pages_num, sizeof(*pages), option_dialog_pages_sort_func);
469 for (i = 0; i < pages_num; i++) {
471 }
472 }
473}
474
475/************************************************************************/
478static inline void option_dialog_foreach(struct option_dialog *pdialog,
479 void (*option_action)
480 (struct option *))
481{
482 fc_assert_ret(NULL != pdialog);
483
484 options_iterate(pdialog->poptset, poption) {
487}
488
489/************************************************************************/
492static void option_dialog_option_add(struct option_dialog *pdialog,
493 struct option *poption,
494 bool reorder_notebook)
495{
496 const int category = option_category(poption);
497 GtkWidget *main_hbox, *label, *ebox, *w = NULL;
498
500
501 /* Add category if needed. */
502 if (NULL == pdialog->vboxes[category]) {
503 GtkWidget *sw;
504
509 g_object_set_data(G_OBJECT(sw), "category", GINT_TO_POINTER(category));
513
514 if (reorder_notebook) {
516 }
517
518 pdialog->vboxes[category] = gtk_grid_new();
521 g_object_set(pdialog->vboxes[category], "margin", 8, NULL);
522 gtk_widget_set_hexpand(pdialog->vboxes[category], TRUE);
523 gtk_container_add(GTK_CONTAINER(sw), pdialog->vboxes[category]);
524
526 }
527 pdialog->box_children[category]++;
528
529 ebox = gtk_event_box_new();
531 gtk_container_add(GTK_CONTAINER(pdialog->vboxes[category]), ebox);
532 g_signal_connect(ebox, "button_press_event",
534
537 g_object_set(label, "margin", 2, NULL);
540
541 switch (option_type(poption)) {
542 case OT_BOOLEAN:
544 break;
545
546 case OT_INTEGER:
547 {
548 int min = option_int_min(poption), max = option_int_max(poption);
549
550 w = gtk_spin_button_new_with_range(min, max, MAX((max - min) / 50, 1));
551 }
552 break;
553
554 case OT_STRING:
555 {
556 const struct strvec *values = option_str_values(poption);
557
558 if (NULL != values) {
560 strvec_iterate(values, value) {
563 } else {
564 w = gtk_entry_new();
565 }
566 }
567 break;
568
569 case OT_ENUM:
570 {
571 int i;
572 const char *str;
573 GtkListStore *model;
574 GtkCellRenderer *renderer;
576
577 /* 0: enum index, 1: translated enum name. */
580 g_object_unref(model);
581
582 renderer = gtk_cell_renderer_text_new();
585 "text", 1, NULL);
586 for (i = 0; (str = option_enum_int_to_str(poption, i)); i++) {
588 gtk_list_store_set(model, &iter, 0, i, 1, _(str), -1);
589 }
590 }
591 break;
592
593 case OT_BITWISE:
594 {
595 GList *list = NULL;
596 GtkWidget *grid, *check;
597 const struct strvec *values = option_bitwise_values(poption);
598 int i;
599
600 w = gtk_frame_new(NULL);
601 grid = gtk_grid_new();
605 for (i = 0; i < strvec_size(values); i++) {
607 gtk_grid_attach(GTK_GRID(grid), check, 0, i, 1, 1);
608 label = gtk_label_new(_(strvec_get(values, i)));
609 gtk_grid_attach(GTK_GRID(grid), label, 1, i, 1, 1);
611 }
612 g_object_set_data_full(G_OBJECT(w), "check_buttons", list,
614 }
615 break;
616
617 case OT_FONT:
619 g_object_set(G_OBJECT(w), "use-font", TRUE, NULL);
620 break;
621
622 case OT_COLOR:
623 {
624 GtkWidget *button;
625
626 w = gtk_grid_new();
629
630 /* Foreground color selector button. */
631 button = gtk_button_new();
634 _("Select the text color"));
635 g_object_set_data(G_OBJECT(w), "fg_button", button);
636 g_signal_connect(button, "clicked",
638
639 /* Background color selector button. */
640 button = gtk_button_new();
643 _("Select the background color"));
644 g_object_set_data(G_OBJECT(w), "bg_button", button);
645 g_signal_connect(button, "clicked",
647 }
648 break;
649
650 case OT_VIDEO_MODE:
651 log_error("Option type %s (%d) not supported yet.",
654 break;
655 }
656
658 if (NULL == w) {
659 log_error("Failed to create a widget for option %d \"%s\".",
661 } else {
662 g_object_set_data(G_OBJECT(w), "main_widget", ebox);
666 }
667
669
670 /* Set as current value. */
672}
673
674/************************************************************************/
677static void option_dialog_option_remove(struct option_dialog *pdialog,
678 struct option *poption)
679{
681
682 if (NULL != object) {
683 const int category = option_category(poption);
684
686 gtk_widget_destroy(GTK_WIDGET(g_object_get_data(object, "main_widget")));
687
688 /* Remove category if needed. */
689 if (0 == --pdialog->box_children[category]) {
691 pdialog->vboxes[category] = NULL;
692 }
693 }
694}
695
696/************************************************************************/
700 bool value)
701{
704 value);
705}
706
707/************************************************************************/
710static inline void option_dialog_option_int_set(struct option *poption,
711 int value)
712{
714 value);
715}
716
717/************************************************************************/
720static inline void option_dialog_option_str_set(struct option *poption,
721 const char *string)
722{
725 (option_get_gui_data(poption)))), string);
726 } else {
728 }
729}
730
731/************************************************************************/
735 int value)
736{
740 int i;
741
742 if (gtk_tree_model_get_iter_first(model, &iter)) {
743 do {
744 gtk_tree_model_get(model, &iter, 0, &i, -1);
745 if (i == value) {
747 return;
748 }
749 } while (gtk_tree_model_iter_next(model, &iter));
750 }
751
752 log_error("Didn't find the value %d for option \"%s\" (nb %d).",
754}
755
756/************************************************************************/
760 unsigned value)
761{
763 GList *iter = g_object_get_data(data, "check_buttons");
764 int bit;
765
766 for (bit = 0; NULL != iter; iter = g_list_next(iter), bit++) {
768 value & (1 << bit));
769 }
770}
771
772/************************************************************************/
776 const char *font)
777{
780}
781
782/************************************************************************/
786 struct ft_color color)
787{
790
791 /* Update the foreground button. */
792 if (NULL != color.foreground
793 && '\0' != color.foreground[0]
794 && gdk_rgba_parse(&gdk_color, color.foreground)) {
796 "fg_button"),
797 &gdk_color);
798 } else {
800 "fg_button"), NULL);
801 }
802
803 /* Update the background button. */
804 if (NULL != color.background
805 && '\0' != color.background[0]
806 && gdk_rgba_parse(&gdk_color, color.background)) {
808 "bg_button"),
809 &gdk_color);
810 } else {
812 "bg_button"), NULL);
813 }
814}
815
816/************************************************************************/
853
854/************************************************************************/
888
889/************************************************************************/
893{
895
896 switch (option_type(poption)) {
897 case OT_BOOLEAN:
899 (GTK_TOGGLE_BUTTON(w)));
900 break;
901
902 case OT_INTEGER:
904 (GTK_SPIN_BUTTON(w)));
905 break;
906
907 case OT_STRING:
911 } else {
913 }
914 break;
915
916 case OT_ENUM:
917 {
919 int value;
920
922 break;
923 }
924
926 &iter, 0, &value, -1);
928 }
929 break;
930
931 case OT_BITWISE:
932 {
933 GList *iter = g_object_get_data(G_OBJECT(w), "check_buttons");
934 unsigned value = 0;
935 int bit;
936
937 for (bit = 0; NULL != iter; iter = g_list_next(iter), bit++) {
939 value |= 1 << bit;
940 }
941 }
943 }
944 break;
945
946 case OT_FONT:
948 (GTK_FONT_CHOOSER(w)));
949 break;
950
951 case OT_COLOR:
952 {
954 GObject *button;
955 GdkRGBA *color;
956
957 /* Get foreground color. */
958 button = g_object_get_data(G_OBJECT(w), "fg_button");
959 color = g_object_get_data(button, "color");
961
962 /* Get background color. */
963 button = g_object_get_data(G_OBJECT(w), "bg_button");
964 color = g_object_get_data(button, "color");
966
971 }
972 break;
973
974 case OT_VIDEO_MODE:
975 log_error("Option type %s (%d) not supported yet.",
978 break;
979 }
980}
981
982/************************************************************************/
985void option_dialog_popup(const char *name, const struct option_set *poptset)
986{
987 struct option_dialog *pdialog = option_dialog_get(poptset);
988
989 if (NULL != pdialog) {
991 } else {
993 }
994}
995
996/************************************************************************/
1000{
1001 struct option_dialog *pdialog = option_dialog_get(poptset);
1002
1003 if (NULL != pdialog) {
1004 option_dialog_destroy(pdialog);
1005 }
1006}
1007
1008/************************************************************************/
1013{
1015 if (strcmp(option_name(poption), "aifill") == 0) {
1017 } else if (strcmp(option_name(poption), "nationset") == 0) {
1019 }
1020 }
1021}
1022
1023/************************************************************************/
1027{
1029
1030 if (NULL != pdialog) {
1032 }
1033
1035}
1036
1037/************************************************************************/
1041{
1043
1044 if (NULL != pdialog) {
1046 }
1047
1049}
1050
1051/************************************************************************/
1055{
1057
1058 if (NULL != pdialog) {
1060 }
1061}
#define str
Definition astring.c:76
static struct fc_sockaddr_list * list
Definition clinet.c:102
char * incite_cost
Definition comments.c:75
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:125
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:130
static void color_selector_response_callback(GtkDialog *dialog, gint res, gpointer data)
Definition optiondlg.c:310
static int opt_dlog_height
Definition optiondlg.c:39
static struct option_dialog * option_dialog_get(const struct option_set *poptset)
Definition optiondlg.c:232
void option_gui_remove(struct option *poption)
Definition optiondlg.c:1054
static void option_dialog_option_refresh(struct option *poption)
Definition optiondlg.c:819
static int opt_dlog_width
Definition optiondlg.c:39
void option_dialog_popdown(const struct option_set *poptset)
Definition optiondlg.c:999
static void option_dialog_option_color_set(struct option *poption, struct ft_color color)
Definition optiondlg.c:785
static void option_color_set_button_color(GtkButton *button, const GdkRGBA *new_color)
Definition optiondlg.c:259
static void option_dialog_option_add(struct option_dialog *pdialog, struct option *poption, bool reorder_notebook)
Definition optiondlg.c:492
#define option_dialogs_iterate_end
Definition optiondlg.c:56
static void option_dialog_option_bitwise_set(struct option *poption, unsigned value)
Definition optiondlg.c:759
static void option_dialog_destroy(struct option_dialog *pdialog)
Definition optiondlg.c:418
static void option_dialog_option_bool_set(struct option *poption, bool value)
Definition optiondlg.c:699
static void option_dialog_option_remove(struct option_dialog *pdialog, struct option *poption)
Definition optiondlg.c:677
void option_gui_add(struct option *poption)
Definition optiondlg.c:1040
static void option_color_select_callback(GtkButton *button, gpointer data)
Definition optiondlg.c:332
static void option_dialog_option_int_set(struct option *poption, int value)
Definition optiondlg.c:710
static void option_dialog_reponse_callback(GtkDialog *dialog, gint response_id, gpointer data)
Definition optiondlg.c:98
#define option_dialogs_iterate(pdialog)
Definition optiondlg.c:54
static void option_gui_update_extra(struct option *poption)
Definition optiondlg.c:1012
static void option_apply_callback(GtkMenuItem *menuitem, gpointer data)
Definition optiondlg.c:180
static void option_color_destroy_notify(gpointer data)
Definition optiondlg.c:247
@ RESPONSE_SAVE
Definition optiondlg.c:67
@ RESPONSE_APPLY
Definition optiondlg.c:64
@ RESPONSE_CANCEL
Definition optiondlg.c:62
@ RESPONSE_OK
Definition optiondlg.c:63
@ RESPONSE_RESET
Definition optiondlg.c:65
@ RESPONSE_REFRESH
Definition optiondlg.c:66
static void option_dialog_option_font_set(struct option *poption, const char *font)
Definition optiondlg.c:775
void option_gui_update(struct option *poption)
Definition optiondlg.c:1026
static int option_dialog_pages_sort_func(const void *w1, const void *w2)
Definition optiondlg.c:444
void option_dialog_popup(const char *name, const struct option_set *poptset)
Definition optiondlg.c:985
static void option_dialog_reorder_notebook(struct option_dialog *pdialog)
Definition optiondlg.c:456
static void option_dialog_option_apply(struct option *poption)
Definition optiondlg.c:892
static gboolean option_button_press_callback(GtkWidget *widget, GdkEventButton *event, gpointer data)
Definition optiondlg.c:193
static void option_dialog_option_reset(struct option *poption)
Definition optiondlg.c:857
static void option_reset_callback(GtkMenuItem *menuitem, gpointer data)
Definition optiondlg.c:167
static void option_dialog_foreach(struct option_dialog *pdialog, void(*option_action)(struct option *))
Definition optiondlg.c:478
static void option_dialog_option_str_set(struct option *poption, const char *string)
Definition optiondlg.c:720
static struct option_dialog_list * option_dialogs
Definition optiondlg.c:59
static void option_dialog_option_enum_set(struct option *poption, int value)
Definition optiondlg.c:734
static void option_refresh_callback(GtkMenuItem *menuitem, gpointer data)
Definition optiondlg.c:154
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:191
#define fc_assert(condition)
Definition log.h:176
#define log_error(message,...)
Definition log.h:103
#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:919
unsigned option_bitwise_def(const struct option *poption)
Definition options.c:1089
int option_int_min(const struct option *poption)
Definition options.c:860
bool option_bool_def(const struct option *poption)
Definition options.c:812
const char * option_font_def(const struct option *poption)
Definition options.c:1156
const struct option_set * server_optset
Definition options.c:4020
const char * option_description(const struct option *poption)
Definition options.c:642
const char * option_help_text(const struct option *poption)
Definition options.c:652
struct ft_color option_color_get(const struct option *poption)
Definition options.c:1194
int option_enum_get_int(const struct option *poption)
Definition options.c:984
int option_number(const struct option *poption)
Definition options.c:622
int option_category(const struct option *poption)
Definition options.c:672
bool option_str_set(struct option *poption, const char *str)
Definition options.c:930
const char * option_name(const struct option *poption)
Definition options.c:632
int option_int_get(const struct option *poption)
Definition options.c:838
bool option_color_set(struct option *poption, struct ft_color color)
Definition options.c:1217
bool option_bool_set(struct option *poption, bool val)
Definition options.c:823
bool option_is_changeable(const struct option *poption)
Definition options.c:693
void option_set_gui_data(struct option *poption, void *data)
Definition options.c:771
const char * option_str_get(const struct option *poption)
Definition options.c:897
void * option_get_gui_data(const struct option *poption)
Definition options.c:781
bool option_enum_set_int(struct option *poption, int val)
Definition options.c:1044
bool option_bool_get(const struct option *poption)
Definition options.c:801
int optset_category_number(const struct option_set *poptset)
Definition options.c:461
enum option_type option_type(const struct option *poption)
Definition options.c:662
const char * option_enum_int_to_str(const struct option *poption, int val)
Definition options.c:969
const struct option_set * option_optset(const struct option *poption)
Definition options.c:612
const char * option_str_def(const struct option *poption)
Definition options.c:908
int option_int_max(const struct option *poption)
Definition options.c:871
bool option_font_set(struct option *poption, const char *font)
Definition options.c:1178
void queue_options_save(option_save_log_callback log_cb)
Definition options.c:6103
const struct strvec * option_bitwise_values(const struct option *poption)
Definition options.c:1117
bool option_bitwise_set(struct option *poption, unsigned val)
Definition options.c:1128
const char * option_font_get(const struct option *poption)
Definition options.c:1145
struct ft_color option_color_def(const struct option *poption)
Definition options.c:1205
unsigned option_bitwise_get(const struct option *poption)
Definition options.c:1078
int option_enum_def_int(const struct option *poption)
Definition options.c:1008
bool option_int_set(struct option *poption, int val)
Definition options.c:882
const char * option_category_name(const struct option *poption)
Definition options.c:682
int option_int_def(const struct option *poption)
Definition options.c:849
#define options_iterate(poptset, poption)
Definition options.h:553
#define options_iterate_end
Definition options.h:558
#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:47
GtkWidget ** vboxes
Definition optiondlg.c:46
GtkWidget * shell
Definition optiondlg.c:44
const struct option_set * poptset
Definition optiondlg.c:43
GtkWidget * notebook
Definition optiondlg.c:45
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47