Author: sveinung
Date: Thu May 12 13:34:47 2016
New Revision: 32675

URL: http://svn.gna.org/viewcvs/freeciv?rev=32675&view=rev
Log:
Use action_get_ui_name() instead of repeating it.

When the calls to action_prepare_ui_name() in the newer GTK clients stopped
adding mnemonics they became equivalent with action_get_ui_name(). Use it.

See patch #7213

Modified:
    trunk/client/gui-gtk-3.0/menu.c
    trunk/client/gui-gtk-3.x/menu.c

Modified: trunk/client/gui-gtk-3.0/menu.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/menu.c?rev=32675&r1=32674&r2=32675&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/menu.c     (original)
+++ trunk/client/gui-gtk-3.0/menu.c     Thu May 12 13:34:47 2016
@@ -2315,8 +2315,7 @@
 
   if (units_can_do_action(punits, ACTION_HELP_WONDER, TRUE)) {
     menus_rename("BUILD_CITY",
-                 action_prepare_ui_name(ACTION_HELP_WONDER,
-                                        "", ACTPROB_NA, NULL));
+                 action_get_ui_name(ACTION_HELP_WONDER));
   } else {
     bool city_on_tile = FALSE;
 
@@ -2332,20 +2331,17 @@
     if (city_on_tile && units_can_do_action(punits, ACTION_JOIN_CITY,
                                             TRUE)) {
       menus_rename("BUILD_CITY",
-                   action_prepare_ui_name(ACTION_JOIN_CITY,
-                                          "", ACTPROB_NA, NULL));
+                   action_get_ui_name(ACTION_JOIN_CITY));
     } else {
       /* refresh default order */
       menus_rename("BUILD_CITY",
-                   action_prepare_ui_name(ACTION_FOUND_CITY,
-                                          "", ACTPROB_NA, NULL));
+                   action_get_ui_name(ACTION_FOUND_CITY));
     }
   }
 
   if (units_can_do_action(punits, ACTION_TRADE_ROUTE, TRUE)) {
     menus_rename("BUILD_ROAD",
-                 action_prepare_ui_name(ACTION_TRADE_ROUTE,
-                                        "", ACTPROB_NA, NULL));
+                 action_get_ui_name(ACTION_TRADE_ROUTE));
   } else if (units_have_type_flag(punits, UTYF_SETTLERS, TRUE)) {
     char road_item[500];
     struct extra_type *pextra = NULL;

Modified: trunk/client/gui-gtk-3.x/menu.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.x/menu.c?rev=32675&r1=32674&r2=32675&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.x/menu.c     (original)
+++ trunk/client/gui-gtk-3.x/menu.c     Thu May 12 13:34:47 2016
@@ -2314,8 +2314,7 @@
 
   if (units_can_do_action(punits, ACTION_HELP_WONDER, TRUE)) {
     menus_rename("BUILD_CITY",
-                 action_prepare_ui_name(ACTION_HELP_WONDER,
-                                        "", ACTPROB_NA, NULL));
+                 action_get_ui_name(ACTION_HELP_WONDER));
   } else {
     bool city_on_tile = FALSE;
 
@@ -2331,20 +2330,17 @@
     if (city_on_tile && units_can_do_action(punits, ACTION_JOIN_CITY,
                                             TRUE)) {
       menus_rename("BUILD_CITY",
-                   action_prepare_ui_name(ACTION_JOIN_CITY,
-                                          "", ACTPROB_NA, NULL));
+                   action_get_ui_name(ACTION_JOIN_CITY));
     } else {
       /* refresh default order */
       menus_rename("BUILD_CITY",
-                   action_prepare_ui_name(ACTION_FOUND_CITY,
-                                          "", ACTPROB_NA, NULL));
+                   action_get_ui_name(ACTION_FOUND_CITY));
     }
   }
 
   if (units_can_do_action(punits, ACTION_TRADE_ROUTE, TRUE)) {
     menus_rename("BUILD_ROAD",
-                 action_prepare_ui_name(ACTION_TRADE_ROUTE,
-                                        "", ACTPROB_NA, NULL));
+                 action_get_ui_name(ACTION_TRADE_ROUTE));
   } else if (units_have_type_flag(punits, UTYF_SETTLERS, TRUE)) {
     char road_item[500];
     struct extra_type *pextra = NULL;


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

Reply via email to