diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-10-29 22:14:57 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-10-29 22:14:57 +0100 |
commit | 44823324f9f489adf957a459bac5dd4d0693e85e (patch) | |
tree | 7d761d3c8189c06dda83e3fa88f281a24ab46e4b /gui/consolewindow.cpp | |
parent | 946d397ccedfe1c116566fce1f86ae4f794e44a4 (diff) | |
parent | 511417c4f7a9429619492092201253124ee9fed9 (diff) | |
download | MultiMC-44823324f9f489adf957a459bac5dd4d0693e85e.tar MultiMC-44823324f9f489adf957a459bac5dd4d0693e85e.tar.gz MultiMC-44823324f9f489adf957a459bac5dd4d0693e85e.tar.lz MultiMC-44823324f9f489adf957a459bac5dd4d0693e85e.tar.xz MultiMC-44823324f9f489adf957a459bac5dd4d0693e85e.zip |
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into 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) |