diff -Nur -Xpatches/no.freeciv freeciv-cvs/client/control.c my_freeciv/client/control.c --- freeciv-cvs/client/control.c Fri Oct 27 18:19:59 2000 +++ my_freeciv/client/control.c Sun Dec 10 13:25:48 2000 @@ -1368,7 +1368,8 @@ **************************************************************************/ void key_unit_connect(void) { - request_unit_connect(); + if(get_unit_in_focus()) + request_unit_connect(); } /************************************************************************** @@ -1400,7 +1401,8 @@ **************************************************************************/ void key_unit_done(void) { - request_unit_move_done(); + if(get_unit_in_focus()) + request_unit_move_done(); } /************************************************************************** @@ -1438,7 +1440,8 @@ **************************************************************************/ void key_unit_goto(void) { - request_unit_goto(); + if(get_unit_in_focus()) + request_unit_goto(); } /************************************************************************** @@ -1494,7 +1497,8 @@ **************************************************************************/ void key_unit_patrol(void) { - request_unit_patrol(); + if(get_unit_in_focus()) + request_unit_patrol(); } /************************************************************************** diff -Nur -Xpatches/no.freeciv freeciv-cvs/client/gui-gtk/menu.c my_freeciv/client/gui-gtk/menu.c --- freeciv-cvs/client/gui-gtk/menu.c Fri Oct 27 18:20:03 2000 +++ my_freeciv/client/gui-gtk/menu.c Sun Dec 10 13:30:00 2000 @@ -88,46 +88,45 @@ MENU_VIEW_SHOW_CITY_PRODUCTIONS, MENU_VIEW_CENTER_VIEW, - MENU_ORDER_AUTO_SETTLER, - MENU_ORDER_AUTO_ATTACK, - MENU_ORDER_MINE, + MENU_ORDER_BUILD_CITY, /* shared with BUILD_WONDER */ + MENU_ORDER_ROAD, /* shared with TRADEROUTE */ MENU_ORDER_IRRIGATE, + MENU_ORDER_MINE, MENU_ORDER_TRANSFORM, - MENU_ORDER_FORTRESS, + MENU_ORDER_FORTRESS, /* shared with FORTIFY */ MENU_ORDER_AIRBASE, - MENU_ORDER_BUILD_CITY, - MENU_ORDER_ROAD, - MENU_ORDER_CONNECT, - MENU_ORDER_PATROL, - MENU_ORDER_POLLUTION, + MENU_ORDER_POLLUTION, /* shared with PARADROP */ MENU_ORDER_FALLOUT, - MENU_ORDER_FORTIFY, MENU_ORDER_SENTRY, MENU_ORDER_PILLAGE, - MENU_ORDER_AUTO_EXPLORE, MENU_ORDER_HOMECITY, - MENU_ORDER_WAIT, MENU_ORDER_UNLOAD, MENU_ORDER_WAKEUP_OTHERS, + MENU_ORDER_AUTO_SETTLER, /* shared with AUTO_ATTACK */ + MENU_ORDER_AUTO_EXPLORE, + MENU_ORDER_CONNECT, + MENU_ORDER_PATROL, MENU_ORDER_GOTO, MENU_ORDER_GOTO_CITY, MENU_ORDER_DISBAND, - MENU_ORDER_BUILD_WONDER, - MENU_ORDER_TRADEROUTE, MENU_ORDER_DIPLOMAT_DLG, - MENU_ORDER_DONE, MENU_ORDER_NUKE, + MENU_ORDER_WAIT, + MENU_ORDER_DONE, MENU_REPORT_CITIES, - MENU_REPORT_SCIENCE, - MENU_REPORT_ECONOMY, MENU_REPORT_UNITS, - MENU_REPORT_DEMOGRAPHIC, - MENU_REPORT_TOP_CITIES, + MENU_REPORT_ECONOMY, + MENU_REPORT_SCIENCE, MENU_REPORT_WOW, + MENU_REPORT_TOP_CITIES, + MENU_REPORT_DEMOGRAPHIC, MENU_REPORT_SPACESHIP, + MENU_HELP_LANGUAGES, + MENU_HELP_CONNECTING, MENU_HELP_CONTROLS, + MENU_HELP_CHATLINE, MENU_HELP_PLAYING, MENU_HELP_IMPROVEMENTS, MENU_HELP_UNITS, @@ -141,9 +140,6 @@ MENU_HELP_SPACE_RACE, MENU_HELP_COPYING, MENU_HELP_ABOUT, - MENU_HELP_CONNECTING, - MENU_HELP_CHATLINE, - MENU_HELP_LANGUAGES }; @@ -247,126 +243,105 @@ guint callback_action, GtkWidget *widget) { switch(callback_action) { - case MENU_ORDER_AUTO_SETTLER: - case MENU_ORDER_AUTO_ATTACK: - if(get_unit_in_focus()) - request_unit_auto(get_unit_in_focus()); - break; case MENU_ORDER_BUILD_CITY: - if(get_unit_in_focus()) - request_unit_build_city(get_unit_in_focus()); - break; - case MENU_ORDER_IRRIGATE: - if(get_unit_in_focus()) - request_new_unit_activity(get_unit_in_focus(), ACTIVITY_IRRIGATE); + if (get_unit_in_focus()) { + if (can_unit_build_city(get_unit_in_focus()) || + can_unit_add_to_city(get_unit_in_focus())) + key_unit_build_city(); + else + key_unit_build_wonder(); + } break; - case MENU_ORDER_FORTRESS: - if(get_unit_in_focus()) - request_new_unit_activity(get_unit_in_focus(), ACTIVITY_FORTRESS); + case MENU_ORDER_ROAD: + if (get_unit_in_focus()) { + if (unit_can_est_traderoute_here(get_unit_in_focus())) + key_unit_traderoute(); + else + key_unit_road(); + } break; - case MENU_ORDER_AIRBASE: - key_unit_airbase(); + case MENU_ORDER_IRRIGATE: + key_unit_irrigate(); break; case MENU_ORDER_MINE: - if(get_unit_in_focus()) - request_new_unit_activity(get_unit_in_focus(), ACTIVITY_MINE); + key_unit_mine(); break; case MENU_ORDER_TRANSFORM: - if(get_unit_in_focus()) - request_new_unit_activity(get_unit_in_focus(), ACTIVITY_TRANSFORM); - break; - case MENU_ORDER_ROAD: - if(get_unit_in_focus()) - request_new_unit_activity(get_unit_in_focus(), road_activity); + key_unit_transform(); break; - case MENU_ORDER_CONNECT: - if(get_unit_in_focus()) - request_unit_connect(); + case MENU_ORDER_FORTRESS: + if (get_unit_in_focus()) { + if (can_unit_do_activity(get_unit_in_focus(), ACTIVITY_FORTRESS)) + key_unit_fortress(); + else + key_unit_fortify(); + } break; - case MENU_ORDER_PATROL: - if(get_unit_in_focus()) - request_unit_patrol(); + case MENU_ORDER_AIRBASE: + key_unit_airbase(); break; case MENU_ORDER_POLLUTION: - if(get_unit_in_focus()) { - if(can_unit_paradrop(get_unit_in_focus())) + if (get_unit_in_focus()) { + if (can_unit_paradrop(get_unit_in_focus())) key_unit_paradrop(); else key_unit_pollution(); } break; case MENU_ORDER_FALLOUT: - if(get_unit_in_focus()) - request_new_unit_activity(get_unit_in_focus(), ACTIVITY_FALLOUT); - break; - case MENU_ORDER_HOMECITY: - if(get_unit_in_focus()) - request_unit_change_homecity(get_unit_in_focus()); - break; - case MENU_ORDER_FORTIFY: - if(get_unit_in_focus()) - request_new_unit_activity(get_unit_in_focus(), ACTIVITY_FORTIFYING); + key_unit_fallout(); break; case MENU_ORDER_SENTRY: - if(get_unit_in_focus()) - request_new_unit_activity(get_unit_in_focus(), ACTIVITY_SENTRY); + key_unit_sentry(); break; - case MENU_ORDER_WAIT: - if(get_unit_in_focus()) - request_unit_wait(get_unit_in_focus()); + case MENU_ORDER_PILLAGE: + key_unit_pillage(); + break; + case MENU_ORDER_HOMECITY: + key_unit_homecity(); break; case MENU_ORDER_UNLOAD: - if(get_unit_in_focus()) - request_unit_unload(get_unit_in_focus()); + key_unit_unload(); break; case MENU_ORDER_WAKEUP_OTHERS: + key_unit_wakeup_others(); + break; + case MENU_ORDER_AUTO_SETTLER: if(get_unit_in_focus()) - request_unit_wakeup(get_unit_in_focus()); + request_unit_auto(get_unit_in_focus()); + break; + case MENU_ORDER_AUTO_EXPLORE: + key_unit_auto_explore(); + break; + case MENU_ORDER_CONNECT: + key_unit_connect(); + break; + case MENU_ORDER_PATROL: + key_unit_patrol(); break; case MENU_ORDER_GOTO: - if(get_unit_in_focus()) - request_unit_goto(); + key_unit_goto(); break; case MENU_ORDER_GOTO_CITY: if(get_unit_in_focus()) popup_goto_dialog(); break; case MENU_ORDER_DISBAND: - if(get_unit_in_focus()) - request_unit_disband(get_unit_in_focus()); + key_unit_disband(); break; - case MENU_ORDER_PILLAGE: - if(get_unit_in_focus()) - request_unit_pillage(get_unit_in_focus()); - break; - case MENU_ORDER_AUTO_EXPLORE: - if(get_unit_in_focus()) - request_new_unit_activity(get_unit_in_focus(), ACTIVITY_EXPLORE); - break; - case MENU_ORDER_BUILD_WONDER: - if(get_unit_in_focus()) - request_unit_caravan_action(get_unit_in_focus(), - PACKET_UNIT_HELP_BUILD_WONDER); - break; - case MENU_ORDER_TRADEROUTE: - if(get_unit_in_focus()) - request_unit_caravan_action(get_unit_in_focus(), - PACKET_UNIT_ESTABLISH_TRADE); - break; case MENU_ORDER_DIPLOMAT_DLG: - if(get_unit_in_focus()) - key_unit_diplomat_actions(); - break; - case MENU_ORDER_DONE: - if(get_unit_in_focus()) - request_unit_move_done(); + key_unit_diplomat_actions(); break; case MENU_ORDER_NUKE: - if(get_unit_in_focus()) - request_unit_nuke(get_unit_in_focus()); + key_unit_nuke(); + break; + case MENU_ORDER_WAIT: + key_unit_wait(); + break; + case MENU_ORDER_DONE: + key_unit_done(); break; } - } @@ -380,23 +355,23 @@ case MENU_REPORT_CITIES: popup_city_report_dialog(0); break; - case MENU_REPORT_SCIENCE: - popup_science_dialog(0); + case MENU_REPORT_UNITS: + popup_activeunits_report_dialog(0); break; case MENU_REPORT_ECONOMY: popup_economy_report_dialog(0); break; - case MENU_REPORT_UNITS: - popup_activeunits_report_dialog(0); + case MENU_REPORT_SCIENCE: + popup_science_dialog(0); break; - case MENU_REPORT_DEMOGRAPHIC: - send_report_request(REPORT_DEMOGRAPHIC); + case MENU_REPORT_WOW: + send_report_request(REPORT_WONDERS_OF_THE_WORLD); break; - case MENU_REPORT_TOP_CITIES: + case MENU_REPORT_TOP_CITIES: send_report_request(REPORT_TOP_5_CITIES); break; - case MENU_REPORT_WOW: - send_report_request(REPORT_WONDERS_OF_THE_WORLD); + case MENU_REPORT_DEMOGRAPHIC: + send_report_request(REPORT_DEMOGRAPHIC); break; case MENU_REPORT_SPACESHIP: popup_spaceship_dialog(game.player_ptr); @@ -418,12 +393,12 @@ case MENU_HELP_CONNECTING: popup_help_dialog_string(HELP_CONNECTING_ITEM); break; - case MENU_HELP_CHATLINE: - popup_help_dialog_string(HELP_CHATLINE_ITEM); - break; case MENU_HELP_CONTROLS: popup_help_dialog_string(HELP_CONTROLS_ITEM); break; + case MENU_HELP_CHATLINE: + popup_help_dialog_string(HELP_CHATLINE_ITEM); + break; case MENU_HELP_PLAYING: popup_help_dialog_string(HELP_PLAYING_ITEM); break; @@ -491,44 +466,44 @@ static GtkItemFactoryEntry menu_items[] = { /* Game menu ... */ - { "/" N_("_Game"), NULL, + { "/" N_("Game"), NULL, NULL, 0, "" }, { "/" N_("Game") "/tearoff1", NULL, NULL, 0, "" }, { "/" N_("Game") "/sep1", NULL, NULL, 0, "" }, - { "/" N_("Game") "/" N_("_Local Options"), NULL, + { "/" N_("Game") "/" N_("Local Options"), NULL, game_menu_callback, MENU_GAME_OPTIONS }, - { "/" N_("Game") "/" N_("Messa_ge Options"), NULL, + { "/" N_("Game") "/" N_("Message Options"), NULL, game_menu_callback, MENU_GAME_MSG_OPTIONS }, - { "/" N_("Game") "/" N_("_Save Settings"), NULL, + { "/" N_("Game") "/" N_("Save Settings"), NULL, game_menu_callback, MENU_GAME_SAVE_SETTINGS }, { "/" N_("Game") "/sep2", NULL, NULL, 0, "" }, - { "/" N_("Game") "/" N_("_Players"), "F3", + { "/" N_("Game") "/" N_("Players"), "F3", game_menu_callback, MENU_GAME_PLAYERS }, - { "/" N_("Game") "/" N_("_Messages"), "F10", + { "/" N_("Game") "/" N_("Messages"), "F10", game_menu_callback, MENU_GAME_MESSAGES }, { "/" N_("Game") "/sep3", NULL, NULL, 0, "" }, - { "/" N_("Game") "/" N_("Server Opt _initial"), NULL, + { "/" N_("Game") "/" N_("Server Opt initial"), NULL, game_menu_callback, MENU_GAME_SERVER_OPTIONS1 }, - { "/" N_("Game") "/" N_("Server Opt _ongoing"), NULL, + { "/" N_("Game") "/" N_("Server Opt ongoing"), NULL, game_menu_callback, MENU_GAME_SERVER_OPTIONS2 }, { "/" N_("Game") "/sep4", NULL, NULL, 0, "" }, - { "/" N_("Game") "/" N_("_Export Log"), NULL, + { "/" N_("Game") "/" N_("Export Log"), NULL, game_menu_callback, MENU_GAME_OUTPUT_LOG }, - { "/" N_("Game") "/" N_("_Clear Log"), NULL, + { "/" N_("Game") "/" N_("Clear Log"), NULL, game_menu_callback, MENU_GAME_CLEAR_OUTPUT }, { "/" N_("Game") "/sep5", NULL, NULL, 0, "" }, - { "/" N_("Game") "/" N_("_Disconnect"), NULL, + { "/" N_("Game") "/" N_("Disconnect"), NULL, game_menu_callback, MENU_GAME_DISCONNECT }, { "/" N_("Game") "/" N_("_Quit"), "q", gtk_main_quit, 0 }, /* Kingdom menu ... */ - { "/" N_("_Kingdom"), NULL, + { "/" N_("Kingdom"), NULL, NULL, 0, "" }, { "/" N_("Kingdom") "/tearoff1", NULL, NULL, 0, "" }, @@ -536,16 +511,16 @@ kingdom_menu_callback, MENU_KINGDOM_TAX_RATE }, { "/" N_("Kingdom") "/sep1", NULL, NULL, 0, "" }, - { "/" N_("Kingdom") "/" N_("_Find City"), "f", + { "/" N_("Kingdom") "/" N_("_Find City"), "f", kingdom_menu_callback, MENU_KINGDOM_FIND_CITY }, { "/" N_("Kingdom") "/" N_("Work_lists"), "l", kingdom_menu_callback, MENU_KINGDOM_WORKLISTS }, { "/" N_("Kingdom") "/sep2", NULL, NULL, 0, "" }, - { "/" N_("Kingdom") "/" N_("_Revolution"), NULL, + { "/" N_("Kingdom") "/" N_("_Revolution"), "r", kingdom_menu_callback, MENU_KINGDOM_REVOLUTION }, /* View menu ... */ - { "/" N_("_View"), NULL, + { "/" N_("View"), NULL, NULL, 0, "" }, { "/" N_("View") "/tearoff1", NULL, NULL, 0, "" }, @@ -560,7 +535,7 @@ { "/" N_("View") "/" N_("_Center View"), "c", view_menu_callback, MENU_VIEW_CENTER_VIEW }, /* Orders menu ... */ - { "/" N_("_Orders"), NULL, + { "/" N_("Orders"), NULL, NULL, 0, "" }, { "/" N_("Orders") "/tearoff1", NULL, NULL, 0, "" }, @@ -574,7 +549,7 @@ orders_menu_callback, MENU_ORDER_MINE }, { "/" N_("Orders") "/" N_("Transf_orm Terrain"), "o", orders_menu_callback, MENU_ORDER_TRANSFORM }, - { "/" N_("Orders") "/" N_("Build For_tress"), "f", + { "/" N_("Orders") "/" N_("Build _Fortress"), "f", orders_menu_callback, MENU_ORDER_FORTRESS }, { "/" N_("Orders") "/" N_("Build Airbas_e"), "e", orders_menu_callback, MENU_ORDER_AIRBASE }, @@ -584,11 +559,9 @@ orders_menu_callback, MENU_ORDER_FALLOUT }, { "/" N_("Orders") "/sep1", NULL, NULL, 0, "" }, - { "/" N_("Orders") "/" N_("_Fortify"), "f", - orders_menu_callback, MENU_ORDER_FORTIFY }, { "/" N_("Orders") "/" N_("_Sentry"), "s", orders_menu_callback, MENU_ORDER_SENTRY }, - { "/" N_("Orders") "/" N_("Pi_llage"), "p", + { "/" N_("Orders") "/" N_("_Pillage"), "p", orders_menu_callback, MENU_ORDER_PILLAGE }, { "/" N_("Orders") "/sep2", NULL, NULL, 0, "" }, @@ -596,14 +569,12 @@ orders_menu_callback, MENU_ORDER_HOMECITY }, { "/" N_("Orders") "/" N_("_Unload"), "u", orders_menu_callback, MENU_ORDER_UNLOAD }, - { "/" N_("Orders") "/" N_("Wake up others"), "w", + { "/" N_("Orders") "/" N_("_Wake up others"), "w", orders_menu_callback, MENU_ORDER_WAKEUP_OTHERS }, { "/" N_("Orders") "/sep3", NULL, NULL, 0, "" }, { "/" N_("Orders") "/" N_("_Auto Settler"), "a", orders_menu_callback, MENU_ORDER_AUTO_SETTLER }, - { "/" N_("Orders") "/" N_("Auto Attac_k"), "a", - orders_menu_callback, MENU_ORDER_AUTO_ATTACK }, { "/" N_("Orders") "/" N_("Auto E_xplore"), "x", orders_menu_callback, MENU_ORDER_AUTO_EXPLORE }, { "/" N_("Orders") "/" N_("_Connect"), "c", @@ -612,19 +583,15 @@ orders_menu_callback, MENU_ORDER_PATROL }, { "/" N_("Orders") "/" N_("_Go to"), "g", orders_menu_callback, MENU_ORDER_GOTO }, - { "/" N_("Orders") "/" N_("Go|Airlift to Cit_y"), "l", + { "/" N_("Orders") "/" N_("Go|Airlift to City"), "l", orders_menu_callback, MENU_ORDER_GOTO_CITY }, { "/" N_("Orders") "/sep4", NULL, NULL, 0, "" }, { "/" N_("Orders") "/" N_("_Disband Unit"), "d", orders_menu_callback, MENU_ORDER_DISBAND }, - { "/" N_("Orders") "/" N_("Help Build Wonder"), "b", - orders_menu_callback, MENU_ORDER_BUILD_WONDER }, - { "/" N_("Orders") "/" N_("Make Trade Route"), "r", - orders_menu_callback, MENU_ORDER_TRADEROUTE }, - { "/" N_("Orders") "/" N_("Diplomat|Spy Actions"), "b", + { "/" N_("Orders") "/" N_("Diplomat|Spy Actions"), "d", orders_menu_callback, MENU_ORDER_DIPLOMAT_DLG }, - { "/" N_("Orders") "/" N_("Explode Nuclear"), "n", + { "/" N_("Orders") "/" N_("Explode _Nuclear"), "n", orders_menu_callback, MENU_ORDER_NUKE }, { "/" N_("Orders") "/sep5", NULL, NULL, 0, "" }, @@ -633,70 +600,70 @@ { "/" N_("Orders") "/" N_("Done"), "space", orders_menu_callback, MENU_ORDER_DONE }, /* Reports menu ... */ - { "/" N_("_Reports"), NULL, + { "/" N_("Reports"), NULL, NULL, 0, "" }, { "/" N_("Reports") "/tearoff1", NULL, NULL, 0, "" }, - { "/" N_("Reports") "/" N_("_Cities"), "F1", + { "/" N_("Reports") "/" N_("Cities"), "F1", reports_menu_callback, MENU_REPORT_CITIES }, - { "/" N_("Reports") "/" N_("_Units"), "F2", + { "/" N_("Reports") "/" N_("Units"), "F2", reports_menu_callback, MENU_REPORT_UNITS }, - { "/" N_("Reports") "/" N_("_Economy"), "F5", + { "/" N_("Reports") "/" N_("Economy"), "F5", reports_menu_callback, MENU_REPORT_ECONOMY }, - { "/" N_("Reports") "/" N_("_Science"), "F6", + { "/" N_("Reports") "/" N_("Science"), "F6", reports_menu_callback, MENU_REPORT_SCIENCE }, { "/" N_("Reports") "/sep1", NULL, NULL, 0, "" }, - { "/" N_("Reports") "/" N_("_Wonders of the World"), "F7", + { "/" N_("Reports") "/" N_("Wonders of the World"), "F7", reports_menu_callback, MENU_REPORT_WOW }, - { "/" N_("Reports") "/" N_("_Top Five Cities"), "F8", + { "/" N_("Reports") "/" N_("Top Five Cities"), "F8", reports_menu_callback, MENU_REPORT_TOP_CITIES }, - { "/" N_("Reports") "/" N_("_Demographics"), "F11", + { "/" N_("Reports") "/" N_("Demographics"), "F11", reports_menu_callback, MENU_REPORT_DEMOGRAPHIC }, - { "/" N_("Reports") "/" N_("S_paceship"), "F12", + { "/" N_("Reports") "/" N_("Spaceship"), "F12", reports_menu_callback, MENU_REPORT_SPACESHIP }, /* Help menu ... */ - { "/" N_("_Help"), NULL, + { "/" N_("Help"), NULL, NULL, 0, "" }, { "/" N_("Help") "/tearoff1", NULL, NULL, 0, "" }, - { "/" N_("Help") "/" N_("Language_s"), NULL, + { "/" N_("Help") "/" N_("Languages"), NULL, help_menu_callback, MENU_HELP_LANGUAGES }, - { "/" N_("Help") "/" N_("Co_nnecting"), NULL, + { "/" N_("Help") "/" N_("Connecting"), NULL, help_menu_callback, MENU_HELP_CONNECTING }, - { "/" N_("Help") "/" N_("C_ontrols"), NULL, + { "/" N_("Help") "/" N_("Controls"), NULL, help_menu_callback, MENU_HELP_CONTROLS }, - { "/" N_("Help") "/" N_("C_hatline"), NULL, + { "/" N_("Help") "/" N_("Chatline"), NULL, help_menu_callback, MENU_HELP_CHATLINE }, - { "/" N_("Help") "/" N_("_Playing"), NULL, + { "/" N_("Help") "/" N_("Playing"), NULL, help_menu_callback, MENU_HELP_PLAYING }, { "/" N_("Help") "/sep1", NULL, NULL, 0, "" }, - { "/" N_("Help") "/" N_("City _Improvements"), NULL, + { "/" N_("Help") "/" N_("City Improvements"), NULL, help_menu_callback, MENU_HELP_IMPROVEMENTS }, - { "/" N_("Help") "/" N_("_Units"), NULL, + { "/" N_("Help") "/" N_("Units"), NULL, help_menu_callback, MENU_HELP_UNITS }, - { "/" N_("Help") "/" N_("Com_bat"), NULL, + { "/" N_("Help") "/" N_("Combat"), NULL, help_menu_callback, MENU_HELP_COMBAT }, - { "/" N_("Help") "/" N_("_ZOC"), NULL, + { "/" N_("Help") "/" N_("ZOC"), NULL, help_menu_callback, MENU_HELP_ZOC }, - { "/" N_("Help") "/" N_("Techno_logy"), NULL, + { "/" N_("Help") "/" N_("Technology"), NULL, help_menu_callback, MENU_HELP_TECH }, - { "/" N_("Help") "/" N_("_Terrain"), NULL, + { "/" N_("Help") "/" N_("Terrain"), NULL, help_menu_callback, MENU_HELP_TERRAIN }, - { "/" N_("Help") "/" N_("Won_ders"), NULL, + { "/" N_("Help") "/" N_("Wonders"), NULL, help_menu_callback, MENU_HELP_WONDERS }, - { "/" N_("Help") "/" N_("_Government"), NULL, + { "/" N_("Help") "/" N_("Government"), NULL, help_menu_callback, MENU_HELP_GOVERNMENT }, - { "/" N_("Help") "/" N_("Happin_ess"), NULL, + { "/" N_("Help") "/" N_("Happiness"), NULL, help_menu_callback, MENU_HELP_HAPPINESS }, - { "/" N_("Help") "/" N_("Space _Race"), NULL, + { "/" N_("Help") "/" N_("Space Race"), NULL, help_menu_callback, MENU_HELP_SPACE_RACE }, { "/" N_("Help") "/sep2", NULL, NULL, 0, "" }, - { "/" N_("Help") "/" N_("_Copying"), NULL, + { "/" N_("Help") "/" N_("Copying"), NULL, help_menu_callback, MENU_HELP_COPYING }, - { "/" N_("Help") "/" N_("_About"), NULL, + { "/" N_("Help") "/" N_("About"), NULL, help_menu_callback, MENU_HELP_ABOUT } }; @@ -770,8 +737,8 @@ *menubar=gtk_item_factory_get_widget(item_factory, "
"); /* kluge to get around gtk's interpretation of "/" in menu item names */ - menus_rename("
/Orders/Go|Airlift to City", _("Go/Airlift to City")); - menus_rename("
/Orders/Diplomat|Spy Actions", _("Diplomat/Spy Actions")); + menus_rename("
/Orders/Go|Airlift to City", _("Go/Air_lift to City")); + menus_rename("
/Orders/Diplomat|Spy Actions", _("_Diplomat/Spy Actions")); } /**************************************************************** @@ -922,73 +889,84 @@ sz_strlcpy(mintext, _("Build _Mine")); sz_strlcpy(transtext, _("Transf_orm Terrain")); - menus_set_sensitive("
/Orders/Auto Settler", - (can_unit_do_auto(punit) - && unit_flag(punit->type, F_SETTLERS))); - - menus_set_sensitive("
/Orders/Auto Attack", - (can_unit_do_auto(punit) - && !unit_flag(punit->type, F_SETTLERS))); - menus_set_sensitive("
/Orders/Build City", (can_unit_build_city(punit) || - can_unit_add_to_city(punit))); + can_unit_add_to_city(punit) || + unit_can_help_build_wonder_here(punit))); + menus_set_sensitive("
/Orders/Build Road", + (can_unit_do_activity(punit, ACTIVITY_ROAD) || + can_unit_do_activity(punit, ACTIVITY_RAILROAD) || + unit_can_est_traderoute_here(punit))); + menus_set_sensitive("
/Orders/Build Irrigation", + can_unit_do_activity(punit, ACTIVITY_IRRIGATE)); + menus_set_sensitive("
/Orders/Build Mine", + can_unit_do_activity(punit, ACTIVITY_MINE)); + menus_set_sensitive("
/Orders/Transform Terrain", + can_unit_do_activity(punit, ACTIVITY_TRANSFORM)); menus_set_sensitive("
/Orders/Build Fortress", - can_unit_do_activity(punit, ACTIVITY_FORTRESS)); + (can_unit_do_activity(punit, ACTIVITY_FORTRESS) || + can_unit_do_activity(punit, ACTIVITY_FORTIFYING))); menus_set_sensitive("
/Orders/Build Airbase", can_unit_do_activity(punit, ACTIVITY_AIRBASE)); - menus_set_sensitive("
/Orders/Build Road", - can_unit_do_activity(punit, ACTIVITY_ROAD) || - can_unit_do_activity(punit, ACTIVITY_RAILROAD)); - menus_set_sensitive("
/Orders/Connect", - can_unit_do_connect(punit, ACTIVITY_IDLE)); - /* also remove extern struct connection aconnection when removing capability */ - menus_set_sensitive("
/Orders/Patrol", - can_unit_do_activity(punit, ACTIVITY_PATROL) - && has_capability("activity_patrol", aconnection.capability)); menus_set_sensitive("
/Orders/Clean Pollution", - can_unit_do_activity(punit, ACTIVITY_POLLUTION) || - can_unit_paradrop(punit)); + (can_unit_do_activity(punit, ACTIVITY_POLLUTION) || + can_unit_paradrop(punit))); menus_set_sensitive("
/Orders/Clean Nuclear Fallout", can_unit_do_activity(punit, ACTIVITY_FALLOUT)); - menus_set_sensitive("
/Orders/Fortify", - can_unit_do_activity(punit, ACTIVITY_FORTIFYING)); menus_set_sensitive("
/Orders/Sentry", can_unit_do_activity(punit, ACTIVITY_SENTRY)); menus_set_sensitive("
/Orders/Pillage", can_unit_do_activity(punit, ACTIVITY_PILLAGE)); - menus_set_sensitive("
/Orders/Auto Explore", - can_unit_do_activity(punit, ACTIVITY_EXPLORE)); - menus_set_sensitive("
/Orders/Build Mine", - can_unit_do_activity(punit, ACTIVITY_MINE)); - menus_set_sensitive("
/Orders/Build Irrigation", - can_unit_do_activity(punit, ACTIVITY_IRRIGATE)); - menus_set_sensitive("
/Orders/Transform Terrain", - can_unit_do_activity(punit, ACTIVITY_TRANSFORM)); menus_set_sensitive("
/Orders/Make Homecity", can_unit_change_homecity(punit)); - menus_set_sensitive("
/Orders/Explode Nuclear", - unit_flag(punit->type, F_NUCLEAR)); menus_set_sensitive("
/Orders/Unload", get_transporter_capacity(punit)>0); menus_set_sensitive("
/Orders/Wake up others", is_unit_activity_on_tile(ACTIVITY_SENTRY, - punit->x, punit->y)); - menus_set_sensitive("
/Orders/Help Build Wonder", - unit_can_help_build_wonder_here(punit)); - menus_set_sensitive("
/Orders/Make Trade Route", - unit_can_est_traderoute_here(punit)); + punit->x, punit->y)); + menus_set_sensitive("
/Orders/Auto Settler", + can_unit_do_auto(punit)); + menus_set_sensitive("
/Orders/Auto Explore", + can_unit_do_activity(punit, ACTIVITY_EXPLORE)); + menus_set_sensitive("
/Orders/Connect", + can_unit_do_connect(punit, ACTIVITY_IDLE)); + /* also remove extern struct connection aconnection when removing capability */ + menus_set_sensitive("
/Orders/Patrol", + can_unit_do_activity(punit, ACTIVITY_PATROL) + && has_capability("activity_patrol", aconnection.capability)); menus_set_sensitive("
/Orders/Diplomat|Spy Actions", - (is_diplomat_unit(punit) - && diplomat_can_do_action(punit, DIPLOMAT_ANY_ACTION, + (is_diplomat_unit(punit) + && diplomat_can_do_action(punit, DIPLOMAT_ANY_ACTION, punit->x, punit->y))); + menus_set_sensitive("
/Orders/Explode Nuclear", + unit_flag(punit->type, F_NUCLEAR)); - if (unit_flag(punit->type, F_CITIES) - && map_get_city(punit->x, punit->y)) { - menus_rename("
/Orders/Build City", _("Add to City (_B)")); - } else { - menus_rename("
/Orders/Build City", _("_Build City")); + if (unit_flag(punit->type, F_CARAVAN)) + menus_rename("
/Orders/Build City", _("Help _Build Wonder")); + else if (unit_flag(punit->type, F_CITIES)) { + if (map_get_city(punit->x, punit->y)) + menus_rename("
/Orders/Build City", _("Add to City (_B)")); + else + menus_rename("
/Orders/Build City", _("_Build City")); + } + else + menus_rename("
/Orders/Build City", _("_Build City")); + + if (unit_flag(punit->type, F_CARAVAN)) + menus_rename("
/Orders/Build Road", _("Make Trade _Route")); + else if (unit_flag(punit->type, F_SETTLERS)) { + if (map_get_tile(punit->x,punit->y)->special&S_ROAD) { + roadtext = _("Build _Railroad"); + road_activity=ACTIVITY_RAILROAD; + } + else { + roadtext = _("Build _Road"); + road_activity=ACTIVITY_ROAD; + } + menus_rename("
/Orders/Build Road", roadtext); } + else + menus_rename("
/Orders/Build Road", _("Build _Road")); ttype = map_get_tile(punit->x, punit->y)->terrain; tinfo = get_tile_type(ttype); @@ -1013,24 +991,24 @@ (get_tile_type(tinfo->transform_result))->terrain_name); } - if (unit_flag(punit->type, F_PARATROOPERS)) { - menus_rename("
/Orders/Clean Pollution", _("_Paradrop")); - } else { - menus_rename("
/Orders/Clean Pollution", _("Clean _Pollution")); - } - menus_rename("
/Orders/Build Irrigation", irrtext); menus_rename("
/Orders/Build Mine", mintext); menus_rename("
/Orders/Transform Terrain", transtext); - - if (map_get_tile(punit->x,punit->y)->special&S_ROAD) { - roadtext = _("Build _Railroad"); - road_activity=ACTIVITY_RAILROAD; - } else { - roadtext = _("Build _Road"); - road_activity=ACTIVITY_ROAD; - } - menus_rename("
/Orders/Build Road", roadtext); + + if (can_unit_do_activity(punit, ACTIVITY_FORTIFYING)) + menus_rename("
/Orders/Build Fortress", _("_Fortify")); + else + menus_rename("
/Orders/Build Fortress", _("Build _Fortress")); + + if (unit_flag(punit->type, F_PARATROOPERS)) + menus_rename("
/Orders/Clean Pollution", _("_Paradrop")); + else + menus_rename("
/Orders/Clean Pollution", _("Clean _Pollution")); + + if (!unit_flag(punit->type, F_SETTLERS)) + menus_rename("
/Orders/Auto Settler", _("_Auto Attack")); + else + menus_rename("
/Orders/Auto Settler", _("_Auto Settler")); menus_set_sensitive("
/Orders", TRUE); } diff -Nur -Xpatches/no.freeciv freeciv-cvs/client/gui-xaw/actions.c my_freeciv/client/gui-xaw/actions.c --- freeciv-cvs/client/gui-xaw/actions.c Fri Oct 27 18:20:04 2000 +++ my_freeciv/client/gui-xaw/actions.c Sun Dec 10 13:25:48 2000 @@ -343,9 +343,6 @@ if (unit_flag(punit->type, F_SETTLERS)) { if(is_menu_item_active(MENU_ORDER, MENU_ORDER_BUILD_CITY)) key_unit_build_city(); - } else if (unit_flag(punit->type, F_DIPLOMAT)) { - if(is_menu_item_active(MENU_ORDER, MENU_ORDER_DIPLOMAT_DLG)) - key_unit_diplomat_actions(); } else { if(is_menu_item_active(MENU_ORDER, MENU_ORDER_BUILD_WONDER)) key_unit_build_wonder(); @@ -365,6 +362,12 @@ key_unit_connect(); } +static void xaw_key_unit_diplomat_spy_action(Widget w, XEvent *event, String *argv, Cardinal *argc) +{ + if(is_menu_item_active(MENU_ORDER, MENU_ORDER_DIPLOMAT_DLG)) + key_unit_diplomat_actions(); +} + static void xaw_key_unit_disband(Widget w, XEvent *event, String *argv, Cardinal *argc) { if(is_menu_item_active(MENU_ORDER, MENU_ORDER_DISBAND)) @@ -640,6 +643,7 @@ { "key-unit-build-city-or-wonder", xaw_key_unit_build_city_or_wonder }, { "key-unit-build-wonder", xaw_key_unit_build_wonder }, { "key-unit-connect", xaw_key_unit_connect }, + { "key-unit-diplomat-spy-action", xaw_key_unit_diplomat_spy_action }, { "key-unit-disband", xaw_key_unit_disband }, { "key-unit-done", xaw_key_unit_done }, { "key-unit-fallout", xaw_key_unit_fallout }, diff -Nur -Xpatches/no.freeciv freeciv-cvs/client/gui-xaw/menu.c my_freeciv/client/gui-xaw/menu.c --- freeciv-cvs/client/gui-xaw/menu.c Fri Oct 27 18:20:06 2000 +++ my_freeciv/client/gui-xaw/menu.c Sun Dec 10 13:29:51 2000 @@ -124,7 +124,7 @@ static struct MenuEntry kingdom_menu_entries[]={ { { N_("Tax Rates"), 0 }, "T", MENU_KINGDOM_RATES, 0 }, { { 0 }, "", MENU_SEPARATOR_LINE, 0 }, - { { N_("Find City"), 0 }, "ctl-f", MENU_KINGDOM_FIND_CITY, 0 }, + { { N_("Find City"), 0 }, "F", MENU_KINGDOM_FIND_CITY, 0 }, { { N_("Worklists"), 0 }, "L", MENU_KINGDOM_WORKLISTS, 0 }, { { 0 }, "", MENU_SEPARATOR_LINE, 0 }, { { N_("Revolution"), 0 }, "R", MENU_KINGDOM_REVOLUTION, 0 }, @@ -177,7 +177,7 @@ { { N_("Disband Unit"), 0 }, "D", MENU_ORDER_DISBAND, 0 }, { { N_("Help Build Wonder"), 0 }, "b", MENU_ORDER_BUILD_WONDER, 0 }, { { N_("Make Trade Route"), 0 }, "r", MENU_ORDER_TRADEROUTE, 0 }, - { { N_("Diplomat/Spy Actions"), 0 }, "b", MENU_ORDER_DIPLOMAT_DLG, 0}, + { { N_("Diplomat/Spy Actions"), 0 }, "d", MENU_ORDER_DIPLOMAT_DLG, 0}, { { N_("Explode Nuclear"), 0 }, "N", MENU_ORDER_NUKE, 0 }, { { 0 }, "", MENU_SEPARATOR_LINE, 0 }, { { N_("Wait"), 0 }, "w", MENU_ORDER_WAIT, 0 }, diff -Nur -Xpatches/no.freeciv freeciv-cvs/data/Freeciv my_freeciv/data/Freeciv --- freeciv-cvs/data/Freeciv Fri Oct 27 18:20:10 2000 +++ my_freeciv/data/Freeciv Sun Dec 10 13:31:55 2000 @@ -2763,12 +2763,12 @@ : mouse-moved() \n\ Shift: btn-adjust-workers() \n\ : btn-select-mapcanvas() \n\ - Ctrlf: key-open-find-city() \n\ Ctrlg: key-map-grid-toggle() \n\ Ctrln: key-city-names-toggle() \n\ Ctrlp: key-city-productions-toggle() \n\ Shiftc: key-unit-connect() \n\ Shiftd: key-unit-disband() \n\ + Shiftf: key-open-find-city() \n\ Shiftl: key-open-worklists() \n\ Shiftn: key-unit-nuke() \n\ Shiftp: key-unit-pillage() \n\ @@ -2778,6 +2778,7 @@ a: key-unit-auto-attack-or-settle() \n\ b: key-unit-build-city-or-wonder() \n\ c: key-center-on-unit() \n\ + d: key-unit-diplomat-spy-action() \n\ e: key-unit-airbase() \n\ f: key-unit-fortify-or-fortress() \n\ g: key-unit-goto() \n\ @@ -2839,12 +2840,11 @@ Freeciv*overviewcanvas.translations:\ : btn-select-overviewcanvas() \n\ - Ctrlf: key-open-find-city() \n\ Ctrlg: key-map-grid-toggle() \n\ Ctrln: key-city-names-toggle() \n\ Ctrlp: key-city-productions-toggle() \n\ - Shiftc: key-unit-connect() \n\ Shiftd: key-unit-disband() \n\ + Shiftf: key-open-find-city() \n\ Shiftl: key-open-worklists() \n\ Shiftn: key-unit-nuke() \n\ Shiftp: key-unit-pillage() \n\ @@ -2853,7 +2853,8 @@ Shiftw: key-unit-wakeup-others() \n\ a: key-unit-auto-attack-or-settle() \n\ b: key-unit-build-city-or-wonder() \n\ - c: key-center-on-unit() \n\ + c: key-unit-connect() \n\ + d: key-unit-diplomat-spy-action() \n\ e: key-unit-airbase() \n\ f: key-unit-fortify-or-fortress() \n\ g: key-unit-goto() \n\ @@ -2869,6 +2870,7 @@ s: key-unit-sentry() \n\ t: key-city-workers() \n\ u: key-unit-unload() \n\ + v: key-center-on-unit() \n\ w: key-unit-wait() \n\ x: key-unit-auto-explore() \n\ F1: key-open-city-report() \n\ diff -Nur -Xpatches/no.freeciv freeciv-cvs/data/helpdata.txt my_freeciv/data/helpdata.txt --- freeciv-cvs/data/helpdata.txt Fri Oct 27 18:20:10 2000 +++ my_freeciv/data/helpdata.txt Sun Dec 10 13:32:56 2000 @@ -440,49 +440,55 @@ =========\n\ a: (a)uto-settler (settler units)\n\ a: (a)uto-attack (military units)\n\ - c: (c)enter view on unit\n\ - C: unit (C)onnect (then left-click mouse to select destination)\n\ b: (b)uild city (settler units)\n\ b: help (b)uild wonder (caravan units)\n\ + c: (c)enter view on unit\n\ + C: unit (c)onnect (then left-click mouse to select destination)\n\ + d: (d)iplomat/spy actions (diplomat/spy units)\n\ D: (D)isband unit\n\ - e: build airbas(e) (airbase units)\n\ + e: build airbas(e)\n\ f: (f)ortify unit (military units)\n\ - f: build (f)ortress on tile (settler units)\n\ + f: build (f)ortress (settler units)\n\ + F: open (F)ind City dialog\n\ g: unit (g)oto (then left-click mouse to select destination)\n\ h: change (h)omecity (to city at current location)\n\ i: build (i)rrigation/farmland (may convert terrain)\n\ l: go/air(l)ift to city\n\ + L: open Work(L)ists dialog\n\ m: build (m)ine (may convert terrain)\n\ + n: clean (n)uclear fallout\n\ N: explode (N)uclear\n\ o: transf(o)rm terrain\n\ - p: clean (p)ollution\n\ + p: clean (p)ollution (settler units)\n\ + p: (p)aradrop (paratroopers)\n\ P: (P)illage terrain alteration\n\ + q: unit patrol (then left-click mouse to select destination)\n\ r: build (r)oad/railroad (settler units)\n\ r: establish trade (r)oute (caravan units)\n\ R: incite a (R)evolution\n\ - q: unit patrol (then left-click mouse to select destination)\n\ s: (s)entry unit\n\ + t: show (t)iles city is using (mouse over or near city)\n\ + T: open (T)ax/Lux/Sci Rates dialog\n\ u: (u)nload boat\n\ w: (w)ait until later in turn\n\ W: (W)ake up other units on tile\n\ - t: show (t)iles city is using (mouse over or near city)\n\ - T: open (t)ax/lux/sci rates dialog\n\ x: auto-e(x)plore\n\ \n\ 1: move south-west F1: open City Report\n\ 2: move south F2: open Military Report\n\ 3: move south-east F3: open Players dialog\n\ - 4: move west F4: open Messages dialog\n\ - 5: focus on next unit F5: open Trade Report\n\ - 6: move east F6: open Science Report\n\ - 7: move north-west F7: open World Wonders\n\ - 8: move north F8: open Top Five Cities\n\ + 4: move west F5: open Trade Report\n\ + 5: focus on next unit F6: open Science Report\n\ + 6: move east F7: open World Wonders\n\ + 7: move north-west F8: open Top Five Cities\n\ + 8: move north F10: open Messages dialog\n\ 9: move north-east F11: open Demographics\n\ F12: open Spaceship\n\ \n\ - arrows: move unit control-f: open (f)ind city dialog\n\ - space: unit stay put control-g: grid lines on/off\n\ - tab: focus on next unit return: turn done\ + arrows: move unit control-g: grid lines on/off\n\ + space: unit stay put control-n: city names on/off\n\ + tab: focus on next unit control-p: city production on/off\n\ + return: turn done\ ") [help_chatline]