Author: sveinung
Date: Sun Dec  6 10:13:42 2015
New Revision: 30862

URL: http://svn.gna.org/viewcvs/freeciv?rev=30862&view=rev
Log:
clients: don't show unimplemented actions

...in the action selection dialog.

See patch #6654

Modified:
    trunk/client/gui-gtk-2.0/action_dialog.c
    trunk/client/gui-gtk-3.0/action_dialog.c
    trunk/client/gui-qt/dialogs.cpp
    trunk/client/gui-sdl2/action_dialog.c

Modified: trunk/client/gui-gtk-2.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/action_dialog.c?rev=30862&r1=30861&r2=30862&view=diff
==============================================================================
--- trunk/client/gui-gtk-2.0/action_dialog.c    (original)
+++ trunk/client/gui-gtk-2.0/action_dialog.c    Sun Dec  6 10:13:42 2015
@@ -1184,6 +1184,12 @@
     return;
   }
 
+  if (af_map[action_id] == NULL) {
+    /* This client doesn't support ordering this action from the
+     * action selection dialog. */
+    return;
+  }
+
   /* Don't show disabled actions. */
   if (!action_prob_possible(action_probabilities[action_id])) {
     return;

Modified: trunk/client/gui-gtk-3.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/action_dialog.c?rev=30862&r1=30861&r2=30862&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/action_dialog.c    (original)
+++ trunk/client/gui-gtk-3.0/action_dialog.c    Sun Dec  6 10:13:42 2015
@@ -1194,6 +1194,12 @@
     return;
   }
 
+  if (af_map[action_id] == NULL) {
+    /* This client doesn't support ordering this action from the
+     * action selection dialog. */
+    return;
+  }
+
   /* Don't show disabled actions. */
   if (!action_prob_possible(action_probabilities[action_id])) {
     return;

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=30862&r1=30861&r2=30862&view=diff
==============================================================================
--- trunk/client/gui-qt/dialogs.cpp     (original)
+++ trunk/client/gui-qt/dialogs.cpp     Sun Dec  6 10:13:42 2015
@@ -1512,6 +1512,12 @@
     return;
   }
 
+  if (!af_map.contains(act)) {
+    /* The Qt client doesn't support ordering this action from the
+     * action selection dialog. */
+    return;
+  }
+
   /* Don't show disabled actions. */
   if (!action_prob_possible(action_probabilities[act])) {
     return;

Modified: trunk/client/gui-sdl2/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/action_dialog.c?rev=30862&r1=30861&r2=30862&view=diff
==============================================================================
--- trunk/client/gui-sdl2/action_dialog.c       (original)
+++ trunk/client/gui-sdl2/action_dialog.c       Sun Dec  6 10:13:42 2015
@@ -1014,6 +1014,12 @@
     return;
   }
 
+  if (af_map[act] == NULL) {
+    /* This client doesn't support ordering this action from the
+     * action selection dialog. */
+    return;
+  }
+
   /* Don't show disabled actions */
   if (!action_prob_possible(action_probabilities[act])) {
     return;


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to