23#include <gdk/gdkkeysyms.h>
61#define NEG_VAL(x) ((x)<0 ? (x) : (-x))
64#define CMA_NONE (10000)
65#define CMA_CUSTOM (10001)
107#define CRD_COL_CITY_ID (0 + NUM_CREPORT_COLS)
370 for (
i = 0;
i < 4;
i++) {
375 for (
i = 0;
i < 3;
i++) {
411 for (
i = 0;
i < 3;
i++) {
412 if (
row[
i][0] ==
'\0') {
449 for (
i = 0;
i < 3;
i++) {
654 PL_(
"Sold %d %s for %d gold.",
655 "Sold %d %s for %d gold.",
657 sd.count, imprname,
sd.gold);
661 _(
"No %s could be sold."),
783 "win.chg_governor_none"));
822 "win.sel_governor_none"));
850 "win.sel_governor_custom"));
1039 for (p = columns; p !=
NULL; p = p->next) {
1059 pos, spec->
show ?
"true" :
"false");
1674 "win.clear_worklist"));
1735 "win.select_none"));
1742 "win.select_invert"));
1749 "win.select_build_unit"));
1756 "win.select_build_impr"));
1763 "win.select_build_wonder"));
1794 "win.select_coastal"));
1801 "win.select_island"));
1908 if (!
view || !label) {
1915 for (p =
rows; p !=
NULL; p = p->next) {
bool city_has_building(const struct city *pcity, const struct impr_type *pimprove)
#define cities_iterate_end
#define city_list_iterate(citylist, pcity)
#define cities_iterate(pcity)
#define city_owner(_pcity_)
#define city_list_iterate_end
void get_city_dialog_production_row(char *buf[], size_t column_size, struct universal *target, struct city *pcity)
int city_set_worklist(struct city *pcity, const struct worklist *pworklist)
bool city_queue_insert(struct city *pcity, int position, struct universal *item)
bool city_queue_insert_worklist(struct city *pcity, int position, const struct worklist *worklist)
bool city_set_queue(struct city *pcity, const struct worklist *pqueue)
int city_change_production(struct city *pcity, struct universal *target)
int city_sell_improvement(struct city *pcity, Impr_type_id sell_id)
void popup_city_dialog(struct city *pcity)
void refresh_city_dialog(struct city *pcity)
bool can_city_sell_universal(const struct city *pcity, const struct universal *target)
struct city_report_spec * city_report_specs
int cityrepfield_compare(const char *str1, const char *str2)
bool can_client_issue_orders(void)
bool client_has_player(void)
bool city_unit_supported(const struct city *pcity, const struct universal *target)
void cityrep_buy(struct city *pcity)
void name_and_sort_items(struct universal *targets, int num_targets, struct item *items, bool show_cost, struct city *pcity)
cid cid_encode(struct universal target)
bool city_building_present(const struct city *pcity, const struct universal *target)
struct universal cid_decode(cid id)
bool can_city_build_now_client(const struct city *pcity, const struct universal *target)
bool city_unit_present(const struct city *pcity, const struct universal *target)
int collect_production_targets(struct universal *targets, struct city **selected_cities, int num_selected_cities, bool append_units, bool append_wonders, bool change_prod, TestCityFunc test_func)
#define MAX_NUM_PRODUCTION_TARGETS
bool(* TestCityFunc)(const struct city *, const struct universal *)
bool cm_are_parameter_equal(const struct cm_parameter *const p1, const struct cm_parameter *const p2)
bool cma_is_city_under_agent(const struct city *pcity, struct cm_parameter *parameter)
void cma_put_city_under_agent(struct city *pcity, const struct cm_parameter *const parameter)
void cma_release_city(struct city *pcity)
char * cmafec_preset_get_descr(int idx)
const struct cm_parameter * cmafec_preset_get_parameter(int idx)
int cmafec_preset_get_index_of_parameter(const struct cm_parameter *const parameter)
int cmafec_preset_num(void)
void connection_do_buffer(struct connection *pc)
void connection_do_unbuffer(struct connection *pc)
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 struct unit struct city * pcity
#define PL_(String1, String2, n)
struct city * game_city_by_number(int id)
struct global_worklist * global_worklist_by_id(int id)
const char * global_worklist_name(const struct global_worklist *pgwl)
int global_worklist_id(const struct global_worklist *pgwl)
const struct worklist * global_worklist_get(const struct global_worklist *pgwl)
#define global_worklists_iterate(pgwl)
#define global_worklists_iterate_end
static void append_worklist_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static void create_city_report_dialog(bool make_modal)
static void city_invert_selection_callback(GtkMenuItem *item, gpointer data)
static GtkWidget * city_popup_command
static void worklist_next_impr_or_unit_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static GtkWidget * city_total_buy_cost_label
static GtkWidget * city_buy_command
static void update_total_buy_cost(void)
void real_city_report_dialog_update(void *unused)
void real_city_report_update_city(struct city *pcity)
static void city_select_building_callback(GtkMenuItem *item, gpointer data)
static void popup_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static void create_select_menu(GtkWidget *item)
static void city_activated_callback(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data)
static void select_impr_or_unit_callback(GtkWidget *wdg, gpointer data)
static void impr_or_unit_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static void city_model_fill(GtkListStore *store, GtkTreeSelection *selection, GHashTable *select)
static void center_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
void toggle_city_hilite(struct city *pcity, bool on_off)
static bool city_building_impr_or_unit(const struct city *pcity, const struct universal *target)
static gint cityrep_sort_func(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data)
static struct city * city_model_get(GtkTreeModel *model, GtkTreeIter *iter)
static void city_select_coastal_callback(GtkMenuItem *item, gpointer data)
static void popup_select_menu(GtkMenuShell *menu, gpointer data)
static void city_command_callback(struct gui_dialog *dlg, int response, gpointer data)
static void city_model_set(GtkListStore *store, GtkTreeIter *iter, struct city *pcity)
static void city_clear_worklist_callback(GtkMenuItem *item, gpointer data)
static GtkListStore * city_model
static void clear_worklist_foreach_func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static GtkWidget * city_sell_command
static void city_select_all_callback(GtkMenuItem *item, gpointer data)
static void sell_impr_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static GtkTreeSelection * city_selection
static void same_island_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static void set_worklist_callback(GtkMenuItem *menuitem, gpointer data)
static void city_selection_changed_callback(GtkTreeSelection *selection)
static gboolean city_model_find(GtkTreeModel *model, GtkTreeIter *iter, const struct city *pcity)
static void worklist_next_to_last_impr_or_unit_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static GtkListStore * city_report_dialog_store_new(void)
static int city_dialog_shell_is_modal
static void city_report_update_views(void)
static void get_city_table_header(char **text, int n)
void hilite_cities_from_canvas(void)
void city_report_dialog_popdown(void)
void city_report_dialog_popup(bool raise)
static GtkWidget * city_view
static struct gui_dialog * city_dialog_shell
static void worklist_first_impr_or_unit_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static void set_worklist_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static void toggle_view(GtkCheckMenuItem *item, gpointer data)
static void append_worklist_callback(GtkMenuItem *menuitem, gpointer data)
static void city_unselect_all_callback(GtkMenuItem *item, gpointer data)
static void worklist_last_impr_or_unit_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static GtkWidget * city_center_command
static void buy_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static void recreate_sell_menu(void)
static void create_change_menu(GtkWidget *item)
void gui_dialog_destroy(struct gui_dialog *dlg)
void gui_dialog_present(struct gui_dialog *dlg)
void itree_get(ITree *it,...)
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_response_set_callback(struct gui_dialog *dlg, GUI_DIALOG_RESPONSE_FUN fun)
void itree_begin(GtkTreeModel *model, ITree *it)
void itree_unselect(GtkTreeSelection *selection, ITree *it)
void gui_dialog_show_all(struct gui_dialog *dlg)
void itree_select(GtkTreeSelection *selection, ITree *it)
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 itree_next(ITree *it)
gboolean itree_is_selected(GtkTreeSelection *selection, ITree *it)
GtkWidget * gui_dialog_add_button(struct gui_dialog *dlg, const char *icon_name, const char *text, int response)
gboolean itree_end(ITree *it)
static GMenu * impr_b_select_menu
static GtkWidget * create_city_report_menu(void)
static GMenu * wl_set_menu
static void recreate_production_menu(GActionGroup *group)
static GMenu * unit_b_select_menu
static void city_select_island_callback(GSimpleAction *action, GVariant *parameter, gpointer data)
static GMenu * display_menu
static GMenu * add_first_menu
static GMenu * add_2ndlast_menu
static GMenu * add_next_menu
static GMenu * impr_a_select_menu
static void select_governor_callback(GSimpleAction *action, GVariant *parameter, gpointer data)
static GMenu * unit_s_select_menu
static GMenu * impr_p_select_menu
static GActionGroup * cityrep_group
static GMenu * wl_append_menu
static void governors_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static GMenu * create_governor_menu(GActionGroup *group, bool change_governor)
static GMenu * create_display_menu(GActionGroup *group)
static void recreate_select_menu(GActionGroup *group)
static GMenu * create_production_menu(GActionGroup *group)
static GMenuItem * create_display_menu_item(int pos)
static GMenu * select_menu
static GMenu * add_last_menu
static GMenu * cityrep_menu
static GMenu * create_wl_menu(GActionGroup *group, const char *act_pfx, GCallback cb)
static void append_impr_or_unit_to_menu(GMenu *menu, GActionGroup *act_group, const char *act_pfx, const char *act_pfx2, bool append_units, bool append_wonders, enum city_operation_type city_operation, TestCityFunc test_func, GCallback callback, int size)
static GMenu * unit_a_select_menu
static GMenu * unit_p_select_menu
static void update_governor_menu(void)
static GMenu * governor_select_menu
static GMenu * change_menu
static GMenu * wndr_b_select_menu
static GMenu * wndr_p_select_menu
static GMenu * wndr_a_select_menu
gint blocking_dialog(GtkWidget *dlg)
GtkWidget * aux_menu_new(void)
void gui_dialog_add_content_widget(struct gui_dialog *dlg, GtkWidget *wdg)
GtkWidget * gui_dialog_add_action_widget(struct gui_dialog *dlg, GtkWidget *widget)
#define submenu_append_unref(menu, name, submenu)
#define menu_item_insert_unref(menu, index, item)
#define submenu_insert_unref(menu, index, name, submenu)
#define menu_item_append_unref(menu, item)
int impr_sell_gold(const struct impr_type *pimprove)
Impr_type_id improvement_number(const struct impr_type *pimprove)
bool is_wonder(const struct impr_type *pimprove)
const char * improvement_name_translation(const struct impr_type *pimprove)
#define fc_assert_ret(condition)
#define fc_assert_action(condition, action)
bool is_city_hilited(struct city *pcity)
void center_tile_mapcanvas(const struct tile *ptile)
#define fc_realloc(ptr, sz)
struct client_options gui_options
struct city_list * cities
bool are_universals_equal(const struct universal *psource1, const struct universal *psource2)
struct sprite int int int int struct sprite * mask
const char *(* func)(const struct city *pcity, const void *data)
bool center_when_popup_city
struct city_list * cities
const struct impr_type * target
struct unit::@84::@86 client
int fc_snprintf(char *str, size_t n, const char *format,...)
bool is_terrain_class_near_tile(const struct civ_map *nmap, const struct tile *ptile, enum terrain_class tclass)
#define tile_continent(_tile)
const struct impr_type * building
void worklist_init(struct worklist *pwl)
int worklist_length(const struct worklist *pwl)