74#define SPECLIST_TAG dialog
75#define SPECLIST_TYPE struct Diplomacy_dialog
78#define dialog_list_iterate(dialoglist, pdialog) \
79 TYPED_LIST_ITERATE(struct Diplomacy_dialog, dialoglist, pdialog)
80#define dialog_list_iterate_end LIST_ITERATE_END
133#define RESPONSE_CANCEL_MEETING 100
134#define RESPONSE_CANCEL_MEETING_ALL 101
437 for (j = 0; j <
i; j++) {
637 _(
"Cancel _all meetings"),
893 "mnemonic-widget",
spin,
"label",
_(
"Gold:"),
894 "xalign", 0.0,
"yalign", 0.5,
NULL);
972 "mnemonic-widget",
spin,
"label",
_(
"Gold:"),
973 "xalign", 0.0,
"yalign", 0.5,
NULL);
989 pdialog->
store = store;
1013 "use-underline",
TRUE,
1014 "mnemonic-widget",
view,
1015 "label",
_(
"C_lauses:"),
1046 store = pdialog->
store;
1062 _(
"--- This treaty is blank. "
1063 "Please add some clauses. ---"), -1);
1081 int giver, dest,
other, tech;
1310 if ((pdialog->treaty->plr0 == plr0 && pdialog->treaty->plr1 ==
they)
1311 || (pdialog->treaty->plr0 ==
they && pdialog->treaty->
plr1 == plr0)) {
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
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)
struct Treaty struct player struct player *initiator gui_recv_create_clause
struct Treaty struct player struct player *initiator struct Treaty struct player *they gui_recv_accept_treaty
struct Treaty struct player * they
bool clause_enabled(enum clause_type type)
#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 * create_diplomacy_dialog(struct Treaty *ptreaty, struct player *plr0, struct player *plr1)
void gui_init_meeting(struct Treaty *ptreaty, struct player *they, struct player *initiator)
static void diplomacy_dialog_seamap_callback(GtkWidget *w, gpointer data)
static void diplomacy_dialog_city_callback(GtkWidget *w, gpointer data)
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)
static struct Diplomacy_dialog * find_diplomacy_dialog(struct player *they)
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_dialog_shared_tiles_callback(GtkWidget *w, gpointer data)
static void diplomacy_response(struct gui_dialog *dlg, int response, gpointer data)
void gui_recv_remove_clause(struct Treaty *ptreaty, struct player *they)
#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 popup_diplomacy_dialog(struct Treaty *ptreaty, struct player *they, struct player *initiator)
static void diplomacy_main_destroy(void)
void gui_prepare_clause_updt(struct Treaty *ptreaty, struct player *they)
static void diplomacy_dialog_alliance_callback(GtkWidget *w, gpointer data)
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)
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)
GtkWidget * gui_dialog_add_button(struct gui_dialog *dlg, const char *icon_name, const char *text, int response)
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 fc_assert(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
bool tech_trade_allow_holes
struct player_economic economic
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(_p)
#define advance_iterate_end
struct sprite * get_nation_flag_sprite(const struct tileset *t, const struct nation_type *pnation)