summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 17308ab8..97ba1da1 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -4051,15 +4051,24 @@ void MainWindow::deleteSavegame_clicked()
QString savesMsgLabel;
QStringList deleteFiles;
+ int count = 0;
+
foreach (const QModelIndex &idx, selectedIndexes) {
QString name = idx.data().toString();
SaveGame *save = new SaveGame(this, idx.data(Qt::UserRole).toString());
- savesMsgLabel += "<li>" + QFileInfo(name).completeBaseName() + "</li>";
+ if (count < 10) {
+ savesMsgLabel += "<li>" + QFileInfo(name).completeBaseName() + "</li>";
+ }
+ ++count;
deleteFiles << save->saveFiles();
}
+ if (count > 10) {
+ savesMsgLabel += "<li><i>... " + tr("%1 more").arg(count - 10) + "</i></li>";
+ }
+
if (QMessageBox::question(this, tr("Confirm"), tr("Are you sure you want to remove the following %n save(s)?<br><ul>%1</ul><br>Removed saves will be sent to the Recycle Bin.", "", selectedIndexes.count())
.arg(savesMsgLabel),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {