Author: mir3x
Date: Mon Jul 11 07:19:44 2016
New Revision: 33215

URL: http://svn.gna.org/viewcvs/freeciv?rev=33215&view=rev
Log:
Show information about error when failing to load new tileset.

Reported by by GriffonSpade.

See bug #24832


Modified:
    branches/S2_6/client/gui-qt/dialogs.cpp
    branches/S2_6/client/gui-qt/fc_client.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=33215&r1=33214&r2=33215&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/dialogs.cpp     (original)
+++ branches/S2_6/client/gui-qt/dialogs.cpp     Mon Jul 11 07:19:44 2016
@@ -2313,7 +2313,18 @@
 *****************************************************************/
 void show_tileset_error(const char *msg)
 {
-  /* PORTME */
+  QMessageBox ask(gui()->central_wdg);
+  char buf[1024];
+
+  fc_snprintf(buf, sizeof(buf),
+              _("Tileset problem, it's probably incompatible with the"
+                " ruleset:\n%s\nProgram will now exit."), msg);
+  ask.setText(buf);
+  ask.setStandardButtons(QMessageBox::Ok);
+  ask.setWindowTitle(_("Tileset error"));
+  ask.exec();
+  gui()->quit();
+
 }
 
 /****************************************************************

Modified: branches/S2_6/client/gui-qt/fc_client.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/fc_client.h?rev=33215&r1=33214&r2=33215&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/fc_client.h     (original)
+++ branches/S2_6/client/gui-qt/fc_client.h     Mon Jul 11 07:19:44 2016
@@ -259,7 +259,6 @@
 
   void server_input(int sock);
   void chat();
-  void quit();
   void closing();
   void slot_lan_scan();
   void slot_meta_scan();
@@ -283,6 +282,7 @@
   void switch_page(int i);
   void popup_client_options();
   void update_info_label();
+  void quit();
 
 protected slots:
 


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

Reply via email to