97 void (*
toggle)(GSimpleAction *act, GVariant *value, gpointer data);
531 {
"CLEAR_CHAT_LOGS",
N_(
"_Clear Chat Log"),
534 {
"SAVE_CHAT_LOGS",
N_(
"Save Chat _Log"),
538 {
"LOCAL_OPTIONS",
N_(
"_Local Client"),
541 {
"MESSAGE_OPTIONS",
N_(
"_Message"),
544 {
"SERVER_OPTIONS",
N_(
"_Remote Server"),
547 {
"SAVE_OPTIONS",
N_(
"Save Options _Now"),
550 {
"SAVE_OPTIONS_ON_EXIT",
N_(
"Save Options on _Exit"),
555 {
"RELOAD_TILESET",
N_(
"_Reload Tileset"),
560 {
"GAME_SAVE",
N_(
"_Save Game"),
563 {
"GAME_SAVE_AS",
N_(
"Save Game _As..."),
566 {
"MAPIMG_SAVE",
N_(
"Save Map _Image"),
569 {
"MAPIMG_SAVE_AS",
N_(
"Save _Map Image As..."),
572 {
"LEAVE",
N_(
"_Leave"),
575 {
"QUIT",
N_(
"_Quit"),
580 {
"FIND_CITY",
N_(
"_Find City"),
583 {
"WORKLISTS",
N_(
"Work_lists"),
586 {
"RALLY_DLG",
N_(
"Rally point dialog"),
589 {
"INFRA_DLG",
N_(
"Infra dialog"),
592 {
"EDIT_MODE",
N_(
"_Editing Mode"),
595 {
"TOGGLE_FOG",
N_(
"Toggle Fog of _War"),
598 {
"SCENARIO_PROPERTIES",
N_(
"Game/Scenario Properties"),
601 {
"SCENARIO_SAVE",
N_(
"Save Scenario"),
604 {
"CLIENT_LUA_SCRIPT",
N_(
"Client _Lua Script"),
609 {
"SHOW_CITY_OUTLINES",
N_(
"Cit_y Outlines"),
612 {
"SHOW_CITY_OUTPUT",
N_(
"City Output"),
615 {
"SHOW_MAP_GRID",
N_(
"Map _Grid"),
618 {
"SHOW_NAT_BORDERS",
N_(
"National _Borders"),
621 {
"SHOW_NATIVE_TILES",
N_(
"Native Tiles"),
622 "show_native_tiles",
"<ctrl><shift>n",
MGROUP_SAFE,
624 {
"SHOW_CITY_FULL_BAR",
N_(
"City Full Bar"),
627 {
"SHOW_CITY_NAMES",
N_(
"City _Names"),
630 {
"SHOW_CITY_GROWTH",
N_(
"City G_rowth"),
633 {
"SHOW_CITY_PRODUCTIONS",
N_(
"City _Production"),
636 {
"SHOW_CITY_BUY_COST",
N_(
"City Buy Cost"),
639 {
"SHOW_CITY_TRADE_ROUTES",
N_(
"City Tra_deroutes"),
642 {
"SHOW_TERRAIN",
N_(
"_Terrain"),
645 {
"SHOW_COASTLINE",
N_(
"C_oastline"),
648 {
"SHOW_PATHS",
N_(
"_Paths"),
651 {
"SHOW_IRRIGATION",
N_(
"_Irrigation"),
654 {
"SHOW_MINES",
N_(
"_Mines"),
657 {
"SHOW_BASES",
N_(
"_Bases"),
660 {
"SHOW_RESOURCES",
N_(
"_Resources"),
663 {
"SHOW_HUTS",
N_(
"_Huts"),
666 {
"SHOW_POLLUTION",
N_(
"Po_llution & Fallout"),
669 {
"SHOW_CITIES",
N_(
"Citi_es"),
672 {
"SHOW_UNITS",
N_(
"_Units"),
675 {
"SHOW_UNIT_SOLID_BG",
N_(
"Unit Solid Background"),
678 {
"SHOW_UNIT_SHIELDS",
N_(
"Unit shields"),
681 {
"SHOW_STACK_SIZE",
N_(
"Unit Stack Size"),
684 {
"SHOW_FOCUS_UNIT",
N_(
"Focu_s Unit"),
687 {
"SHOW_FOG_OF_WAR",
N_(
"Fog of _War"),
691 {
"FULL_SCREEN",
N_(
"_Fullscreen"),
694 {
"CENTER_VIEW",
N_(
"_Center View"),
699 {
"SELECT_SINGLE",
N_(
"_Single Unit (Unselect Others)"),
702 {
"SELECT_ALL_ON_TILE",
N_(
"_All On Tile"),
705 {
"SELECT_SAME_TYPE_TILE",
N_(
"Same Type on _Tile"),
708 {
"SELECT_SAME_TYPE_CONT",
N_(
"Same Type on _Continent"),
711 {
"SELECT_SAME_TYPE",
N_(
"Same Type _Everywhere"),
714 {
"SELECT_DLG",
N_(
"Unit Selection Dialog"),
719 {
"UNIT_GOTO",
N_(
"_Go to"),
722 {
"UNIT_GOTO_CITY",
N_(
"Go _to/Airlift to City..."),
725 {
"UNIT_RETURN",
N_(
"_Return to Nearest City"),
728 {
"UNIT_EXPLORE",
N_(
"Auto E_xplore"),
731 {
"UNIT_PATROL",
N_(
"_Patrol"),
734 {
"UNIT_SENTRY",
N_(
"_Sentry"),
737 {
"UNSENTRY_ALL",
N_(
"Uns_entry All On Tile"),
740 {
"UNIT_BOARD",
N_(
"_Load"),
743 {
"UNIT_DEBOARD",
N_(
"_Unload"),
746 {
"UNIT_UNLOAD_TRANSPORTER",
N_(
"U_nload All From Transporter"),
749 {
"UNIT_HOMECITY",
N_(
"Set _Home City"),
752 {
"UNIT_UPGRADE",
N_(
"Upgr_ade"),
755 {
"UNIT_CONVERT",
N_(
"C_onvert"),
758 {
"UNIT_DISBAND",
N_(
"_Disband"),
761 {
"DO_ACTION",
N_(
"_Do..."),
764 {
"UNIT_WAIT",
N_(
"_Wait"),
767 {
"UNIT_DONE",
N_(
"_Done"),
772 {
"BUILD_CITY",
N_(
"_Build City"),
775 {
"AUTO_SETTLER",
N_(
"_Auto Settler"),
778 {
"BUILD_ROAD",
N_(
"Build _Road"),
781 {
"BUILD_IRRIGATION",
N_(
"Build _Irrigation"),
784 {
"BUILD_MINE",
N_(
"Build _Mine"),
787 {
"CULTIVATE",
N_(
"Cultivate"),
790 {
"PLANT",
N_(
"Plant"),
793 {
"TRANSFORM_TERRAIN",
N_(
"Transf_orm Terrain"),
796 {
"CONNECT_ROAD",
N_(
"Connect With Roa_d"),
799 {
"CONNECT_RAIL",
N_(
"Connect With Rai_l"),
802 {
"CONNECT_MAGLEV",
N_(
"Connect With _Maglev"),
805 {
"CONNECT_IRRIGATION",
N_(
"Connect With Irri_gation"),
808 {
"CLEAN",
N_(
"_Clean"),
813 {
"FORTIFY",
N_(
"Fortify"),
816 {
"BUILD_FORTRESS",
N_(
"Build Fortress"),
819 {
"BUILD_AIRBASE",
N_(
"Build Airbase"),
822 {
"PARADROP",
N_(
"P_aradrop"),
825 {
"PILLAGE",
N_(
"_Pillage"),
830 {
"MAP_VIEW",
N_(
"?noun:_View"),
833 {
"REPORT_UNITS",
N_(
"_Units"),
836 {
"REPORT_NATIONS",
N_(
"_Nations"),
839 {
"REPORT_CITIES",
N_(
"_Cities"),
842 {
"REPORT_ECONOMY",
N_(
"_Economy"),
845 {
"REPORT_RESEARCH",
N_(
"_Research"),
849 {
"TAX_RATES",
N_(
"_Tax Rates..."),
852 {
"POLICIES",
N_(
"_Policies..."),
855 {
"START_REVOLUTION",
N_(
"_Revolution..."),
859 {
"REPORT_WOW",
N_(
"_Wonders of the World"),
862 {
"REPORT_TOP_CITIES",
N_(
"Top _Five Cities"),
865 {
"REPORT_MESSAGES",
N_(
"_Messages"),
868 {
"REPORT_DEMOGRAPHIC",
N_(
"_Demographics"),
871 {
"REPORT_SPACESHIP",
N_(
"_Spaceship"),
874 {
"REPORT_ACHIEVEMENTS",
N_(
"_Achievements"),
880 {
"BG_SELECT_1",
N_(
"Select Battle Group 1"),
883 {
"BG_ASSIGN_1",
N_(
"Assign Battle Group 1"),
886 {
"BG_APPEND_1",
N_(
"Append to Battle Group 1"),
889 {
"BG_SELECT_2",
N_(
"Select Battle Group 2"),
892 {
"BG_ASSIGN_2",
N_(
"Assign Battle Group 2"),
895 {
"BG_APPEND_2",
N_(
"Append to Battle Group 2"),
898 {
"BG_SELECT_3",
N_(
"Select Battle Group 3"),
901 {
"BG_ASSIGN_3",
N_(
"Assign Battle Group 3"),
904 {
"BG_APPEND_3",
N_(
"Append to Battle Group 3"),
907 {
"BG_SELECT_4",
N_(
"Select Battle Group 4"),
910 {
"BG_ASSIGN_4",
N_(
"Assign Battle Group 4"),
913 {
"BG_APPEND_4",
N_(
"Append to Battle Group 4"),
918 {
"HELP_OVERVIEW",
N_(
"?help:Overview"),
921 {
"HELP_PLAYING",
N_(
"Strategy and Tactics"),
924 {
"HELP_POLICIES",
N_(
"Policies"),
927 {
"HELP_TERRAIN",
N_(
"Terrain"),
930 {
"HELP_ECONOMY",
N_(
"Economy"),
933 {
"HELP_CITIES",
N_(
"Cities"),
936 {
"HELP_IMPROVEMENTS",
N_(
"City Improvements"),
939 {
"HELP_WONDERS",
N_(
"Wonders of the World"),
942 {
"HELP_UNITS",
N_(
"Units"),
945 {
"HELP_COMBAT",
N_(
"Combat"),
948 {
"HELP_ZOC",
N_(
"Zones of Control"),
951 {
"HELP_GOVERNMENT",
N_(
"Government"),
954 {
"HELP_DIPLOMACY",
N_(
"Diplomacy"),
957 {
"HELP_TECH",
N_(
"Technology"),
960 {
"HELP_SPACE_RACE",
N_(
"Space Race"),
963 {
"HELP_RULESET",
N_(
"About Current Ruleset"),
966 {
"HELP_TILESET",
N_(
"About Current Tileset"),
969 {
"HELP_NATIONS",
N_(
"About Nations"),
972 {
"HELP_CONNECTING",
N_(
"Connecting"),
975 {
"HELP_CONTROLS",
N_(
"Controls"),
978 {
"HELP_GOVERNOR",
N_(
"Citizen Governor"),
981 {
"HELP_CHATLINE",
N_(
"Chatline"),
984 {
"HELP_WORKLIST_EDITOR",
N_(
"Worklist Editor"),
987 {
"HELP_LANGUAGES",
N_(
"Languages"),
990 {
"HELP_COPYING",
N_(
"Copying"),
993 {
"HELP_ABOUT",
N_(
"About Freeciv"),
1155 GVariant *parameter,
1165 GVariant *parameter,
1175 GVariant *parameter,
1185 GVariant *parameter,
1195 GVariant *parameter,
1205 GVariant *parameter,
1215 GVariant *parameter,
1234 GVariant *parameter,
1283 gtk_window_destroy(GTK_WINDOW(dialog));
1284 if (response == GTK_RESPONSE_OK) {
1297 GVariant *parameter,
1302 = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_WARNING,
1303 GTK_BUTTONS_OK_CANCEL,
1304 _(
"Leaving a local game will end it!"));
1306 g_signal_connect(dialog,
"response",
1308 gtk_window_present(GTK_WINDOW(dialog));
1318 GVariant *parameter,
1328 GVariant *parameter,
1338 GVariant *parameter,
1348 GVariant *parameter, gpointer data)
1357 GVariant *parameter,
1367 GVariant *parameter,
1377 GVariant *parameter,
1387 GVariant *parameter,
1397 GVariant *parameter,
1407 GVariant *parameter,
1417 GVariant *parameter,
1427 GVariant *parameter,
1437 GVariant *parameter,
1447 GVariant *parameter,
1457 GVariant *parameter,
1467 GVariant *parameter,
1477 GVariant *parameter,
1487 GVariant *parameter,
1497 GVariant *parameter,
1507 GVariant *parameter,
1517 GVariant *parameter,
1527 GVariant *parameter,
1537 GVariant *parameter,
1547 GVariant *parameter,
1557 GVariant *parameter,
1567 GVariant *parameter,
1577 GVariant *parameter,
1587 GVariant *parameter,
1597 GVariant *parameter,
1607 GVariant *parameter,
1617 GVariant *parameter,
1627 GVariant *parameter,
1637 GVariant *parameter,
1647 GVariant *parameter,
1657 GVariant *parameter,
1667 GVariant *parameter,
1677 GVariant *parameter,
1687 GVariant *parameter,
1706 {
"TOGGLE_FOG", NULL, -1 },
1744 bool updt_sensitivity,
1754 if (updt_sensitivity) {
1761 if (!strcmp(
meoms[i].menu_entry, info->
key)) {
1774 GVariant *parameter,
1784 GVariant *parameter,
1803 GVariant *parameter,
1813 GVariant *parameter,
1823 GVariant *parameter,
1833 GVariant *parameter,
1843 GVariant *parameter,
1853 GVariant *parameter,
1863 GVariant *parameter,
1873 GVariant *parameter,
1883 GVariant *parameter,
1893 GVariant *parameter,
1903 GVariant *parameter,
1913 GVariant *parameter,
1923 GVariant *parameter,
1942 GVariant *parameter,
1988 GVariant *parameter,
1998 GVariant *parameter,
2008 GVariant *parameter,
2018 GVariant *parameter,
2056 GVariant *parameter,
2075 GVariant *parameter,
2107 GVariant *parameter,
2117 GVariant *parameter,
2127 GVariant *parameter,
2137 GVariant *parameter,
2147 GVariant *parameter,
2157 GVariant *parameter,
2167 GVariant *parameter,
2177 GVariant *parameter,
2187 GVariant *parameter,
2206 GVariant *parameter,
2232 case ASTK_EXTRA_NOT_THERE:
2256 GVariant *parameter,
2268 GVariant *parameter,
2280 GVariant *parameter,
2299 GVariant *parameter,
2309 GVariant *parameter,
2319 GVariant *parameter,
2353 GVariant *parameter,
2363 GVariant *parameter,
2373 GVariant *parameter,
2383 GVariant *parameter,
2393 GVariant *parameter,
2403 GVariant *parameter,
2414 ACTION_HELP_WONDER)) {
2424 GVariant *parameter,
2434 GVariant *parameter,
2444 bool building_road =
FALSE;
2449 building_road =
TRUE;
2462 GVariant *parameter,
2472 GVariant *parameter,
2482 GVariant *parameter,
2492 GVariant *parameter,
2502 GVariant *parameter,
2507 if (proad != NULL) {
2520 GVariant *parameter,
2525 if (prail != NULL) {
2538 GVariant *parameter,
2543 if (pmaglev != NULL) {
2556 GVariant *parameter,
2561 if (extra_type_list_size(
extras) > 0) {
2574 GVariant *parameter,
2611 GVariant *parameter,
2621 GVariant *parameter,
2631 GVariant *parameter,
2659 GVariant *parameter,
2669 GVariant *parameter,
2679 GVariant *parameter,
2693 GVariant *parameter,
2708 GVariant *parameter,
2723 GVariant *parameter,
2738 GVariant *parameter,
2758 GVariant *parameter,
2768 GVariant *parameter,
2778 GVariant *parameter,
2789 GVariant *parameter,
2799 GVariant *parameter,
2809 GVariant *parameter,
2821 GVariant *parameter,
2831 GVariant *parameter,
2841 GVariant *parameter,
2856 fc_snprintf(actname,
sizeof(actname),
"app.%s(%s)",
2858 item = g_menu_item_new(
Q_(info->
name), NULL);
2859 g_menu_item_set_detailed_action(
item, actname);
2861 if (info->
accl != NULL) {
2862 const char *accls[2] = { info->
accl, NULL };
2864 gtk_application_set_accels_for_action(
gui_app(), actname, accls);
2889 if (info->
toggle != NULL) {
2895 item = g_menu_item_new(
Q_(info->
name), actname);
2899 g_menu_append_item(sub,
item);
2900 g_object_unref(
item);
2928 GVariantType *bvart = g_variant_type_new(
"b");
2931 g_action_map_add_action_entries(G_ACTION_MAP(
fc_app),
acts,
2938 GVariant *var = g_variant_new(
"b",
TRUE);
2941 g_action_map_add_action(G_ACTION_MAP(
fc_app), G_ACTION(act));
2942 g_signal_connect(act,
"change-state",
2948 g_variant_type_free(bvart);
2957 gtk_application_set_accels_for_action(GTK_APPLICATION(
fc_app), actname, accls);
2970 fc_snprintf(actname,
sizeof(actname),
"bg_select_%d", bg);
2971 act = g_simple_action_new(actname, NULL);
2972 g_action_map_add_action(map, G_ACTION(act));
2973 g_signal_connect(act,
"activate",
2976 fc_snprintf(actname,
sizeof(actname),
"bg_assign_%d", bg);
2977 act = g_simple_action_new(actname, NULL);
2978 g_action_map_add_action(map, G_ACTION(act));
2979 g_signal_connect(act,
"activate",
2982 fc_snprintf(actname,
sizeof(actname),
"bg_append_%d", bg);
2983 act = g_simple_action_new(actname, NULL);
2984 g_action_map_add_action(map, G_ACTION(act));
2985 g_signal_connect(act,
"activate",
3001 menubar = g_menu_new();
3003 topmenu = g_menu_new();
3079 topmenu = g_menu_new();
3095 submenu = g_menu_new();
3122 submenu = g_menu_new();
3124 submenu = g_menu_new();
3126 submenu = g_menu_new();
3128 submenu = g_menu_new();
3151 submenu = g_menu_new();
3171 submenu = g_menu_new();
3183 topmenu = g_menu_new();
3204 topmenu = g_menu_new();
3263 gboolean is_enabled)
3265 GAction *act = g_action_map_lookup_action(map, info->
action);
3268 g_simple_action_set_enabled(G_SIMPLE_ACTION(act), is_enabled);
3277 gboolean is_enabled)
3291 gboolean is_enabled)
3306 const char *new_name)
3315 g_menu_remove(parent, index);
3317 item = g_menu_item_new(new_name, actname);
3356 enum unit_activity activity)
3374 GActionMap *map = G_ACTION_MAP(
fc_app);
3378 struct unit_list *punits;
3382 struct extra_type_list *
extras;
3391 submenu = g_menu_new();
3397 for (tgt_kind_group = 0; tgt_kind_group < ATK_COUNT; tgt_kind_group++) {
3419 fc_snprintf(actname,
sizeof(actname),
"action_%d", i);
3420 act = g_simple_action_new(actname, NULL);
3421 g_action_map_add_action(map, G_ACTION(act));
3425 fc_snprintf(actname,
sizeof(actname),
"app.action_%d", i++);
3428 GMenu *sub_target_menu = g_menu_new();
3431#define CREATE_SUB_ITEM(_sub_target_, _sub_target_key_, _sub_target_name_) \
3433 fc_snprintf(actname, sizeof(actname), "subtgt_%d", j); \
3434 act = g_simple_action_new(actname, NULL); \
3435 g_action_map_add_action(map, G_ACTION(act)); \
3436 g_object_set_data(G_OBJECT(act), _sub_target_key_, _sub_target_); \
3437 g_signal_connect(act, "activate", G_CALLBACK(unit_goto_and_callback), \
3439 fc_snprintf(subname, sizeof(subname), "%s", _sub_target_name_); \
3440 fc_snprintf(actname, sizeof(actname), "app.subtgt_%d", j++); \
3441 menu_item_append_unref(sub_target_menu, \
3442 g_menu_item_new(subname, actname)); \
3459 case ASTK_EXTRA_NOT_THERE:
3480#undef CREATE_SUB_ITEM
3484 g_signal_connect(act,
"activate",
3491 g_menu_insert_submenu(
unit_menu, 1,
_(
"Go to a_nd..."), G_MENU_MODEL(submenu));
3493 submenu = g_menu_new();
3506 fc_snprintf(actname,
sizeof(actname),
"government_%d", i);
3507 act = g_simple_action_new(actname, NULL);
3509 g_action_map_add_action(map, G_ACTION(act));
3515 fc_snprintf(actname,
sizeof(actname),
"app.government_%d", i++);
3520 g_menu_insert_submenu(
gov_menu, 8,
_(
"_Government"), G_MENU_MODEL(submenu));
3522 submenu = g_menu_new();
3525 if (pextra->buildable) {
3529 fc_snprintf(actname,
sizeof(actname),
"path_%d", i);
3530 act = g_simple_action_new(actname, NULL);
3531 g_simple_action_set_enabled(act,
3535 g_action_map_add_action(map, G_ACTION(act));
3536 g_signal_connect(act,
"activate", G_CALLBACK(
road_callback), pextra);
3538 fc_snprintf(actname,
sizeof(actname),
"app.path_%d", i++);
3545 g_menu_insert_submenu(
work_menu, 2,
_(
"Build _Path"), G_MENU_MODEL(submenu));
3547 submenu = g_menu_new();
3550 if (pextra->buildable) {
3554 fc_snprintf(actname,
sizeof(actname),
"irrig_%d", i);
3555 act = g_simple_action_new(actname, NULL);
3556 g_simple_action_set_enabled(act,
3560 g_action_map_add_action(map, G_ACTION(act));
3563 fc_snprintf(actname,
sizeof(actname),
"app.irrig_%d", i++);
3570 g_menu_insert_submenu(
work_menu, 3,
_(
"Build _Irrigation"), G_MENU_MODEL(submenu));
3572 submenu = g_menu_new();
3575 if (pextra->buildable) {
3579 fc_snprintf(actname,
sizeof(actname),
"mine_%d", i);
3580 act = g_simple_action_new(actname, NULL);
3581 g_simple_action_set_enabled(act,
3585 g_action_map_add_action(map, G_ACTION(act));
3586 g_signal_connect(act,
"activate", G_CALLBACK(
mine_callback), pextra);
3588 fc_snprintf(actname,
sizeof(actname),
"app.mine_%d", i++);
3595 g_menu_insert_submenu(
work_menu, 4,
_(
"Build _Mine"), G_MENU_MODEL(submenu));
3597 submenu = g_menu_new();
3603 fc_snprintf(actname,
sizeof(actname),
"clean_%d", i);
3604 act = g_simple_action_new(actname, NULL);
3605 g_simple_action_set_enabled(act,
3609 g_action_map_add_action(map, G_ACTION(act));
3612 fc_snprintf(actname,
sizeof(actname),
"app.clean_%d", i++);
3621 fc_snprintf(actname,
sizeof(actname),
"clean_%d", i);
3622 act = g_simple_action_new(actname, NULL);
3623 g_simple_action_set_enabled(act,
3627 g_action_map_add_action(map, G_ACTION(act));
3630 fc_snprintf(actname,
sizeof(actname),
"app.clean_%d", i++);
3636 g_menu_insert_submenu(
work_menu, 5,
_(
"_Clean Nuisance"),
3637 G_MENU_MODEL(submenu));
3639 submenu = g_menu_new();
3642 if (pextra->buildable) {
3646 fc_snprintf(actname,
sizeof(actname),
"base_%d", i);
3647 act = g_simple_action_new(actname, NULL);
3648 g_simple_action_set_enabled(act,
3652 g_action_map_add_action(map, G_ACTION(act));
3653 g_signal_connect(act,
"activate", G_CALLBACK(
base_callback), pextra);
3655 fc_snprintf(actname,
sizeof(actname),
"app.base_%d", i++);
3662 g_menu_insert_submenu(
combat_menu, 3,
_(
"Build _Base"), G_MENU_MODEL(submenu));
3664 bool units_all_same_tile =
TRUE, units_all_same_type =
TRUE;
3665 char acttext[128], irrtext[128], mintext[128], transtext[128];
3666 char cultext[128], plantext[128];
3675 if (num_units > 0) {
3676 const struct tile *ptile = NULL;
3680 fc_assert((ptile==NULL) == (ptype==NULL));
3681 if (ptile || ptype) {
3683 units_all_same_tile =
FALSE;
3686 units_all_same_type =
FALSE;
3736 if (proad != NULL) {
3738 snprintf(road_buf,
sizeof(road_buf),
_(
"Connect With %s"),
3744 if (proad != NULL) {
3745 snprintf(road_buf,
sizeof(road_buf),
_(
"Connect With %s"),
3788 ACTIVITY_FORTIFYING));
3825 if (proad != NULL) {
3832 conn_possible =
FALSE;
3837 if (proad != NULL) {
3844 conn_possible =
FALSE;
3849 if (proad != NULL) {
3856 conn_possible =
FALSE;
3862 if (extra_type_list_size(
extras) > 0) {
3865 tgt = extra_type_list_get(
extras, 0);
3868 conn_possible =
FALSE;
3880 bool city_on_tile =
FALSE;
3886 city_on_tile =
TRUE;
3906 char road_item[500];
3914 if (pextra != NULL) {
3919 if (pextra != NULL) {
3921 snprintf(road_item,
sizeof(road_item),
_(
"Build %s"),
3929 if (units_all_same_type && num_units > 0) {
3930 struct unit *
punit = unit_list_get(punits, 0);
3936 fc_snprintf(acttext,
sizeof(acttext),
_(
"Upgr_ade to %s"),
3946 if (
'\0' != acttext[0]) {
3953 if (units_all_same_type && num_units > 0) {
3954 struct unit *
punit = unit_list_get(punits, 0);
3957 fc_snprintf(acttext,
sizeof(acttext),
_(
"C_onvert to %s"),
3966 if (
'\0' != acttext[0]) {
3972 if (units_all_same_tile && num_units > 0) {
3973 struct unit *first = unit_list_get(punits, 0);
3985 if (pextra != NULL) {
3990 if (pextra != NULL) {
3992 snprintf(irrtext,
sizeof(irrtext),
_(
"Build %s"),
4002 fc_snprintf(cultext,
sizeof(cultext),
_(
"Change to %s"),
4004 ACTIVITY_CULTIVATE));
4017 if (pextra != NULL) {
4022 if (pextra != NULL) {
4024 snprintf(mintext,
sizeof(mintext),
_(
"Build %s"),
4034 fc_snprintf(plantext,
sizeof(plantext),
_(
"Change to %s"),
4042 fc_snprintf(transtext,
sizeof(transtext),
_(
"Transf_orm to %s"),
4044 ACTIVITY_TRANSFORM));
4112 while (g_main_context_pending(NULL)) {
4113 g_main_context_iteration(NULL,
FALSE);
4117 gtk_application_window_set_show_menubar(GTK_APPLICATION_WINDOW(
toplevel),
TRUE);
4121 gtk_application_window_set_show_menubar(GTK_APPLICATION_WINDOW(
toplevel),
FALSE);
4122 gtk_application_set_menubar(
fc_app, NULL);
4127 g_object_notify(G_OBJECT(gtk_settings_get_default()),
"gtk-shell-shows-menubar");
bool action_removes_extra(const struct action *paction, const struct extra_type *pextra)
enum action_sub_target_kind action_get_sub_target_kind(const struct action *paction)
bool action_creates_extra(const struct action *paction, const struct extra_type *pextra)
const char * action_get_ui_name_mnemonic(action_id act_id, const char *mnemonic)
static struct action * action_by_number(action_id act_id)
#define action_iterate_end
#define action_id_get_actor_kind(act_id)
#define action_iterate(_act_)
#define action_id_get_target_kind(act_id)
#define action_id_has_complex_target(act_id)
enum client_states client_state(void)
void send_report_request(enum report_type type)
bool can_client_issue_orders(void)
bool client_has_player(void)
bool can_client_change_view(void)
bool can_units_do_connect(struct unit_list *punits, enum unit_activity activity, struct extra_type *tgt)
void disconnect_from_server(void)
void send_save_game(const char *filename)
bool is_server_running(void)
bool can_client_access_hack(void)
bool can_conn_enable_editing(const struct connection *pconn)
void key_coastline_toggle(void)
void key_irrigation_toggle(void)
void key_unit_sentry(void)
void key_city_output_toggle(void)
void request_unit_return(struct unit *punit)
void request_unit_fortify(struct unit *punit)
void key_roads_rails_toggle(void)
void request_unit_caravan_action(struct unit *punit, action_id action)
void key_focus_unit_toggle(void)
void key_unit_auto_explore(void)
void key_unit_auto_settle(void)
void key_unit_connect(enum unit_activity activity, struct extra_type *tgt)
void key_city_full_bar_toggle(void)
void key_bases_toggle(void)
void key_map_native_toggle(void)
void key_resources_toggle(void)
void request_unit_goto(enum unit_orders last_order, action_id act_id, int sub_tgt_id)
void key_unit_paradrop(void)
struct unit_list * get_units_in_focus(void)
void key_unit_shields_toggle(void)
void key_city_productions_toggle(void)
void key_unit_plant(void)
void key_unit_fortress(void)
void key_unit_pillage(void)
void request_unit_unload(struct unit *pcargo)
void key_editor_toggle_fogofwar(void)
void request_new_unit_activity_targeted(struct unit *punit, enum unit_activity act, struct extra_type *tgt)
void key_unit_irrigate(void)
void request_unit_build_city(struct unit *punit)
void key_unit_unload_all(void)
void key_cities_toggle(void)
void key_city_outlines_toggle(void)
void key_unit_homecity(void)
void key_unit_patrol(void)
void key_unit_solid_bg_toggle(void)
void key_terrain_toggle(void)
void key_unit_wakeup_others(void)
void key_unit_stack_size_toggle(void)
void key_huts_toggle(void)
void key_fog_of_war_toggle(void)
void key_units_toggle(void)
void key_unit_select_battlegroup(int battlegroup, bool append)
void key_map_grid_toggle(void)
void key_pollution_toggle(void)
void key_city_growth_toggle(void)
void key_unit_action_select_tgt(void)
void key_city_buycost_toggle(void)
int get_num_units_in_focus(void)
void key_unit_transform(void)
void key_city_trade_routes_toggle(void)
void key_city_names_toggle(void)
void request_unit_select(struct unit_list *punits, enum unit_select_type_mode seltype, enum unit_select_location_mode selloc)
void key_unit_airbase(void)
void key_unit_convert(void)
void key_unit_clean(void)
void key_editor_toggle(void)
void key_unit_assign_battlegroup(int battlegroup, bool append)
void key_unit_cultivate(void)
void key_mines_toggle(void)
void key_map_borders_toggle(void)
#define can_unit_do_activity_targeted_client(_punit_, _act_, _tgt_)
#define can_units_do_activity_targeted_client(_punits_, _act_, _tgt_)
#define can_units_do_activity_client(_punits_, _act_)
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 * punit
bool editor_is_active(void)
const char * government_name_translation(const struct government *pgovern)
bool untargeted_revolution_allowed(void)
bool can_change_to_government(struct player *pplayer, const struct government *gov)
#define governments_iterate(NAME_pgov)
#define governments_iterate_end
void log_output_window(void)
void clear_output_window(void)
void city_report_dialog_popup(bool raise)
void unit_select_dialog_popup(struct tile *ptile)
void popup_upgrade_dialog(struct unit_list *punits)
void popup_disband_dialog(struct unit_list *punits)
void editgui_refresh(void)
void property_editor_popup(struct property_editor *pe, enum editor_object_type objtype)
struct property_editor * editprop_get_property_editor(void)
void property_editor_reload(struct property_editor *pe, enum editor_object_type objtype)
void popup_find_dialog(void)
void popup_multiplier_dialog(void)
void popup_rates_dialog(void)
void popup_goto_dialog(void)
void fullscreen_opt_refresh(struct option *poption)
gboolean map_canvas_focus(void)
void popup_quit_dialog(void)
#define GUI_GTK_OPTION(optname)
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
void popup_help_dialog_string(const char *item)
void luaconsole_dialog_popup(bool raise)
void center_on_unit(void)
void popup_messageopt_dialog(void)
void meswin_dialog_popup(bool raise)
void option_dialog_popup(const char *name, const struct option_set *poptset)
void save_mapimg_dialog_popup(void)
void mapimg_client_save(const char *filename)
void save_game_dialog_popup(void)
void save_scenario_dialog_popup(void)
void popup_players_dialog(bool raise)
void science_report_dialog_popup(bool raise)
void economy_report_dialog_popup(bool raise)
void units_report_dialog_popup(bool raise)
void science_report_dialog_popdown(void)
void popup_spaceship_dialog(struct player *pplayer)
bool request_transport(struct unit *cargo, struct tile *ptile)
void popup_worklists_report(void)
void infra_dialog_popup(void)
void rally_dialog_popup(void)
static GtkApplication * fc_app
GtkApplication * gui_app(void)
#define submenu_append_unref(menu, name, submenu)
#define menu_item_insert_unref(menu, index, item)
#define menu_item_append_unref(menu, item)
void popup_revolution_dialog(void)
#define HELP_TERRAIN_ITEM
#define HELP_LANGUAGES_ITEM
#define HELP_CONNECTING_ITEM
#define HELP_TILESET_ITEM
#define HELP_CHATLINE_ITEM
#define HELP_RULESET_ITEM
#define HELP_GOVERNMENT_ITEM
#define HELP_MULTIPLIER_ITEM
#define HELP_PLAYING_ITEM
#define HELP_IMPROVEMENTS_ITEM
#define HELP_WORKLIST_EDITOR_ITEM
#define HELP_WONDERS_ITEM
#define HELP_SPACE_RACE_ITEM
#define HELP_COPYING_ITEM
#define HELP_OVERVIEW_ITEM
#define HELP_NATIONS_ITEM
#define HELP_DIPLOMACY_ITEM
#define HELP_ECONOMY_ITEM
#define HELP_CONTROLS_ITEM
Impr_type_id improvement_number(const struct impr_type *pimprove)
const char * improvement_name_translation(const struct impr_type *pimprove)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define FC_STATIC_ASSERT(cond, tag)
struct terrain_misc terrain_control
Multiplier_type_id multiplier_count(void)
const struct option_set * server_optset
const struct option_set * client_optset
void options_save(option_save_log_callback log_cb)
struct client_options gui_options
@ REPORT_WONDERS_OF_THE_WORLD
struct extra_type * road_extra_get(const struct road_type *proad)
struct road_type * road_by_gui_type(enum road_gui_type gui_type)
struct packet_game_info info
struct government * government_during_revolution
bool draw_city_productions
bool draw_fortress_airbase
bool draw_unit_stack_size
bool draw_city_trade_routes
bool save_options_on_exit
bool solid_color_behind_units
enum borders_mode borders
struct terrain * cultivate_result
struct terrain * plant_result
struct terrain * transform_result
int fc_snprintf(char *str, size_t n, const char *format,...)
#define sz_strlcpy(dest, src)
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
void tile_virtual_destroy(struct tile *vtile)
bool tile_apply_activity(struct tile *ptile, Activity_type_id act, struct extra_type *tgt)
struct tile * tile_virtual_new(const struct tile *ptile)
const char * tile_get_info_text(const struct tile *ptile, bool include_nuisances, int linebreaks)
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
bool tilespec_reread(const char *new_tileset_name, bool game_fully_initialized, float scale)
bool unit_can_est_trade_route_here(const struct unit *punit)
bool unit_can_add_or_build_city(const struct civ_map *nmap, const struct unit *punit)
bool can_unit_change_homecity(const struct civ_map *nmap, const struct unit *punit)
bool can_unit_do_autosettlers(const struct unit *punit)
bool can_unit_paradrop(const struct civ_map *nmap, const struct unit *punit)
bool unit_can_help_build_wonder_here(const struct civ_map *nmap, const struct unit *punit)
#define MAX_NUM_BATTLEGROUPS
bool units_can_convert(const struct civ_map *nmap, const struct unit_list *punits)
bool units_are_occupied(const struct unit_list *punits)
bool can_units_do_base_gui(const struct unit_list *punits, enum base_gui_type base_gui)
bool can_units_do_any_road(const struct civ_map *nmap, const struct unit_list *punits)
bool units_can_upgrade(const struct civ_map *nmap, const struct unit_list *punits)
bool units_can_unload(const struct unit_list *punits)
bool units_have_activity_on_tile(const struct unit_list *punits, enum unit_activity activity)
bool units_have_type_flag(const struct unit_list *punits, enum unit_type_flag_id flag, bool has_flag)
bool can_units_do(const struct unit_list *punits, bool(can_fn)(const struct unit *punit))
bool units_can_do_action(const struct unit_list *punits, action_id act_id, bool can_do)
bool units_can_load(const struct unit_list *punits)
bool can_units_do_on_map(const struct civ_map *nmap, const struct unit_list *punits, bool(can_fn)(const struct civ_map *nmap, const struct unit *punit))
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
const struct unit_type * can_upgrade_unittype(const struct player *pplayer, const struct unit_type *punittype)
const char * utype_name_translation(const struct unit_type *punittype)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)