Author: sveinung
Date: Sun May  3 18:36:37 2015
New Revision: 28975

URL: http://svn.gna.org/viewcvs/freeciv?rev=28975&view=rev
Log:
Gtk clients: Use ruleset defined action ui names in menu items.

See patch #6060

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

Modified: trunk/client/gui-gtk-2.0/menu.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/menu.c?rev=28975&r1=28974&r2=28975&view=diff
==============================================================================
--- trunk/client/gui-gtk-2.0/menu.c     (original)
+++ trunk/client/gui-gtk-2.0/menu.c     Sun May  3 18:36:37 2015
@@ -2274,7 +2274,9 @@
                       units_have_type_flag(punits, UTYF_NUCLEAR, TRUE));
 
   if (units_can_do_action(punits, ACTION_HELP_WONDER, TRUE)) {
-    menus_rename(unit_group, "BUILD_CITY", _("Help _Build Wonder"));
+    menus_rename(unit_group, "BUILD_CITY",
+                 action_prepare_ui_name(ACTION_HELP_WONDER,
+                                        "_", ACTPROB_NA, NULL));
   } else {
     bool city_on_tile = FALSE;
 
@@ -2289,15 +2291,21 @@
     
     if (city_on_tile && units_can_do_action(punits, ACTION_JOIN_CITY,
                                             TRUE)) {
-      menus_rename(unit_group, "BUILD_CITY", _("Add to City"));
+      menus_rename(unit_group, "BUILD_CITY",
+                   action_prepare_ui_name(ACTION_JOIN_CITY,
+                                          "_", ACTPROB_NA, NULL));
     } else {
       /* refresh default order */
-      menus_rename(unit_group, "BUILD_CITY", _("_Build City"));
+      menus_rename(unit_group, "BUILD_CITY",
+                   action_prepare_ui_name(ACTION_FOUND_CITY,
+                                          "_", ACTPROB_NA, NULL));
     }
   }
 
   if (units_can_do_action(punits, ACTION_TRADE_ROUTE, TRUE)) {
-    menus_rename(unit_group, "BUILD_ROAD", _("Establish Trade _Route"));
+    menus_rename(unit_group, "BUILD_ROAD",
+                 action_prepare_ui_name(ACTION_TRADE_ROUTE,
+                                        "_", ACTPROB_NA, NULL));
   } 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.0/menu.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/menu.c?rev=28975&r1=28974&r2=28975&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/menu.c     (original)
+++ trunk/client/gui-gtk-3.0/menu.c     Sun May  3 18:36:37 2015
@@ -2275,7 +2275,9 @@
                       units_have_type_flag(punits, UTYF_NUCLEAR, TRUE));
 
   if (units_can_do_action(punits, ACTION_HELP_WONDER, TRUE)) {
-    menus_rename(unit_group, "BUILD_CITY", _("Help _Build Wonder"));
+    menus_rename(unit_group, "BUILD_CITY",
+                 action_prepare_ui_name(ACTION_HELP_WONDER,
+                                        "_", ACTPROB_NA, NULL));
   } else {
     bool city_on_tile = FALSE;
 
@@ -2290,15 +2292,21 @@
     
     if (city_on_tile && units_can_do_action(punits, ACTION_JOIN_CITY,
                                             TRUE)) {
-      menus_rename(unit_group, "BUILD_CITY", _("Add to City"));
+      menus_rename(unit_group, "BUILD_CITY",
+                   action_prepare_ui_name(ACTION_JOIN_CITY,
+                                          "_", ACTPROB_NA, NULL));
     } else {
       /* refresh default order */
-      menus_rename(unit_group, "BUILD_CITY", _("_Build City"));
+      menus_rename(unit_group, "BUILD_CITY",
+                   action_prepare_ui_name(ACTION_FOUND_CITY,
+                                          "_", ACTPROB_NA, NULL));
     }
   }
 
   if (units_can_do_action(punits, ACTION_TRADE_ROUTE, TRUE)) {
-    menus_rename(unit_group, "BUILD_ROAD", _("Establish Trade _Route"));
+    menus_rename(unit_group, "BUILD_ROAD",
+                 action_prepare_ui_name(ACTION_TRADE_ROUTE,
+                                        "_", ACTPROB_NA, NULL));
   } 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