Author: sveinung
Date: Thu Aug  6 15:01:00 2015
New Revision: 29350

URL: http://svn.gna.org/viewcvs/freeciv?rev=29350&view=rev
Log:
Qt client: action UI name menu item creation

Use the ruleset defined action UI names when creating menu items.

See patch #6182

Modified:
    trunk/client/gui-qt/menu.cpp

Modified: trunk/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/menu.cpp?rev=29350&r1=29349&r2=29350&view=diff
==============================================================================
--- trunk/client/gui-qt/menu.cpp        (original)
+++ trunk/client/gui-qt/menu.cpp        Thu Aug  6 15:01:00 2015
@@ -692,7 +692,7 @@
 
   /* Work Menu */
   menu = this->addMenu(_("Work"));
-  act = menu->addAction(_("Build City"));
+  act = menu->addAction(action_get_ui_name(ACTION_FOUND_CITY));
   act->setShortcut(QKeySequence(tr("b")));
   menu_list.insertMulti(BUILD, act);
   connect(act, SIGNAL(triggered()), this, SLOT(slot_build_city()));
@@ -743,11 +743,11 @@
   menu_list.insertMulti(FALLOUT, act);
   act->setShortcut(QKeySequence(tr("n")));
   connect(act, SIGNAL(triggered()), this, SLOT(slot_clean_fallout()));
-  act = menu->addAction(_("Help build Wonder"));
+  act = menu->addAction(action_get_ui_name(ACTION_HELP_WONDER));
   act->setShortcut(QKeySequence(tr("b")));
   menu_list.insertMulti(BUILD_WONDER, act);
   connect(act, SIGNAL(triggered()), this, SLOT(slot_build_city()));
-  act = menu->addAction(_("Establish Trade Route"));
+  act = menu->addAction(action_get_ui_name(ACTION_TRADE_ROUTE));
   act->setShortcut(QKeySequence(tr("r")));
   menu_list.insertMulti(ORDER_TRADEROUTE, act);
   connect(act, SIGNAL(triggered()), this, SLOT(slot_build_road()));
@@ -1125,8 +1125,6 @@
       case BUILD:
         if (can_units_do(punits, unit_can_add_or_build_city)) {
           i.value()->setEnabled(true);
-        } else {
-          break;
         }
         if (city_on_tile
             && units_can_do_action(punits, ACTION_JOIN_CITY, true)) {


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

Reply via email to