Author: mir3x
Date: Mon Jul 11 07:20:29 2016
New Revision: 33216

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

Reported by GriffonSpade.

See bug #24832


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

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=33216&r1=33215&r2=33216&view=diff
==============================================================================
--- trunk/client/gui-qt/dialogs.cpp     (original)
+++ trunk/client/gui-qt/dialogs.cpp     Mon Jul 11 07:20:29 2016
@@ -2609,7 +2609,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: trunk/client/gui-qt/fc_client.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/fc_client.h?rev=33216&r1=33215&r2=33216&view=diff
==============================================================================
--- trunk/client/gui-qt/fc_client.h     (original)
+++ trunk/client/gui-qt/fc_client.h     Mon Jul 11 07:20:29 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