From 80b10107d9deeaf8b1aa9d306ea506aafcb99bd1 Mon Sep 17 00:00:00 2001 From: Tannin Date: Tue, 15 Jul 2014 20:37:10 +0200 Subject: - Disabled compilation of loot_cli as the current loot version can't be compiled or linked against with vs 2010 - bugfix: some incompatibilities with non-skyrim games - bugfix: incorrect handling of plurals in translateable strings --- src/mainwindow.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d6cef2dc..5d4c4cca 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3887,23 +3887,18 @@ void MainWindow::deleteSavegame_clicked() QModelIndexList selectedIndexes = ui->savegameList->selectionModel()->selectedIndexes(); QString savesMsgLabel; - QRegExp saveSuffix(".ess$"); QStringList deleteFiles; foreach (const QModelIndex &idx, selectedIndexes) { QString name = idx.data().toString(); SaveGame *save = new SaveGame(this, idx.data(Qt::UserRole).toString()); - savesMsgLabel += "
  • " + name.replace(saveSuffix, "") + "
  • "; + savesMsgLabel += "
  • " + QFileInfo(name).completeBaseName() + "
  • "; deleteFiles << save->saveFiles(); } - bool multipleRows = (selectedIndexes.count() > 1); - - if (QMessageBox::question(this, tr("Confirm"), tr("Are you sure you want to remove the following %1save%2?

    Removed saves will be sent to the Recycle Bin.") - .arg((multipleRows) ? QString::number(selectedIndexes.count()) + " " : "") - .arg((multipleRows) ? "s" : "") + if (QMessageBox::question(this, tr("Confirm"), tr("Are you sure you want to remove the following %n save(s)?

    Removed saves will be sent to the Recycle Bin.", "", selectedIndexes.count()) .arg(savesMsgLabel), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { shellDelete(deleteFiles, true); // recycle bin delete. @@ -4012,14 +4007,12 @@ void MainWindow::on_savegameList_customContextMenuRequested(const QPoint &pos) if (!selection->hasSelection()) return; - bool multipleSelected = (selection->selectedIndexes().count() > 1); - QMenu menu; - if (!multipleSelected) + if (!(selection->selectedIndexes().count() > 1)) menu.addAction(tr("Fix Mods..."), this, SLOT(fixMods_clicked())); - QString deleteMenuLabel = tr("Delete save%1").arg((multipleSelected) ? "s" : ""); + QString deleteMenuLabel = tr("Delete %n save(s)", "", selection->selectedIndexes().count()); menu.addAction(deleteMenuLabel, this, SLOT(deleteSavegame_clicked())); @@ -4212,7 +4205,7 @@ void MainWindow::installTranslator(const QString &name) QTranslator *translator = new QTranslator(this); QString fileName = name + "_" + m_CurrentLanguage; if (!translator->load(fileName, qApp->applicationDirPath() + "/translations")) { - if (m_CurrentLanguage != "en-US") { + if (m_CurrentLanguage != "en_US") { qWarning("localization file %s not found", qPrintable(fileName)); } // we don't actually expect localization files for english } -- cgit v1.3.1