diff options
author | timoreo <contact@timoreo.fr> | 2022-08-11 07:33:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-11 07:33:13 +0200 |
commit | 5d188c69ed4626541d107b8e71e82e9c9b7e3351 (patch) | |
tree | 8c3fdbc21464e2d04c38adedaf5c570f36b1116a /launcher | |
parent | 6bff7751d09005b11ef9a4abfa7bd8b15430bca5 (diff) | |
parent | cebac3c10e177317c3df812bc87b83d999b0a37d (diff) | |
download | PrismLauncher-5d188c69ed4626541d107b8e71e82e9c9b7e3351.tar.gz PrismLauncher-5d188c69ed4626541d107b8e71e82e9c9b7e3351.tar.bz2 PrismLauncher-5d188c69ed4626541d107b8e71e82e9c9b7e3351.zip |
Merge pull request #1039 from budak7273/fix-world-safety-nag-title-text
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/ui/pages/instance/WorldListPage.cpp | 12 | ||||
-rw-r--r-- | launcher/ui/pages/instance/WorldListPage.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/launcher/ui/pages/instance/WorldListPage.cpp b/launcher/ui/pages/instance/WorldListPage.cpp index 647b04a7..85cc01ff 100644 --- a/launcher/ui/pages/instance/WorldListPage.cpp +++ b/launcher/ui/pages/instance/WorldListPage.cpp @@ -211,7 +211,7 @@ void WorldListPage::on_actionDatapacks_triggered() return; } - if(!worldSafetyNagQuestion()) + if(!worldSafetyNagQuestion(tr("Open World Datapacks Folder"))) return; auto fullPath = m_worlds->data(index, WorldList::FolderRole).toString(); @@ -269,7 +269,7 @@ void WorldListPage::on_actionMCEdit_triggered() return; } - if(!worldSafetyNagQuestion()) + if(!worldSafetyNagQuestion(tr("Open World in MCEdit"))) return; auto fullPath = m_worlds->data(index, WorldList::FolderRole).toString(); @@ -373,11 +373,11 @@ bool WorldListPage::isWorldSafe(QModelIndex) return !m_inst->isRunning(); } -bool WorldListPage::worldSafetyNagQuestion() +bool WorldListPage::worldSafetyNagQuestion(const QString &actionType) { if(!isWorldSafe(getSelectedWorld())) { - auto result = QMessageBox::question(this, tr("Copy World"), tr("Changing a world while Minecraft is running is potentially unsafe.\nDo you wish to proceed?")); + auto result = QMessageBox::question(this, actionType, tr("Changing a world while Minecraft is running is potentially unsafe.\nDo you wish to proceed?")); if(result == QMessageBox::No) { return false; @@ -395,7 +395,7 @@ void WorldListPage::on_actionCopy_triggered() return; } - if(!worldSafetyNagQuestion()) + if(!worldSafetyNagQuestion(tr("Copy World"))) return; auto worldVariant = m_worlds->data(index, WorldList::ObjectRole); @@ -417,7 +417,7 @@ void WorldListPage::on_actionRename_triggered() return; } - if(!worldSafetyNagQuestion()) + if(!worldSafetyNagQuestion(tr("Rename World"))) return; auto worldVariant = m_worlds->data(index, WorldList::ObjectRole); diff --git a/launcher/ui/pages/instance/WorldListPage.h b/launcher/ui/pages/instance/WorldListPage.h index 17e36a08..1dc9e53e 100644 --- a/launcher/ui/pages/instance/WorldListPage.h +++ b/launcher/ui/pages/instance/WorldListPage.h @@ -93,7 +93,7 @@ protected: private: QModelIndex getSelectedWorld(); bool isWorldSafe(QModelIndex index); - bool worldSafetyNagQuestion(); + bool worldSafetyNagQuestion(const QString &actionType); void mceditError(); private: |