23#include <gdk/gdkkeysyms.h>
61#define NEG_VAL(x) ((x)<0 ? (x) : (-x))
64#define CMA_NONE (10000)
65#define CMA_CUSTOM (10001)
81 GtkTreeViewColumn *col, gpointer data);
95 const char *human_mname,
107#define CRD_COL_CITY_ID (0 + NUM_CREPORT_COLS)
182 model_types[i] = G_TYPE_STRING;
186 model_types[i++] = G_TYPE_INT;
188 return gtk_list_store_newv(i, model_types);
205 gtk_list_store_set(store, iter, i, buf, -1);
220 return ((NULL != pcity
230 const struct city *pcity)
232 const int searched = pcity->
id;
235 if (gtk_tree_model_get_iter_first(model, iter)) {
238 if (searched ==
id) {
241 }
while (gtk_tree_model_iter_next(model, iter));
250 GtkTreeSelection *selection, GHashTable *select)
256 gtk_list_store_append(store, &iter);
259 && g_hash_table_remove(select, GINT_TO_POINTER(pcity->id))) {
260 gtk_tree_selection_select_iter(selection, &iter);
266 gtk_list_store_append(store, &iter);
269 && g_hash_table_remove(select, GINT_TO_POINTER(pcity->id))) {
270 gtk_tree_selection_select_iter(selection, &iter);
308 GActionGroup *act_group,
310 const char *act_pfx2,
321 int i,
item, targets_used;
325 GtkSizeGroup *size_group[3];
328 const char *markup[3] = {
335 if (city_operation !=
CO_NONE) {
338 int num_selected = 0;
339 GtkTreeModel *model = GTK_TREE_MODEL(
city_model);
342 selected = g_ptr_array_sized_new(
size);
352 g_ptr_array_add(selected, pcity);
356 data = (
struct city **)g_ptr_array_free(selected,
FALSE);
363 append_wonders,
FALSE,
368 city_operation !=
CO_NONE, NULL);
370 for (i = 0; i < 4; i++) {
375 for (i = 0; i < 3; i++) {
376 size_group[i] = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
381 GMenuItem *menu_item;
386 GtkWidget *hgrid, *label;
392 fc_snprintf(actbuf,
sizeof(actbuf),
"win.%s%s%d", act_pfx, act_pfx2,
item);
394 menu_item = g_menu_item_new(buf[0], actbuf);
396 fc_snprintf(actbuf,
sizeof(actbuf),
"%s%s%d", act_pfx, act_pfx2,
item);
397 act = g_simple_action_new(actbuf, NULL);
398 g_object_set_data(G_OBJECT(act),
"freeciv_test_func",
test_func);
399 g_object_set_data(G_OBJECT(act),
"freeciv_city_operation",
400 GINT_TO_POINTER(city_operation));
401 g_action_map_add_action(G_ACTION_MAP(act_group), G_ACTION(act));
402 g_signal_connect(act,
"activate",
callback,
407 hgrid = gtk_grid_new();
408 gtk_grid_set_column_spacing(GTK_GRID(hgrid), 18);
409 gtk_container_add(GTK_CONTAINER(menu_item), hgrid);
411 for (i = 0; i < 3; i++) {
412 if (row[i][0] ==
'\0') {
416 if (city_operation ==
CO_SELL && i != 0) {
423 label = gtk_label_new(NULL);
424 gtk_label_set_markup(GTK_LABEL(label), txt);
428 gtk_widget_set_halign(label, GTK_ALIGN_START);
429 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
432 gtk_widget_set_halign(label, GTK_ALIGN_END);
433 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
439 gtk_grid_attach(GTK_GRID(hgrid), label, grid_col++, 0, 1, 1);
440 gtk_size_group_add_widget(size_group[i], label);
443 gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item);
444 g_signal_connect(menu_item,
"activate",
callback,
449 for (i = 0; i < 3; i++) {
450 g_object_unref(size_group[i]);
454 gtk_widget_set_sensitive(GTK_WIDGET(parent_item), (targets_used > 0));
462 GtkTreeIter *iter, gpointer data)
554 GtkTreeIter *iter, gpointer data)
579 GPOINTER_TO_INT(g_object_get_data(G_OBJECT(
action),
"freeciv_city_operation"));
582 if (city_operation ==
CO_NONE) {
583 GtkTreeModel *model = GTK_TREE_MODEL(
city_model);
590 if (NULL != pcity &&
test_func(pcity, &target)) {
595 GtkTreeSelectionForeachFunc foreach_func;
598 switch (city_operation) {
628 struct sell_data sd = { 0, 0, building };
635 buf = g_strdup_printf(
_(
"Are you sure you want to sell those %s?"), imprname);
636 w = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
637 GTK_MESSAGE_QUESTION,
638 GTK_BUTTONS_YES_NO,
"%s", buf);
641 gtk_window_destroy(GTK_WINDOW(w));
642 if (res == GTK_RESPONSE_NO) {
652 w = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
653 GTK_MESSAGE_INFO, GTK_BUTTONS_OK,
654 PL_(
"Sold %d %s for %d gold.",
655 "Sold %d %s for %d gold.",
659 w = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
660 GTK_MESSAGE_INFO, GTK_BUTTONS_OK,
661 _(
"No %s could be sold."),
665 g_signal_connect(w,
"response",
666 G_CALLBACK(gtk_window_destroy), NULL);
667 gtk_window_present(GTK_WINDOW(w));
681 GtkTreeIter *iter, gpointer data)
684 int idx = GPOINTER_TO_INT(data);
704 int idx = GPOINTER_TO_INT(data);
705 bool change_governor =
706 GPOINTER_TO_INT(g_object_get_data(G_OBJECT(
action),
"governor"));
710 if (!change_governor) {
712 GtkTreeModel *model = GTK_TREE_MODEL(
city_model);
731 }
else if (controlled) {
749 GINT_TO_POINTER(idx));
760 bool change_governor)
772 if (change_governor) {
775 act = g_simple_action_new(
"chg_governor_none", NULL);
776 g_object_set_data(G_OBJECT(act),
"governor",
777 GINT_TO_POINTER(change_governor));
778 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
782 g_menu_item_new(
Q_(
"?cma:none"),
783 "win.chg_governor_none"));
788 fc_snprintf(buf,
sizeof(buf),
"chg_governor_%d", i);
789 act = g_simple_action_new(buf, NULL);
790 g_object_set_data(G_OBJECT(act),
"governor",
791 GINT_TO_POINTER(change_governor));
792 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
795 fc_snprintf(buf,
sizeof(buf),
"win.chg_governor_%d", i);
814 act = g_simple_action_new(
"sel_governor_none", NULL);
815 g_object_set_data(G_OBJECT(act),
"governor",
816 GINT_TO_POINTER(change_governor));
817 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
821 g_menu_item_new(
Q_(
"?cma:none"),
822 "win.sel_governor_none"));
842 act = g_simple_action_new(
"sel_governor_custom", NULL);
843 g_object_set_data(G_OBJECT(act),
"governor",
844 GINT_TO_POINTER(change_governor));
845 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
849 g_menu_item_new(
Q_(
"?cma:custom"),
850 "win.sel_governor_custom"));
869 fc_snprintf(buf,
sizeof(buf),
"sel_governor_%d", i);
871 act = g_simple_action_new(buf, NULL);
872 g_object_set_data(G_OBJECT(act),
"governor",
873 GINT_TO_POINTER(change_governor));
874 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
877 fc_snprintf(buf,
sizeof(buf),
"win.sel_governor_%d", i);
904 GtkTreeIter *iter, gpointer data)
945 GtkTreeIter *iter, gpointer data)
1001 fc_snprintf(buf,
sizeof(buf),
"wl%s%d", act_pfx, count);
1002 act = g_simple_action_new(buf, NULL);
1003 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
1004 g_signal_connect(act,
"activate", cb,
1006 fc_snprintf(buf,
sizeof(buf),
"win.wl%s%d", act_pfx, count);
1016 fc_snprintf(buf,
sizeof(buf),
"win.wl%s_dummy", act_pfx);
1018 g_menu_item_new(
_(
"(no worklists defined)"), buf));
1031 GtkTreeViewColumn *col;
1037 columns = gtk_tree_view_get_columns(
view);
1039 for (p = columns; p != NULL; p = p->next) {
1041 spec = g_object_get_data(G_OBJECT(col),
"city_report_spec");
1042 gtk_tree_view_column_set_visible(col, spec->
show);
1045 g_list_free(columns);
1058 fc_snprintf(act_name,
sizeof(act_name),
"win.display%d(%s)",
1059 pos, spec->
show ?
"true" :
"false");
1061 g_menu_item_set_detailed_action(
item, act_name);
1088 GVariantType *bvart = g_variant_type_new(
"b");
1094 GVariant *var = g_variant_new(
"b",
TRUE);
1096 fc_snprintf(act_name,
sizeof(act_name),
"display%d", i);
1097 act = g_simple_action_new_stateful(act_name, bvart, var);
1098 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
1099 g_signal_connect(act,
"change-state", G_CALLBACK(
toggle_view), (gpointer)spec);
1104 g_variant_type_free(bvart);
1114 GtkWidget *vbox, *sep;
1115 GtkWidget *aux_menu;
1118 vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
1119 sep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
1120 gtk_box_append(GTK_BOX(vbox), sep);
1123 cityrep_group = G_ACTION_GROUP(g_simple_action_group_new());
1129 G_MENU_MODEL(g_menu_new()));
1141 gtk_widget_insert_action_group(aux_menu,
"win",
cityrep_group);
1142 gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(aux_menu), G_MENU_MODEL(
cityrep_menu));
1143 gtk_box_append(GTK_BOX(vbox), aux_menu);
1152 GtkTreeIter *b, gpointer
data)
1154 gint col = GPOINTER_TO_INT(
data);
1158 gtk_tree_model_get(model, a, col, &str1, -1);
1159 gtk_tree_model_get(model, b, col, &str2, -1);
1172 static char **titles;
1173 static char (*buf)[128];
1176 GtkWidget *w, *sw, *aux_menu;
1195 PANGO_ELLIPSIZE_START);
1225 gtk_widget_set_name(
city_view,
"small_font");
1226 g_signal_connect(
city_view,
"row_activated",
1229 gtk_tree_selection_set_mode(
city_selection, GTK_SELECTION_MULTIPLE);
1235 GtkCellRenderer *renderer;
1236 GtkTreeViewColumn *col;
1238 renderer = gtk_cell_renderer_text_new();
1239 col = gtk_tree_view_column_new_with_attributes(NULL, renderer,
1241 header = gtk_label_new(titles[i]);
1242 gtk_widget_set_tooltip_text(header, spec->
explanation);
1243 gtk_widget_show(header);
1244 gtk_tree_view_column_set_widget(col, header);
1245 gtk_tree_view_column_set_visible(col, spec->
show);
1246 gtk_tree_view_column_set_sort_column_id(col, i);
1247 gtk_tree_view_column_set_reorderable(col,
TRUE);
1248 g_object_set_data(G_OBJECT(col),
"city_report_spec", spec);
1249 gtk_tree_view_append_column(GTK_TREE_VIEW(
city_view), col);
1250 gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(
city_model), i,
1255 sw = gtk_scrolled_window_new();
1256 gtk_scrolled_window_set_has_frame(GTK_SCROLLED_WINDOW(sw),
TRUE);
1257 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
1258 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
1259 gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(sw),
city_view);
1278 GVariant *parameter,
1288 GVariant *parameter,
1298 GVariant *parameter,
1302 GtkTreeModel *model = GTK_TREE_MODEL(
city_model);
1317 GVariant *parameter,
1321 GtkTreeModel *model = GTK_TREE_MODEL(
city_model);
1339 GtkTreeIter *iter, gpointer data)
1344 if (NULL == selected_pcity) {
1363 GVariant *parameter,
1374 GVariant *parameter,
1379 GtkTreeModel *model = GTK_TREE_MODEL(
city_model);
1403 GtkTreeIter *iter, gpointer data)
1407 if (NULL != pcity) {
1416 GtkTreeIter *iter, gpointer data)
1420 if (NULL != pcity) {
1429 GtkTreeIter *iter, gpointer data)
1433 if (NULL != pcity) {
1449 if (1 == gtk_tree_selection_count_selected_rows(
city_selection)) {
1471 GtkTreeViewColumn *col, gpointer data)
1473 GtkTreeModel *model;
1477 GdkModifierType mask;
1479 model = gtk_tree_view_get_model(
view);
1481 if (!gtk_tree_model_get_iter(model, &iter, path)) {
1485 win = gtk_native_get_surface(gtk_widget_get_native(GTK_WIDGET(
view)));
1486 seat = gdk_display_get_default_seat(gdk_surface_get_display(win));
1488 gdk_surface_get_device_position(win, gdk_seat_get_pointer(seat),
1491 if (!(mask & GDK_CONTROL_MASK)) {
1503 GHashTable *selected;
1512 selected = g_hash_table_new(NULL, NULL);
1517 g_hash_table_insert(selected, GINT_TO_POINTER(city_id), NULL);
1524 g_hash_table_destroy(selected);
1558 const char *human_mname,
1561 GMenu *menu = g_menu_new();
1568 submenu = g_menu_new();
1576 submenu = g_menu_new();
1581 fc_snprintf(buf,
sizeof(buf), human_mname,
_(
"Improvement"));
1584 submenu = g_menu_new();
1589 fc_snprintf(buf,
sizeof(buf), human_mname,
_(
"Wonder"));
1601 GMenu *menu = g_menu_new();
1669 act = g_simple_action_new(
"clear_worklist", NULL);
1670 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
1674 "win.clear_worklist"));
1719 gtk_menu_item_set_submenu(GTK_MENU_ITEM(
item), menu);
1723 act = g_simple_action_new(
"select_all", NULL);
1724 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
1730 act = g_simple_action_new(
"select_none", NULL);
1731 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
1735 "win.select_none"));
1737 act = g_simple_action_new(
"select_invert", NULL);
1738 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
1742 "win.select_invert"));
1744 act = g_simple_action_new(
"select_build_unit", NULL);
1745 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
1749 "win.select_build_unit"));
1751 act = g_simple_action_new(
"select_build_impr", NULL);
1752 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
1756 "win.select_build_impr"));
1758 act = g_simple_action_new(
"select_build_wonder", NULL);
1759 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
1763 "win.select_build_wonder"));
1778 fc_snprintf(buf,
sizeof(buf),
_(
"Building %s"),
_(
"Improvement"));
1786 fc_snprintf(buf,
sizeof(buf),
_(
"Building %s"),
_(
"Wonder"));
1789 act = g_simple_action_new(
"select_coastal", NULL);
1790 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
1794 "win.select_coastal"));
1796 act = g_simple_action_new(
"select_island", NULL);
1797 g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(act));
1801 "win.select_island"));
1808 fc_snprintf(buf,
sizeof(buf),
_(
"Supported %s"),
_(
"Unit"));
1824 fc_snprintf(buf,
sizeof(buf),
_(
"Present %s"),
_(
"Improvement"));
1832 fc_snprintf(buf,
sizeof(buf),
_(
"Present %s"),
_(
"Wonder"));
1840 fc_snprintf(buf,
sizeof(buf),
_(
"Available %s"),
_(
"Unit"));
1848 fc_snprintf(buf,
sizeof(buf),
_(
"Available %s"),
_(
"Improvement"));
1856 fc_snprintf(buf,
sizeof(buf),
_(
"Available %s"),
_(
"Wonder"));
1896 GtkWidget *label, *
view;
1898 GtkTreeModel *model;
1899 GtkTreeSelection *sel;
1908 if (!
view || !label) {
1912 sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(
view));
1913 rows = gtk_tree_selection_get_selected_rows(sel, &model);
1915 for (p = rows; p != NULL; p = p->next) {
1917 if (gtk_tree_model_get_iter(model, &iter, path)) {
1922 gtk_tree_path_free(path);
1927 gchar *buf = g_strdup_printf(
_(
"Total Buy Cost: %d"), total);
1929 gtk_label_set_text(GTK_LABEL(label), buf);
1932 gtk_label_set_text(GTK_LABEL(label), NULL);
1944 bool obs_may, plr_may;
1946 n = gtk_tree_selection_count_selected_rows(selection);
1982 if (NULL != pcity) {
2014 GtkTreeModel *model;
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)
#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)
GtkWidget * gui_dialog_add_button(struct gui_dialog *dlg, const char *text, int response)
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)
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)
const char *(* func)(const struct city *pcity, const void *data)
struct universal production
struct city::@17::@20 client
bool center_when_popup_city
struct city_list * cities
const struct impr_type * target
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)