24#include <gdk/gdkkeysyms.h>
84static void races_response(GtkWidget *w, gint response, gpointer data);
90 GtkTreeModel *model, GtkTreePath *path,
91 gboolean selected, gpointer data);
106 GtkWidget *
vbox, *
label, *headline_label, *sw;
115 vbox = gtk_grid_new();
116 gtk_orientable_set_orientation(GTK_ORIENTABLE(
vbox),
117 GTK_ORIENTATION_VERTICAL);
118 gtk_grid_set_row_spacing(GTK_GRID(
vbox), 2);
121 headline_label = gtk_label_new(
headline);
122 gtk_container_add(GTK_CONTAINER(
vbox), headline_label);
123 gtk_widget_set_name(headline_label,
"notify_label");
125 gtk_label_set_justify(GTK_LABEL(headline_label), GTK_JUSTIFY_LEFT);
126 gtk_widget_set_halign(headline_label, GTK_ALIGN_START);
127 gtk_widget_set_valign(headline_label, GTK_ALIGN_START);
129 sw = gtk_scrolled_window_new(NULL, NULL);
130 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
131 GTK_SHADOW_ETCHED_IN);
132 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
133 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
137 gtk_container_add(GTK_CONTAINER(sw),
label);
139 gtk_widget_set_name(
label,
"notify_label");
140 gtk_label_set_justify(GTK_LABEL(
label), GTK_JUSTIFY_LEFT);
141 gtk_widget_set_halign(
label, GTK_ALIGN_START);
142 gtk_widget_set_valign(
label, GTK_ALIGN_START);
144 gtk_container_add(GTK_CONTAINER(
vbox), sw);
160 struct city *pcity = NULL;
161 struct tile *ptile = g_object_get_data(G_OBJECT(w),
"tile");
179 gtk_widget_destroy(w);
187 gtk_widget_destroy(w);
196 const struct text_tag_list *tags,
203 _(
"_Close"), GTK_RESPONSE_CLOSE,
210 _(
"Goto _Location"), 1,
211 _(
"I_nspect City"), 2,
212 _(
"_Close"), GTK_RESPONSE_CLOSE,
216 _(
"Goto _Location"), 1,
217 _(
"_Close"), GTK_RESPONSE_CLOSE,
222 gtk_dialog_set_default_response(GTK_DIALOG(
shell), GTK_RESPONSE_CLOSE);
223 gtk_window_set_position(GTK_WINDOW(
shell), GTK_WIN_POS_CENTER_ON_PARENT);
225 label = gtk_label_new(
lines);
226 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(
shell))), label);
227 gtk_widget_show(label);
229 g_object_set_data(G_OBJECT(
shell),
"tile", ptile);
232 gtk_widget_show(
shell);
240 GtkWidget *
shell, *label;
242 shell = gtk_dialog_new();
245 gtk_dialog_set_default_response(GTK_DIALOG(
shell), GTK_RESPONSE_CLOSE);
246 gtk_window_set_position(GTK_WINDOW(
shell), GTK_WIN_POS_CENTER_ON_PARENT);
248 label = gtk_label_new(
message);
249 gtk_label_set_selectable(GTK_LABEL(label), 1);
251 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(
shell))), label);
252 gtk_widget_show(label);
254 gtk_dialog_add_button(GTK_DIALOG(
shell),
_(
"_Close"),GTK_RESPONSE_CLOSE);
258 gtk_widget_show(
shell);
268 if (response == GTK_RESPONSE_YES) {
276 gtk_widget_destroy(w);
285 static GtkWidget *
shell = NULL;
289 shell = gtk_message_dialog_new(NULL,
293 _(
"You say you wanna revolution?"));
294 gtk_window_set_title(GTK_WINDOW(
shell),
_(
"Revolution!"));
297 g_signal_connect(
shell,
"destroy",
298 G_CALLBACK(gtk_widget_destroyed), &
shell);
300 g_signal_connect(
shell,
"response",
303 gtk_window_present(GTK_WINDOW(
shell));
316 if (arg == GTK_RESPONSE_YES) {
317 int au_id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dlg),
321 int tgt_id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dlg),
325 if (
actor && tgt_extra) {
331 gtk_widget_destroy(dlg);
341 bv_extras alternative;
357 BV_SET(alternative, what);
362 _(
"What To Pillage"),
364 _(
"Looking for target extra:"),
366 _(
"Select what to pillage:"),
401 if (nation == -1 ||
list == NULL) {
404 GtkTreeModel *model = gtk_tree_view_get_model(
list);
406 GtkTreePath *path = NULL;
407 gtk_tree_model_get_iter_first(model, &iter);
410 gtk_tree_model_get(model, &iter, 0, &nation_of_row, -1);
411 if (nation == nation_of_row) {
412 path = gtk_tree_model_get_path(model, &iter);
415 }
while (gtk_tree_model_iter_next(model, &iter));
429 GtkTreeView *
list = GTK_TREE_VIEW(tab_list);
430 GtkTreeSelection *select = gtk_tree_view_get_selection(GTK_TREE_VIEW(
list));
438 if (!gtk_tree_selection_path_is_selected(select, path)) {
440 gtk_tree_view_set_cursor(
list, path, NULL,
FALSE);
442 gtk_tree_view_scroll_to_cell(
list, path, NULL,
FALSE, 0, 0);
447 GtkTreePath *cursorpath;
452 gtk_tree_view_get_cursor(
list, &cursorpath, NULL);
455 if (!cursorpath || gtk_tree_selection_get_selected(select, NULL, NULL)) {
456 cursorpath = gtk_tree_path_new_first();
457 gtk_tree_view_set_cursor(
list, cursorpath, NULL,
FALSE);
459 gtk_tree_selection_unselect_all(select);
460 gtk_tree_path_free(cursorpath);
462 gtk_tree_path_free(path);
489 GtkListStore *model =
490 GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(
races_leader)));
493 gtk_list_store_clear(model);
500 gtk_list_store_insert_with_values(model, &iter, i, 0,
leader_name, -1);
513 const char *leadername,
bool is_male,
525 gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(
races_leader))),
528 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
races_sex[is_male]),
531 int idx =
fc_rand(nation_leader_list_size(
534 gtk_combo_box_set_active(GTK_COMBO_BOX(
races_leader), idx);
547 if (i >= 0 && i < style_id) {
554 path = gtk_tree_path_new();
555 gtk_tree_path_append_index(path, j);
558 gtk_tree_path_free(path);
567 gtk_text_buffer_set_text(
races_text, buf, -1);
572 gtk_dialog_set_response_sensitive(GTK_DIALOG(
races_shell),
573 GTK_RESPONSE_ACCEPT,
TRUE);
577 gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(
races_leader))),
580 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
races_sex[0]),
TRUE);
583 GtkTreeSelection* select
586 gtk_tree_selection_unselect_all(select);
594 gtk_dialog_set_response_sensitive(GTK_DIALOG(
races_shell),
595 GTK_RESPONSE_ACCEPT,
FALSE);
611 GtkWidget *sw = NULL;
612 GtkListStore *store = NULL;
613 GtkWidget *
list = NULL;
620 GValue value = { 0, };
633 GtkTreeSelection *select;
634 GtkCellRenderer *render;
635 GtkTreeViewColumn *column;
637 store = gtk_list_store_new(4, G_TYPE_INT, G_TYPE_BOOLEAN,
638 GDK_TYPE_PIXBUF, G_TYPE_STRING);
639 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store),
640 3, GTK_SORT_ASCENDING);
642 list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
645 gtk_tree_view_set_search_column(GTK_TREE_VIEW(
list), 3);
646 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
list),
FALSE);
647 g_object_unref(store);
649 select = gtk_tree_view_get_selection(GTK_TREE_VIEW(
list));
655 sw = gtk_scrolled_window_new(NULL, NULL);
656 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
657 GTK_SHADOW_ETCHED_IN);
658 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
659 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
660 gtk_container_add(GTK_CONTAINER(sw),
list);
662 render = gtk_cell_renderer_pixbuf_new();
663 column = gtk_tree_view_column_new_with_attributes(
"Flag", render,
665 gtk_tree_view_append_column(GTK_TREE_VIEW(
list), column);
666 render = gtk_cell_renderer_text_new();
667 column = gtk_tree_view_column_new_with_attributes(
"Nation", render,
668 "text", 3,
"strikethrough", 1, NULL);
669 gtk_tree_view_append_column(GTK_TREE_VIEW(
list), column);
672 gtk_list_store_append(store, &it);
674 used = (pnation->player != NULL && pnation->player !=
races_player);
675 gtk_list_store_set(store, &it, 0,
nation_number(pnation), 1, used, -1);
678 gtk_list_store_set(store, &it, 2,
img, -1);
682 g_value_init(&value, G_TYPE_STRING);
684 gtk_list_store_set_value(store, &it, 3, &value);
685 g_value_unset(&value);
697 GtkWidget *nation_list;
698 GtkWidget *group_name_label;
711 gtk_notebook_append_page(GTK_NOTEBOOK(
races_notebook), nation_list,
720 group_name_label = gtk_label_new(
_(
"All"));
721 gtk_notebook_append_page(GTK_NOTEBOOK(
races_notebook), nation_list,
739 tab = gtk_notebook_get_current_page(GTK_NOTEBOOK(
races_notebook));
771 while (gtk_notebook_get_n_pages(GTK_NOTEBOOK(
races_notebook)) > 0) {
785 for (i = 0; i < groupidx; i++) {
816 if (gtk_combo_box_get_active_iter(b, &iter)) {
820 gtk_tree_model_get(gtk_combo_box_get_model(b), &iter,
842 GtkWidget *hbox, *table;
843 GtkWidget *frame, *label, *combo;
849 GtkCellRenderer *render;
850 GtkTreeViewColumn *column;
860 title =
_(
"What Nation Will You Be?");
879 gtk_window_set_position(GTK_WINDOW(
shell), GTK_WIN_POS_CENTER_ON_PARENT);
880 gtk_window_set_default_size(GTK_WINDOW(
shell), -1, 590);
882 frame = gtk_frame_new(
_(
"Select a nation"));
883 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(
shell))), frame);
885 hbox = gtk_grid_new();
886 gtk_grid_set_column_spacing(GTK_GRID(hbox), 18);
887 gtk_container_set_border_width(GTK_CONTAINER(hbox), 3);
888 gtk_container_add(GTK_CONTAINER(frame), hbox);
892 GtkWidget* nation_selection_list = gtk_grid_new();
895 gtk_grid_set_row_spacing(GTK_GRID(nation_selection_list), 2);
902 GtkListStore *sets_model = gtk_list_store_new(4, G_TYPE_STRING,
906 GtkCellRenderer *renderer;
922 "<b>%s</b> (%d nations)", num_nations),
923 escaped, num_nations);
935 int len = strcspn(p,
"\n");
937 if (p[
len] ==
'\n') {
940 escaped = g_markup_escape_text(p,
len);
947 gtk_list_store_insert_with_values(sets_model, NULL, -1,
958 = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(sets_model));
959 g_object_unref(G_OBJECT(sets_model));
966 gtk_editable_set_editable(GTK_EDITABLE(
entry),
FALSE);
973 renderer = gtk_cell_renderer_text_new();
978 renderer,
"markup", 1, NULL);
992 label = g_object_new(GTK_TYPE_LABEL,
993 "use-underline",
TRUE,
994 "label",
_(
"_Nation Set:"),
1001 gtk_grid_attach(GTK_GRID(nation_selection_list), label,
1008 gtk_notebook_set_tab_pos(GTK_NOTEBOOK(
races_notebook), GTK_POS_LEFT);
1014 bool show_groups =
FALSE;
1025 label = g_object_new(GTK_TYPE_LABEL,
1026 "use-underline",
TRUE,
1027 "label",
_(
"Nation _Groups:"),
1032 gtk_grid_attach(GTK_GRID(nation_selection_list), label,
1041 gtk_container_add(GTK_CONTAINER(hbox), nation_selection_list);
1045 notebook = gtk_notebook_new();
1046 gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_BOTTOM);
1047 gtk_container_add(GTK_CONTAINER(hbox), notebook);
1050 label = gtk_label_new_with_mnemonic(
_(
"_Properties"));
1053 g_signal_connect(table,
"destroy",
1055 g_object_set(table,
"margin", 6, NULL);
1056 gtk_grid_set_row_spacing(GTK_GRID(table), 2);
1057 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), table, label);
1061 GtkListStore *model = gtk_list_store_new(1, G_TYPE_STRING);
1063 combo = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(model));
1064 gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(combo), 0);
1065 g_object_unref(G_OBJECT(model));
1068 label = g_object_new(GTK_TYPE_LABEL,
1069 "use-underline",
TRUE,
1070 "mnemonic-widget", GTK_COMBO_BOX(combo),
1071 "label",
_(
"_Leader:"),
1075 gtk_widget_set_margin_bottom(label, 6);
1076 gtk_widget_set_margin_end(label, 12);
1077 gtk_grid_attach(GTK_GRID(table), label, 0, 0, 1, 2);
1078 gtk_grid_attach(GTK_GRID(table), combo, 1, 0, 2, 1);
1080 cmd = gtk_radio_button_new_with_mnemonic(NULL,
_(
"_Female"));
1081 gtk_widget_set_margin_bottom(cmd, 6);
1083 gtk_grid_attach(GTK_GRID(table), cmd, 1, 1, 1, 1);
1085 cmd = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(cmd),
1087 gtk_widget_set_margin_bottom(cmd, 6);
1089 gtk_grid_attach(GTK_GRID(table), cmd, 2, 1, 1, 1);
1092 store = gtk_list_store_new(3, G_TYPE_INT,
1093 GDK_TYPE_PIXBUF, G_TYPE_STRING);
1095 list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
1096 gtk_widget_set_hexpand(
list,
TRUE);
1097 gtk_widget_set_vexpand(
list,
TRUE);
1099 g_object_unref(store);
1100 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
list),
FALSE);
1101 g_signal_connect(gtk_tree_view_get_selection(GTK_TREE_VIEW(
list)),
"changed",
1104 sw = gtk_scrolled_window_new(NULL, NULL);
1105 gtk_widget_set_margin_top(sw, 6);
1106 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
1107 GTK_SHADOW_ETCHED_IN);
1108 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
1109 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
1110 gtk_container_add(GTK_CONTAINER(sw),
list);
1111 gtk_grid_attach(GTK_GRID(table), sw, 1, 2, 2, 2);
1113 label = g_object_new(GTK_TYPE_LABEL,
1114 "use-underline",
TRUE,
1115 "mnemonic-widget",
list,
1116 "label",
_(
"City _Styles:"),
1120 gtk_widget_set_margin_top(label, 6);
1121 gtk_widget_set_margin_end(label, 12);
1122 gtk_grid_attach(GTK_GRID(table), label, 0, 2, 1, 1);
1124 render = gtk_cell_renderer_pixbuf_new();
1125 column = gtk_tree_view_column_new_with_attributes(NULL, render,
1127 gtk_tree_view_append_column(GTK_TREE_VIEW(
list), column);
1128 render = gtk_cell_renderer_text_new();
1129 column = gtk_tree_view_column_new_with_attributes(NULL, render,
1131 gtk_tree_view_append_column(GTK_TREE_VIEW(
list), column);
1142 gtk_list_store_append(store, &it);
1147 gtk_list_store_set(store, &it, 0, i, 1,
img, 2,
1149 g_object_unref(
img);
1154 label = gtk_label_new_with_mnemonic(
_(
"_Description"));
1156 text = gtk_text_view_new();
1157 g_object_set(text,
"margin", 6, NULL);
1158 gtk_widget_set_hexpand(text,
TRUE);
1159 gtk_widget_set_vexpand(text,
TRUE);
1160 races_text = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
1161 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
1162 gtk_text_view_set_editable(GTK_TEXT_VIEW(text),
FALSE);
1163 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(text),
FALSE);
1164 gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text), 6);
1165 gtk_text_view_set_right_margin(GTK_TEXT_VIEW(text), 6);
1167 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), text, label);
1170 g_signal_connect(
shell,
"destroy",
1172 g_signal_connect(
shell,
"response",
1175 g_signal_connect(GTK_COMBO_BOX(
races_leader),
"changed",
1178 g_signal_connect(
races_sex[0],
"toggled",
1180 g_signal_connect(
races_sex[1],
"toggled",
1184 gtk_dialog_set_default_response(GTK_DIALOG(
shell), GTK_RESPONSE_CANCEL);
1188 gtk_dialog_set_response_sensitive(GTK_DIALOG(
shell), GTK_RESPONSE_NO,
1192 gtk_widget_show_all(gtk_dialog_get_content_area(GTK_DIALOG(
shell)));
1253 GtkTreeModel *model = gtk_tree_view_get_model(
list);
1254 GtkTreeSelection* select = gtk_tree_view_get_selection(
list);
1259 if (gtk_tree_model_get_iter_first(model, &it)) {
1264 gtk_tree_model_get(model, &it, 0, &nation_no, -1);
1270 gtk_list_store_set(GTK_LIST_STORE(model), &it, 1, chosen, -1);
1272 }
while (gtk_tree_model_iter_next(model, &it));
1276 if (gtk_tree_selection_get_selected(select, &model, &it)) {
1277 gtk_tree_model_get(model, &it, 1, &chosen, -1);
1280 gtk_tree_selection_unselect_all(select);
1292 GtkTreeModel *model;
1295 if (gtk_tree_selection_get_selected(select, &model, &it)) {
1299 gtk_tree_model_get(model, &it, 0, &newnation, 1, &chosen, -1);
1325 gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(
races_leader))));
1348 GtkTreeModel *model, GtkTreePath *path,
1349 gboolean selected, gpointer data)
1354 gtk_tree_model_get_iter(model, &it, path);
1355 gtk_tree_model_get(model, &it, 1, &chosen, -1);
1356 return (!chosen || selected);
1364 GtkTreeModel *model;
1367 if (gtk_tree_selection_get_selected(select, &model, &it)) {
1379 if (response == GTK_RESPONSE_ACCEPT) {
1397 s = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(
races_leader))));
1401 if (strlen(s) == 0) {
1410 }
else if (response == GTK_RESPONSE_NO) {
1437 if (!punits || unit_list_size(punits) == 0) {
1442 shell = gtk_message_dialog_new(NULL, 0,
1443 GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,
1445 gtk_window_set_title(GTK_WINDOW(
shell),
_(
"Upgrade Unit!"));
1447 g_signal_connect(
shell,
"response", G_CALLBACK(gtk_widget_destroy),
1449 gtk_window_present(GTK_WINDOW(
shell));
1451 shell = gtk_message_dialog_new(NULL, 0,
1452 GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
1454 gtk_window_set_title(GTK_WINDOW(
shell),
_(
"Upgrade Obsolete Units"));
1456 gtk_dialog_set_default_response(GTK_DIALOG(
shell), GTK_RESPONSE_YES);
1458 if (gtk_dialog_run(GTK_DIALOG(
shell)) == GTK_RESPONSE_YES) {
1463 gtk_widget_destroy(
shell);
1475 if (!punits || unit_list_size(punits) == 0) {
1480 shell = gtk_message_dialog_new(NULL, 0,
1481 GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,
1483 gtk_window_set_title(GTK_WINDOW(
shell),
_(
"Disband Units"));
1485 g_signal_connect(
shell,
"response", G_CALLBACK(gtk_widget_destroy),
1487 gtk_window_present(GTK_WINDOW(
shell));
1489 shell = gtk_message_dialog_new(NULL, 0,
1490 GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
1492 gtk_window_set_title(GTK_WINDOW(
shell),
_(
"Disband Units"));
1494 gtk_dialog_set_default_response(GTK_DIALOG(
shell), GTK_RESPONSE_YES);
1496 if (gtk_dialog_run(GTK_DIALOG(
shell)) == GTK_RESPONSE_YES) {
1503 gtk_widget_destroy(
shell);
1525 if (NULL != padvance
1543 dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
1544 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
1545 _(
"Tileset \"%s\" problem, "
1546 "it's probably incompatible with "
1547 "the ruleset:\n%s"),
1550 dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
1551 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
1552 _(
"Tileset problem, "
1553 "it's probably incompatible with "
1554 "the ruleset:\n%s"),
1560 gtk_dialog_run(GTK_DIALOG(dialog));
1562 gtk_widget_destroy(dialog);
1581 int attacker_hp,
int defender_hp,
1582 bool make_att_veteran,
bool make_def_veteran)
void astr_free(struct astring *astr)
void astr_set(struct astring *astr, const char *format,...)
void astr_add(struct astring *astr, const char *format,...)
static const char * astr_str(const struct astring *astr) fc__attribute((nonnull(1)))
void output_window_append(const struct ft_color color, const char *featured_text)
const char * city_style_name_translation(const int style)
#define city_owner(_pcity_)
void popup_city_dialog(struct city *pcity)
enum client_states client_state(void)
void common_taxrates_callback(int idx, bool reverse)
static struct fc_sockaddr_list * list
void request_unit_disband(struct unit *punit)
void request_new_unit_activity_targeted(struct unit *punit, enum unit_activity act, struct extra_type *tgt)
void request_unit_upgrade(struct unit *punit)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction show_tileset_error
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit * actor
const char const char * headline
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction bool fatal
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction bool const char * tset_name
#define MAX_NUM_NATION_GROUPS
#define PL_(String1, String2, n)
const struct ft_color ftc_client
struct unit * game_unit_by_number(int id)
static GtkWidget * races_properties
static gboolean races_selection_func(GtkTreeSelection *select, GtkTreeModel *model, GtkTreePath *path, gboolean selected, gpointer data)
static GtkWidget * races_shell
static void select_nation(int nation, const char *leadername, bool is_male, int style_id)
static void sync_tabs_to_nation(int nation)
static GtkWidget * races_style_list
static void revolution_response(GtkWidget *w, gint response, gpointer data)
static void races_leader_callback(void)
static int selected_style
static void create_nation_selection_lists(void)
static int is_showing_pillage_dialog
static void create_races_dialog(struct player *pplayer)
static GtkWidget * races_leader
static GtkWidget * races_nation_list[MAX_NUM_NATION_GROUPS+1]
static void populate_leader_list(void)
void unit_select_dialog_popup(struct tile *ptile)
void popup_upgrade_dialog(struct unit_list *punits)
void races_update_pickable(bool nationset_change)
static void notify_connect_msg_response(GtkWidget *w, gint response)
static void races_sex_callback(GtkWidget *w, gpointer data)
static void pillage_callback(GtkWidget *dlg, gint arg)
void popup_notify_goto_dialog(const char *headline, const char *lines, const struct text_tag_list *tags, struct tile *ptile)
void show_tech_gained_dialog(Tech_type_id tech)
static GtkWidget * races_sex[2]
void popup_races_dialog(struct player *pplayer)
void popup_disband_dialog(struct unit_list *punits)
static GtkTreePath * path_to_nation_on_list(Nation_type_id nation, GtkTreeView *list)
void popdown_races_dialog(void)
static int selected_nation
static GtkWidget * races_notebook
void popup_pillage_dialog(struct unit *punit, bv_extras extras)
static void races_response(GtkWidget *w, gint response, gpointer data)
static void notify_goto_response(GtkWidget *w, gint response)
static void races_nation_callback(GtkTreeSelection *select, gpointer data)
void popup_connect_msg(const char *headline, const char *message)
bool handmade_scenario_warning(void)
void unit_select_dialog_update_real(void *unused)
static void nationset_callback(GtkComboBox *b, gpointer data)
void races_toggles_set_sensitive(void)
static void races_style_callback(GtkTreeSelection *select, gpointer data)
void popup_combat_info(int attacker_unit_id, int defender_unit_id, int attacker_hp, int defender_hp, bool make_att_veteran, bool make_def_veteran)
struct player * races_player
static GtkWidget * nationsets_chooser
static GtkTextBuffer * races_text
void nationset_sync_to_server(const char *nationset)
gboolean taxrates_callback(GtkWidget *w, GdkEventButton *ev, gpointer data)
static GtkWidget * create_list_of_nations_in_group(struct nation_group *group, int index)
static void select_nation_on_tab(GtkWidget *tab_list, int nation)
void popdown_all_game_dialogs(void)
struct property_editor * editprop_get_property_editor(void)
void property_editor_popdown(struct property_editor *pe)
GtkWidget * bottom_notebook
#define GUI_GTK_OPTION(optname)
void gui_dialog_present(struct gui_dialog *dlg)
void gui_dialog_set_default_response(struct gui_dialog *dlg, int response)
void gui_dialog_new(struct gui_dialog **pdlg, GtkNotebook *notebook, gpointer user_data, bool check_top)
GtkWidget * gui_dialog_add_button(struct gui_dialog *dlg, const char *text, int response)
void gui_dialog_show_all(struct gui_dialog *dlg)
void gui_dialog_set_title(struct gui_dialog *dlg, const char *title)
void gui_dialog_set_default_size(struct gui_dialog *dlg, int width, int height)
void gui_dialog_destroy_all(void)
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
void popup_help_dialog_typed(const char *item, enum help_page_type htype)
static struct gui_dialog * shell
GdkPixbuf * get_flag(const struct nation_type *nation)
void free_sprite(struct sprite *s)
GdkPixbuf * sprite_get_pixbuf(struct sprite *sprite)
struct sprite * crop_blankspace(struct sprite *s)
void unit_select_dialog_popup_main(struct tile *ptile, bool create)
void unit_select_dialog_popdown(void)
void blank_max_unit_size(void)
static char * leader_name
void popup_revolution_dialog(void)
void helptext_nation(char *buf, size_t bufsz, struct nation_type *pnation, const char *user_text)
#define fc_assert(condition)
#define fc_assert_action(condition, action)
void center_tile_mapcanvas(const struct tile *ptile)
Nation_type_id nation_number(const struct nation_type *pnation)
struct nation_leader * nation_leader_by_name(const struct nation_type *pnation, const char *name)
bool nation_leader_is_male(const struct nation_leader *pleader)
const char * nation_adjective_translation(const struct nation_type *pnation)
struct nation_type * nation_by_number(const Nation_type_id nation)
int nation_set_index(const struct nation_set *pset)
bool is_nation_pickable(const struct nation_type *nation)
const struct nation_leader_list * nation_leaders(const struct nation_type *pnation)
const char * nation_set_name_translation(const struct nation_set *pset)
bool is_nation_playable(const struct nation_type *nation)
bool nation_is_in_group(const struct nation_type *pnation, const struct nation_group *pgroup)
bool nation_is_in_set(const struct nation_type *pnation, const struct nation_set *pset)
const char * nation_set_description(const struct nation_set *pset)
const char * nation_group_name_translation(const struct nation_group *pgroup)
int nation_set_count(void)
struct nation_group * nation_group_by_number(int id)
struct nation_set * nation_set_by_rule_name(const char *name)
bool is_nation_group_hidden(struct nation_group *pgroup)
struct nation_set * nation_set_by_setting_value(const char *setting)
const char * nation_leader_name(const struct nation_leader *pleader)
int nation_group_count(void)
const char * nation_set_rule_name(const struct nation_set *pset)
struct nation_style * style_of_nation(const struct nation_type *pnation)
#define nation_leader_list_iterate(leaderlist, pleader)
#define nation_sets_iterate_end
#define nation_sets_iterate(NAME_pset)
#define nations_iterate_end
#define nations_iterate(NAME_pnation)
#define nation_leader_list_iterate_end
#define nation_groups_iterate(NAME_pgroup)
#define nation_groups_iterate_end
const struct option_set * server_optset
bool option_str_set(struct option *poption, const char *str)
const char * option_str_get(const struct option *poption)
struct client_options gui_options
struct option * optset_option_by_name(const struct option_set *poptset, const char *name)
@ GUI_POPUP_TECH_HELP_RULESET
@ GUI_POPUP_TECH_HELP_ENABLED
int dsend_packet_nation_select_req(struct connection *pc, int player_no, Nation_type_id nation_no, bool is_male, const char *name, int style)
void start_revolution(void)
void set_government_choice(struct government *government)
int player_number(const struct player *pplayer)
const char * player_name(const struct player *pplayer)
struct packet_ruleset_control control
bool center_when_popup_city
struct nation_type * nation
struct nation_style * style
int style_number(const struct nation_style *pstyle)
int basic_city_style_for_style(struct nation_style *pstyle)
#define styles_iterate(_p)
#define styles_iterate_end
int fc_break_lines(char *str, size_t desired_len)
const char * advance_name_translation(const struct advance *padvance)
struct advance * valid_advance_by_number(const Tech_type_id id)
struct extra_type * get_preferred_pillage(bv_extras extras)
bool get_units_upgrade_info(char *buf, size_t bufsz, struct unit_list *punits)
bool get_units_disband_info(char *buf, size_t bufsz, struct unit_list *punits)
struct city * tile_city(const struct tile *ptile)
struct sprite * get_sample_city_sprite(const struct tileset *t, int style_idx)
bool unit_can_do_action(const struct unit *punit, const action_id act_id)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end