Author: mir3x
Date: Thu Dec 31 14:00:20 2015
New Revision: 31271

URL: http://svn.gna.org/viewcvs/freeciv?rev=31271&view=rev
Log:
Hided buttons "allies only" and "show links" for local game
Reported by Jacob Nevins <jtn>

See bug #24113


Modified:
    trunk/client/gui-qt/chatline.cpp
    trunk/client/gui-qt/chatline.h
    trunk/client/gui-qt/fc_client.cpp

Modified: trunk/client/gui-qt/chatline.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/chatline.cpp?rev=31271&r1=31270&r2=31271&view=diff
==============================================================================
--- trunk/client/gui-qt/chatline.cpp    (original)
+++ trunk/client/gui-qt/chatline.cpp    Thu Dec 31 14:00:20 2015
@@ -24,6 +24,7 @@
 #include "climisc.h"      /* for write_chatline_content */
 #include "climap.h"
 #include "control.h"
+#include "connectdlg_common.h"
 #include "game.h"
 
 // gui-qt
@@ -263,6 +264,19 @@
   chat_output->setFont(*qf);
 }
 
+/***************************************************************************
+  Hides allies and links button for local game
+***************************************************************************/
+void chatwdg::update_widgets()
+{
+  if (is_server_running()) {
+    cb->hide();
+    remove_links->hide();
+  } else {
+    cb->show();
+    remove_links->show();
+  }
+}
 
 /***************************************************************************
   Makes link to tile/unit or city

Modified: trunk/client/gui-qt/chatline.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/chatline.h?rev=31271&r1=31270&r2=31271&view=diff
==============================================================================
--- trunk/client/gui-qt/chatline.h      (original)
+++ trunk/client/gui-qt/chatline.h      Thu Dec 31 14:00:20 2015
@@ -43,6 +43,7 @@
   QLineEdit *chat_line;
   void make_link(struct tile *ptile);
   void update_font();
+  void update_widgets();
 private slots:
   void send();
   void state_changed(int state);

Modified: trunk/client/gui-qt/fc_client.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/fc_client.cpp?rev=31271&r1=31270&r2=31271&view=diff
==============================================================================
--- trunk/client/gui-qt/fc_client.cpp   (original)
+++ trunk/client/gui-qt/fc_client.cpp   Thu Dec 31 14:00:20 2015
@@ -298,6 +298,7 @@
     update_load_page();
     break;
   case PAGE_GAME:
+    gui()->infotab->chtwdg->update_widgets();
     status_bar->setVisible(false);
     gui()->infotab->chtwdg->update_font();
     if (gui_options.gui_qt_fullscreen){


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

Reply via email to