Author: mir3x
Date: Thu Nov 17 10:23:15 2016
New Revision: 34543

URL: http://svn.gna.org/viewcvs/freeciv?rev=34543&view=rev
Log:
Qt client - ported popup_soundset_suggestion_dialog()

See patch #7993


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

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=34543&r1=34542&r2=34543&view=diff
==============================================================================
--- trunk/client/gui-qt/dialogs.cpp     (original)
+++ trunk/client/gui-qt/dialogs.cpp     Thu Nov 17 10:23:15 2016
@@ -39,6 +39,7 @@
 #include "research.h"
 
 // client
+#include "audio.h"
 #include "control.h"
 #include "helpdata.h"
 #include "packhand.h"
@@ -2757,7 +2758,23 @@
 *****************************************************************/
 void popup_soundset_suggestion_dialog(void)
 {
-  qDebug() << Q_FUNC_INFO << "PORTME";
+  hud_message_box ask(gui()->central_wdg);
+  QString text;
+  QString title;
+  QPushButton *ok_button;
+
+  title = QString(_("Modpack suggests using %1 soundset."))
+          .arg(game.control.preferred_soundset);
+  text = QString("It might not work with other tilesets.\n"
+                 "You are currently using soundset %1.")
+         .arg(sound_set_name);
+  ask.addButton(_("Keep current soundset"), QMessageBox::ActionRole);
+  ok_button = ask.addButton(_("Load soundset"), QMessageBox::ActionRole);
+  ask.set_text_title(text, title);
+  ask.exec();
+  if (ask.clickedButton() == ok_button) {
+    audio_restart(game.control.preferred_soundset, music_set_name);
+  }
 }
 
 /****************************************************************


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

Reply via email to