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;
114 vbox = gtk_grid_new();
115 gtk_orientable_set_orientation(GTK_ORIENTABLE(
vbox),
116 GTK_ORIENTATION_VERTICAL);
117 gtk_grid_set_row_spacing(GTK_GRID(
vbox), 2);
120 headline_label = gtk_label_new(
headline);
121 gtk_container_add(GTK_CONTAINER(
vbox), headline_label);
122 gtk_widget_set_name(headline_label,
"notify_label");
124 gtk_label_set_justify(GTK_LABEL(headline_label), GTK_JUSTIFY_LEFT);
125 gtk_widget_set_halign(headline_label, GTK_ALIGN_START);
126 gtk_widget_set_valign(headline_label, GTK_ALIGN_START);
128 sw = gtk_scrolled_window_new(NULL, NULL);
129 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
130 GTK_SHADOW_ETCHED_IN);
131 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
132 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
136 gtk_container_add(GTK_CONTAINER(sw),
label);
138 gtk_widget_set_name(
label,
"notify_label");
139 gtk_label_set_justify(GTK_LABEL(
label), GTK_JUSTIFY_LEFT);
140 gtk_widget_set_halign(
label, GTK_ALIGN_START);
141 gtk_widget_set_valign(
label, GTK_ALIGN_START);
143 gtk_container_add(GTK_CONTAINER(
vbox), sw);
159 struct city *pcity = NULL;
160 struct tile *ptile = g_object_get_data(G_OBJECT(w),
"tile");
178 gtk_widget_destroy(w);
186 gtk_widget_destroy(w);
195 const struct text_tag_list *tags,
198 GtkWidget *
shell, *
label, *goto_command, *popcity_command;
200 shell = gtk_dialog_new();
203 gtk_dialog_set_default_response(GTK_DIALOG(
shell), GTK_RESPONSE_CLOSE);
204 gtk_window_set_position(GTK_WINDOW(
shell), GTK_WIN_POS_CENTER_ON_PARENT);
207 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(
shell))),
label);
208 gtk_widget_show(
label);
211 _(
"Goto _Location"));
212 gtk_dialog_add_action_widget(GTK_DIALOG(
shell), goto_command, 1);
213 gtk_widget_show(goto_command);
217 gtk_dialog_add_action_widget(GTK_DIALOG(
shell), popcity_command, 2);
218 gtk_widget_show(popcity_command);
220 gtk_dialog_add_button(GTK_DIALOG(
shell), GTK_STOCK_CLOSE,
224 gtk_widget_set_sensitive(goto_command,
FALSE);
225 gtk_widget_set_sensitive(popcity_command,
FALSE);
230 gtk_widget_set_sensitive(popcity_command,
234 g_object_set_data(G_OBJECT(
shell),
"tile", ptile);
237 gtk_widget_show(
shell);
245 GtkWidget *
shell, *label;
247 shell = gtk_dialog_new();
250 gtk_dialog_set_default_response(GTK_DIALOG(
shell), GTK_RESPONSE_CLOSE);
251 gtk_window_set_position(GTK_WINDOW(
shell), GTK_WIN_POS_CENTER_ON_PARENT);
253 label = gtk_label_new(
message);
254 gtk_label_set_selectable(GTK_LABEL(label), 1);
256 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(
shell))), label);
257 gtk_widget_show(label);
259 gtk_dialog_add_button(GTK_DIALOG(
shell), GTK_STOCK_CLOSE,
264 gtk_widget_show(
shell);
274 if (response == GTK_RESPONSE_YES) {
282 gtk_widget_destroy(w);
291 static GtkWidget *
shell = NULL;
295 shell = gtk_message_dialog_new(NULL,
299 _(
"You say you wanna revolution?"));
300 gtk_window_set_title(GTK_WINDOW(
shell),
_(
"Revolution!"));
303 g_signal_connect(
shell,
"destroy",
304 G_CALLBACK(gtk_widget_destroyed), &
shell);
306 g_signal_connect(
shell,
"response",
309 gtk_window_present(GTK_WINDOW(
shell));
322 if (arg == GTK_RESPONSE_YES) {
323 int au_id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dlg),
327 int tgt_id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dlg),
331 if (
actor && tgt_extra) {
337 gtk_widget_destroy(dlg);
347 bv_extras alternative;
363 BV_SET(alternative, what);
368 _(
"What To Pillage"),
370 _(
"Looking for target extra:"),
372 _(
"Select what to pillage:"),
407 if (nation == -1 ||
list == NULL) {
410 GtkTreeModel *model = gtk_tree_view_get_model(
list);
412 GtkTreePath *path = NULL;
413 gtk_tree_model_get_iter_first(model, &iter);
416 gtk_tree_model_get(model, &iter, 0, &nation_of_row, -1);
417 if (nation == nation_of_row) {
418 path = gtk_tree_model_get_path(model, &iter);
421 }
while (gtk_tree_model_iter_next(model, &iter));
435 GtkTreeView *
list = GTK_TREE_VIEW(tab_list);
436 GtkTreeSelection *select = gtk_tree_view_get_selection(GTK_TREE_VIEW(
list));
444 if (!gtk_tree_selection_path_is_selected(select, path)) {
446 gtk_tree_view_set_cursor(
list, path, NULL,
FALSE);
448 gtk_tree_view_scroll_to_cell(
list, path, NULL,
FALSE, 0, 0);
453 GtkTreePath *cursorpath;
459 gtk_tree_view_get_cursor(
list, &cursorpath, NULL);
462 if (!cursorpath || gtk_tree_selection_get_selected(select, NULL, NULL)) {
463 cursorpath = gtk_tree_path_new_first();
464 gtk_tree_view_set_cursor(
list, cursorpath, NULL,
FALSE);
466 gtk_tree_selection_unselect_all(select);
467 gtk_tree_path_free(cursorpath);
469 gtk_tree_path_free(path);
496 GtkListStore *model =
497 GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(
races_leader)));
500 gtk_list_store_clear(model);
507 gtk_list_store_insert_with_values(model, &iter, i, 0,
leader_name, -1);
520 const char *leadername,
bool is_male,
532 gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(
races_leader))),
535 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
races_sex[is_male]),
538 int idx =
fc_rand(nation_leader_list_size(
541 gtk_combo_box_set_active(GTK_COMBO_BOX(
races_leader), idx);
554 if (i >= 0 && i < style_id) {
561 path = gtk_tree_path_new();
562 gtk_tree_path_append_index(path, j);
565 gtk_tree_path_free(path);
574 gtk_text_buffer_set_text(
races_text, buf, -1);
579 gtk_dialog_set_response_sensitive(GTK_DIALOG(
races_shell),
580 GTK_RESPONSE_ACCEPT,
TRUE);
584 gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(
races_leader))),
587 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
races_sex[0]),
TRUE);
590 GtkTreeSelection* select
593 gtk_tree_selection_unselect_all(select);
601 gtk_dialog_set_response_sensitive(GTK_DIALOG(
races_shell),
602 GTK_RESPONSE_ACCEPT,
FALSE);
618 GtkWidget *sw = NULL;
619 GtkListStore *store = NULL;
620 GtkWidget *
list = NULL;
627 GValue value = { 0, };
640 GtkTreeSelection *select;
641 GtkCellRenderer *render;
642 GtkTreeViewColumn *column;
644 store = gtk_list_store_new(4, G_TYPE_INT, G_TYPE_BOOLEAN,
645 GDK_TYPE_PIXBUF, G_TYPE_STRING);
646 gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store),
647 3, GTK_SORT_ASCENDING);
649 list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
652 gtk_tree_view_set_search_column(GTK_TREE_VIEW(
list), 3);
653 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
list),
FALSE);
654 g_object_unref(store);
656 select = gtk_tree_view_get_selection(GTK_TREE_VIEW(
list));
662 sw = gtk_scrolled_window_new(NULL, NULL);
663 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
664 GTK_SHADOW_ETCHED_IN);
665 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
666 GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
667 gtk_container_add(GTK_CONTAINER(sw),
list);
669 render = gtk_cell_renderer_pixbuf_new();
670 column = gtk_tree_view_column_new_with_attributes(
"Flag", render,
672 gtk_tree_view_append_column(GTK_TREE_VIEW(
list), column);
673 render = gtk_cell_renderer_text_new();
674 column = gtk_tree_view_column_new_with_attributes(
"Nation", render,
675 "text", 3,
"strikethrough", 1, NULL);
676 gtk_tree_view_append_column(GTK_TREE_VIEW(
list), column);
679 gtk_list_store_append(store, &it);
681 used = (pnation->player != NULL && pnation->player !=
races_player);
682 gtk_list_store_set(store, &it, 0,
nation_number(pnation), 1, used, -1);
685 gtk_list_store_set(store, &it, 2,
img, -1);
689 g_value_init(&value, G_TYPE_STRING);
691 gtk_list_store_set_value(store, &it, 3, &value);
692 g_value_unset(&value);
704 GtkWidget *nation_list;
705 GtkWidget *group_name_label;
718 gtk_notebook_append_page(GTK_NOTEBOOK(
races_notebook), nation_list,
727 group_name_label = gtk_label_new(
_(
"All"));
728 gtk_notebook_append_page(GTK_NOTEBOOK(
races_notebook), nation_list,
746 tab = gtk_notebook_get_current_page(GTK_NOTEBOOK(
races_notebook));
779 while (gtk_notebook_get_n_pages(GTK_NOTEBOOK(
races_notebook)) > 0) {
794 for (i = 0; i < groupidx; i++) {
825 if (gtk_combo_box_get_active_iter(b, &iter)) {
829 gtk_tree_model_get(gtk_combo_box_get_model(b), &iter,
851 GtkWidget *hbox, *table;
852 GtkWidget *frame, *label, *combo;
858 GtkCellRenderer *render;
859 GtkTreeViewColumn *column;
869 title =
_(
"What Nation Will You Be?");
888 gtk_window_set_position(GTK_WINDOW(
shell), GTK_WIN_POS_CENTER_ON_PARENT);
889 gtk_window_set_default_size(GTK_WINDOW(
shell), -1, 590);
891 frame = gtk_frame_new(
_(
"Select a nation"));
892 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(
shell))), frame);
894 hbox = gtk_grid_new();
895 gtk_grid_set_column_spacing(GTK_GRID(hbox), 18);
896 gtk_container_set_border_width(GTK_CONTAINER(hbox), 3);
897 gtk_container_add(GTK_CONTAINER(frame), hbox);
901 GtkWidget* nation_selection_list = gtk_grid_new();
905 gtk_grid_set_row_spacing(GTK_GRID(nation_selection_list), 2);
912 GtkListStore *sets_model = gtk_list_store_new(4, G_TYPE_STRING,
916 GtkCellRenderer *renderer;
932 "<b>%s</b> (%d nations)", num_nations),
933 escaped, num_nations);
945 int len = strcspn(p,
"\n");
947 if (p[
len] ==
'\n') {
950 escaped = g_markup_escape_text(p,
len);
957 gtk_list_store_insert_with_values(sets_model, NULL, -1,
968 = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(sets_model));
969 g_object_unref(G_OBJECT(sets_model));
976 gtk_editable_set_editable(GTK_EDITABLE(
entry),
FALSE);
983 renderer = gtk_cell_renderer_text_new();
988 renderer,
"markup", 1, NULL);
1003 label = g_object_new(GTK_TYPE_LABEL,
1004 "use-underline",
TRUE,
1005 "label",
_(
"_Nation Set:"),
1012 gtk_grid_attach(GTK_GRID(nation_selection_list), label,
1019 gtk_notebook_set_tab_pos(GTK_NOTEBOOK(
races_notebook), GTK_POS_LEFT);
1025 bool show_groups =
FALSE;
1036 label = g_object_new(GTK_TYPE_LABEL,
1037 "use-underline",
TRUE,
1038 "label",
_(
"Nation _Groups:"),
1043 gtk_grid_attach(GTK_GRID(nation_selection_list), label,
1052 gtk_container_add(GTK_CONTAINER(hbox), nation_selection_list);
1056 notebook = gtk_notebook_new();
1057 gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook), GTK_POS_BOTTOM);
1058 gtk_container_add(GTK_CONTAINER(hbox), notebook);
1061 label = gtk_label_new_with_mnemonic(
_(
"_Properties"));
1064 g_signal_connect(table,
"destroy",
1066 g_object_set(table,
"margin", 6, NULL);
1067 gtk_grid_set_row_spacing(GTK_GRID(table), 2);
1068 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), table, label);
1072 GtkListStore *model = gtk_list_store_new(1, G_TYPE_STRING);
1074 combo = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(model));
1075 gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(combo), 0);
1076 g_object_unref(G_OBJECT(model));
1079 label = g_object_new(GTK_TYPE_LABEL,
1080 "use-underline",
TRUE,
1081 "mnemonic-widget", GTK_COMBO_BOX(combo),
1082 "label",
_(
"_Leader:"),
1086 gtk_widget_set_margin_bottom(label, 6);
1087 gtk_widget_set_margin_right(label, 12);
1088 gtk_grid_attach(GTK_GRID(table), label, 0, 0, 1, 2);
1089 gtk_grid_attach(GTK_GRID(table), combo, 1, 0, 2, 1);
1091 cmd = gtk_radio_button_new_with_mnemonic(NULL,
_(
"_Female"));
1092 gtk_widget_set_margin_bottom(cmd, 6);
1094 gtk_grid_attach(GTK_GRID(table), cmd, 1, 1, 1, 1);
1096 cmd = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(cmd),
1098 gtk_widget_set_margin_bottom(cmd, 6);
1100 gtk_grid_attach(GTK_GRID(table), cmd, 2, 1, 1, 1);
1103 store = gtk_list_store_new(3, G_TYPE_INT,
1104 GDK_TYPE_PIXBUF, G_TYPE_STRING);
1106 list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
1107 gtk_widget_set_hexpand(
list,
TRUE);
1108 gtk_widget_set_vexpand(
list,
TRUE);
1110 g_object_unref(store);
1111 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
list),
FALSE);
1112 g_signal_connect(gtk_tree_view_get_selection(GTK_TREE_VIEW(
list)),
"changed",
1115 sw = gtk_scrolled_window_new(NULL, NULL);
1116 gtk_widget_set_margin_top(sw, 6);
1117 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),
1118 GTK_SHADOW_ETCHED_IN);
1119 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
1120 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
1121 gtk_container_add(GTK_CONTAINER(sw),
list);
1122 gtk_grid_attach(GTK_GRID(table), sw, 1, 2, 2, 2);
1124 label = g_object_new(GTK_TYPE_LABEL,
1125 "use-underline",
TRUE,
1126 "mnemonic-widget",
list,
1127 "label",
_(
"City _Styles:"),
1131 gtk_widget_set_margin_top(label, 6);
1132 gtk_widget_set_margin_right(label, 12);
1133 gtk_grid_attach(GTK_GRID(table), label, 0, 2, 1, 1);
1135 render = gtk_cell_renderer_pixbuf_new();
1136 column = gtk_tree_view_column_new_with_attributes(NULL, render,
1138 gtk_tree_view_append_column(GTK_TREE_VIEW(
list), column);
1139 render = gtk_cell_renderer_text_new();
1140 column = gtk_tree_view_column_new_with_attributes(NULL, render,
1142 gtk_tree_view_append_column(GTK_TREE_VIEW(
list), column);
1153 gtk_list_store_append(store, &it);
1158 gtk_list_store_set(store, &it, 0, i, 1,
img, 2,
1160 g_object_unref(
img);
1165 label = gtk_label_new_with_mnemonic(
_(
"_Description"));
1167 text = gtk_text_view_new();
1168 g_object_set(text,
"margin", 6, NULL);
1169 gtk_widget_set_hexpand(text,
TRUE);
1170 gtk_widget_set_vexpand(text,
TRUE);
1171 races_text = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
1172 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
1173 gtk_text_view_set_editable(GTK_TEXT_VIEW(text),
FALSE);
1174 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(text),
FALSE);
1175 gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text), 6);
1176 gtk_text_view_set_right_margin(GTK_TEXT_VIEW(text), 6);
1178 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), text, label);
1181 g_signal_connect(
shell,
"destroy",
1183 g_signal_connect(
shell,
"response",
1186 g_signal_connect(GTK_COMBO_BOX(
races_leader),
"changed",
1189 g_signal_connect(
races_sex[0],
"toggled",
1191 g_signal_connect(
races_sex[1],
"toggled",
1195 gtk_dialog_set_default_response(GTK_DIALOG(
shell), GTK_RESPONSE_CANCEL);
1199 gtk_dialog_set_response_sensitive(GTK_DIALOG(
shell), GTK_RESPONSE_NO,
1203 gtk_widget_show_all(gtk_dialog_get_content_area(GTK_DIALOG(
shell)));
1264 GtkTreeModel *model = gtk_tree_view_get_model(
list);
1265 GtkTreeSelection* select = gtk_tree_view_get_selection(
list);
1270 if (gtk_tree_model_get_iter_first(model, &it)) {
1275 gtk_tree_model_get(model, &it, 0, &nation_no, -1);
1281 gtk_list_store_set(GTK_LIST_STORE(model), &it, 1, chosen, -1);
1283 }
while (gtk_tree_model_iter_next(model, &it));
1287 if (gtk_tree_selection_get_selected(select, &model, &it)) {
1288 gtk_tree_model_get(model, &it, 1, &chosen, -1);
1291 gtk_tree_selection_unselect_all(select);
1303 GtkTreeModel *model;
1306 if (gtk_tree_selection_get_selected(select, &model, &it)) {
1310 gtk_tree_model_get(model, &it, 0, &newnation, 1, &chosen, -1);
1336 gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(
races_leader))));
1359 GtkTreeModel *model, GtkTreePath *path,
1360 gboolean selected, gpointer data)
1365 gtk_tree_model_get_iter(model, &it, path);
1366 gtk_tree_model_get(model, &it, 1, &chosen, -1);
1367 return (!chosen || selected);
1375 GtkTreeModel *model;
1378 if (gtk_tree_selection_get_selected(select, &model, &it)) {
1390 if (response == GTK_RESPONSE_ACCEPT) {
1408 s = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(
races_leader))));
1412 if (strlen(s) == 0) {
1421 }
else if (response == GTK_RESPONSE_NO) {
1449 if (!punits || unit_list_size(punits) == 0) {
1454 shell = gtk_message_dialog_new(NULL, 0,
1455 GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,
1457 gtk_window_set_title(GTK_WINDOW(
shell),
_(
"Upgrade Unit!"));
1459 g_signal_connect(
shell,
"response", G_CALLBACK(gtk_widget_destroy),
1461 gtk_window_present(GTK_WINDOW(
shell));
1463 shell = gtk_message_dialog_new(NULL, 0,
1464 GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
1466 gtk_window_set_title(GTK_WINDOW(
shell),
_(
"Upgrade Obsolete Units"));
1468 gtk_dialog_set_default_response(GTK_DIALOG(
shell), GTK_RESPONSE_YES);
1470 if (gtk_dialog_run(GTK_DIALOG(
shell)) == GTK_RESPONSE_YES) {
1475 gtk_widget_destroy(
shell);
1487 if (!punits || unit_list_size(punits) == 0) {
1492 shell = gtk_message_dialog_new(NULL, 0,
1493 GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE,
1495 gtk_window_set_title(GTK_WINDOW(
shell),
_(
"Disband Units"));
1497 g_signal_connect(
shell,
"response", G_CALLBACK(gtk_widget_destroy),
1499 gtk_window_present(GTK_WINDOW(
shell));
1501 shell = gtk_message_dialog_new(NULL, 0,
1502 GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
1504 gtk_window_set_title(GTK_WINDOW(
shell),
_(
"Disband Units"));
1506 gtk_dialog_set_default_response(GTK_DIALOG(
shell), GTK_RESPONSE_YES);
1508 if (gtk_dialog_run(GTK_DIALOG(
shell)) == GTK_RESPONSE_YES) {
1515 gtk_widget_destroy(
shell);
1537 if (NULL != padvance
1555 dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
1556 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
1557 _(
"Tileset \"%s\" problem, "
1558 "it's probably incompatible with "
1559 "the ruleset:\n%s"),
1562 dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
1563 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
1564 _(
"Tileset problem, "
1565 "it's probably incompatible with "
1566 "the ruleset:\n%s"),
1572 gtk_dialog_run(GTK_DIALOG(dialog));
1574 gtk_widget_destroy(dialog);
1593 int attacker_hp,
int defender_hp,
1594 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)
GtkWidget * gtk_stockbutton_new(const gchar *stock, const gchar *label_text)
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