Freeciv-3.2
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/gdkkeysyms.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 return row;
219}
220
221/**********************************************************************/
225{
226 GtkTreeModel *model;
227 GtkTreePath *path;
229
230 if ((model = gtk_tree_view_get_model(view))
232 && (path = gtk_tree_model_get_path(model, &iter))) {
234 gtk_tree_path_free(path);
236 }
237}
238
239/**********************************************************************/
249
250/**********************************************************************/
253static void close_callback(GtkDialog *dialog, gpointer data)
254{
256}
257
258/**********************************************************************/
284
285/**********************************************************************/
288static void gui_dialog_response(struct gui_dialog *dlg, int response)
289{
290 if (dlg->response_callback) {
291 (*dlg->response_callback)(dlg, response, dlg->user_data);
292 }
293}
294
295/**********************************************************************/
298static void gui_dialog_destroyed(struct gui_dialog *dlg, int response,
299 gpointer data)
300{
302}
303
304/**********************************************************************/
308{
309 if (dlg->type == GUI_DIALOG_TAB) {
310 GtkWidget *notebook = dlg->v.tab.notebook;
311 gulong handler_id = dlg->v.tab.handler_id;
312
313 g_signal_handler_disconnect(notebook, handler_id);
314 }
315
317
318 if (*(dlg->source)) {
319 *(dlg->source) = NULL;
320 }
321
323
324 /* Raise the return dialog set by gui_dialog_set_return_dialog() */
325 if (dlg->return_dialog_id != -1) {
326 GList *it;
327
328 for (it = dialog_list; it; it = g_list_next(it)) {
329 struct gui_dialog *adialog = (struct gui_dialog *)it->data;
330
331 if (adialog->id == dlg->return_dialog_id) {
333 break;
334 }
335 }
336 }
337
338 if (dlg->title) {
339 free(dlg->title);
340 }
341
342 free(dlg);
343}
344
345/**********************************************************************/
351{
352 struct gui_dialog *dlg = data;
353
354 /* emit response signal. */
356
357 /* do the destroy by default. */
358 return FALSE;
359}
360
361/**********************************************************************/
367{
369 int n;
370
371 notebook = dlg->v.tab.notebook;
374 != dlg->v.tab.child) {
376 }
377
378 /* emit response signal. */
380
381 /* do the destroy by default. */
382 return FALSE;
383}
384
385
386/**********************************************************************/
391 GdkModifierType state,
392 gpointer data)
393{
394 struct gui_dialog *dlg = (struct gui_dialog *)data;
395
397 || ((state & GDK_CONTROL_MASK) && keyval == GDK_KEY_w)) {
398 /* Emit response signal. */
400 }
401
402 /* Propagate event further. */
403 return FALSE;
404}
405
406/**********************************************************************/
410 GtkWidget *page,
411 guint num,
412 struct gui_dialog *dlg)
413{
414 gint n;
415
417
418 if (n == num) {
419 gtk_widget_remove_css_class(dlg->v.tab.label, "alert");
420 gtk_widget_remove_css_class(dlg->v.tab.label, "notice");
421 }
422}
423
424/**********************************************************************/
427static void gui_dialog_detach(struct gui_dialog *dlg)
428{
429 gint n;
432
433 if (dlg->type != GUI_DIALOG_TAB) {
434 return;
435 }
436 dlg->type = GUI_DIALOG_WINDOW;
437
438 /* Create a new reference to the main widget, so it won't be
439 * destroyed in gtk_notebook_remove_page() */
440 g_object_ref(dlg->grid);
441
442 /* Remove widget from the notebook */
443 notebook = dlg->v.tab.notebook;
444 handler_id = dlg->v.tab.handler_id;
446
449
450
451 /* Create window and put the widget inside */
455
457 dlg->v.window = window;
458 g_signal_connect(window, "close-request",
460
462 dlg->default_width,
463 dlg->default_height);
465}
466
467/**********************************************************************/
471 int n_press,
472 double x, double y, gpointer data)
473{
474 if (n_press == 2) {
475 gui_dialog_detach((struct gui_dialog *)data);
476 }
477
478 return TRUE;
479}
480
481/**********************************************************************/
491{
492 struct gui_dialog *dlg;
494 static int dialog_id_counter;
496
497 dlg = fc_malloc(sizeof(*dlg));
499
500 dlg->source = pdlg;
501 *pdlg = dlg;
502 dlg->user_data = user_data;
503 dlg->title = NULL;
504
505 dlg->default_width = 200;
506 dlg->default_height = 300;
507
509 dlg->type = GUI_DIALOG_TAB;
510 } else {
511 dlg->type = GUI_DIALOG_WINDOW;
512 }
513
514 if (!gui_action) {
516 }
518
519 dlg->grid = gtk_grid_new();
520 dlg->content_counter = 0;
524 /* We expect this to be short (as opposed to tall); maximise usable
525 * height by putting buttons down the right hand side */
527 dlg->vertical_content = FALSE;
528 } else {
529 /* We expect this to be reasonably tall; maximise usable width by
530 * putting buttons along the bottom */
534 dlg->vertical_content = TRUE;
535 }
536
540
545
550
551 switch (dlg->type) {
553 {
555
557 gtk_widget_set_name(window, "Freeciv");
559
561 dlg->v.window = window;
562 g_signal_connect(window, "close-request",
564
565 }
566 break;
567 case GUI_DIALOG_TAB:
568 {
569 GtkWidget *hbox, *label, *button;
570 gchar *buf;
571
573
582
583 button = gtk_button_new();
585 g_signal_connect_swapped(button, "clicked",
587
588 buf = g_strdup_printf(_("Close Tab:\n%s"), _("Ctrl+W"));
590 g_free(buf);
591
592 gtk_button_set_icon_name(GTK_BUTTON(button), "window-close");
593
594 gtk_box_append(GTK_BOX(hbox), button);
595
597
599 dlg->v.tab.handler_id
600 = g_signal_connect(notebook, "switch-page",
602 dlg->v.tab.child = dlg->grid;
603
604 dlg->v.tab.label = label;
606
608 g_signal_connect(controller, "pressed",
611 }
612 break;
613 }
614
615 dlg->actions = action_area;
616
618
619 dlg->id = dialog_id_counter;
621 dlg->return_dialog_id = -1;
622
623 g_signal_connect(dlg->grid, "destroy",
626 g_signal_connect(controller, "key-pressed",
629
630 g_object_set_data(G_OBJECT(dlg->grid), "gui-dialog-data", dlg);
631}
632
633/**********************************************************************/
637{
638 struct gui_dialog *dlg =
639 g_object_get_data(G_OBJECT(vbox), "gui-dialog-data");
640 gpointer arg2 =
641 g_object_get_data(G_OBJECT(button), "gui-dialog-response-data");
642
644}
645
646/**********************************************************************/
649static void gui_dialog_pack_button(struct gui_dialog *dlg, GtkWidget *button,
650 int response)
651{
653
655
656 g_object_set_data(G_OBJECT(button), "gui-dialog-response-data",
657 GINT_TO_POINTER(response));
658
659 if ((signal_id = g_signal_lookup("clicked", GTK_TYPE_BUTTON))) {
661
663 G_OBJECT(dlg->grid));
665 }
666
667 gui_dialog_add_action_widget(dlg, button);
669}
670
671/**********************************************************************/
675 const char *icon_name,
676 const char *text, int response)
677{
678 GtkWidget *button;
679
680 button = icon_label_button_new(icon_name, text);
681 gui_dialog_pack_button(dlg, button, response);
682
683 return button;
684}
685
686/**********************************************************************/
698
699/**********************************************************************/
703 int response, bool setting)
704{
706
708 iter != NULL;
710 if (GTK_IS_BUTTON(iter)) {
712 "gui-dialog-response-data");
713
714 if (response == GPOINTER_TO_INT(data)) {
716 }
717 }
718 }
719}
720
721/**********************************************************************/
728
729/**********************************************************************/
733{
735
736 if (dlg->type == GUI_DIALOG_TAB) {
738 gint num_visible = 0;
739
741 iter != NULL;
743 if (!GTK_IS_BUTTON(iter)) {
744 num_visible++;
745 } else {
747 "gui-dialog-response-data");
748 int response = GPOINTER_TO_INT(data);
749
750 if (response != GTK_RESPONSE_CLOSE
751 && response != GTK_RESPONSE_CANCEL) {
752 num_visible++;
753 } else {
755 }
756 }
757 }
758
759 if (num_visible == 0) {
761 }
762 }
763}
764
765/**********************************************************************/
769{
770 fc_assert_ret(NULL != dlg);
771
772 switch (dlg->type) {
775 break;
776 case GUI_DIALOG_TAB:
777 {
779 gint current, n;
780
783
784 if (current != n) {
785 gtk_widget_add_css_class(dlg->v.tab.label, "notice");
786 }
787 }
788 break;
789 }
790}
791
792/**********************************************************************/
796{
797 fc_assert_ret(NULL != dlg);
798
799 switch (dlg->type) {
802 break;
803 case GUI_DIALOG_TAB:
804 {
806 gint n;
807
810 }
811 break;
812 }
813}
814
815/**********************************************************************/
819{
820 fc_assert_ret(NULL != dlg);
821
822 switch (dlg->type) {
824 break;
825 case GUI_DIALOG_TAB:
826 {
828 gint current, n;
829
832
833 if (current != n) {
834 /* Have only alert - remove notice if it exist. */
835 gtk_widget_remove_css_class(dlg->v.tab.label, "notice");
836 gtk_widget_add_css_class(dlg->v.tab.label, "alert");
837 }
838 }
839 break;
840 }
841}
842
843/**********************************************************************/
847{
848 dlg->default_width = width;
849 dlg->default_height = height;
850 switch (dlg->type) {
853 break;
854 case GUI_DIALOG_TAB:
855 break;
856 }
857}
858
859/**********************************************************************/
862void gui_dialog_set_title(struct gui_dialog *dlg, const char *title)
863{
864 if (dlg->title) {
865 free(dlg->title);
866 }
867 dlg->title = fc_strdup(title);
868 switch (dlg->type) {
871 break;
872 case GUI_DIALOG_TAB:
874 break;
875 }
876}
877
878/**********************************************************************/
882{
883 switch (dlg->type) {
886 break;
887 case GUI_DIALOG_TAB:
888 {
889 gint n;
890
893 }
894 break;
895 }
896}
897
898/**********************************************************************/
902{
903 GList *it, *it_next;
904
905 for (it = dialog_list; it; it = it_next) {
906 it_next = g_list_next(it);
907
908 gui_dialog_destroy((struct gui_dialog *)it->data);
909 }
910}
911
912/**********************************************************************/
920
921/**********************************************************************/
926{
927 if (return_dialog == NULL) {
928 dlg->return_dialog_id = -1;
929 } else {
931 }
932}
933
934/**********************************************************************/
937void gui_update_font(const char *font_name, const char *font_value)
938{
939 char *str;
942 int size;
943 const char *fam;
944 const char *style;
945 const char *weight;
946
948
949 if (desc == NULL) {
950 return;
951 }
952
954
955 if (fam == NULL) {
956 return;
957 }
958
960 style = "\n font-style: italic;";
961 } else {
962 style = "";
963 }
964
965 if (pango_font_description_get_weight(desc) >= 700) {
966 weight = "\n font-weight: bold;";
967 } else {
968 weight = "";
969 }
970
972
973 if (size != 0) {
975 str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpx;%s%s}",
976 font_name, fam, size / PANGO_SCALE, style, weight);
977 } else {
978 str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;%s%s}",
979 font_name, fam, size / PANGO_SCALE, style, weight);
980 }
981 } else {
982 str = g_strdup_printf("#Freeciv #%s { font-family: %s;%s%s}",
983 font_name, fam, style, weight);
984 }
985
987
990 str, -1);
994 g_free(str);
995}
996
997/**********************************************************************/
1012
1013/**********************************************************************/
1018{
1019 gulong hid;
1020
1021 if (!obj || !cb) {
1022 return;
1023 }
1024
1026 0, 0, NULL, cb, NULL);
1028}
1029
1030/**********************************************************************/
1034{
1035 gulong hid;
1036
1037 if (!obj || !cb) {
1038 return;
1039 }
1040
1042 0, 0, NULL, cb, NULL);
1044}
1045
1046/**********************************************************************/
1051 GType gtype, int model_index)
1052{
1055 const char *attr;
1056
1060
1061 if (gtype == G_TYPE_BOOLEAN) {
1063 attr = "active";
1064 } else if (gtype == GDK_TYPE_PIXBUF) {
1066 attr = "pixbuf";
1067 } else {
1069 attr = "text";
1070 }
1071
1073 model_index, NULL);
1075
1076 return col;
1077}
1078
1079/**********************************************************************/
1083{
1085
1087 ".alert {\n"
1088 "color: rgba(255, 0, 0, 255);\n"
1089 "}\n"
1090 ".notice {\n"
1091 "color: rgba(0, 0, 255, 255);\n"
1092 "}\n",
1093 -1);
1094
1099}
1100
1101/**********************************************************************/
1105{
1106 if (dlg->vertical_content) {
1108 0, dlg->content_counter++, 1, 1);
1109 } else {
1111 dlg->content_counter++, 0, 1, 1);
1112 }
1113}
1114
1119
1120/**********************************************************************/
1123static void blocking_dialog_response(GtkWidget *dlg, gint response, void *data)
1124{
1125 struct blocking_dialog_data *bd_data = (struct blocking_dialog_data *)data;
1126
1128
1130}
1131
1132/**********************************************************************/
1136{
1137 struct blocking_dialog_data data;
1139
1142 data.loop = dlg_loop;
1144 &data);
1145
1147
1148 return data.response;
1149}
1150
1151/**********************************************************************/
1155{
1156 *(GtkWidget **)data = NULL;
1157}
1158
1159/**********************************************************************/
#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:75
#define Q_(String)
Definition fcintl.h:70
#define _(String)
Definition fcintl.h:67
GtkWidget * top_notebook
Definition gui_main.c:129
gboolean fc_lost_focus(GtkWidget *w, GdkEventKey *ev, gpointer data)
Definition gui_main.c:735
gboolean fc_gained_focus(GtkWidget *w, GdkEventKey *ev, gpointer data)
Definition gui_main.c:745
GtkWidget * toplevel
Definition gui_main.c:125
#define GUI_GTK_OPTION(optname)
Definition gui_main.h:25
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:1135
GtkWidget * aux_menu_new(void)
Definition gui_stuff.c:243
void gui_dialog_add_content_widget(struct gui_dialog *dlg, GtkWidget *wdg)
Definition gui_stuff.c:1104
GtkWidget * widget_get_child(GtkWidget *wdg)
Definition gui_stuff.c:1163
static void blocking_dialog_response(GtkWidget *dlg, gint response, void *data)
Definition gui_stuff.c:1123
GtkWidget * gui_dialog_add_action_widget(struct gui_dialog *dlg, GtkWidget *widget)
Definition gui_stuff.c:689
void widget_destroyed(GtkWidget *wdg, void *data)
Definition gui_stuff.c:1154
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:191
#define fc_assert(condition)
Definition log.h:176
#define fc_assert_ret_val(condition, val)
Definition log.h:194
#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
union gui_dialog::@152 v
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
struct gui_dialog::@152::@153 tab
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
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