Author: mir3x
Date: Thu Dec 31 14:00:03 2015
New Revision: 31270

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

See bug #24113


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

Modified: branches/S2_6/client/gui-qt/chatline.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/chatline.cpp?rev=31270&r1=31269&r2=31270&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/chatline.cpp    (original)
+++ branches/S2_6/client/gui-qt/chatline.cpp    Thu Dec 31 14:00:03 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: branches/S2_6/client/gui-qt/chatline.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/chatline.h?rev=31270&r1=31269&r2=31270&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/chatline.h      (original)
+++ branches/S2_6/client/gui-qt/chatline.h      Thu Dec 31 14:00:03 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: branches/S2_6/client/gui-qt/fc_client.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/fc_client.cpp?rev=31270&r1=31269&r2=31270&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/fc_client.cpp   (original)
+++ branches/S2_6/client/gui-qt/fc_client.cpp   Thu Dec 31 14:00:03 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