aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/instance/WorldListPage.cpp
diff options
context:
space:
mode:
authorTheKodeToad <TheKodeToad@proton.me>2022-12-14 15:02:04 +0000
committerTheKodeToad <TheKodeToad@proton.me>2022-12-14 15:20:42 +0000
commit127b094c4158f7a2315bb35cea05f5644a0db1c5 (patch)
tree5ab2b81990ab14e663922c9540182e2ae0904f4d /launcher/ui/pages/instance/WorldListPage.cpp
parente05ccc0e55488837eb8f6f88354a2f8a90ce2474 (diff)
downloadPrismLauncher-127b094c4158f7a2315bb35cea05f5644a0db1c5.tar.gz
PrismLauncher-127b094c4158f7a2315bb35cea05f5644a0db1c5.tar.bz2
PrismLauncher-127b094c4158f7a2315bb35cea05f5644a0db1c5.zip
Improve handling of destructive actions
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/ui/pages/instance/WorldListPage.cpp')
-rw-r--r--launcher/ui/pages/instance/WorldListPage.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/launcher/ui/pages/instance/WorldListPage.cpp b/launcher/ui/pages/instance/WorldListPage.cpp
index 93458ce4..74cb5a05 100644
--- a/launcher/ui/pages/instance/WorldListPage.cpp
+++ b/launcher/ui/pages/instance/WorldListPage.cpp
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
- * PolyMC - Minecraft Launcher
+ * Prism Launcher - Minecraft Launcher
* Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org>
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
+ * Copyright (C) 2022 TheKodeToad <TheKodeToad@proton.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,6 +36,7 @@
*/
#include "WorldListPage.h"
+#include "ui/dialogs/CustomMessageBox.h"
#include "ui_WorldListPage.h"
#include "minecraft/WorldList.h"
@@ -192,12 +194,14 @@ void WorldListPage::on_actionRemove_triggered()
if(!proxiedIndex.isValid())
return;
- auto result = QMessageBox::question(this,
- tr("Are you sure?"),
- tr("This will remove the selected world permenantly.\n"
- "The world will be gone forever (A LONG TIME).\n"
- "\n"
- "Do you want to continue?"));
+ auto result = CustomMessageBox::selectable(this, tr("CAREFUL!"),
+ tr("About to delete: %1\n"
+ "The world may be gone forever (A LONG TIME).\n\n"
+ "Are you sure?")
+ .arg(m_worlds->allWorlds().at(proxiedIndex.row()).name()),
+ QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
+ ->exec();
+
if(result != QMessageBox::Yes)
{
return;