Author: mir3x
Date: Fri Nov 20 17:10:39 2015
New Revision: 30707

URL: http://svn.gna.org/viewcvs/freeciv?rev=30707&view=rev
Log:
Added popdown_endgame_report() to qt-client.

See patch #6597


Modified:
    branches/S2_6/client/gui-qt/dialogs.cpp
    branches/S2_6/client/gui-qt/repodlgs.cpp
    branches/S2_6/client/gui-qt/repodlgs.h

Modified: branches/S2_6/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/dialogs.cpp?rev=30707&r1=30706&r2=30707&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/dialogs.cpp     (original)
+++ branches/S2_6/client/gui-qt/dialogs.cpp     Fri Nov 20 17:10:39 2015
@@ -60,6 +60,7 @@
 extern void popdown_units_report();
 extern void popdown_science_report();
 extern void popdown_city_report();
+extern void popdown_endgame_report();
 
 static void diplomat_keep_moving(QVariant data1, QVariant data2);
 static void diplomat_incite(QVariant data1, QVariant data2);
@@ -2054,6 +2055,7 @@
   popdown_units_report();
   popdown_science_report();
   popdown_city_report();
+  popdown_endgame_report();
 }
 
 /**************************************************************************

Modified: branches/S2_6/client/gui-qt/repodlgs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/repodlgs.cpp?rev=30707&r1=30706&r2=30707&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/repodlgs.cpp    (original)
+++ branches/S2_6/client/gui-qt/repodlgs.cpp    Fri Nov 20 17:10:39 2015
@@ -1196,6 +1196,8 @@
   end_widget->setEditTriggers(QAbstractItemView::NoEditTriggers);
   end_widget->verticalHeader()->setVisible(false);
   end_widget->setSelectionMode(QAbstractItemView::SingleSelection);
+  end_widget->horizontalHeader()->setSectionResizeMode(
+                                            QHeaderView::ResizeToContents);
   end_layout->addWidget(end_widget, 1, 0, 5, 5);
   setLayout(end_layout);
 
@@ -1382,6 +1384,19 @@
 }
 
 /****************************************************************************
+  Removes endgame report
+****************************************************************************/
+void popdown_endgame_report()
+{
+  int i;
+  if (gui()->is_repo_dlg_open("END")) {
+    i = gui()->gimme_index_of("END");
+    fc_assert(i != -1);
+    delete gui()->game_tab_widget->widget(i);
+  }
+}
+
+/****************************************************************************
   Received endgame report information about single player.
 ****************************************************************************/
 void endgame_report_dialog_player(const struct packet_endgame_player *packet)

Modified: branches/S2_6/client/gui-qt/repodlgs.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/repodlgs.h?rev=30707&r1=30706&r2=30707&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/repodlgs.h      (original)
+++ branches/S2_6/client/gui-qt/repodlgs.h      Fri Nov 20 17:10:39 2015
@@ -199,5 +199,6 @@
 void popdown_economy_report();
 void popdown_units_report();
 void popdown_science_report();
+void popdown_endgame_report();
 
 #endif /* FC__REPODLGS_H */


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

Reply via email to