Freeciv-3.3
Loading...
Searching...
No Matches
gui_stuff.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 <stdarg.h>
19#include <stdio.h>
20#include <stdlib.h>
21#include <string.h>
22
23#include <gtk/gtk.h>
24#include <gdk/gdk.h>
25
26/* utility */
27#include "fcintl.h"
28#include "log.h"
29#include "mem.h"
30#include "support.h"
31
32/* client */
33#include "options.h"
34
35/* client/gui-gtk-4.0 */
36#include "colors.h"
37#include "gui_main.h"
38
39#include "gui_stuff.h"
40
41
43
45
47
48
49/**********************************************************************/
56
57/**********************************************************************/
64 const gchar *label_text)
65{
66 GtkWidget *button;
67
68 fc_assert(icon_name != NULL || label_text != NULL);
69
70 if (label_text != NULL) {
71 button = gtk_button_new_with_mnemonic(label_text);
72 } else if (icon_name != NULL) {
74 } else {
75 button = NULL;
76 }
77
78 return button;
79}
80
81/**********************************************************************/
85void gtk_stockbutton_set_label(GtkWidget *button, const gchar *label_text)
86{
87 gtk_button_set_label(GTK_BUTTON(button), label_text);
88}
89
90/**********************************************************************/
100void intl_slist(int n, const char **s, bool *done)
101{
102 int i;
103
104 if (!*done) {
105 for (i = 0; i < n; i++) {
106 s[i] = Q_(s[i]);
107 }
108
109 *done = TRUE;
110 }
111}
112
113/**********************************************************************/
117{
118 it->model = model;
119 it->end = !gtk_tree_model_get_iter_first(it->model, &it->it);
120}
121
122/**********************************************************************/
126{
127 return it->end;
128}
129
130/**********************************************************************/
134{
135 it->end = !gtk_tree_model_iter_next(it->model, &it->it);
136}
137
138/**********************************************************************/
141void itree_set(ITree *it, ...)
142{
143 va_list ap;
144
145 va_start(ap, it);
147 va_end(ap);
148}
149
150/**********************************************************************/
153void itree_get(ITree *it, ...)
154{
155 va_list ap;
156
157 va_start(ap, it);
159 va_end(ap);
160}
161
162/**********************************************************************/
166{
167 it->model = GTK_TREE_MODEL(store);
168 if (parent)
170 else
172 it->end = FALSE;
173}
174
175/**********************************************************************/
179{
180 return gtk_tree_selection_iter_is_selected(selection, &it->it);
181}
182
183/**********************************************************************/
187{
188 gtk_tree_selection_select_iter(selection, &it->it);
189}
190
191/**********************************************************************/
195{
196 gtk_tree_selection_unselect_iter(selection, &it->it);
197}
198
199/**********************************************************************/
204{
205 GtkTreeModel *model;
206 GtkTreeIter it;
207 gint row = -1;
208
209 if (gtk_tree_selection_get_selected(selection, &model, &it)) {
210 GtkTreePath *path;
211 gint *idx;
212
213 path = gtk_tree_model_get_path(model, &it);
214 idx = gtk_tree_path_get_indices(path);
215 row = idx[0];
216 gtk_tree_path_free(path);
217 }
218
219 return row;
220}
221
222/**********************************************************************/
226{
227 GtkTreeModel *model;
228 GtkTreePath *path;
230
231 if ((model = gtk_tree_view_get_model(view))
233 && (path = gtk_tree_model_get_path(model, &iter))) {
235 gtk_tree_path_free(path);
237 }
238}
239
240/**********************************************************************/
250
251/**********************************************************************/
254static void close_callback(GtkDialog *dialog, gpointer data)
255{
257}
258
259/**********************************************************************/
285
286/**********************************************************************/
289static void gui_dialog_response(struct gui_dialog *dlg, int response)
290{
291 if (dlg->response_callback) {
292 (*dlg->response_callback)(dlg, response, dlg->user_data);
293 }
294}
295
296/**********************************************************************/
299static void gui_dialog_destroyed(struct gui_dialog *dlg, int response,
300 gpointer data)
301{
303}
304
305/**********************************************************************/
309{
311
313
314 /* Raise the return dialog set by gui_dialog_set_return_dialog() */
315 if (dlg->return_dialog_id != -1) {
316 GList *it;
317
318 for (it = dialog_list; it; it = g_list_next(it)) {
319 struct gui_dialog *adialog = (struct gui_dialog *)it->data;
320
321 if (adialog->id == dlg->return_dialog_id) {
323 break;
324 }
325 }
326 }
327
328 if (dlg->title) {
329 free(dlg->title);
330 }
331
332 free(dlg);
333}
334
335/**********************************************************************/
341{
342 struct gui_dialog *dlg = data;
343
344 /* emit response signal. */
346
347 /* do the destroy by default. */
348 return FALSE;
349}
350
351/**********************************************************************/
357{
359 int n;
360
361 notebook = dlg->v.tab.notebook;
364 != dlg->v.tab.child) {
366 }
367
368 /* Emit response signal. */
370
371 /* Do the destroy by default. */
372 return FALSE;
373}
374
375
376/**********************************************************************/
381 GdkModifierType state,
382 gpointer data)
383{
384 struct gui_dialog *dlg = (struct gui_dialog *)data;
385
387 || ((state & GDK_CONTROL_MASK) && keyval == GDK_KEY_w)) {
388 /* Emit response signal. */
390 }
391
392 /* Propagate event further. */
393 return FALSE;
394}
395
396/**********************************************************************/
400 GtkWidget *page,
401 guint num,
402 struct gui_dialog *dlg)
403{
404 gint n;
405
407
408 if (n == num) {
409 gtk_widget_remove_css_class(dlg->v.tab.label, "alert");
410 gtk_widget_remove_css_class(dlg->v.tab.label, "notice");
411 }
412}
413
414/**********************************************************************/
417static void gui_dialog_detach(struct gui_dialog *dlg)
418{
419 gint n;
422
423 if (dlg->type != GUI_DIALOG_TAB) {
424 return;
425 }
426 dlg->type = GUI_DIALOG_WINDOW;
427
428 /* Create a new reference to the main widget, so it won't be
429 * destroyed in gtk_notebook_remove_page() */
430 g_object_ref(dlg->grid);
431
432 /* Remove widget from the notebook */
433 notebook = dlg->v.tab.notebook;
434 handler_id = dlg->v.tab.handler_id;
436
438
439 fc_assert(n >= 0);
440
442
443
444 /* Create window and put the widget inside */
448
450 dlg->v.window = window;
451 g_signal_connect(window, "close-request",
453
455 dlg->default_width,
456 dlg->default_height);
458}
459
460/**********************************************************************/
464 int n_press,
465 double x, double y, gpointer data)
466{
467 if (n_press == 2) {
468 gui_dialog_detach((struct gui_dialog *)data);
469 }
470
471 return TRUE;
472}
473
474/**********************************************************************/
484{
485 struct gui_dialog *dlg;
487 static int dialog_id_counter;
489
490 dlg = fc_malloc(sizeof(*dlg));
492
493 dlg->source = pdlg;
494 *pdlg = dlg;
495 dlg->user_data = user_data;
496 dlg->title = NULL;
497
498 dlg->default_width = 200;
499 dlg->default_height = 300;
500
502 dlg->type = GUI_DIALOG_TAB;
503 } else {
504 dlg->type = GUI_DIALOG_WINDOW;
505 }
506
507 if (!gui_action) {
509 }
511
512 dlg->grid = gtk_grid_new();
513 dlg->content_counter = 0;
517 /* We expect this to be short (as opposed to tall); maximise usable
518 * height by putting buttons down the right hand side */
520 dlg->vertical_content = FALSE;
521 } else {
522 /* We expect this to be reasonably tall; maximise usable width by
523 * putting buttons along the bottom */
527 dlg->vertical_content = TRUE;
528 }
529
533
538
543
544 switch (dlg->type) {
546 {
548
550 gtk_widget_set_name(window, "Freeciv");
552
554 dlg->v.window = window;
555 g_signal_connect(window, "close-request",
557
558 }
559 break;
560 case GUI_DIALOG_TAB:
561 {
562 GtkWidget *hbox, *label, *button;
563 gchar *buf;
564
566
575
576 button = gtk_button_new();
578 g_signal_connect_swapped(button, "clicked",
580
581 buf = g_strdup_printf(_("Close Tab:\n%s"), _("Ctrl+W"));
583 g_free(buf);
584
585 gtk_button_set_icon_name(GTK_BUTTON(button), "window-close");
586
587 gtk_box_append(GTK_BOX(hbox), button);
588
590
592 dlg->v.tab.handler_id
593 = g_signal_connect(notebook, "switch-page",
595 dlg->v.tab.child = dlg->grid;
596
597 dlg->v.tab.label = label;
599
601 g_signal_connect(controller, "pressed",
604 }
605 break;
606 }
607
608 dlg->actions = action_area;
609
611
612 dlg->id = dialog_id_counter;
614 dlg->return_dialog_id = -1;
615
616 g_signal_connect(dlg->grid, "destroy",
619 g_signal_connect(controller, "key-pressed",
622
623 g_object_set_data(G_OBJECT(dlg->grid), "gui-dialog-data", dlg);
624}
625
626/**********************************************************************/
630{
631 struct gui_dialog *dlg =
632 g_object_get_data(G_OBJECT(vbox), "gui-dialog-data");
633 gpointer arg2 =
634 g_object_get_data(G_OBJECT(button), "gui-dialog-response-data");
635
637}
638
639/**********************************************************************/
642static void gui_dialog_pack_button(struct gui_dialog *dlg, GtkWidget *button,
643 int response)
644{
646
648
649 g_object_set_data(G_OBJECT(button), "gui-dialog-response-data",
650 GINT_TO_POINTER(response));
651
652 if ((signal_id = g_signal_lookup("clicked", GTK_TYPE_BUTTON))) {
654
656 G_OBJECT(dlg->grid));
658 }
659
660 gui_dialog_add_action_widget(dlg, button);
662}
663
664/**********************************************************************/
668 const char *icon_name,
669 const char *text, int response)
670{
671 GtkWidget *button;
672
673 button = icon_label_button_new(icon_name, text);
674 gui_dialog_pack_button(dlg, button, response);
675
676 return button;
677}
678
679/**********************************************************************/
691
692/**********************************************************************/
696 int response, bool setting)
697{
699
701 iter != NULL;
703 if (GTK_IS_BUTTON(iter)) {
705 "gui-dialog-response-data");
706
707 if (response == GPOINTER_TO_INT(data)) {
709 }
710 }
711 }
712}
713
714/**********************************************************************/
721
722/**********************************************************************/
726{
728
729 if (dlg->type == GUI_DIALOG_TAB) {
731 gint num_visible = 0;
732
734 iter != NULL;
736 if (!GTK_IS_BUTTON(iter)) {
737 num_visible++;
738 } else {
740 "gui-dialog-response-data");
741 int response = GPOINTER_TO_INT(data);
742
743 if (response != GTK_RESPONSE_CLOSE
744 && response != GTK_RESPONSE_CANCEL) {
745 num_visible++;
746 } else {
748 }
749 }
750 }
751
752 if (num_visible == 0) {
754 }
755 }
756}
757
758/**********************************************************************/
762{
763 fc_assert_ret(nullptr != dlg);
764
765 switch (dlg->type) {
768 break;
769 case GUI_DIALOG_TAB:
770 {
772 gint current, n;
773
776
777 if (current != n) {
778 gtk_widget_add_css_class(dlg->v.tab.label, "notice");
779 }
780 }
781 break;
782 }
783}
784
785/**********************************************************************/
789{
790 fc_assert_ret(NULL != dlg);
791
792 switch (dlg->type) {
795 break;
796 case GUI_DIALOG_TAB:
797 {
799 gint n;
800
803 }
804 break;
805 }
806}
807
808/**********************************************************************/
812{
813 fc_assert_ret(NULL != dlg);
814
815 switch (dlg->type) {
817 break;
818 case GUI_DIALOG_TAB:
819 {
821 gint current, n;
822
825
826 if (current != n) {
827 /* Have only alert - remove notice if it exist. */
828 gtk_widget_remove_css_class(dlg->v.tab.label, "notice");
829 gtk_widget_add_css_class(dlg->v.tab.label, "alert");
830 }
831 }
832 break;
833 }
834}
835
836/**********************************************************************/
840{
841 dlg->default_width = width;
842 dlg->default_height = height;
843 switch (dlg->type) {
846 break;
847 case GUI_DIALOG_TAB:
848 break;
849 }
850}
851
852/**********************************************************************/
855void gui_dialog_set_title(struct gui_dialog *dlg, const char *title)
856{
857 if (dlg->title) {
858 free(dlg->title);
859 }
860 dlg->title = fc_strdup(title);
861 switch (dlg->type) {
864 break;
865 case GUI_DIALOG_TAB:
867 break;
868 }
869}
870
871/**********************************************************************/
875{
876 switch (dlg->type) {
878 if (dlg->v.window != NULL) {
880 dlg->v.window = NULL;
881 }
882 break;
883 case GUI_DIALOG_TAB:
884 {
885 gint n;
886
888
889 fc_assert(n >= 0);
890
893 dlg->v.tab.handler_id);
894 }
895 break;
896 }
897
898 if (*(dlg->source)) {
899 *(dlg->source) = NULL;
900 }
901}
902
903/**********************************************************************/
907{
908 GList *it, *it_next;
909
910 for (it = dialog_list; it; it = it_next) {
911 it_next = g_list_next(it);
912
913 gui_dialog_destroy((struct gui_dialog *)it->data);
914 }
915}
916
917/**********************************************************************/
925
926/**********************************************************************/
931{
932 if (return_dialog == NULL) {
933 dlg->return_dialog_id = -1;
934 } else {
936 }
937}
938
939/**********************************************************************/
942void gui_update_font(const char *font_name, const char *font_value)
943{
944 char *str;
947 int size;
948 const char *fam;
949 const char *style;
950 const char *weight;
951
953
954 if (desc == NULL) {
955 return;
956 }
957
959
960 if (fam == NULL) {
961 return;
962 }
963
965 style = "\n font-style: italic;";
966 } else {
967 style = "";
968 }
969
970 if (pango_font_description_get_weight(desc) >= 700) {
971 weight = "\n font-weight: bold;";
972 } else {
973 weight = "";
974 }
975
977
978 if (size != 0) {
980 str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpx;%s%s}",
981 font_name, fam, size / PANGO_SCALE, style, weight);
982 } else {
983 str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;%s%s}",
984 font_name, fam, size / PANGO_SCALE, style, weight);
985 }
986 } else {
987 str = g_strdup_printf("#Freeciv #%s { font-family: %s;%s%s}",
988 font_name, fam, style, weight);
989 }
990
992
995 str, -1);
999 g_free(str);
1000}
1001
1002/**********************************************************************/
1017
1018/**********************************************************************/
1023{
1024 gulong hid;
1025
1026 if (!obj || !cb) {
1027 return;
1028 }
1029
1031 0, 0, NULL, cb, NULL);
1033}
1034
1035/**********************************************************************/
1039{
1040 gulong hid;
1041
1042 if (!obj || !cb) {
1043 return;
1044 }
1045
1047 0, 0, NULL, cb, NULL);
1049}
1050
1051/**********************************************************************/
1056 GType gtype, int model_index)
1057{
1060 const char *attr;
1061
1065
1066 if (gtype == G_TYPE_BOOLEAN) {
1068 attr = "active";
1069 } else if (gtype == GDK_TYPE_PIXBUF) {
1071 attr = "pixbuf";
1072 } else {
1074 attr = "text";
1075 }
1076
1078 model_index, NULL);
1080
1081 return col;
1082}
1083
1084/**********************************************************************/
1088{
1090
1092 ".alert {\n"
1093 "color: rgba(255, 0, 0, 255);\n"
1094 "}\n"
1095 ".notice {\n"
1096 "color: rgba(0, 0, 255, 255);\n"
1097 "}\n",
1098 -1);
1099
1104}
1105
1106/**********************************************************************/
1110{
1111 if (dlg->vertical_content) {
1113 0, dlg->content_counter++, 1, 1);
1114 } else {
1116 dlg->content_counter++, 0, 1, 1);
1117 }
1118}
1119
1124
1125/**********************************************************************/
1128static void blocking_dialog_response(GtkWidget *dlg, gint response, void *data)
1129{
1130 struct blocking_dialog_data *bd_data = (struct blocking_dialog_data *)data;
1131
1133
1135}
1136
1137/**********************************************************************/
1141{
1142 struct blocking_dialog_data data;
1144
1146 dlg_loop = g_main_loop_new(nullptr, FALSE);
1147 data.loop = dlg_loop;
1149 &data);
1150
1152
1153 return data.response;
1154}
1155
1156/**********************************************************************/
1160{
1161 *(GtkWidget **)data = NULL;
1162}
1163
1164/**********************************************************************/
#define str
Definition astring.c:76
#define n
Definition astring.c:77
struct canvas int int struct sprite int int int int height
Definition canvas_g.h:44
struct canvas int int struct sprite int int int width
Definition canvas_g.h:44
char * incite_cost
Definition comments.c:76
#define Q_(String)
Definition fcintl.h:70
#define _(String)
Definition fcintl.h:67
GtkWidget * top_notebook
Definition gui_main.c:130
gboolean fc_lost_focus(GtkWidget *w, GdkEventKey *ev, gpointer data)
Definition gui_main.c:704
gboolean fc_gained_focus(GtkWidget *w, GdkEventKey *ev, gpointer data)
Definition gui_main.c:714
GtkWidget * toplevel
Definition gui_main.c:126
#define GUI_GTK_OPTION(optname)
Definition gui_main.h:32
void gtk_tree_view_focus(GtkTreeView *view)
Definition gui_stuff.c:236
void gui_dialog_destroy(struct gui_dialog *dlg)
Definition gui_stuff.c:954
static void gui_dialog_pack_button(struct gui_dialog *dlg, GtkWidget *button, int response)
Definition gui_stuff.c:680
void gui_dialog_present(struct gui_dialog *dlg)
Definition gui_stuff.c:835
static void gui_dialog_switch_page_handler(GtkNotebook *notebook, GtkWidget *page, guint num, struct gui_dialog *dlg)
Definition gui_stuff.c:431
void gtk_stockbutton_set_label(GtkWidget *button, const gchar *label_text)
Definition gui_stuff.c:96
static GtkCssProvider * dlg_tab_provider
Definition gui_stuff.c:46
void itree_get(ITree *it,...)
Definition gui_stuff.c:164
void itree_set(ITree *it,...)
Definition gui_stuff.c:152
void gui_dialog_raise(struct gui_dialog *dlg)
Definition gui_stuff.c:865
void gui_dialog_new(struct gui_dialog **pdlg, GtkNotebook *notebook, gpointer user_data, bool check_top)
Definition gui_stuff.c:517
void disable_gobject_callback(GObject *obj, GCallback cb)
Definition gui_stuff.c:1090
gint gtk_tree_selection_get_row(GtkTreeSelection *selection)
Definition gui_stuff.c:215
void gui_dialog_set_return_dialog(struct gui_dialog *dlg, struct gui_dialog *return_dialog)
Definition gui_stuff.c:997
void dlg_tab_provider_prepare(void)
Definition gui_stuff.c:1155
void gui_dialog_response_set_callback(struct gui_dialog *dlg, GUI_DIALOG_RESPONSE_FUN fun)
Definition gui_stuff.c:988
static GtkSizeGroup * gui_action
Definition gui_stuff.c:44
void itree_begin(GtkTreeModel *model, ITree *it)
Definition gui_stuff.c:127
static void gui_dialog_destroyed(struct gui_dialog *dlg, int response, gpointer data)
Definition gui_stuff.c:322
static void action_widget_activated(GtkWidget *button, GtkWidget *vbox)
Definition gui_stuff.c:667
void itree_unselect(GtkTreeSelection *selection, ITree *it)
Definition gui_stuff.c:206
void enable_gobject_callback(GObject *obj, GCallback cb)
Definition gui_stuff.c:1106
static void gui_dialog_detach(struct gui_dialog *dlg)
Definition gui_stuff.c:451
void gui_dialog_show_all(struct gui_dialog *dlg)
Definition gui_stuff.c:795
static gboolean gui_dialog_key_press_handler(GtkWidget *w, GdkEventKey *ev, gpointer data)
Definition gui_stuff.c:413
static gint gui_dialog_delete_handler(GtkWidget *widget, GdkEventAny *ev, gpointer data)
Definition gui_stuff.c:374
void itree_select(GtkTreeSelection *selection, ITree *it)
Definition gui_stuff.c:198
void gui_dialog_set_title(struct gui_dialog *dlg, const char *title)
Definition gui_stuff.c:935
static void close_callback(GtkDialog *dialog, gpointer data)
Definition gui_stuff.c:277
void gui_dialog_set_default_size(struct gui_dialog *dlg, int width, int height)
Definition gui_stuff.c:919
GtkWidget * icon_label_button_new(const gchar *icon_name, const gchar *label_text)
Definition gui_stuff.c:76
void gui_dialog_alert(struct gui_dialog *dlg)
Definition gui_stuff.c:888
GtkTreeViewColumn * add_treeview_column(GtkWidget *view, const char *title, GType gtype, int model_index)
Definition gui_stuff.c:1123
static void gui_dialog_destroy_handler(GtkWidget *w, struct gui_dialog *dlg)
Definition gui_stuff.c:331
void tstore_append(GtkTreeStore *store, ITree *it, ITree *parent)
Definition gui_stuff.c:176
static gint gui_dialog_delete_tab_handler(struct gui_dialog *dlg)
Definition gui_stuff.c:391
void itree_next(ITree *it)
Definition gui_stuff.c:144
void gui_dialog_destroy_all(void)
Definition gui_stuff.c:974
static gboolean click_on_tab_callback(GtkWidget *w, GdkEventButton *button, gpointer data)
Definition gui_stuff.c:494
gboolean itree_is_selected(GtkTreeSelection *selection, ITree *it)
Definition gui_stuff.c:190
GtkWidget * gui_dialog_add_button(struct gui_dialog *dlg, const char *icon_name, const char *text, int response)
Definition gui_stuff.c:706
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
Definition gui_stuff.c:287
static GList * dialog_list
Definition gui_stuff.c:42
void gui_update_font_full(const char *font_name, const char *font_value, PangoFontDescription **font_desc)
Definition gui_stuff.c:1073
void gtk_expose_now(GtkWidget *w)
Definition gui_stuff.c:52
void gui_dialog_set_response_sensitive(struct gui_dialog *dlg, int response, bool setting)
Definition gui_stuff.c:760
GtkWidget * gui_dialog_get_toplevel(struct gui_dialog *dlg)
Definition gui_stuff.c:787
void intl_slist(int n, const char **s, bool *done)
Definition gui_stuff.c:111
gboolean itree_end(ITree *it)
Definition gui_stuff.c:136
static void gui_dialog_response(struct gui_dialog *dlg, int response)
Definition gui_stuff.c:312
@ GUI_DIALOG_WINDOW
Definition gui_stuff.h:61
@ GUI_DIALOG_TAB
Definition gui_stuff.h:62
void(* GUI_DIALOG_RESPONSE_FUN)(struct gui_dialog *, int, gpointer)
Definition gui_stuff.h:67
static struct gui_dialog * shell
Definition messagedlg.c:39
const char * title
Definition repodlgs.c:1314
gint blocking_dialog(GtkWidget *dlg)
Definition gui_stuff.c:1140
GtkWidget * aux_menu_new(void)
Definition gui_stuff.c:244
void gui_dialog_add_content_widget(struct gui_dialog *dlg, GtkWidget *wdg)
Definition gui_stuff.c:1109
GtkWidget * widget_get_child(GtkWidget *wdg)
Definition gui_stuff.c:1168
static void blocking_dialog_response(GtkWidget *dlg, gint response, void *data)
Definition gui_stuff.c:1128
GtkWidget * gui_dialog_add_action_widget(struct gui_dialog *dlg, GtkWidget *widget)
Definition gui_stuff.c:682
void widget_destroyed(GtkWidget *wdg, void *data)
Definition gui_stuff.c:1159
const char * font_name
Definition gui_main_g.h:43
gui_update_font
Definition gui_main_g.h:43
#define fc_assert_ret(condition)
Definition log.h:192
#define fc_assert(condition)
Definition log.h:177
#define fc_assert_ret_val(condition, val)
Definition log.h:195
#define fc_strdup(str)
Definition mem.h:43
#define fc_malloc(sz)
Definition mem.h:34
size_t size
Definition specvec.h:72
struct sprite int int y
Definition sprite_g.h:31
struct sprite int x
Definition sprite_g.h:31
GtkTreeModel * model
Definition gui_stuff.h:33
gboolean end
Definition gui_stuff.h:34
GtkTreeIter it
Definition gui_stuff.h:35
GtkWidget * vbox
Definition gui_stuff.h:72
char * title
Definition gui_stuff.h:76
gulong handler_id
Definition gui_stuff.h:89
struct gui_dialog::@156::@157 tab
GtkWidget * actions
Definition gui_stuff.h:72
int content_counter
Definition gui_stuff.h:84
GtkWidget * grid
Definition gui_stuff.h:71
bool vertical_content
Definition gui_stuff.h:83
GtkSizeGroup * gui_button
Definition gui_stuff.h:99
GtkWidget * action_area
Definition gui_stuff.h:73
GUI_DIALOG_RESPONSE_FUN response_callback
Definition gui_stuff.h:96
GtkWidget * label
Definition gui_stuff.h:87
GtkWidget * notebook
Definition gui_stuff.h:88
int return_dialog_id
Definition gui_stuff.h:79
int default_height
Definition gui_stuff.h:82
struct gui_dialog ** source
Definition gui_stuff.h:94
gpointer user_data
Definition gui_stuff.h:97
GtkWidget * window
Definition gui_stuff.h:85
union gui_dialog::@156 v
enum gui_dialog_type type
Definition gui_stuff.h:77
int default_width
Definition gui_stuff.h:81
GtkWidget * child
Definition gui_stuff.h:90
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47