Author: sveinung Date: Fri Aug 12 20:39:04 2016 New Revision: 33585 URL: http://svn.gna.org/viewcvs/freeciv?rev=33585&view=rev Log: Gtk clients: ask for target for "Do...".
Change "Do..." to always ask the player for a target tile. A 2nd call (like pressing "d" twice) will call the old "Do..." against own tile. This gives the player a way to select the actor unit's target tile. A 2.6 ruleset can allow a unit without any movement left to act against a neighbor tile. In 3.0 the actions "Paradrop Unit" and "Airlift Unit" targets tiles that are far away. Pressing "d" twice doesn't slow down acting against a target on the same tile as the actor too much. No mouse is required. A user with an existing habit of pressing "d" to act against (a target on) the tile the actor is likely to press it again if the first key press don't work. If he selected the menu item he will notice that the mouse pointer turns into a selector. See patch #7573 Modified: branches/S2_6/client/gui-gtk-2.0/menu.c branches/S2_6/client/gui-gtk-3.0/menu.c Modified: branches/S2_6/client/gui-gtk-2.0/menu.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-2.0/menu.c?rev=33585&r1=33584&r2=33585&view=diff ============================================================================== --- branches/S2_6/client/gui-gtk-2.0/menu.c (original) +++ branches/S2_6/client/gui-gtk-2.0/menu.c Fri Aug 12 20:39:04 2016 @@ -1260,7 +1260,7 @@ *****************************************************************/ static void diplomat_action_callback(GtkAction *action, gpointer data) { - key_unit_action_select(); + key_unit_action_select_tgt(); } /**************************************************************** @@ -2296,7 +2296,7 @@ menus_set_sensitive(unit_group, "CONNECT_IRRIGATION", conn_possible); menus_set_sensitive(unit_group, "DIPLOMAT_ACTION", - can_units_act_against_own_tile(punits)); + units_can_do_action(punits, ACTION_ANY, TRUE)); menus_set_sensitive(unit_group, "EXPLODE_NUKE", units_have_type_flag(punits, UTYF_NUCLEAR, TRUE)); Modified: branches/S2_6/client/gui-gtk-3.0/menu.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/menu.c?rev=33585&r1=33584&r2=33585&view=diff ============================================================================== --- branches/S2_6/client/gui-gtk-3.0/menu.c (original) +++ branches/S2_6/client/gui-gtk-3.0/menu.c Fri Aug 12 20:39:04 2016 @@ -1253,7 +1253,7 @@ *****************************************************************/ static void diplomat_action_callback(GtkAction *action, gpointer data) { - key_unit_action_select(); + key_unit_action_select_tgt(); } /**************************************************************** @@ -2284,7 +2284,7 @@ menus_set_sensitive(unit_group, "CONNECT_IRRIGATION", conn_possible); menus_set_sensitive(unit_group, "DIPLOMAT_ACTION", - can_units_act_against_own_tile(punits)); + units_can_do_action(punits, ACTION_ANY, TRUE)); menus_set_sensitive(unit_group, "EXPLODE_NUKE", units_have_type_flag(punits, UTYF_NUCLEAR, TRUE)); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits