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

Looking at Jason's suggestion for 2.2 and beyond, <CONTROL>+<SHIFT>+<LMB>
toggles workers on the main map.  So, it makes some sense for this to be
<CONTROL>+<SHIFT>+<RMB> (instead of 't') to show the overlay.

Committed trunk revision 14156.
Committed S2_2 revision 14157.

Should this new undocumented feature be added to 2.1?

Should the old 't' be removed entirely?  This would require a change to
one very long translation msgid (and the end of the translations would no
longer make any sense).  It would also be removed from xaw (and isn't
implemented in other clients).

BTW, whatever we choose, the overlay doesn't accurately show changes made
using the mouse toggled workers....  Blech!

trunk/2.2 patch for posterity:

Index: client/gui-gtk-2.0/gui_main.c
===================================================================
--- client/gui-gtk-2.0/gui_main.c       (revision 14155)
+++ client/gui-gtk-2.0/gui_main.c       (working copy)
@@ -615,10 +615,6 @@
     key_cancel_action();
     return TRUE;
 
-  case GDK_t:
-    key_city_workers(w, ev);
-    return TRUE;
-
   default:
     break;
   };
Index: client/gui-gtk-2.0/mapctrl.c
===================================================================
--- client/gui-gtk-2.0/mapctrl.c        (revision 14155)
+++ client/gui-gtk-2.0/mapctrl.c        (working copy)
@@ -290,14 +290,22 @@
 
   case 3: /* RIGHT mouse button */
 
+    /* <SHIFT> + <CONTROL> + RMB : Show/hide workers. */
+    if ((ev->state & GDK_SHIFT_MASK) && (ev->state & GDK_CONTROL_MASK)) {
+      if (NULL != pcity) {
+        overlay_workers_at_city();
+      }
+    }
     /* <CONTROL> + RMB : Quickselect a land unit. */
-    if (ev->state & GDK_CONTROL_MASK) {
+    else if (ev->state & GDK_CONTROL_MASK) {
       action_button_pressed(ev->x, ev->y, SELECT_LAND);
     }
     /* <SHIFT> + RMB: Paste Production. */
-    else if ((ev->state & GDK_SHIFT_MASK) && pcity) {
-      clipboard_paste_production(pcity);
-      cancel_tile_hiliting();
+    else if ((ev->state & GDK_SHIFT_MASK)) {
+      if (NULL != pcity) {
+        clipboard_paste_production(pcity);
+        cancel_tile_hiliting();
+      }
     }
     /* Plain RMB click. */
     else {
@@ -448,7 +456,7 @@
 }
 
 /**************************************************************************
-  Draws the on the map the tiles the given city is using
+  Best effort to center the map on the currently selected unit(s)
 **************************************************************************/
 void center_on_unit(void)
 {
@@ -456,9 +464,9 @@
 }
 
 /**************************************************************************
-  Draws the on the map the tiles the given city is using
+  Shows/hides overlay on the map for the city at this location
 **************************************************************************/
-void key_city_workers(GtkWidget *w, GdkEventKey *ev)
+void overlay_workers_at_city(void)
 {
   int x, y;
   
Index: client/gui-gtk-2.0/mapctrl.h
===================================================================
--- client/gui-gtk-2.0/mapctrl.h        (revision 14155)
+++ client/gui-gtk-2.0/mapctrl.h        (working copy)
@@ -19,8 +19,6 @@
 
 #include "mapctrl_g.h"
 
-void key_city_workers(GtkWidget *w, GdkEventKey *ev);
-
 gboolean butt_release_mapcanvas(GtkWidget *w, GdkEventButton *ev, gpointer 
data);
 gboolean butt_down_mapcanvas(GtkWidget *w, GdkEventButton *ev, gpointer data);
 gboolean butt_down_overviewcanvas(GtkWidget *w, GdkEventButton *ev, gpointer 
data);
@@ -29,6 +27,8 @@
 gboolean move_overviewcanvas(GtkWidget *w, GdkEventMotion *ev, gpointer data);
 
 void center_on_unit(void);
+void overlay_workers_at_city(void);
+
 void popupinfo_popdown_callback(GtkWidget *w, gpointer data);
 
 #endif  /* FC__MAPCTRL_H */
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to