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)
383 for (
i = 0;
i < 4;
i++) {
391 for (
i = 0;
i < 3;
i++) {
407 for (
i = 0;
i < 3;
i++) {
408 if (
row[
i][0] ==
'\0') {
444 for (
i = 0;
i < 3;
i++) {
648 PL_(
"Sold %d %s for %d gold.",
649 "Sold %d %s for %d gold.",
651 sd.count, imprname,
sd.gold);
655 _(
"No %s could be sold."),
998 for (p = columns; p !=
NULL; p = p->next) {
1977 if (!
view || !label) {
1984 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 GtkWidget * select_wonders_item
static void create_city_report_dialog(bool make_modal)
static GtkWidget * next_to_last_wonders_item
static GtkWidget * city_governor_command
static void city_invert_selection_callback(GtkMenuItem *item, gpointer data)
static GtkWidget * city_popup_command
static GtkWidget * select_cma_item
static void worklist_next_impr_or_unit_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static GtkWidget * last_wonders_item
static void create_first_menu(GtkWidget *item)
static void create_next_to_last_menu(GtkWidget *item)
static GtkWidget * city_total_buy_cost_label
static GtkWidget * city_buy_command
static void update_total_buy_cost(void)
static GtkWidget * change_units_item
void real_city_report_dialog_update(void *unused)
static GtkWidget * last_units_item
static void popup_next_to_last_menu(GtkMenuShell *menu, gpointer data)
void real_city_report_update_city(struct city *pcity)
static void create_next_menu(GtkWidget *item)
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 GtkWidget * select_improvements_item
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 GtkWidget * select_supported_item
static GtkWidget * select_bimprovement_item
static GtkWidget * select_units_item
static GtkWidget * select_island_item
static gint cityrep_sort_func(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data)
static GtkWidget * change_improvements_item
static struct city * city_model_get(GtkTreeModel *model, GtkTreeIter *iter)
static void append_impr_or_unit_to_menu_item(GtkMenuItem *parent_item, bool append_units, bool append_wonders, enum city_operation_type city_operation, TestCityFunc test_func, GCallback callback, int size)
static void city_select_coastal_callback(GtkMenuItem *item, gpointer data)
static void production_menu_shown(GtkWidget *widget, gpointer data)
static void popup_select_menu(GtkMenuShell *menu, gpointer data)
static void popup_first_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 GtkWidget * last_improvements_item
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 append_cma_to_menu_item(GtkMenuItem *parent_item, bool change_cma)
static GtkWidget * select_bwonder_item
static void city_select_all_callback(GtkMenuItem *item, gpointer data)
static void popup_last_menu(GtkMenuShell *menu, gpointer data)
static void sell_impr_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static GtkTreeSelection * city_selection
static void create_last_menu(GtkWidget *item)
static void same_island_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static GtkWidget * change_wonders_item
static GtkWidget * first_improvements_item
static void city_select_same_island_callback(GtkMenuItem *item, gpointer data)
static GtkWidget * select_built_wonders_item
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 GtkWidget * next_to_last_units_item
static GtkWidget * next_to_last_improvements_item
static GtkWidget * city_production_command
static GtkListStore * city_report_dialog_store_new(void)
static int city_dialog_shell_is_modal
static GtkWidget * create_city_report_menubar(void)
static void city_report_update_views(void)
static void get_city_table_header(char **text, int n)
static GtkWidget * select_bunit_item
void hilite_cities_from_canvas(void)
void city_report_dialog_popdown(void)
static void create_sell_menu(GtkWidget *item)
void city_report_dialog_popup(bool raise)
static GtkWidget * city_view
static GtkWidget * select_present_item
static void update_view_menu(GtkWidget *show_item)
static GtkWidget * select_built_improvements_item
static struct gui_dialog * city_dialog_shell
static void worklist_first_impr_or_unit_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static GtkWidget * next_improvements_item
static void popup_change_menu(GtkMenuShell *menu, gpointer data)
static void cma_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 popup_next_menu(GtkMenuShell *menu, gpointer data)
static void worklist_last_impr_or_unit_iterate(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
static GtkWidget * next_wonders_item
static GtkWidget * first_units_item
static GtkWidget * next_units_item
static GtkWidget * first_wonders_item
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)
static void select_cma_callback(GtkWidget *w, gpointer data)
void gui_dialog_destroy(struct gui_dialog *dlg)
void gui_dialog_present(struct gui_dialog *dlg)
void gui_dialog_set_default_response(struct gui_dialog *dlg, int response)
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)
GtkWidget * gui_dialog_add_widget(struct gui_dialog *dlg, GtkWidget *widget)
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 * gtk_aux_menu_bar_new(void)
GtkWidget * gui_dialog_add_button(struct gui_dialog *dlg, const char *icon_name, const char *text, int response)
gboolean itree_end(ITree *it)
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(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)