Add # of shortcuts to deletion confirmation screen instead
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
parent
d2ee023788
commit
4214571cff
2 changed files with 6 additions and 6 deletions
|
@ -1040,10 +1040,6 @@ QString MinecraftInstance::getStatusbarDescription()
|
||||||
.arg(Time::prettifyDuration(totalTimePlayed(), APPLICATION->settings()->get("ShowGameTimeWithoutDays").toBool())));
|
.arg(Time::prettifyDuration(totalTimePlayed(), APPLICATION->settings()->get("ShowGameTimeWithoutDays").toBool())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto currentShortcuts = shortcuts();
|
|
||||||
if (!currentShortcuts.isEmpty()) {
|
|
||||||
description.append(tr(", %n shortcut(s) registered", "", currentShortcuts.size()));
|
|
||||||
}
|
|
||||||
if (hasCrashed()) {
|
if (hasCrashed()) {
|
||||||
description.append(tr(", has crashed."));
|
description.append(tr(", has crashed."));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1409,11 +1409,15 @@ void MainWindow::on_actionDeleteInstance_triggered()
|
||||||
}
|
}
|
||||||
auto id = m_selectedInstance->id();
|
auto id = m_selectedInstance->id();
|
||||||
|
|
||||||
|
QString shortcutStr;
|
||||||
|
auto shortcuts = m_selectedInstance->shortcuts();
|
||||||
|
if (!shortcuts.isEmpty())
|
||||||
|
shortcutStr = tr(" and its %n registered shortcut(s)", "", shortcuts.size());
|
||||||
auto response = CustomMessageBox::selectable(this, tr("Confirm Deletion"),
|
auto response = CustomMessageBox::selectable(this, tr("Confirm Deletion"),
|
||||||
tr("You are about to delete \"%1\" and all of its shortcut(s).\n"
|
tr("You are about to delete \"%1\"%2.\n"
|
||||||
"This may be permanent and will completely delete the instance.\n\n"
|
"This may be permanent and will completely delete the instance.\n\n"
|
||||||
"Are you sure?")
|
"Are you sure?")
|
||||||
.arg(m_selectedInstance->name()),
|
.arg(m_selectedInstance->name(), shortcutStr),
|
||||||
QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
|
QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
|
||||||
->exec();
|
->exec();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue