Author: mir3x Date: Thu Dec 31 13:59:42 2015 New Revision: 31269 URL: http://svn.gna.org/viewcvs/freeciv?rev=31269&view=rev Log: Hided buttons "allies only" and "show links" for local game Reported by Jacob Nevins <jtn>
See bug #24113 Modified: branches/S2_5/client/gui-qt/chatline.cpp branches/S2_5/client/gui-qt/chatline.h branches/S2_5/client/gui-qt/fc_client.cpp Modified: branches/S2_5/client/gui-qt/chatline.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/chatline.cpp?rev=31269&r1=31268&r2=31269&view=diff ============================================================================== --- branches/S2_5/client/gui-qt/chatline.cpp (original) +++ branches/S2_5/client/gui-qt/chatline.cpp Thu Dec 31 13:59:42 2015 @@ -23,6 +23,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_5/client/gui-qt/chatline.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/chatline.h?rev=31269&r1=31268&r2=31269&view=diff ============================================================================== --- branches/S2_5/client/gui-qt/chatline.h (original) +++ branches/S2_5/client/gui-qt/chatline.h Thu Dec 31 13:59:42 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_5/client/gui-qt/fc_client.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/fc_client.cpp?rev=31269&r1=31268&r2=31269&view=diff ============================================================================== --- branches/S2_5/client/gui-qt/fc_client.cpp (original) +++ branches/S2_5/client/gui-qt/fc_client.cpp Thu Dec 31 13:59:42 2015 @@ -306,6 +306,7 @@ update_load_page(); break; case PAGE_GAME: + gui()->infotab->chtwdg->update_widgets(); status_bar->setVisible(false); gui()->infotab->chtwdg->update_font(); if (fullscreen_mode){ _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits