<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39602 >

Yet another of the myriad bugs introduced by PR#14365.  I'm so sick and
tired of cleaning up this battlegroup mess!

These keys are undocumented intercepts (just as ESC) that appear only in the
gui-gtk2 client.  They are not in any menu.  Apparently, their only real
purpose is to crash.  Only warclient folks would even notice them (probably
by furiously trying every key).

   http://www.youtube.com/watch?v=TTwgNhX4BSo

Looking at the proposed patches, they are inconsistent.  None performs a
semantically useful function.  They fix the symptom without addressing the
underlying problem.

Reading the code to try to divine the original intent, it makes no sense to
have a special purpose key to filter land or sea units from an existing
selected group.  The only time that could possibly be used would be in a
port, and only when both ships and land units are present.

This especially make no sense with battlegroups that can be on more than one
tile.  More than one port?  Battlegroups with both land and sea units?

(Before PR#14365, it would try to find a land or sea unit that wasn't
currently selected.  That's duplicated by <control> LMB/RMB already in
mapview for both gtk2 and xaw.  But not documented!)

It's a waste of time to maintain such undocumented and infrequently useful
keys....  I'm deleting the code.

Index: client/control.c
===================================================================
--- client/control.c    (revision 14109)
+++ client/control.c    (working copy)
@@ -1990,8 +1990,8 @@
 
 /**************************************************************************
  Quickselecting a unit is normally done with <control> left, right click,
- or keypad / * for the current tile. Bypassing the stack popup is quite
- convenient, and can be tactically important in furious multiplayer games.
+ for the current tile. Bypassing the stack popup is quite convenient, 
+ and can be tactically important in furious multiplayer games.
 **************************************************************************/
 static struct unit *quickselect(struct tile *ptile,
                                 enum quickselect_type qtype)
@@ -2770,15 +2770,3 @@
 {
   request_toggle_fog_of_war();
 }
-
-/**************************************************************************
-...
-**************************************************************************/
-void key_quickselect(enum quickselect_type qtype)
-{
-  unit_list_iterate(get_units_in_focus(), punit) {
-    struct unit *punit2 = quickselect(punit->tile, qtype);
-
-    set_unit_focus_and_select(punit2);
-  } unit_list_iterate_end;
-}
Index: client/gui-gtk-2.0/gui_main.c
===================================================================
--- client/gui-gtk-2.0/gui_main.c       (revision 14109)
+++ client/gui-gtk-2.0/gui_main.c       (working copy)
@@ -595,14 +595,6 @@
     key_city_workers(w, ev);
     break;
 
-  case GDK_KP_Divide:
-    key_quickselect(SELECT_SEA);
-    break;
-
-  case GDK_KP_Multiply:
-    key_quickselect(SELECT_LAND);
-    break;
-
   default:
     return FALSE;
   }
Index: client/control.h
===================================================================
--- client/control.h    (revision 14109)
+++ client/control.h    (working copy)
@@ -169,7 +169,6 @@
 void key_city_outlines_toggle(void);
 void key_map_grid_toggle(void);
 void key_map_borders_toggle(void);
-void key_quickselect(enum quickselect_type qtype);
 void key_recall_previous_focus_unit(void);
 void key_unit_move(enum direction8 gui_dir);
 void key_unit_airbase(void);
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to