diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-10-30 00:56:43 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-10-30 00:56:43 +0100 |
commit | f941119fbd89b5677a2895eee3232fa76389b4b5 (patch) | |
tree | 7d761d3c8189c06dda83e3fa88f281a24ab46e4b /gui/consolewindow.cpp | |
parent | c46292c9b1c153f2d17554690e90db1c8efe4d23 (diff) | |
parent | 44823324f9f489adf957a459bac5dd4d0693e85e (diff) | |
download | MultiMC-f941119fbd89b5677a2895eee3232fa76389b4b5.tar MultiMC-f941119fbd89b5677a2895eee3232fa76389b4b5.tar.gz MultiMC-f941119fbd89b5677a2895eee3232fa76389b4b5.tar.lz MultiMC-f941119fbd89b5677a2895eee3232fa76389b4b5.tar.xz MultiMC-f941119fbd89b5677a2895eee3232fa76389b4b5.zip |
Merge branch 'develop'
Diffstat (limited to 'gui/consolewindow.cpp')
-rw-r--r-- | gui/consolewindow.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gui/consolewindow.cpp b/gui/consolewindow.cpp index 6ed4a0ec..49e12339 100644 --- a/gui/consolewindow.cpp +++ b/gui/consolewindow.cpp @@ -5,6 +5,7 @@ #include <QMessageBox> #include <gui/platform.h> +#include <gui/CustomMessageBox.h> ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent) : QDialog(parent), @@ -12,8 +13,9 @@ ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent) : m_mayclose(true), proc(mcproc) { - MultiMCPlatform::fixWM_CLASS(this); + MultiMCPlatform::fixWM_CLASS(this); ui->setupUi(this); + this->setWindowFlags(Qt::Window); connect(mcproc, SIGNAL(ended(BaseInstance*)), this, SLOT(onEnded(BaseInstance*))); } @@ -96,17 +98,13 @@ void ConsoleWindow::closeEvent(QCloseEvent * event) void ConsoleWindow::on_btnKillMinecraft_clicked() { ui->btnKillMinecraft->setEnabled(false); - QMessageBox r_u_sure; - //: Main question of the kill confirmation dialog - r_u_sure.setText(tr("Kill Minecraft?")); - r_u_sure.setInformativeText(tr("This can cause the instance to get corrupted and should only be used if Minecraft is frozen for some reason")); - r_u_sure.setStandardButtons(QMessageBox::Yes | QMessageBox::No); - r_u_sure.setDefaultButton(QMessageBox::Yes); - if (r_u_sure.exec() == QMessageBox::Yes) + auto response = CustomMessageBox::selectable(this, tr("Kill Minecraft?"), + tr("This can cause the instance to get corrupted and should only be used if Minecraft is frozen for some reason"), + QMessageBox::Question, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)->exec(); + if (response == QMessageBox::Yes) proc->killMinecraft(); else ui->btnKillMinecraft->setEnabled(true); - r_u_sure.close(); } void ConsoleWindow::onEnded(BaseInstance *instance) |