Author: mir3x
Date: Thu Nov  5 20:57:17 2015
New Revision: 30427

URL: http://svn.gna.org/viewcvs/freeciv?rev=30427&view=rev
Log:
Made qt-client menu entries about building base of certain gui_type type 
ruleset defined.

See patch #6265


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

Modified: trunk/client/gui-qt/fc_client.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/fc_client.cpp?rev=30427&r1=30426&r2=30427&view=diff
==============================================================================
--- trunk/client/gui-qt/fc_client.cpp   (original)
+++ trunk/client/gui-qt/fc_client.cpp   Thu Nov  5 20:57:17 2015
@@ -117,7 +117,6 @@
   fc_fonts.init_fonts();
   history_pos = -1;
   menu_bar = new mr_menu();
-  menu_bar->setup_menus();
   setMenuBar(menu_bar);
   status_bar = statusBar();
   status_bar_label = new QLabel;

Modified: trunk/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/menu.cpp?rev=30427&r1=30426&r2=30427&view=diff
==============================================================================
--- trunk/client/gui-qt/menu.cpp        (original)
+++ trunk/client/gui-qt/menu.cpp        Thu Nov  5 20:57:17 2015
@@ -61,7 +61,9 @@
 **************************************************************************/
 void real_menus_init(void)
 {
-  /* PORTME */
+  gui()->menu_bar->clear();
+  gui()->menu_bar->setup_menus();
+
   gov_menu::create_all();
 
   /* A new ruleset may have been loaded. */
@@ -75,9 +77,12 @@
 void real_menus_update(void)
 {
   if (C_S_RUNNING == client_state()) {
+    gui()->menuBar()->setVisible(true);
     gui()->menu_bar->menus_sensitive();
     gov_menu::update_all();
     go_act_menu::update_all();
+  } else {
+    gui()->menuBar()->setVisible(false);
   }
 }
 
@@ -846,11 +851,11 @@
   menu_list.insertMulti(FORTIFY, act);
   act->setShortcut(QKeySequence(tr("f")));
   connect(act, SIGNAL(triggered()), this, SLOT(slot_unit_fortify()));
-  act = menu->addAction(_("Build Type A Base"));
+  act = menu->addAction(Q_(terrain_control.gui_type_base0));
   menu_list.insertMulti(FORTRESS, act);
   act->setShortcut(QKeySequence(tr("shift+f")));
   connect(act, SIGNAL(triggered()), this, SLOT(slot_unit_fortress()));
-  act = menu->addAction(_("Build Type B Base"));
+  act = menu->addAction(Q_(terrain_control.gui_type_base1));
   menu_list.insertMulti(AIRBASE, act);
   act->setShortcut(QKeySequence(tr("shift+e")));
   connect(act, SIGNAL(triggered()), this, SLOT(slot_unit_airbase()));


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

Reply via email to