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/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-3.22 */
36#include "colors.h"
37#include "gui_main.h"
38
39#include "gui_stuff.h"
40
41
43
45
47
48
49/**********************************************************************/
56
57/**********************************************************************/
61{
62 gint x, y, width, height;
63
66
67 x += px * width / 100;
68 y += py * height / 100;
69
70 gtk_window_move(w, x, y);
71}
72
73/**********************************************************************/
77 const gchar *label_text)
78{
79 GtkWidget *button;
81
82 button = gtk_button_new_with_mnemonic(label_text);
83
84 if (icon_name != NULL) {
87 }
88
89 return button;
90}
91
92/**********************************************************************/
96void gtk_stockbutton_set_label(GtkWidget *button, const gchar *label_text)
97{
98 gtk_button_set_label(GTK_BUTTON(button), label_text);
99}
100
101/**********************************************************************/
111void intl_slist(int n, const char **s, bool *done)
112{
113 int i;
114
115 if (!*done) {
116 for (i = 0; i < n; i++) {
117 s[i] = Q_(s[i]);
118 }
119
120 *done = TRUE;
121 }
122}
123
124/**********************************************************************/
128{
129 it->model = model;
130 it->end = !gtk_tree_model_get_iter_first(it->model, &it->it);
131}
132
133/**********************************************************************/
137{
138 return it->end;
139}
140
141/**********************************************************************/
145{
146 it->end = !gtk_tree_model_iter_next(it->model, &it->it);
147}
148
149/**********************************************************************/
152void itree_set(ITree *it, ...)
153{
154 va_list ap;
155
156 va_start(ap, it);
158 va_end(ap);
159}
160
161/**********************************************************************/
164void itree_get(ITree *it, ...)
165{
166 va_list ap;
167
168 va_start(ap, it);
170 va_end(ap);
171}
172
173/**********************************************************************/
177{
178 it->model = GTK_TREE_MODEL(store);
179 if (parent) {
181 } else {
183 }
184 it->end = FALSE;
185}
186
187/**********************************************************************/
191{
192 return gtk_tree_selection_iter_is_selected(selection, &it->it);
193}
194
195/**********************************************************************/
199{
200 gtk_tree_selection_select_iter(selection, &it->it);
201}
202
203/**********************************************************************/
207{
208 gtk_tree_selection_unselect_iter(selection, &it->it);
209}
210
211/**********************************************************************/
216{
217 GtkTreeModel *model;
218 GtkTreeIter it;
219 gint row = -1;
220
221 if (gtk_tree_selection_get_selected(selection, &model, &it)) {
222 GtkTreePath *path;
223 gint *idx;
224
225 path = gtk_tree_model_get_path(model, &it);
226 idx = gtk_tree_path_get_indices(path);
227 row = idx[0];
228 gtk_tree_path_free(path);
229 }
230 return row;
231}
232
233/**********************************************************************/
237{
238 GtkTreeModel *model;
239 GtkTreePath *path;
241
242 if ((model = gtk_tree_view_get_model(view))
244 && (path = gtk_tree_model_get_path(model, &iter))) {
246 gtk_tree_path_free(path);
248 }
249}
250
251/**********************************************************************/
256{
258
259 /*
260 * Ubuntu Linux's Ayatana/Unity desktop environment likes to steal the
261 * application's main menu bar from its window and put it at the top of
262 * the screen. It needs a hint in order not to steal menu bars other
263 * than the main one. Gory details at
264 * https://bugs.launchpad.net/ubuntu/+source/freeciv/+bug/743265
265 */
267 G_OBJECT_CLASS(GTK_MENU_BAR_GET_CLASS(menubar)), "ubuntu-local")) {
268 g_object_set(G_OBJECT(menubar), "ubuntu-local", TRUE, NULL);
269 }
270
271 return menubar;
272}
273
274/**********************************************************************/
277static void close_callback(GtkDialog *dialog, gpointer data)
278{
280}
281
282/**********************************************************************/
308
309/**********************************************************************/
312static void gui_dialog_response(struct gui_dialog *dlg, int response)
313{
314 if (dlg->response_callback) {
315 (*dlg->response_callback)(dlg, response, dlg->user_data);
316 }
317}
318
319/**********************************************************************/
322static void gui_dialog_destroyed(struct gui_dialog *dlg, int response,
323 gpointer data)
324{
326}
327
328/**********************************************************************/
332{
333 if (dlg->type == GUI_DIALOG_TAB) {
334 GtkWidget *notebook = dlg->v.tab.notebook;
335 gulong handler_id = dlg->v.tab.handler_id;
336
337 g_signal_handler_disconnect(notebook, handler_id);
338 }
339
341
342 if (*(dlg->source)) {
343 *(dlg->source) = NULL;
344 }
345
347
348 /* Raise the return dialog set by gui_dialog_set_return_dialog() */
349 if (dlg->return_dialog_id != -1) {
350 GList *it;
351
352 for (it = dialog_list; it; it = g_list_next(it)) {
353 struct gui_dialog * adialog = (struct gui_dialog *)it->data;
354
355 if (adialog->id == dlg->return_dialog_id) {
357 break;
358 }
359 }
360 }
361
362 if (dlg->title) {
363 free(dlg->title);
364 }
365
366 free(dlg);
367}
368
369/**********************************************************************/
375 GdkEventAny *ev, gpointer data)
376{
377 struct gui_dialog *dlg = data;
378
379 /* emit response signal. */
381
382 /* do the destroy by default. */
383 return FALSE;
384}
385
386/**********************************************************************/
392{
394 int n;
395
396 notebook = dlg->v.tab.notebook;
399 != dlg->v.tab.child) {
401 }
402
403 /* emit response signal. */
405
406 /* do the destroy by default. */
407 return FALSE;
408}
409
410/**********************************************************************/
414 gpointer data)
415{
416 struct gui_dialog *dlg = data;
417
418 if (ev->keyval == GDK_KEY_Escape
419 || ((ev->state & GDK_CONTROL_MASK) && ev->keyval == GDK_KEY_w)) {
420 /* emit response signal. */
422 }
423
424 /* propagate event further. */
425 return FALSE;
426}
427
428/**********************************************************************/
432 GtkWidget *page,
433 guint num,
434 struct gui_dialog *dlg)
435{
436 gint n;
437
439
440 if (n == num) {
442
445 }
446}
447
448/**********************************************************************/
451static void gui_dialog_detach(struct gui_dialog* dlg)
452{
453 gint n;
456
457 if (dlg->type != GUI_DIALOG_TAB) {
458 return;
459 }
460 dlg->type = GUI_DIALOG_WINDOW;
461
462 /* Create a new reference to the main widget, so it won't be
463 * destroyed in gtk_notebook_remove_page() */
464 g_object_ref(dlg->vbox);
465
466 /* Remove widget from the notebook */
467 notebook = dlg->v.tab.notebook;
468 handler_id = dlg->v.tab.handler_id;
470
473
474
475 /* Create window and put the widget inside */
479
481 dlg->v.window = window;
482 g_signal_connect(window, "delete_event",
484
486 dlg->default_width,
487 dlg->default_height);
489}
490
491/**********************************************************************/
495 GdkEventButton* button,
496 gpointer data)
497{
498 if (button->type != GDK_2BUTTON_PRESS) {
499 return FALSE;
500 }
501 if (button->button != 1) {
502 return FALSE;
503 }
504 gui_dialog_detach((struct gui_dialog*) data);
505 return TRUE;
506}
507
508
509/**********************************************************************/
519{
520 struct gui_dialog *dlg;
522 static int dialog_id_counter;
523
524 dlg = fc_malloc(sizeof(*dlg));
526
527 dlg->source = pdlg;
528 *pdlg = dlg;
529 dlg->user_data = user_data;
530 dlg->title = NULL;
531
532 dlg->default_width = 200;
533 dlg->default_height = 300;
534
536 dlg->type = GUI_DIALOG_TAB;
537 } else {
538 dlg->type = GUI_DIALOG_WINDOW;
539 }
540
541 if (!gui_action) {
543 }
545
546 vbox = gtk_grid_new();
553 /* We expect this to be short (as opposed to tall); maximise usable
554 * height by putting buttons down the right hand side */
557 } else {
558 /* We expect this to be reasonably tall; maximise usable width by
559 * putting buttons along the bottom */
562 }
563
567
570
571 switch (dlg->type) {
573 {
575
577 gtk_widget_set_name(window, "Freeciv");
580
582 dlg->v.window = window;
583 g_signal_connect(window, "delete_event",
585
586 }
587 break;
588 case GUI_DIALOG_TAB:
589 {
590 GtkWidget *hbox, *label, *image, *button, *event_box;
591 gchar *buf;
592
593 hbox = gtk_grid_new();
594
603
604 button = gtk_button_new();
606 g_signal_connect_swapped(button, "clicked",
608
609 buf = g_strdup_printf(_("Close Tab:\n%s"), _("Ctrl+W"));
611 g_free(buf);
612
619
621
623
627
629 dlg->v.tab.handler_id =
630 g_signal_connect(notebook, "switch-page",
632 dlg->v.tab.child = vbox;
633
637 dlg->v.tab.label = label;
639
641 g_signal_connect(event_box, "button-press-event",
643 }
644 break;
645 }
646
647 dlg->vbox = vbox;
649
651
652 dlg->id = dialog_id_counter;
654 dlg->return_dialog_id = -1;
655
656 g_signal_connect(vbox, "destroy",
658 g_signal_connect(vbox, "key_press_event",
660
661 g_object_set_data(G_OBJECT(vbox), "gui-dialog-data", dlg);
662}
663
664/**********************************************************************/
668{
669 struct gui_dialog *dlg =
670 g_object_get_data(G_OBJECT(vbox), "gui-dialog-data");
671 gpointer arg2 =
672 g_object_get_data(G_OBJECT(button), "gui-dialog-response-data");
673
675}
676
677/**********************************************************************/
680static void gui_dialog_pack_button(struct gui_dialog *dlg, GtkWidget *button,
681 int response)
682{
684
686
687 g_object_set_data(G_OBJECT(button), "gui-dialog-response-data",
688 GINT_TO_POINTER(response));
689
690 if ((signal_id = g_signal_lookup("clicked", GTK_TYPE_BUTTON))) {
692
694 G_OBJECT(dlg->vbox));
696 }
697
701}
702
703/**********************************************************************/
707 const char *icon_name,
708 const char *text, int response)
709{
710 GtkWidget *button;
711
712 button = icon_label_button_new(icon_name, text);
714 gui_dialog_pack_button(dlg, button, response);
715
716 return button;
717}
718
719/**********************************************************************/
730
731/**********************************************************************/
734void gui_dialog_set_default_response(struct gui_dialog *dlg, int response)
735{
737 GList *list;
738
740
741 for (list = children; list; list = g_list_next(list)) {
742 GtkWidget *button = list->data;
743
744 if (GTK_IS_BUTTON(button)) {
745 gpointer data = g_object_get_data(G_OBJECT(button),
746 "gui-dialog-response-data");
747
748 if (response == GPOINTER_TO_INT(data)) {
750 }
751 }
752 }
753
755}
756
757/**********************************************************************/
761 int response, bool setting)
762{
764 GList *list;
765
767
768 for (list = children; list; list = g_list_next(list)) {
769 GtkWidget *button = list->data;
770
771 if (GTK_IS_BUTTON(button)) {
772 gpointer data = g_object_get_data(G_OBJECT(button),
773 "gui-dialog-response-data");
774
775 if (response == GPOINTER_TO_INT(data)) {
777 }
778 }
779 }
780
782}
783
784/**********************************************************************/
791
792/**********************************************************************/
796{
798
799 if (dlg->type == GUI_DIALOG_TAB) {
801 GList *list;
802 gint num_visible = 0;
803
805
806 for (list = children; list; list = g_list_next(list)) {
807 GtkWidget *button = list->data;
808
809 if (!GTK_IS_BUTTON(button)) {
810 num_visible++;
811 } else {
812 gpointer data = g_object_get_data(G_OBJECT(button),
813 "gui-dialog-response-data");
814 int response = GPOINTER_TO_INT(data);
815
816 if (response != GTK_RESPONSE_CLOSE
817 && response != GTK_RESPONSE_CANCEL) {
818 num_visible++;
819 } else {
820 gtk_widget_hide(button);
821 }
822 }
823 }
825
826 if (num_visible == 0) {
828 }
829 }
830}
831
832/**********************************************************************/
836{
837 fc_assert_ret(NULL != dlg);
838
839 switch (dlg->type) {
842 break;
843 case GUI_DIALOG_TAB:
844 {
846 gint current, n;
847
850
851 if (current != n) {
852 GtkWidget *label = dlg->v.tab.label;
853
855 "notice");
856 }
857 }
858 break;
859 }
860}
861
862/**********************************************************************/
866{
867 fc_assert_ret(NULL != dlg);
868
869 switch (dlg->type) {
872 break;
873 case GUI_DIALOG_TAB:
874 {
876 gint n;
877
880 }
881 break;
882 }
883}
884
885/**********************************************************************/
889{
890 fc_assert_ret(NULL != dlg);
891
892 switch (dlg->type) {
894 break;
895 case GUI_DIALOG_TAB:
896 {
898 gint current, n;
899
902
903 if (current != n) {
904 GtkWidget *label = dlg->v.tab.label;
906
907 /* Have only alert - remove notice if it exist. */
910 }
911 }
912 break;
913 }
914}
915
916/**********************************************************************/
920{
921 dlg->default_width = width;
922 dlg->default_height = height;
923 switch (dlg->type) {
926 break;
927 case GUI_DIALOG_TAB:
928 break;
929 }
930}
931
932/**********************************************************************/
935void gui_dialog_set_title(struct gui_dialog *dlg, const char *title)
936{
937 if (dlg->title) {
938 free(dlg->title);
939 }
940 dlg->title = fc_strdup(title);
941 switch (dlg->type) {
944 break;
945 case GUI_DIALOG_TAB:
947 break;
948 }
949}
950
951/**********************************************************************/
955{
956 switch (dlg->type) {
959 break;
960 case GUI_DIALOG_TAB:
961 {
962 gint n;
963
966 }
967 break;
968 }
969}
970
971/**********************************************************************/
975{
976 GList *it, *it_next;
977
978 for (it = dialog_list; it; it = it_next) {
979 it_next = g_list_next(it);
980
981 gui_dialog_destroy((struct gui_dialog *)it->data);
982 }
983}
984
985/**********************************************************************/
993
994/**********************************************************************/
999{
1000 if (return_dialog == NULL) {
1001 dlg->return_dialog_id = -1;
1002 } else {
1004 }
1005}
1006
1007/**********************************************************************/
1010void gui_update_font(const char *font_name, const char *font_value)
1011{
1012 char *str;
1015 int size;
1016 const char *fam;
1017 const char *style;
1018 const char *weight;
1019
1021
1022 if (desc == NULL) {
1023 return;
1024 }
1025
1027
1028 if (fam == NULL) {
1029 return;
1030 }
1031
1033 style = "\n font-style: italic;";
1034 } else {
1035 style = "";
1036 }
1037
1038 if (pango_font_description_get_weight(desc) >= 700) {
1039 weight = "\n font-weight: bold;";
1040 } else {
1041 weight = "";
1042 }
1043
1045
1046 if (size != 0) {
1048 str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpx;%s%s}",
1049 font_name, fam, size / PANGO_SCALE, style, weight);
1050 } else {
1051 str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;%s%s}",
1052 font_name, fam, size / PANGO_SCALE, style, weight);
1053 }
1054 } else {
1055 str = g_strdup_printf("#Freeciv #%s { font-family: %s;%s%s}",
1056 font_name, fam, style, weight);
1057 }
1058
1060
1063 str, -1, NULL);
1067 g_free(str);
1068}
1069
1070/**********************************************************************/
1085
1086/**********************************************************************/
1091{
1092 gulong hid;
1093
1094 if (!obj || !cb) {
1095 return;
1096 }
1097
1099 0, 0, NULL, cb, NULL);
1101}
1102
1103/**********************************************************************/
1107{
1108 gulong hid;
1109
1110 if (!obj || !cb) {
1111 return;
1112 }
1113
1115 0, 0, NULL, cb, NULL);
1117}
1118
1119/**********************************************************************/
1124 GType gtype, int model_index)
1125{
1128 const char *attr;
1129
1133
1134 if (gtype == G_TYPE_BOOLEAN) {
1136 attr = "active";
1137 } else if (gtype == GDK_TYPE_PIXBUF) {
1139 attr = "pixbuf";
1140 } else {
1142 attr = "text";
1143 }
1144
1146 model_index, NULL);
1148
1149 return col;
1150}
1151
1152/**********************************************************************/
1156{
1158
1160 ".alert {\n"
1161 "color: rgba(255, 0, 0, 255);\n"
1162 "}\n"
1163 ".notice {\n"
1164 "color: rgba(0, 0, 255, 255);\n"
1165 "}\n",
1166 -1, NULL);
1167}
#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
static struct fc_sockaddr_list * list
Definition clinet.c:102
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:736
gboolean fc_gained_focus(GtkWidget *w, GdkEventKey *ev, gpointer data)
Definition gui_main.c:746
GtkWidget * toplevel
Definition gui_main.c:126
#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
void gui_dialog_set_default_response(struct gui_dialog *dlg, int response)
Definition gui_stuff.c:734
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
GtkWidget * gui_dialog_add_widget(struct gui_dialog *dlg, GtkWidget *widget)
Definition gui_stuff.c:722
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 set_relative_window_position(GtkWindow *ref, GtkWindow *w, int px, int py)
Definition gui_stuff.c:60
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 * gtk_aux_menu_bar_new(void)
Definition gui_stuff.c:255
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
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_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
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