73#define SPECLIST_TAG dialog
74#define SPECLIST_TYPE struct Diplomacy_dialog
77#define dialog_list_iterate(dialoglist, pdialog) \
78 TYPED_LIST_ITERATE(struct Diplomacy_dialog, dialoglist, pdialog)
79#define dialog_list_iterate_end LIST_ITERATE_END
127#define RESPONSE_CANCEL_MEETING 100
128#define RESPONSE_CANCEL_MEETING_ALL 101
175 enum clause_type
type,
int value)
193 enum clause_type
type,
int value)
258 struct player *partner,
bool them)
260 GMenu *topmenu, *submenu;
262 bool any_map =
FALSE;
263 char act_plr_part[20];
265 struct player *pgiver, *pother;
268 fc_strlcpy(act_plr_part,
"_them",
sizeof(act_plr_part));
272 fc_strlcpy(act_plr_part,
"_us",
sizeof(act_plr_part));
277 topmenu = g_menu_new();
281 submenu = g_menu_new();
283 fc_snprintf(act_name,
sizeof(act_name),
"worldmap%s", act_plr_part);
284 act = g_simple_action_new(act_name, NULL);
285 g_object_set_data(G_OBJECT(act),
"plr", pgiver);
286 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
290 fc_snprintf(act_name,
sizeof(act_name),
"win.worldmap%s", act_plr_part);
298 submenu = g_menu_new();
301 fc_snprintf(act_name,
sizeof(act_name),
"seamap%s", act_plr_part);
302 act = g_simple_action_new(act_name, NULL);
303 g_object_set_data(G_OBJECT(act),
"plr", pgiver);
304 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
308 fc_snprintf(act_name,
sizeof(act_name),
"win.seamap%s", act_plr_part);
322 GList *sorting_list = NULL;
326 submenu = g_menu_new();
337 == TECH_PREREQS_KNOWN)) {
338 sorting_list = g_list_prepend(sorting_list, padvance);
342 if (NULL != sorting_list) {
344 const struct advance *padvance;
349 fc_snprintf(act_name,
sizeof(act_name),
"advance%sall", act_plr_part);
350 act = g_simple_action_new(act_name, NULL);
351 g_object_set_data(G_OBJECT(act),
"player_from",
353 g_object_set_data(G_OBJECT(act),
"player_to",
355 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
356 g_signal_connect(act,
"activate",
360 fc_snprintf(act_name,
sizeof(act_name),
"win.advance%sall", act_plr_part);
363 for (list_item = sorting_list, i = 0; NULL != list_item;
364 list_item = g_list_next(list_item), i++) {
366 fc_snprintf(act_name,
sizeof(act_name),
"advance%s%d",
368 act = g_simple_action_new(act_name, NULL);
370 padvance = (
const struct advance *) list_item->data;
371 g_object_set_data(G_OBJECT(act),
"player_from",
373 g_object_set_data(G_OBJECT(act),
"player_to",
375 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
376 g_signal_connect(act,
"activate",
380 fc_snprintf(act_name,
sizeof(act_name),
"win.advance%s%d",
387 g_list_free(sorting_list);
404 int n = city_list_size(pgiver->
cities);
406 submenu = g_menu_new();
409 struct city **city_list_ptrs;
415 city_list_ptrs[i] = pcity;
425 for (j = 0; j < i; j++) {
428 fc_snprintf(act_name,
sizeof(act_name),
"city%s%d", act_plr_part, i);
429 act = g_simple_action_new(act_name, NULL);
433 deal->
id = city_list_ptrs[j]->
id;
435 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
436 g_signal_connect(act,
"activate",
440 fc_snprintf(act_name,
sizeof(act_name),
"win.city%s%d",
448 free(city_list_ptrs);
456 fc_snprintf(act_name,
sizeof(act_name),
"vision%s", act_plr_part);
457 act = g_simple_action_new(act_name, NULL);
458 g_object_set_data(G_OBJECT(act),
"plr", pgiver);
459 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
463 fc_snprintf(act_name,
sizeof(act_name),
"win.vision%s", act_plr_part);
466 g_simple_action_set_enabled(G_SIMPLE_ACTION(act),
472 fc_snprintf(act_name,
sizeof(act_name),
"embassy%s", act_plr_part);
473 act = g_simple_action_new(act_name, NULL);
474 g_object_set_data(G_OBJECT(act),
"plr", pgiver);
475 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
479 fc_snprintf(act_name,
sizeof(act_name),
"win.embassy%s", act_plr_part);
482 g_simple_action_set_enabled(G_SIMPLE_ACTION(act),
488 enum diplstate_type ds;
489 int pact_clauses = 0;
493 submenu = g_menu_new();
496 fc_snprintf(act_name,
sizeof(act_name),
"ceasefire%s", act_plr_part);
497 act = g_simple_action_new(act_name, NULL);
498 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
499 g_signal_connect(act,
"activate",
502 fc_snprintf(act_name,
sizeof(act_name),
"win.ceasefire%s", act_plr_part);
504 g_menu_item_new(
Q_(
"?diplomatic_state:Cease-fire"),
507 g_simple_action_set_enabled(G_SIMPLE_ACTION(act),
508 ds != DS_CEASEFIRE && ds != DS_TEAM);
513 fc_snprintf(act_name,
sizeof(act_name),
"peace%s", act_plr_part);
514 act = g_simple_action_new(act_name, NULL);
515 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
516 g_signal_connect(act,
"activate",
519 fc_snprintf(act_name,
sizeof(act_name),
"win.peace%s", act_plr_part);
523 g_simple_action_set_enabled(G_SIMPLE_ACTION(act),
524 ds != DS_PEACE && ds != DS_TEAM);
529 fc_snprintf(act_name,
sizeof(act_name),
"alliance%s", act_plr_part);
530 act = g_simple_action_new(act_name, NULL);
531 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
532 g_signal_connect(act,
"activate",
535 fc_snprintf(act_name,
sizeof(act_name),
"win.alliance%s", act_plr_part);
537 g_menu_item_new(
Q_(
"?diplomatic_state:Alliance"),
540 g_simple_action_set_enabled(G_SIMPLE_ACTION(act),
541 ds != DS_ALLIANCE && ds != DS_TEAM);
545 if (pact_clauses > 0) {
548 g_object_unref(submenu);
559 GtkTreeViewColumn *col, gpointer data)
565 index = gtk_tree_path_get_indices(path);
598 dipl_sw = gtk_scrolled_window_new();
599 gtk_widget_set_margin_bottom(dipl_sw, 2);
600 gtk_widget_set_margin_end(dipl_sw, 2);
601 gtk_widget_set_margin_start(dipl_sw, 2);
602 gtk_widget_set_margin_top(dipl_sw, 2);
603 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(dipl_sw),
604 GTK_POLICY_AUTOMATIC,
605 GTK_POLICY_AUTOMATIC);
606 gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(dipl_sw),
611 _(
"Cancel _all meetings"),
651 log_error(
"unhandled response in %s: %d", __FUNCTION__, response);
653 case GTK_RESPONSE_DELETE_EVENT:
660 adialog->treaty.plr1));
671 if (NULL != pdialog->
dialog) {
685 buf = g_strdup_printf(
_(
"Diplomacy [%d]"), dialog_list_size(
dialog_list));
711 case GTK_RESPONSE_ACCEPT:
718 log_error(
"unhandled response in %s: %d", __FUNCTION__, response);
720 case GTK_RESPONSE_DELETE_EVENT:
721 case GTK_RESPONSE_CANCEL:
737 GtkWidget *vbox, *hgrid, *table, *mainbox;
738 GtkWidget *label, *sw, *
view, *pic, *spin;
742 GtkCellRenderer *rend;
760 buf = g_strdup_printf(
_(
"Diplomacy [%d]"), dialog_list_size(
dialog_list));
770 _(
"Accept treaty"), GTK_RESPONSE_ACCEPT);
782 for (i = 0; i < gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook)); i++) {
784 = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), i);
786 = g_object_get_data(G_OBJECT(prev_page),
"gui-dialog-data");
787 const char *prev_label
788 = gtk_label_get_text(GTK_LABEL(prev_dialog->
v.
tab.
label));
791 gtk_notebook_reorder_child(GTK_NOTEBOOK(
notebook),
799 vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
800 gtk_widget_set_margin_start(
vbox, 2);
801 gtk_widget_set_margin_end(
vbox, 2);
802 gtk_widget_set_margin_top(
vbox, 2);
803 gtk_widget_set_margin_bottom(
vbox, 2);
807 label = gtk_label_new(NULL);
808 gtk_widget_set_halign(
label, GTK_ALIGN_CENTER);
809 gtk_widget_set_valign(
label, GTK_ALIGN_CENTER);
810 buf = g_strdup_printf(
"<span size=\"large\"><u>%s</u></span>",
812 gtk_label_set_markup(GTK_LABEL(
label), buf);
816 hgrid = gtk_grid_new();
817 gtk_grid_set_column_spacing(GTK_GRID(hgrid), 5);
818 gtk_box_append(GTK_BOX(
vbox), hgrid);
823 pic = gtk_picture_new();
825 gtk_grid_attach(GTK_GRID(hgrid), pic, grid_col++, 0, 1, 1);
828 label = gtk_label_new(NULL);
830 gtk_widget_set_halign(
label, GTK_ALIGN_CENTER);
831 gtk_widget_set_valign(
label, GTK_ALIGN_CENTER);
832 buf = g_strdup_printf(
"<span size=\"large\" weight=\"bold\">%s</span>",
834 gtk_label_set_markup(GTK_LABEL(
label), buf);
836 gtk_grid_attach(GTK_GRID(hgrid),
label, grid_col++, 0, 1, 1);
838 pdialog->
pic0 = gtk_picture_new();
839 gtk_grid_attach(GTK_GRID(hgrid), pdialog->
pic0, grid_col++, 0, 1, 1);
843 group = G_ACTION_GROUP(g_simple_action_group_new());
846 gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(aux_menu), G_MENU_MODEL(menu));
849 table = gtk_grid_new();
850 gtk_widget_set_halign(table, GTK_ALIGN_CENTER);
851 gtk_widget_set_valign(table, GTK_ALIGN_CENTER);
852 gtk_grid_set_column_spacing(GTK_GRID(table), 16);
853 gtk_box_append(GTK_BOX(
vbox), table);
856 spin = gtk_spin_button_new_with_range(0.0, plr0->
economic.
gold + 0.1,
858 gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin), 0);
859 gtk_editable_set_width_chars(GTK_EDITABLE(spin), 16);
860 gtk_grid_attach(GTK_GRID(table), spin, 1, 0, 1, 1);
861 g_object_set_data(G_OBJECT(spin),
"plr", plr0);
862 g_signal_connect_after(spin,
"value-changed",
865 label = g_object_new(GTK_TYPE_LABEL,
"use-underline",
TRUE,
866 "mnemonic-widget", spin,
"label",
_(
"Gold:"),
867 "xalign", 0.0,
"yalign", 0.5, NULL);
868 gtk_grid_attach(GTK_GRID(table),
label, 0, 0, 1, 1);
870 gtk_grid_attach(GTK_GRID(table), aux_menu, 2, 0, 1, 1);
872 gtk_grid_attach(GTK_GRID(table), aux_menu, 0, 0, 1, 1);
874 gtk_widget_insert_action_group(aux_menu,
"win", group);
877 vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
878 gtk_widget_set_margin_start(
vbox, 2);
879 gtk_widget_set_margin_end(
vbox, 2);
880 gtk_widget_set_margin_top(
vbox, 2);
881 gtk_widget_set_margin_bottom(
vbox, 2);
885 label = gtk_label_new(NULL);
886 gtk_widget_set_halign(
label, GTK_ALIGN_CENTER);
887 gtk_widget_set_valign(
label, GTK_ALIGN_CENTER);
888 buf = g_strdup_printf(
"<span size=\"large\"><u>%s</u></span>",
890 gtk_label_set_markup(GTK_LABEL(
label), buf);
894 hgrid = gtk_grid_new();
896 gtk_grid_set_column_spacing(GTK_GRID(hgrid), 5);
897 gtk_box_append(GTK_BOX(
vbox), hgrid);
902 pic = gtk_picture_new();
904 gtk_grid_attach(GTK_GRID(hgrid), pic, grid_col++, 0, 1, 1);
907 label = gtk_label_new(NULL);
909 gtk_widget_set_halign(
label, GTK_ALIGN_CENTER);
910 gtk_widget_set_valign(
label, GTK_ALIGN_CENTER);
911 buf = g_strdup_printf(
"<span size=\"large\" weight=\"bold\">%s</span>",
913 gtk_label_set_markup(GTK_LABEL(
label), buf);
915 gtk_grid_attach(GTK_GRID(hgrid),
label, grid_col++, 0, 1, 1);
917 pdialog->
pic1 = gtk_picture_new();
918 gtk_grid_attach(GTK_GRID(hgrid), pdialog->
pic1, grid_col++, 0, 1, 1);
922 group = G_ACTION_GROUP(g_simple_action_group_new());
925 gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(aux_menu), G_MENU_MODEL(menu));
928 table = gtk_grid_new();
929 gtk_widget_set_halign(table, GTK_ALIGN_CENTER);
930 gtk_widget_set_valign(table, GTK_ALIGN_CENTER);
931 gtk_grid_set_column_spacing(GTK_GRID(table), 16);
932 gtk_box_append(GTK_BOX(
vbox), table);
935 spin = gtk_spin_button_new_with_range(0.0, plr1->
economic.
gold + 0.1,
937 gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin), 0);
938 gtk_editable_set_width_chars(GTK_EDITABLE(spin), 16);
939 gtk_grid_attach(GTK_GRID(table), spin, 1, 0, 1, 1);
940 g_object_set_data(G_OBJECT(spin),
"plr", plr1);
941 g_signal_connect_after(spin,
"value-changed",
944 label = g_object_new(GTK_TYPE_LABEL,
"use-underline",
TRUE,
945 "mnemonic-widget", spin,
"label",
_(
"Gold:"),
946 "xalign", 0.0,
"yalign", 0.5, NULL);
947 gtk_grid_attach(GTK_GRID(table),
label, 0, 0, 1, 1);
949 gtk_grid_attach(GTK_GRID(table), aux_menu, 2, 0, 1, 1);
951 gtk_grid_attach(GTK_GRID(table), aux_menu, 0, 0, 1, 1);
953 gtk_widget_insert_action_group(aux_menu,
"win", group);
956 mainbox = gtk_grid_new();
957 gtk_orientable_set_orientation(GTK_ORIENTABLE(mainbox),
958 GTK_ORIENTATION_VERTICAL);
961 store = gtk_list_store_new(1, G_TYPE_STRING);
962 pdialog->
store = store;
964 view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
967 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
view),
FALSE);
968 g_object_unref(store);
969 gtk_widget_set_size_request(
view, 320, 100);
971 rend = gtk_cell_renderer_text_new();
972 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(
view), -1, NULL,
973 rend,
"text", 0, NULL);
975 sw = gtk_scrolled_window_new();
976 gtk_widget_set_margin_bottom(sw, 2);
977 gtk_widget_set_margin_end(sw, 2);
978 gtk_widget_set_margin_start(sw, 2);
979 gtk_widget_set_margin_top(sw, 2);
980 gtk_scrolled_window_set_has_frame(GTK_SCROLLED_WINDOW(sw),
TRUE);
981 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
982 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
983 gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(sw),
view);
985 label = g_object_new(GTK_TYPE_LABEL,
986 "use-underline",
TRUE,
987 "mnemonic-widget",
view,
988 "label",
_(
"C_lauses:"),
993 vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
995 gtk_grid_attach(GTK_GRID(mainbox),
vbox, 0, main_row++, 1, 1);
997 gtk_box_append(GTK_BOX(
vbox), sw);
999 gtk_widget_show(mainbox);
1001 g_signal_connect(
view,
"row_activated", G_CALLBACK(
row_callback), pdialog);
1014 GtkListStore *store;
1019 store = pdialog->
store;
1021 gtk_list_store_clear(store);
1027 gtk_list_store_append(store, &it);
1028 gtk_list_store_set(store, &it, 0, buf, -1);
1033 gtk_list_store_append(store, &it);
1034 gtk_list_store_set(store, &it, 0,
1035 _(
"--- This treaty is blank. "
1036 "Please add some clauses. ---"), -1);
1040 gtk_picture_set_pixbuf(GTK_PICTURE(pdialog->
pic0), pixbuf);
1041 g_object_unref(G_OBJECT(pixbuf));
1043 gtk_picture_set_pixbuf(GTK_PICTURE(pdialog->
pic1), pixbuf);
1044 g_object_unref(G_OBJECT(pixbuf));
1051 GVariant *parameter,
1054 int giver, dest, other, tech;
1056 giver = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(
action),
"player_from"));
1057 dest = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(
action),
"player_to"));
1058 tech = GPOINTER_TO_INT(data);
1069 const struct research *dresearch, *gresearch;
1084 == TECH_PREREQS_KNOWN)) {
1092 CLAUSE_ADVANCE, tech);
1101 GVariant *parameter,
1110 other = deal_data->
giver;
1114 CLAUSE_CITY, deal_data->
id);
1128 pgiver = (
struct player *)g_object_get_data(G_OBJECT(
action),
"plr");
1144 pgiver = (
struct player *)g_object_get_data(G_OBJECT(
action),
"plr");
1169 GVariant *parameter,
1179 GVariant *parameter,
1189 GVariant *parameter,
1199 GVariant *parameter,
1205 pgiver = (
struct player *)g_object_get_data(G_OBJECT(
action),
"plr");
1217 GVariant *parameter,
1223 pgiver = (
struct player *)g_object_get_data(G_OBJECT(
action),
"plr");
1265 if ((pdialog->treaty.plr0 == plr0 && pdialog->treaty.plr1 == plr1)
1266 || (pdialog->treaty.plr0 == plr1 && pdialog->treaty.plr1 == plr0)) {
1281 (
struct player *) g_object_get_data(G_OBJECT(w),
"plr");
1282 int amount = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(w));
1288 CLAUSE_GOLD, amount);
void output_window_append(const struct ft_color color, const char *featured_text)
bool is_capital(const struct city *pcity)
const char * city_name_get(const struct city *pcity)
int city_name_compare(const void *p1, const void *p2)
#define city_list_iterate(citylist, pcity)
#define city_list_iterate_end
bool can_client_issue_orders(void)
const char * title_for_player(const struct player *pplayer, char *buf, size_t buf_len)
void client_diplomacy_clause_string(char *buf, int bufsiz, struct Clause *pclause)
int int initiated_from int int giver
int int initiated_from handle_diplomacy_remove_clause
handle_diplomacy_cancel_meeting
void init_treaty(struct Treaty *ptreaty, struct player *plr0, struct player *plr1)
bool add_clause(struct Treaty *ptreaty, struct player *pfrom, enum clause_type type, int val, struct player *client_player)
bool clause_enabled(enum clause_type type)
bool remove_clause(struct Treaty *ptreaty, struct player *pfrom, enum clause_type type, int val)
#define clause_list_iterate_end
#define clause_list_iterate(clauselist, pclause)
const struct ft_color ftc_client
const char * ruler_title_for_player(const struct player *pplayer, char *buf, size_t buf_len)
static void diplomacy_dialog_add_pact_clause(GtkWidget *w, gpointer data, int type)
#define RESPONSE_CANCEL_MEETING
static gint sort_advance_names(gconstpointer a, gconstpointer b)
static void close_diplomacy_dialog(struct Diplomacy_dialog *pdialog)
static void diplomacy_dialog_tech_callback(GtkWidget *w, gpointer data)
static void row_callback(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data)
static void diplomacy_dialog_ceasefire_callback(GtkWidget *w, gpointer data)
static void update_diplomacy_dialog(struct Diplomacy_dialog *pdialog)
static struct Diplomacy_dialog * find_diplomacy_dialog(int other_player_id)
static struct Diplomacy_dialog * create_diplomacy_dialog(struct player *plr0, struct player *plr1)
static void diplomacy_dialog_seamap_callback(GtkWidget *w, gpointer data)
static void diplomacy_dialog_city_callback(GtkWidget *w, gpointer data)
void handle_diplomacy_init_meeting(int counterpart, int initiated_from)
static void diplomacy_dialog_map_callback(GtkWidget *w, gpointer data)
void diplomacy_dialog_init(void)
static void diplomacy_destroy(struct Diplomacy_dialog *pdialog)
#define dialog_list_iterate_end
static struct Diplomacy_notebook * diplomacy_main_create(void)
void handle_diplomacy_create_clause(int counterpart, int giver, enum clause_type type, int value)
static void diplomacy_dialog_vision_callback(GtkWidget *w, gpointer data)
void close_all_diplomacy_dialogs(void)
#define RESPONSE_CANCEL_MEETING_ALL
static void diplomacy_dialog_embassy_callback(GtkWidget *w, gpointer data)
static void diplomacy_response(struct gui_dialog *dlg, int response, gpointer data)
#define dialog_list_iterate(dialoglist, pdialog)
static struct dialog_list * dialog_list
static void diplomacy_main_response(struct gui_dialog *dlg, int response, gpointer data)
static void diplomacy_dialog_peace_callback(GtkWidget *w, gpointer data)
void diplomacy_dialog_done(void)
static void diplo_dialog_returnkey(GtkWidget *w, gpointer data)
static void diplomacy_main_destroy(void)
void handle_diplomacy_accept_treaty(int counterpart, bool I_accepted, bool other_accepted)
static void diplomacy_dialog_alliance_callback(GtkWidget *w, gpointer data)
static void popup_diplomacy_dialog(int other_player_id, int initiated_from)
static struct Diplomacy_notebook * dipl_main
void gui_dialog_destroy(struct gui_dialog *dlg)
void gui_dialog_present(struct gui_dialog *dlg)
void gui_dialog_raise(struct gui_dialog *dlg)
void gui_dialog_new(struct gui_dialog **pdlg, GtkNotebook *notebook, gpointer user_data, bool check_top)
void gui_dialog_set_return_dialog(struct gui_dialog *dlg, struct gui_dialog *return_dialog)
void gui_dialog_response_set_callback(struct gui_dialog *dlg, GUI_DIALOG_RESPONSE_FUN fun)
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_alert(struct gui_dialog *dlg)
GdkPixbuf * get_thumb_pixbuf(int onoff)
struct gui_dialog * players_dialog_shell
static GMenu * create_clause_menu(GActionGroup *group, struct Diplomacy_dialog *pdialog, struct player *partner, bool them)
GtkWidget * aux_menu_new(void)
void gui_dialog_add_content_widget(struct gui_dialog *dlg, GtkWidget *wdg)
#define submenu_append_unref(menu, name, submenu)
#define menu_item_append_unref(menu, item)
void picture_set_from_surface(GtkPicture *pic, cairo_surface_t *surf)
#define fc_assert_ret(condition)
#define log_error(message,...)
struct nation_type * nation_of_player(const struct player *pplayer)
const char * nation_plural_for_player(const struct player *pplayer)
int dsend_packet_diplomacy_create_clause_req(struct connection *pc, int counterpart, int giver, enum clause_type type, int value)
int dsend_packet_diplomacy_cancel_meeting_req(struct connection *pc, int counterpart)
int dsend_packet_diplomacy_remove_clause_req(struct connection *pc, int counterpart, int giver, enum clause_type type, int value)
int dsend_packet_diplomacy_accept_treaty_req(struct connection *pc, int counterpart)
struct player * player_by_number(const int player_id)
int player_number(const struct player *pplayer)
bool player_has_real_embassy(const struct player *pplayer, const struct player *pplayer2)
bool team_has_embassy(const struct team *pteam, const struct player *tgt_player)
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
bool gives_shared_vision(const struct player *me, const struct player *them)
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
bool research_invention_gettable(const struct research *presearch, const Tech_type_id tech, bool allow_holes)
struct gui_dialog * dialog
struct gui_dialog * dialog
struct clause_list * clauses
struct packet_game_info info
struct gui_dialog::@149::@150 tab
bool tech_trade_allow_holes
struct city_list * cities
struct player_economic economic
cairo_surface_t * surface
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
int fc_strcasecmp(const char *str0, const char *str1)
int fc_strcoll(const char *str0, const char *str1)
const char * advance_name_translation(const struct advance *padvance)
Tech_type_id advance_number(const struct advance *padvance)
#define advance_iterate(_start, _p)
#define advance_iterate_end
struct sprite * get_nation_flag_sprite(const struct tileset *t, const struct nation_type *pnation)