Author: mir3x
Date: Fri Nov 20 17:10:18 2015
New Revision: 30706

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

See patch #6597


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

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=30706&r1=30705&r2=30706&view=diff
==============================================================================
--- trunk/client/gui-qt/dialogs.cpp     (original)
+++ trunk/client/gui-qt/dialogs.cpp     Fri Nov 20 17:10:18 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);
@@ -2294,6 +2295,7 @@
   popdown_units_report();
   popdown_science_report();
   popdown_city_report();
+  popdown_endgame_report();
 }
 
 /**************************************************************************

Modified: trunk/client/gui-qt/repodlgs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/repodlgs.cpp?rev=30706&r1=30705&r2=30706&view=diff
==============================================================================
--- trunk/client/gui-qt/repodlgs.cpp    (original)
+++ trunk/client/gui-qt/repodlgs.cpp    Fri Nov 20 17:10:18 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: trunk/client/gui-qt/repodlgs.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/repodlgs.h?rev=30706&r1=30705&r2=30706&view=diff
==============================================================================
--- trunk/client/gui-qt/repodlgs.h      (original)
+++ trunk/client/gui-qt/repodlgs.h      Fri Nov 20 17:10:18 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