Author: mir3x
Date: Mon Jan 16 14:22:58 2017
New Revision: 34857

URL: http://svn.gna.org/viewcvs/freeciv?rev=34857&view=rev
Log:
Qt client - add configurable shortcut to toggle city full bar

See patch #8069


Modified:
    branches/S3_0/client/gui-qt/menu.cpp
    branches/S3_0/client/gui-qt/shortcuts.cpp
    branches/S3_0/client/gui-qt/shortcuts.h

Modified: branches/S3_0/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/menu.cpp?rev=34857&r1=34856&r2=34857&view=diff
==============================================================================
--- branches/S3_0/client/gui-qt/menu.cpp        (original)
+++ branches/S3_0/client/gui-qt/menu.cpp        Mon Jan 16 14:22:58 2017
@@ -1080,6 +1080,8 @@
   connect(act, SIGNAL(triggered()), this, SLOT(slot_native_tiles()));
   act = menu->addAction(_("City Full Bar"));
   act->setCheckable(true);
+  act->setShortcut(QKeySequence(shortcut_to_string(
+                   fc_shortcuts::sc()->get_shortcut(SC_SHOW_FULLBAR))));
   act->setChecked(gui_options.draw_full_citybar);
   connect(act, SIGNAL(triggered()), this, SLOT(slot_fullbar()));
   act = menu->addAction(_("City Names"));

Modified: branches/S3_0/client/gui-qt/shortcuts.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/shortcuts.cpp?rev=34857&r1=34856&r2=34857&view=diff
==============================================================================
--- branches/S3_0/client/gui-qt/shortcuts.cpp   (original)
+++ branches/S3_0/client/gui-qt/shortcuts.cpp   Mon Jan 16 14:22:58 2017
@@ -52,7 +52,7 @@
   RESPONSE_SAVE
 };
 
-static int num_shortcuts = 49;
+static int num_shortcuts = 50;
 fc_shortcut default_shortcuts[] = {
   {SC_SCROLL_MAP, 0, Qt::RightButton, Qt::NoModifier, "Scroll map" },
   {SC_CENTER_VIEW, Qt::Key_C, Qt::AllButtons, Qt::NoModifier,
@@ -149,7 +149,9 @@
   {SC_RELOAD_THEME, Qt::Key_F5, Qt::AllButtons, Qt::ControlModifier
      | Qt::ShiftModifier, _("Reload theme") },
   {SC_RELOAD_TILESET, Qt::Key_F6, Qt::AllButtons, Qt::ControlModifier
-    | Qt::ShiftModifier, _("Reload tileset") }
+    | Qt::ShiftModifier, _("Reload tileset") },
+  {SC_SHOW_FULLBAR, Qt::Key_F, Qt::AllButtons, Qt::ControlModifier,
+    _("Toggle city full bar visiblity") }
 };
 
 

Modified: branches/S3_0/client/gui-qt/shortcuts.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/shortcuts.h?rev=34857&r1=34856&r2=34857&view=diff
==============================================================================
--- branches/S3_0/client/gui-qt/shortcuts.h     (original)
+++ branches/S3_0/client/gui-qt/shortcuts.h     Mon Jan 16 14:22:58 2017
@@ -79,7 +79,8 @@
   SC_PARADROP = 46,
   SC_POPUP_COMB_INF = 47,
   SC_RELOAD_THEME = 48,
-  SC_RELOAD_TILESET = 49
+  SC_RELOAD_TILESET = 49,
+  SC_SHOW_FULLBAR = 50
 };
 
 


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

Reply via email to