From eb6ee86da45e07b486d950234543ad1dcfc3879b Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sat, 5 Jan 2019 21:50:52 -0600 Subject: Change version to 2.1.7alpha5 --- src/version.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/version.rc b/src/version.rc index de5ec82e..92a70360 100644 --- a/src/version.rc +++ b/src/version.rc @@ -4,7 +4,7 @@ // Otherwise, if letters are used in VER_FILEVERSION_STR, uses the full MOBase::VersionInfo parser // Otherwise, uses the numbers from VER_FILEVERSION and sets the release type as pre-alpha #define VER_FILEVERSION 2,1,7 -#define VER_FILEVERSION_STR "2.1.7alpha4\0" +#define VER_FILEVERSION_STR "2.1.7alpha5\0" VS_VERSION_INFO VERSIONINFO FILEVERSION VER_FILEVERSION -- cgit v1.3.1 From 2a010e5cdbe5ebf9a94b59d8a1e7e4557cbd1c52 Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 6 Jan 2019 20:57:17 +0100 Subject: Fixed version notification messages. --- src/mainwindow.cpp | 6 +++--- src/selfupdater.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ae37968c..e9d86810 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1834,9 +1834,9 @@ void MainWindow::processUpdates() { if (currentVersion > lastVersion) settings.setValue("version", currentVersion.toString()); else if (currentVersion < lastVersion) - qWarning() << tr("Notice: Your current MO version (%1) is lower than the previous version (%2).
" - "The GUI may not downgrade gracefully, so you may experience oddities.
" - "However, there should be no serious issues.").arg(lastVersion.toString()).arg(currentVersion.toString()).toStdWString(); + qWarning() << tr("Notice: Your current MO version (%1) is lower than the previously used one (%2). " + "The GUI may not downgrade gracefully, so you may experience oddities. " + "However, there should be no serious issues.").arg(currentVersion.toString()).arg(lastVersion.toString()).toStdWString(); } void MainWindow::storeSettings(QSettings &settings) { diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp index cdcbc2f4..c913af6a 100644 --- a/src/selfupdater.cpp +++ b/src/selfupdater.cpp @@ -151,7 +151,7 @@ void SelfUpdater::testForUpdate() } else if (newestVer < this->m_MOVersion) { // this could happen if the user switches from using prereleases to // stable builds. Should we downgrade? - qDebug("this version is newer than the newest installed one: %s -> %s", + qDebug("This version is newer than the latest released one: %s -> %s", qUtf8Printable(this->m_MOVersion.displayString()), qUtf8Printable(newestVer.displayString())); } -- cgit v1.3.1 From f2ea231f9212006f43ec29faa6c5b47810748a99 Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 6 Jan 2019 21:54:11 +0100 Subject: Made Delete INIs and Saves dialogs remember selection. --- src/profile.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/profile.cpp b/src/profile.cpp index e8ead8e8..09c2a5f5 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -31,6 +31,7 @@ along with Mod Organizer. If not, see . #include #include "util.h" #include "registry.h" +#include #include #include // for QFile @@ -749,12 +750,12 @@ bool Profile::enableLocalSaves(bool enable) m_Directory.mkdir("saves"); } } else { - QMessageBox::StandardButton res = QMessageBox::question( - QApplication::activeModalWidget(), tr("Delete profile-specific save games?"), + QDialogButtonBox::StandardButton res; + res = QuestionBoxMemory::query(QApplication::activeModalWidget(), "deleteSavesQuery", + tr("Delete profile-specific save games?"), tr("Do you want to delete the profile-specific save games? (If you select \"No\", the " "save games will show up again if you re-enable profile-specific save games)"), - QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, - QMessageBox::Cancel); + QDialogButtonBox::No | QDialogButtonBox::Yes | QDialogButtonBox::Cancel, QDialogButtonBox::No); if (res == QMessageBox::Yes) { shellDelete(QStringList(m_Directory.absoluteFilePath("saves"))); } else if (res == QMessageBox::No) { @@ -797,12 +798,12 @@ bool Profile::enableLocalSettings(bool enable) if (enable) { m_GamePlugin->initializeProfile(m_Directory.absolutePath(), IPluginGame::CONFIGURATION); } else { - QMessageBox::StandardButton res = QMessageBox::question( - QApplication::activeModalWidget(), tr("Delete profile-specific game INI files?"), + QDialogButtonBox::StandardButton res; + res = QuestionBoxMemory::query(QApplication::activeModalWidget(), "deleteINIQuery", + tr("Delete profile-specific game INI files?"), tr("Do you want to delete the profile-specific game INI files? (If you select \"No\", the " "INI files will be used again if you re-enable profile-specific game INI files.)"), - QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, - QMessageBox::Cancel); + QDialogButtonBox::No | QDialogButtonBox::Yes | QDialogButtonBox::Cancel, QDialogButtonBox::No); if (res == QMessageBox::Yes) { QStringList filesToDelete; for (QString file : m_GamePlugin->iniFiles()) { -- cgit v1.3.1 From d32695843d4c3fa888b3d26bf20a9126029020b0 Mon Sep 17 00:00:00 2001 From: Al Date: Mon, 7 Jan 2019 13:28:46 +0100 Subject: Fix drop to downloads tab. Fix DownloadView to be QtreeView in QCreator. --- src/mainwindow.ui | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 547faaa9..4f5400dd 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -1303,7 +1303,7 @@ p, li { white-space: pre-wrap; } - + 320 @@ -1322,19 +1322,25 @@ p, li { white-space: pre-wrap; } This is a list of mods you downloaded from Nexus. Double click one to install it. You can also drag an archive into here. - - true + + QAbstractItemView::NoEditTriggers + + + QAbstractItemView::DropOnly - + + Qt::MoveAction + + true - + 0 - + false - + true @@ -1655,7 +1661,7 @@ Right now this has very limited functionality DownloadListWidget - QWidget + QTreeView
downloadlistwidget.h
-- cgit v1.3.1 From fa8e40adcb2d62c62bc30966e26d64ab00cdc579 Mon Sep 17 00:00:00 2001 From: Al Date: Mon, 7 Jan 2019 14:28:28 +0100 Subject: Update valid mod status when moving files from overwrite. --- src/modlist.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modlist.cpp b/src/modlist.cpp index c1954b39..9835d3b9 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -960,7 +960,7 @@ bool ModList::dropURLs(const QMimeData *mimeData, int row, const QModelIndex &pa QString overwriteName = ModInfo::getByIndex(overwriteIndex)->name(); for (const QUrl &url : mimeData->urls()) { - qDebug("URL drop requested: %s", qUtf8Printable(url.toLocalFile())); + //qDebug("URL drop requested: %s", qUtf8Printable(url.toLocalFile())); if (!url.isLocalFile()) { qDebug("URL drop ignored: Not a local file."); continue; @@ -982,6 +982,10 @@ bool ModList::dropURLs(const QMimeData *mimeData, int row, const QModelIndex &pa } } + if (!modInfo->isValid()) { + modInfo->testValid(); + } + return true; } -- cgit v1.3.1 From 301c1156f848d2cc854aef9fa6c5d52db8c510e9 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Tue, 8 Jan 2019 01:28:25 -0600 Subject: Don't try to resume downloads that aren't paused --- src/downloadlistwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/downloadlistwidget.cpp b/src/downloadlistwidget.cpp index f885a5a8..be9d30e2 100644 --- a/src/downloadlistwidget.cpp +++ b/src/downloadlistwidget.cpp @@ -141,7 +141,7 @@ void DownloadListWidget::onDoubleClick(const QModelIndex &index) QModelIndex sourceIndex = qobject_cast(model())->mapToSource(index); if (m_Manager->getState(sourceIndex.row()) >= DownloadManager::STATE_READY) emit installDownload(sourceIndex.row()); - else if ((m_Manager->getState(sourceIndex.row()) >= DownloadManager::STATE_PAUSED) + else if ((m_Manager->getState(sourceIndex.row()) == DownloadManager::STATE_PAUSED) || (m_Manager->getState(sourceIndex.row()) == DownloadManager::STATE_PAUSING)) emit resumeDownload(sourceIndex.row()); } @@ -161,7 +161,7 @@ void DownloadListWidget::onHeaderCustomContextMenu(const QPoint &point) checkableAction->setDefaultWidget(checkBox); menu.addAction(checkableAction); } - + menu.exec(header()->viewport()->mapToGlobal(point)); // view/hide columns depending on check-state -- cgit v1.3.1 From 14b117d74a9953ce415279eeb8debacd1bcd912f Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 10 Jan 2019 21:16:01 +0100 Subject: Save rich text of notes tab across restart. --- src/modinfodialog.cpp | 6 +++++- src/modinfodialog.ui | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index c8e0fb9e..4201b708 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -193,7 +193,11 @@ ModInfoDialog::ModInfoDialog(ModInfo::Ptr modInfo, const DirectoryEntry *directo ModInfoDialog::~ModInfoDialog() { m_ModInfo->setComments(ui->commentsEdit->text()); - m_ModInfo->setNotes(ui->notesEdit->toPlainText()); + //avoid saving html stump if notes filed is empty + if (ui->notesEdit->toPlainText().isEmpty()) + m_ModInfo->setNotes(ui->notesEdit->toPlainText()); + else + m_ModInfo->setNotes(ui->notesEdit->toHtml()); saveCategories(ui->categoriesTree->invisibleRootItem()); saveIniTweaks(); // ini tweaks are written to the ini file directly. This is the only information not managed by ModInfo delete ui->descriptionView->page(); diff --git a/src/modinfodialog.ui b/src/modinfodialog.ui index 736214f4..1f8b0029 100644 --- a/src/modinfodialog.ui +++ b/src/modinfodialog.ui @@ -802,6 +802,9 @@ p, li { white-space: pre-wrap; } Enter notes about the mod here. These can be viewed in the mod list by hovering over the notes column or the flags column. + + Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + Enter notes about the mod here. These can be viewed in the mod list by hovering over the notes column or the flags column. -- cgit v1.3.1 From d0445685bf9a1723c8550fbdf115b3b86059174c Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 10 Jan 2019 23:51:53 +0100 Subject: Fix #523 by resetting m_URL after install. --- src/installationmanager.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 57c5e861..50e170d2 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -643,6 +643,9 @@ bool InstallationManager::doInstall(GuessedValue &modName, QString game settingsFile.setValue("repository", repository); settingsFile.setValue("url", m_URL); + //cleanup of m_URL or this will persist across installs. + m_URL = ""; + if (!merge) { // this does not clear the list we have in memory but the mod is going to have to be re-read anyway // btw.: installedFiles were written with beginWriteArray but we can still clear it with beginGroup. nice -- cgit v1.3.1 From ff49e2a43c44cb3e9688647b4c7c45c9bdbce227 Mon Sep 17 00:00:00 2001 From: Al Date: Fri, 11 Jan 2019 00:04:09 +0100 Subject: Added Web Page URL field in modinfodialog. It's used only if nexusID is invalid. --- src/modinfodialog.cpp | 7 ++++++- src/modinfodialog.h | 1 + src/modinfodialog.ui | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index 4201b708..ed77f596 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -193,7 +193,7 @@ ModInfoDialog::ModInfoDialog(ModInfo::Ptr modInfo, const DirectoryEntry *directo ModInfoDialog::~ModInfoDialog() { m_ModInfo->setComments(ui->commentsEdit->text()); - //avoid saving html stump if notes filed is empty + //Avoid saving html stump if notes field is empty. if (ui->notesEdit->toPlainText().isEmpty()) m_ModInfo->setNotes(ui->notesEdit->toPlainText()); else @@ -924,6 +924,7 @@ void ModInfoDialog::activateNexusTab() QLineEdit *versionEdit = findChild("versionEdit"); QString currentVersion = m_Settings->value("version", "0.0").toString(); versionEdit->setText(currentVersion); + ui->customUrlLineEdit->setText(m_ModInfo->getURL()); } @@ -967,6 +968,10 @@ void ModInfoDialog::on_versionEdit_editingFinished() updateVersionColor(); } +void ModInfoDialog::on_customUrlLineEdit_editingFinished() +{ + m_ModInfo->setURL(ui->customUrlLineEdit->text()); +} bool ModInfoDialog::recursiveDelete(const QModelIndex &index) { diff --git a/src/modinfodialog.h b/src/modinfodialog.h index f3bc48b4..61517100 100644 --- a/src/modinfodialog.h +++ b/src/modinfodialog.h @@ -185,6 +185,7 @@ private slots: void on_modIDEdit_editingFinished(); void on_sourceGameEdit_currentIndexChanged(int); void on_versionEdit_editingFinished(); + void on_customUrlLineEdit_editingFinished(); void on_iniFileView_textChanged(); void on_textFileView_textChanged(); void on_tabWidget_currentChanged(int index); diff --git a/src/modinfodialog.ui b/src/modinfodialog.ui index 1f8b0029..0211e704 100644 --- a/src/modinfodialog.ui +++ b/src/modinfodialog.ui @@ -774,6 +774,20 @@ p, li { white-space: pre-wrap; }
+ + + + + + Web page URL (only used if invalid NexusID) : + + + + + + + + -- cgit v1.3.1 From 183069a85db598c577ee34fab046f812009c1f18 Mon Sep 17 00:00:00 2001 From: Al Date: Fri, 11 Jan 2019 00:23:39 +0100 Subject: Make Visit on Nexus and Open web page do the other as well for multiple items. --- src/mainwindow.cpp | 57 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 49 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e9d86810..c6dc145d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2974,13 +2974,22 @@ void MainWindow::visitOnNexus_clicked() return; } } - + int row_idx; + ModInfo::Ptr info; + QString gameName; + QString webUrl; for (QModelIndex idx : selection->selectedRows()) { - int modID = m_OrganizerCore.modList()->data(m_OrganizerCore.modList()->index(idx.data(Qt::UserRole + 1).toInt(), 0), Qt::UserRole).toInt(); - QString gameName = m_OrganizerCore.modList()->data(m_OrganizerCore.modList()->index(idx.data(Qt::UserRole + 1).toInt(), 0), Qt::UserRole + 4).toString(); + row_idx = idx.data(Qt::UserRole + 1).toInt(); + info = ModInfo::getByIndex(row_idx); + int modID = info->getNexusID(); + webUrl = info->getURL(); + gameName = info->getGameName(); if (modID > 0) { linkClicked(NexusInterface::instance(&m_PluginContainer)->getModURL(modID, gameName)); } + else if (webUrl != "") { + linkClicked(webUrl); + } } } else { @@ -2996,11 +3005,43 @@ void MainWindow::visitOnNexus_clicked() void MainWindow::visitWebPage_clicked() { - ModInfo::Ptr info = ModInfo::getByIndex(m_ContextRow); - if (info->getURL() != "") { - linkClicked(info->getURL()); - } else { - MessageDialog::showMessage(tr("Web page for this mod is unknown"), this); + + QItemSelectionModel *selection = ui->modList->selectionModel(); + if (selection->hasSelection() && selection->selectedRows().count() > 1) { + int count = selection->selectedRows().count(); + if (count > 10) { + if (QMessageBox::question(this, tr("Opening Web Pages"), + tr("You are trying to open %1 Web Pages. Are you sure you want to do this?").arg(count), + QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) { + return; + } + } + int row_idx; + ModInfo::Ptr info; + QString gameName; + QString webUrl; + for (QModelIndex idx : selection->selectedRows()) { + row_idx = idx.data(Qt::UserRole + 1).toInt(); + info = ModInfo::getByIndex(row_idx); + int modID = info->getNexusID(); + webUrl = info->getURL(); + gameName = info->getGameName(); + if (modID > 0) { + linkClicked(NexusInterface::instance(&m_PluginContainer)->getModURL(modID, gameName)); + } + else if (webUrl != "") { + linkClicked(webUrl); + } + } + } + else { + ModInfo::Ptr info = ModInfo::getByIndex(m_ContextRow); + if (info->getURL() != "") { + linkClicked(info->getURL()); + } + else { + MessageDialog::showMessage(tr("Web page for this mod is unknown"), this); + } } } -- cgit v1.3.1 From 347ac2b8b5f34a2583ae7844e0dfd79773657270 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 11 Jan 2019 01:39:05 -0600 Subject: Support for force loading libraries --- src/CMakeLists.txt | 6 + src/aboutdialog.ui | 8 +- src/editexecutablesdialog.cpp | 47 ++- src/editexecutablesdialog.h | 6 + src/editexecutablesdialog.ui | 37 ++ src/forcedloaddialog.cpp | 76 ++++ src/forcedloaddialog.h | 32 ++ src/forcedloaddialog.ui | 117 ++++++ src/forcedloaddialogwidget.cpp | 87 ++++ src/forcedloaddialogwidget.h | 38 ++ src/forcedloaddialogwidget.ui | 104 +++++ src/mainwindow.cpp | 21 +- src/organizer.pro | 12 +- src/organizer_en.ts | 893 +++++++++++++++++++++++------------------ src/organizercore.cpp | 34 +- src/organizercore.h | 8 +- src/profile.cpp | 118 +++++- src/profile.h | 13 + src/settings.cpp | 4 +- src/settings.h | 4 +- src/settingsdialog.cpp | 6 +- src/usvfsconnector.cpp | 18 +- src/usvfsconnector.h | 3 + 23 files changed, 1260 insertions(+), 432 deletions(-) create mode 100644 src/forcedloaddialog.cpp create mode 100644 src/forcedloaddialog.h create mode 100644 src/forcedloaddialog.ui create mode 100644 src/forcedloaddialogwidget.cpp create mode 100644 src/forcedloaddialogwidget.h create mode 100644 src/forcedloaddialogwidget.ui (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4c883cf5..5cbd5aa9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -92,6 +92,8 @@ SET(organizer_SRCS moshortcut.cpp listdialog.cpp lcdnumber.cpp + forcedloaddialog.cpp + forcedloaddialogwidget.cpp shared/windows_error.cpp shared/error_report.cpp @@ -187,6 +189,8 @@ SET(organizer_HDRS moshortcut.h listdialog.h lcdnumber.h + forcedloaddialog.h + forcedloaddialogwidget.h shared/windows_error.h shared/error_report.h @@ -226,6 +230,8 @@ SET(organizer_UIS browserdialog.ui aboutdialog.ui listdialog.ui + forcedloaddialog.ui + forcedloaddialogwidget.ui ) SET(organizer_QRCS diff --git a/src/aboutdialog.ui b/src/aboutdialog.ui index 98a76061..ac7db1fc 100644 --- a/src/aboutdialog.ui +++ b/src/aboutdialog.ui @@ -161,7 +161,7 @@ - + QAbstractItemView::NoSelection @@ -202,7 +202,7 @@ - + QAbstractItemView::NoSelection @@ -231,7 +231,7 @@ Translators - + @@ -363,7 +363,7 @@ Other Supporters && Contributors - + diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp index be2ee127..212993f1 100644 --- a/src/editexecutablesdialog.cpp +++ b/src/editexecutablesdialog.cpp @@ -25,7 +25,8 @@ along with Mod Organizer. If not, see . #include #include #include - +#include "forcedloaddialog.h" +#include using namespace MOBase; using namespace MOShared; @@ -44,6 +45,8 @@ EditExecutablesDialog::EditExecutablesDialog( refreshExecutablesWidget(); ui->newFilesModBox->addItems(modList.allMods()); + + m_ForcedLibraries = m_Profile->determineForcedLibraries(ui->titleEdit->text()); } EditExecutablesDialog::~EditExecutablesDialog() @@ -93,6 +96,7 @@ void EditExecutablesDialog::resetInput() ui->overwriteAppIDBox->setChecked(false); ui->useAppIconCheckBox->setChecked(false); ui->newFilesModCheckBox->setChecked(false); + ui->forceLoadCheckBox->setChecked(false); m_CurrentItem = nullptr; } @@ -118,6 +122,9 @@ void EditExecutablesDialog::saveExecutable() else { m_Profile->removeSetting("custom_overwrites", ui->titleEdit->text()); } + + m_Profile->saveForcedLibraries(ui->titleEdit->text(), m_ForcedLibraries); + m_Profile->setForcedLibrariesEnabled(ui->titleEdit->text(), ui->forceLoadCheckBox->isChecked()); } @@ -130,6 +137,21 @@ void EditExecutablesDialog::delayedRefresh() } +void EditExecutablesDialog::on_forceLoadButton_clicked() +{ + ForcedLoadDialog dialog(this); + dialog.setValues(m_ForcedLibraries); + if (dialog.exec() == QDialog::Accepted) { + m_ForcedLibraries = dialog.values(); + } +} + +void EditExecutablesDialog::on_forceLoadCheckBox_toggled() +{ + ui->forceLoadButton->setEnabled(ui->forceLoadCheckBox->isChecked()); +} + + void EditExecutablesDialog::on_addButton_clicked() { if (executableChanged()) { @@ -231,6 +253,20 @@ bool EditExecutablesDialog::executableChanged() QString storedCustomOverwrite = m_Profile->setting("custom_overwrites", selectedExecutable.m_Title).toString(); + bool forcedLibrariesDirty = false; + auto forcedLibaries = m_Profile->determineForcedLibraries(selectedExecutable.m_Title); + forcedLibrariesDirty |= !std::equal(forcedLibaries.begin(), forcedLibaries.end(), + m_ForcedLibraries.begin(), m_ForcedLibraries.end(), + [](const ExecutableForcedLoadSetting &lhs, const ExecutableForcedLoadSetting &rhs) + { + return lhs.enabled() == rhs.enabled() && + lhs.forced() == rhs.forced() && + lhs.library() == rhs.library() && + lhs.process() == rhs.process(); + }); + forcedLibrariesDirty |= m_Profile->setting("forced_libraries", ui->titleEdit->text() + "/enabled", false).toBool() != + ui->forceLoadCheckBox->isChecked(); + return selectedExecutable.m_Title != ui->titleEdit->text() || selectedExecutable.m_Arguments != ui->argumentsEdit->text() || selectedExecutable.m_SteamAppID != ui->appIDOverwriteEdit->text() @@ -238,7 +274,9 @@ bool EditExecutablesDialog::executableChanged() || !storedCustomOverwrite.isEmpty() && (storedCustomOverwrite != ui->newFilesModBox->currentText()) || selectedExecutable.m_WorkingDirectory != QDir::fromNativeSeparators(ui->workingDirEdit->text()) || selectedExecutable.m_BinaryInfo.absoluteFilePath() != QDir::fromNativeSeparators(ui->binaryEdit->text()) - || selectedExecutable.usesOwnIcon() != ui->useAppIconCheckBox->isChecked(); + || selectedExecutable.usesOwnIcon() != ui->useAppIconCheckBox->isChecked() + || forcedLibrariesDirty + ; } else { QFileInfo fileInfo(ui->binaryEdit->text()); return !ui->binaryEdit->text().isEmpty() @@ -331,6 +369,11 @@ void EditExecutablesDialog::on_executablesListBox_clicked(const QModelIndex &cur if (index != -1) { ui->newFilesModBox->setCurrentIndex(index); } + + m_ForcedLibraries = m_Profile->determineForcedLibraries(ui->titleEdit->text()); + bool forcedLibraries = m_Profile->forcedLibrariesEnabled(ui->titleEdit->text()); + ui->forceLoadButton->setEnabled(forcedLibraries); + ui->forceLoadCheckBox->setChecked(forcedLibraries); } } diff --git a/src/editexecutablesdialog.h b/src/editexecutablesdialog.h index 0f3dbaff..82e63e15 100644 --- a/src/editexecutablesdialog.h +++ b/src/editexecutablesdialog.h @@ -92,6 +92,10 @@ private slots: void on_executablesListBox_clicked(const QModelIndex &index); + void on_forceLoadButton_clicked(); + + void on_forceLoadCheckBox_toggled(); + private: void resetInput(); @@ -108,6 +112,8 @@ private: ExecutablesList m_ExecutablesList; Profile *m_Profile; + + QList m_ForcedLibraries; }; #endif // EDITEXECUTABLESDIALOG_H diff --git a/src/editexecutablesdialog.ui b/src/editexecutablesdialog.ui index bdbb8bd1..4f9223d5 100644 --- a/src/editexecutablesdialog.ui +++ b/src/editexecutablesdialog.ui @@ -191,6 +191,43 @@ Right now the only case I know of where this needs to be overwritten is for the + + + + + + If this is enabled, the configured libraries will be automatically loaded when this executable is launched. + + + Force Load Libraries (*) + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + Configure Libraries + + + + + diff --git a/src/forcedloaddialog.cpp b/src/forcedloaddialog.cpp new file mode 100644 index 00000000..ad30a58c --- /dev/null +++ b/src/forcedloaddialog.cpp @@ -0,0 +1,76 @@ +#include "forcedloaddialog.h" +#include "ui_forcedloaddialog.h" + +#include "forcedloaddialogwidget.h" + +#include +#include + +using namespace MOBase; + +ForcedLoadDialog::ForcedLoadDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::ForcedLoadDialog) +{ + ui->setupUi(this); +} + +ForcedLoadDialog::~ForcedLoadDialog() +{ + delete ui; +} + +void ForcedLoadDialog::setValues(QList &values) +{ + ui->tableWidget->clearContents(); + + for (int i = 0; i < values.count(); i++) { + ForcedLoadDialogWidget *item = new ForcedLoadDialogWidget(this); + item->setEnabled(values[i].enabled()); + item->setProcess(values[i].process()); + item->setLibraryPath(values[i].library()); + item->setForced(values[i].forced()); + + ui->tableWidget->insertRow(i); + ui->tableWidget->setCellWidget(i, 0, item); + } + + ui->tableWidget->resizeRowsToContents(); +} + +QList ForcedLoadDialog::values() +{ + QList results; + for (int row = 0; row < ui->tableWidget->rowCount(); row++) { + auto widget = (ForcedLoadDialogWidget*)ui->tableWidget->cellWidget(row, 0); + results.append( + ExecutableForcedLoadSetting( + widget->getProcess(), + widget->getLibraryPath() + ).withEnabled(widget->getEnabled()) + .withForced(widget->getForced()) + ); + } + return results; +} + + +void ForcedLoadDialog::on_addRowButton_clicked() +{ + int row = ui->tableWidget->rowCount(); + ui->tableWidget->insertRow(row); + ForcedLoadDialogWidget *item = new ForcedLoadDialogWidget(this); + ui->tableWidget->setCellWidget(row, 0, item); + ui->tableWidget->resizeRowsToContents(); +} + +void ForcedLoadDialog::on_deleteRowButton_clicked() +{ + for (auto rowIndex: ui->tableWidget->selectionModel()->selectedRows()) { + int row = rowIndex.row(); + auto widget = (ForcedLoadDialogWidget*)ui->tableWidget->cellWidget(row, 0); + if (!widget->getForced()){ + ui->tableWidget->removeRow(row); + } + } +} diff --git a/src/forcedloaddialog.h b/src/forcedloaddialog.h new file mode 100644 index 00000000..68460d91 --- /dev/null +++ b/src/forcedloaddialog.h @@ -0,0 +1,32 @@ +#ifndef FORCEDLOADDIALOG_H +#define FORCEDLOADDIALOG_H + +#include +#include + +#include "executableinfo.h" + +namespace Ui { +class ForcedLoadDialog; +} + +class ForcedLoadDialog : public QDialog +{ + Q_OBJECT + +public: + explicit ForcedLoadDialog(QWidget *parent = nullptr); + ~ForcedLoadDialog(); + + void setValues(QList &values); + QList values(); + +private slots: + void on_addRowButton_clicked(); + void on_deleteRowButton_clicked(); + +private: + Ui::ForcedLoadDialog *ui; +}; + +#endif // FORCEDLOADDIALOG_H diff --git a/src/forcedloaddialog.ui b/src/forcedloaddialog.ui new file mode 100644 index 00000000..9c5b2d10 --- /dev/null +++ b/src/forcedloaddialog.ui @@ -0,0 +1,117 @@ + + + ForcedLoadDialog + + + + 0 + 0 + 700 + 400 + + + + Forced Load Settings + + + + + + QAbstractItemView::NoEditTriggers + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + 1 + + + false + + + true + + + + + + + + + + Adds a row to the table. + + + Adds a row to the table. + + + Add Row + + + + + + + Deletes the selected row from the table. + + + Deletes the selected row from the table. + + + Delete Row + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + buttonBox + accepted() + ForcedLoadDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + ForcedLoadDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/forcedloaddialogwidget.cpp b/src/forcedloaddialogwidget.cpp new file mode 100644 index 00000000..61805068 --- /dev/null +++ b/src/forcedloaddialogwidget.cpp @@ -0,0 +1,87 @@ +#include "forcedloaddialogwidget.h" +#include "ui_forcedloaddialogwidget.h" + +#include + +#include "executableinfo.h" + +ForcedLoadDialogWidget::ForcedLoadDialogWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::ForcedLoadDialogWidget) +{ + ui->setupUi(this); +} + +ForcedLoadDialogWidget::~ForcedLoadDialogWidget() +{ + delete ui; +} + +bool ForcedLoadDialogWidget::getEnabled() +{ + return ui->enabledBox->isChecked(); +} + +bool ForcedLoadDialogWidget::getForced() +{ + return m_Forced; +} + +QString ForcedLoadDialogWidget::getLibraryPath() +{ + return ui->libraryPathEdit->text(); +} + +QString ForcedLoadDialogWidget::getProcess() +{ + return ui->processEdit->text(); +} + +void ForcedLoadDialogWidget::setEnabled(bool enabled) +{ + ui->enabledBox->setChecked(enabled); +} + +void ForcedLoadDialogWidget::setForced(bool forced) +{ + m_Forced = forced; + ui->libraryPathBrowseButton->setEnabled(!forced); + ui->libraryPathEdit->setEnabled(!forced); + ui->processBrowseButton->setEnabled(!forced); + ui->processEdit->setEnabled(!forced); +} + +void ForcedLoadDialogWidget::setLibraryPath(QString &path) +{ + ui->libraryPathEdit->setText(path); +} + +void ForcedLoadDialogWidget::setProcess(QString &name) +{ + ui->processEdit->setText(name); +} + +void ForcedLoadDialogWidget::on_enabledBox_toggled() +{ + // anything to do? +} + +void ForcedLoadDialogWidget::on_libraryPathBrowseButton_clicked() +{ + QDir gameDir("D:/Games/Steam Library/steamapps/common/Fallout 4"); + QString startPath = gameDir.absolutePath(); + QString result = QFileDialog::getOpenFileName(nullptr, "Select a library...", startPath, "Dynamic link library (*.dll)", nullptr, QFileDialog::ReadOnly); + if (!result.isEmpty()) { + ui->libraryPathEdit->setText(result); + } +} + +void ForcedLoadDialogWidget::on_processBrowseButton_clicked() +{ + QDir gameDir("D:/Games/Steam Library/steamapps/common/Fallout 4"); + QString startPath = gameDir.absolutePath(); + QString result = QFileDialog::getOpenFileName(nullptr, "Select a process...", startPath, "Executable (*.exe)", nullptr, QFileDialog::ReadOnly); + if (!result.isEmpty()) { + ui->processEdit->setText(QFile(result).fileName()); + } +} diff --git a/src/forcedloaddialogwidget.h b/src/forcedloaddialogwidget.h new file mode 100644 index 00000000..06ad0009 --- /dev/null +++ b/src/forcedloaddialogwidget.h @@ -0,0 +1,38 @@ +#ifndef FORCEDLOADDIALOGWIDGET_H +#define FORCEDLOADDIALOGWIDGET_H + +#include + +namespace Ui { +class ForcedLoadDialogWidget; +} + +class ForcedLoadDialogWidget : public QWidget +{ + Q_OBJECT + +public: + explicit ForcedLoadDialogWidget(QWidget *parent = nullptr); + ~ForcedLoadDialogWidget(); + + bool getEnabled(); + bool getForced(); + QString getLibraryPath(); + QString getProcess(); + + void setEnabled(bool enabled); + void setForced(bool forced); + void setLibraryPath(QString &path); + void setProcess(QString &name); + +private slots: + void on_enabledBox_toggled(); + void on_libraryPathBrowseButton_clicked(); + void on_processBrowseButton_clicked(); + +private: + Ui::ForcedLoadDialogWidget *ui; + bool m_Forced; +}; + +#endif // FORCEDLOADDIALOGWIDGET_H diff --git a/src/forcedloaddialogwidget.ui b/src/forcedloaddialogwidget.ui new file mode 100644 index 00000000..4df78beb --- /dev/null +++ b/src/forcedloaddialogwidget.ui @@ -0,0 +1,104 @@ + + + ForcedLoadDialogWidget + + + + 0 + 0 + 400 + 41 + + + + + 0 + 0 + + + + Form + + + + + + + + + + + + + The name of the process that should be forced to load a library. + + + The name of the process that should be forced to load a library. + + + Process name + + + + + + + + 0 + 0 + + + + + 32 + 0 + + + + + 32 + 16777215 + + + + Browse for a process. + + + Browse for a process. + + + ... + + + + + + + Library to load + + + + + + + + 32 + 16777215 + + + + Browse for a library. + + + Browse for a library. + + + ... + + + + + + + + diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c6dc145d..0ebad6ae 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1162,15 +1162,20 @@ void MainWindow::startExeAction() { QAction *action = qobject_cast(sender()); if (action != nullptr) { - const Executable &selectedExecutable( - m_OrganizerCore.executablesList()->find(action->text())); - QString customOverwrite= m_OrganizerCore.currentProfile()->setting("custom_overwrites", selectedExecutable.m_Title).toString(); + const Executable &selectedExecutable(m_OrganizerCore.executablesList()->find(action->text())); + QString customOverwrite = m_OrganizerCore.currentProfile()->setting("custom_overwrites", selectedExecutable.m_Title).toString(); + auto forcedLibraries = m_OrganizerCore.currentProfile()->determineForcedLibraries(selectedExecutable.m_Title); + if (!m_OrganizerCore.currentProfile()->forcedLibrariesEnabled(selectedExecutable.m_Title)) { + forcedLibraries.clear(); + } m_OrganizerCore.spawnBinary( selectedExecutable.m_BinaryInfo, selectedExecutable.m_Arguments, selectedExecutable.m_WorkingDirectory.length() != 0 ? selectedExecutable.m_WorkingDirectory : selectedExecutable.m_BinaryInfo.absolutePath(), - selectedExecutable.m_SteamAppID, customOverwrite); + selectedExecutable.m_SteamAppID, + customOverwrite, + forcedLibraries); } else { qCritical("not an action?"); } @@ -1957,12 +1962,18 @@ void MainWindow::on_startButton_clicked() { try { const Executable &selectedExecutable(getSelectedExecutable()); QString customOverwrite = m_OrganizerCore.currentProfile()->setting("custom_overwrites", selectedExecutable.m_Title).toString(); + auto forcedLibraries = m_OrganizerCore.currentProfile()->determineForcedLibraries(selectedExecutable.m_Title); + if (!m_OrganizerCore.currentProfile()->forcedLibrariesEnabled(selectedExecutable.m_Title)) { + forcedLibraries.clear(); + } m_OrganizerCore.spawnBinary( selectedExecutable.m_BinaryInfo, selectedExecutable.m_Arguments, selectedExecutable.m_WorkingDirectory.length() != 0 ? selectedExecutable.m_WorkingDirectory : selectedExecutable.m_BinaryInfo.absolutePath(), - selectedExecutable.m_SteamAppID, customOverwrite); + selectedExecutable.m_SteamAppID, + customOverwrite, + forcedLibraries); } catch (...) { ui->startButton->setEnabled(true); throw; diff --git a/src/organizer.pro b/src/organizer.pro index b8e79e0c..ddf676f2 100644 --- a/src/organizer.pro +++ b/src/organizer.pro @@ -92,7 +92,9 @@ SOURCES += \ modinfooverwrite.cpp \ modinfoforeign.cpp \ listdialog.cpp \ - lcdnumber.cpp + lcdnumber.cpp \ + forcedloaddialog.cpp \ + forcedloaddialogwidget.cpp HEADERS += \ @@ -169,7 +171,9 @@ HEADERS += \ modinfooverwrite.h \ modinfoforeign.h \ listdialog.h \ - lcdnumber.h + lcdnumber.h \ + forcedloaddialog.h \ + forcedloaddialogwidget.h FORMS += \ transfersavesdialog.ui \ @@ -197,7 +201,9 @@ FORMS += \ previewdialog.ui \ browserdialog.ui \ aboutdialog.ui \ - listdialog.ui + listdialog.ui \ + forcedloaddialog.ui \ + forcedloaddialogwidget.ui RESOURCES += \ resources.qrc \ diff --git a/src/organizer_en.ts b/src/organizer_en.ts index 299ffe6a..4291f3ae 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -27,7 +27,6 @@ Lead Developers/ Maintainers - Current Maintainers @@ -116,7 +115,12 @@ - + + Tannin (Original Creator) + + + + Close @@ -980,92 +984,107 @@ Right now the only case I know of where this needs to be overwritten is for the - + + If this is enabled, the configured libraries will be automatically loaded when this executable is launched. + + + + + Force Load Libraries (*) + + + + + Configure Libraries + + + + Use Application's Icon for shortcuts - + (*) This setting is profile-specific - - + + Add an executable - - + + Add - - + + Remove the selected executable - + Remove - + Close - + Select a binary - + Executable (%1) - + Java (32-bit) required - + MO requires 32-bit java to run this application. If you already have it installed, select javaw.exe from that installation as the binary. - + Select a directory - + Confirm - + Really remove "%1" from executables? - + Modify - - + + Save Changes? - - + + You made changes to the current executable, do you want to save them? @@ -1117,6 +1136,78 @@ Right now the only case I know of where this needs to be overwritten is for the + + ForcedLoadDialog + + + Forced Load Settings + + + + + + Adds a row to the table. + + + + + Add Row + + + + + + Deletes the selected row from the table. + + + + + Delete Row + + + + + ForcedLoadDialogWidget + + + Form + + + + + + The name of the process that should be forced to load a library. + + + + + Process name + + + + + + Browse for a process. + + + + + + ... + + + + + Library to load + + + + + + Browse for a library. + + + InstallDialog @@ -1457,7 +1548,7 @@ p, li { white-space: pre-wrap; } - + Create Backup @@ -1486,7 +1577,7 @@ p, li { white-space: pre-wrap; } - + Filter @@ -1633,8 +1724,8 @@ p, li { white-space: pre-wrap; } - - + + Refresh @@ -1696,145 +1787,145 @@ p, li { white-space: pre-wrap; } - + Show Hidden - + Tool Bar - + Install Mod - + Install &Mod - + Install a new mod from an archive - + Ctrl+M - + Profiles - + &Profiles - + Configure Profiles - + Ctrl+P - + Executables - + &Executables - + Configure the executables that can be started through Mod Organizer - + Ctrl+E - + Tools - + &Tools - + Ctrl+I - + Settings - + &Settings - + Configure settings and workarounds - + Ctrl+S - + Nexus - + Search nexus network for more mods - + Ctrl+N - - + + Update - + Mod Organizer is up-to-date - + No Problems - + This button will be highlighted if MO discovered potential problems in your setup and provide tips on how to fix them. !Work in progress! @@ -1842,39 +1933,39 @@ Right now this has very limited functionality - - + + Help - + Ctrl+H - + Endorse MO - - + + Endorse Mod Organizer - + Copy Log to Clipboard - + Change Game - + Open the Instance selection dialog to manage a different Game @@ -1927,8 +2018,8 @@ Error: %1 - - + + Endorse @@ -2044,7 +2135,7 @@ Error: %1 - Notice: Your current MO version (%1) is lower than the previous version (%2).<br>The GUI may not downgrade gracefully, so you may experience oddities.<br>However, there should be no serious issues. + Notice: Your current MO version (%1) is lower than the previously used one (%2). The GUI may not downgrade gracefully, so you may experience oddities. However, there should be no serious issues. @@ -2058,676 +2149,676 @@ Error: %1 - + Start Tutorial? - + You're about to start a tutorial. For technical reasons it's not possible to end the tutorial early. Continue? - + failed to spawn notepad.exe: %1 - + failed to change origin name: %1 - + failed to move "%1" from mod "%2" to "%3": %4 - + <Contains %1> - + <Checked> - + <Unchecked> - + <Update> - + <Mod Backup> - + <Managed by MO> - + <Managed outside MO> - + <No category> - + <Conflicted> - + <Not Endorsed> - + failed to rename mod: %1 - + Overwrite? - + This will replace the existing mod "%1". Continue? - + failed to remove mod "%1" - - - + + + failed to rename "%1" to "%2" - - - - + + + + Confirm - + Remove the following mods?<br><ul>%1</ul> - + failed to remove mod: %1 - - + + Failed - + Installation file no longer exists - + Mods installed with old versions of MO can't be reinstalled in this way. - + Failed to create backup. - + You need to be logged in with Nexus to resume a download - - - - + + + + You need to be logged in with Nexus to endorse - - + + Endorsing multiple mods will take a while. Please wait... - - + + Unendorsing multiple mods will take a while. Please wait... - + Failed to display overwrite dialog: %1 - + Opening Nexus Links - + You are trying to open %1 links to Nexus Mods. Are you sure you want to do this? - + Nexus ID for this Mod is unknown - + Web page for this mod is unknown - + <table cellspacing="5"><tr><th>Type</th><th>All</th><th>Visible</th><tr><td>Enabled mods:&emsp;</td><td align=right>%1 / %2</td><td align=right>%3 / %4</td></tr><tr><td>Unmanaged/DLCs:&emsp;</td><td align=right>%5</td><td align=right>%6</td></tr><tr><td>Mod backups:&emsp;</td><td align=right>%7</td><td align=right>%8</td></tr><tr><td>Separators:&emsp;</td><td align=right>%9</td><td align=right>%10</td></tr></table> - - <table cellspacing="4"><tr><th>Type</th><th>Active</th><th>Total</th></tr><tr><td>Active plugins:</td><td align=right>%1</td><td align=right>%2</td></tr><tr><td>Active ESMs:</td><td align=right>%3</td><td align=right>%4</td></tr><tr><td>Active ESPs:</td><td align=right>%7</td><td align=right>%8</td></tr><tr><td>Active ESMs+ESPs:</td><td align=right>%9</td><td align=right>%10</td></tr><tr><td>Active ESLs:</td><td align=right>%5</td><td align=right>%6</td></tr></table> + + <table cellspacing="6"><tr><th>Type</th><th>Active </th><th>Total</th></tr><tr><td>All plugins:</td><td align=right>%1 </td><td align=right>%2</td></tr><tr><td>ESMs:</td><td align=right>%3 </td><td align=right>%4</td></tr><tr><td>ESPs:</td><td align=right>%7 </td><td align=right>%8</td></tr><tr><td>ESMs+ESPs:</td><td align=right>%9 </td><td align=right>%10</td></tr><tr><td>ESLs:</td><td align=right>%5 </td><td align=right>%6</td></tr></table> - - - + + + Create Mod... - + This will create an empty mod. Please enter a name: - - + + A mod with this name already exists - + Create Separator... - + This will create a new separator. Please enter a name: - + A separator with this name already exists - + This will move all files from overwrite into a new, regular mod. Please enter a name: - - + + Are you sure? - + About to recursively delete: - + Not logged in, endorsement information will be wrong - + Continue? - + The versioning scheme decides which version is considered newer than another. This function will guess the versioning scheme under the assumption that the installed version is outdated. - - + + Sorry - + I don't know a versioning scheme where %1 is newer than %2. - + Really enable all visible mods? - + Really disable all visible mods? - + Export to csv - + CSV (Comma Separated Values) is a format that can be imported in programs like Excel to create a spreadsheet. You can also use online editors and converters instead. - + Select what mods you want export: - + All installed mods - + Only active (checked) mods from your current profile - + All currently visible mods in the mod list - + Choose what Columns to export: - + Mod_Priority - + Mod_Name - + Notes_column - + Mod_Status - + Primary_Category - + Nexus_ID - + Mod_Nexus_URL - + Mod_Version - + Install_Date - + Download_File_Name - + export failed: %1 - + Open Game folder - + Open MyGames folder - + Open INIs folder - + Open Instance folder - + Open Mods folder - + Open Profile folder - + Open Downloads folder - + Open MO2 Install folder - + Open MO2 Plugins folder - + Open MO2 Logs folder - + Install Mod... - + Create empty mod - + Create Separator - + Enable all visible - + Disable all visible - + Check all for update - + Export to csv... - - + + Send to - - + + Top - - + + Bottom - - + + Priority... - + Separator... - + All Mods - + Sync to Mods... - + Clear Overwrite... - - + + Open in Explorer - + Restore Backup - + Remove Backup... - - + + Change Categories - - + + Primary Category - + Rename Separator... - + Remove Separator... - + Select Color... - + Reset Color - + Change versioning scheme - + Un-ignore update - + Ignore update - - + + Enable selected - - + + Disable selected - + Rename Mod... - + Reinstall Mod - + Remove Mod... - + Un-Endorse - + Won't endorse - + Endorsement state unknown - + Ignore missing data - + Mark as converted/working - + Visit on Nexus - + Visit web page - + Information... - - + + Exception: - - + + Unknown exception - + <All> - + <Multiple> - + %1 more - + 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. @@ -2735,12 +2826,12 @@ You can also use online editors and converters instead. - + Enable Mods... - + Delete %n save(s) @@ -2748,22 +2839,22 @@ You can also use online editors and converters instead. - + failed to remove %1 - + failed to create %1 - + Restarting MO - + Changing the managed game directory requires restarting MO. Any pending downloads will be paused. @@ -2771,335 +2862,335 @@ Click OK to restart MO now. - + Can't change download directory while downloads are in progress! - + failed to write to file %1 - + %1 written - + Select binary - + Binary - + Enter Name - + Please enter a name for the executable - + Not an executable - + This is not a recognized executable. - - + + Replace file? - + There already is a hidden version of this file. Replace it? - - + + File operation failed - - + + Failed to remove "%1". Maybe you lack the required file permissions? - + There already is a visible version of this file. Replace it? - - + + Set Priority - + Set the priority of the selected plugins - + file not found: %1 - + failed to generate preview for %1 - + Sorry, can't preview anything. This function currently does not support extracting from bsas. - + Update available - + Open/Execute - + Add as Executable - + Preview - + Un-Hide - + Hide - + Write To File... - + Do you want to endorse Mod Organizer on %1 now? - + Thank you! - + Thank you for your endorsement! - + Request to Nexus failed: %1 - - + + failed to read %1: %2 - - + + Error - + failed to extract %1 (errorcode %2) - + Extract BSA - + This archive contains invalid hashes. Some files may be broken. - + Extract... - + This will restart MO, continue? - + Edit Categories... - + Deselect filter - + Remove - + Enable all - + Disable all - + Unlock load order - + Lock load order - + Open Origin in Explorer - + Open Origin Info... - + depends on missing "%1" - + incompatible with "%1" - + Please wait while LOOT is running - + loot failed. Exit code was: %1 - + failed to start loot - + failed to run loot: %1 - + Errors occured - + Backup of load order created - + Choose backup to restore - + No Backups - + There are no backups to restore - - + + Restore failed - - + + Failed to restore the backup. Errorcode: %1 - + Backup of modlist created - + A file with the same name has already been downloaded. What would you like to do? - + Overwrite - + Rename new file - + Ignore file - + Set the priority of the selected mods @@ -4007,123 +4098,123 @@ p, li { white-space: pre-wrap; } - + drag&drop failed: %1 - + Confirm - + Are you sure you want to remove "%1"? - + Flags - + Content - + Mod Name - + Version - + Priority - + Category - + Source Game - + Nexus ID - + Installation - + Notes - - + + unknown - + Name of your mods - + Version of the mod (if available) - + Installation priority of your mod. The higher, the more "important" it is and thus overwrites files from mods with lower priority. - + Category of the mod. - + The source game which was the origin of this mod. - + Id of the mod as used on Nexus. - + Emblemes to highlight things that might require attention. - + Depicts the content of the mod:<br><table cellspacing=7><tr><td><img src=":/MO/gui/content/plugin" width=32/></td><td>Game plugins (esp/esm/esl)</td></tr><tr><td><img src=":/MO/gui/content/interface" width=32/></td><td>Interface</td></tr><tr><td><img src=":/MO/gui/content/mesh" width=32/></td><td>Meshes</td></tr><tr><td><img src=":/MO/gui/content/bsa" width=32/></td><td>BSA</td></tr><tr><td><img src=":/MO/gui/content/texture" width=32/></td><td>Textures</td></tr><tr><td><img src=":/MO/gui/content/sound" width=32/></td><td>Sounds</td></tr><tr><td><img src=":/MO/gui/content/music" width=32/></td><td>Music</td></tr><tr><td><img src=":/MO/gui/content/string" width=32/></td><td>Strings</td></tr><tr><td><img src=":/MO/gui/content/script" width=32/></td><td>Scripts (Papyrus)</td></tr><tr><td><img src=":/MO/gui/content/skse" width=32/></td><td>Script Extender plugins</td></tr><tr><td><img src=":/MO/gui/content/skyproc" width=32/></td><td>SkyProc Patcher</td></tr><tr><td><img src=":/MO/gui/content/menu" width=32/></td><td>Mod Configuration Menu</td></tr><tr><td><img src=":/MO/gui/content/inifile" width=32/></td><td>INI files</td></tr><tr><td><img src=":/MO/gui/content/modgroup" width=32/></td><td>ModGroup files</td></tr></table> - + Time this mod was installed - + User notes about the mod @@ -4131,7 +4222,7 @@ p, li { white-space: pre-wrap; } ModListSortProxy - + Drag&Drop is only supported when sorting by priority @@ -4351,81 +4442,81 @@ Continue launching %1? - + Multiple esps/esls activated, please check that they don't conflict. - + Download? - + A download has been started but no installed page plugin recognizes it. If you download anyway no information (i.e. version) will be associated with the download. Continue? - + failed to update mod list: %1 - - + + login successful - + Login failed - + Login failed, try again? - + login failed: %1. Download will not be associated with an account - + login failed: %1 - + login failed: %1. You need to log-in with Nexus to update MO. - + MO1 "Script Extender" load mechanism has left hook.dll in your game folder - - + + Description missing - + <a href="%1">hook.dll</a> has been found in your game folder (right click to copy the full path). This is most likely a leftover of setting the ModOrganizer 1 load mechanism to "Script Extender", in which case you must remove this file either by changing the load mechanism in ModOrganizer 1 or manually removing the file, otherwise the game is likely to crash and burn. - + failed to save load order: %1 - + The designated write target "%1" is not enabled. @@ -4531,135 +4622,135 @@ Continue? PluginList - + Name - + Priority - + Mod Index - + Flags - - + + unknown - + Name of your mods - + Load priority of your mod. The higher, the more "important" it is and thus overwrites data from plugins with lower priority. - + The modindex determines the formids of objects originating from this mods. - + failed to update esp info for file %1 (source id: %2), error: %3 - + esp not found: %1 - - + + Confirm - + Really enable all plugins? - + Really disable all plugins? - + The file containing locked plugin indices is broken - - + + <b>Origin</b>: %1 - + <br><b><i>This plugin can't be disabled (enforced by the game).</i></b> - + Author - + Description - + Missing Masters - + Enabled Masters - + Loads Archives - + There are Archives connected to this plugin. Their assets will be added to your game, overwriting in case of conflicts following the plugin order. Loose files will always overwrite assets from Archives. (This flag only checks for Archives from the same mod as the plugin) - + Loads INI settings - + There is an ini file connected to this plugin. Its settings will be added to your game settings, overwriting in case of conflicts. - + This ESP is flagged as an ESL. It will adhere to the ESP load order but the records will be loaded in ESL space. - + failed to restore load order for %1 @@ -4721,76 +4812,76 @@ p, li { white-space: pre-wrap; } Profile - + invalid profile name %1 - + failed to create %1 - + failed to write mod list: %1 - + failed to update tweaked ini file, wrong settings may be used: %1 - + failed to create tweaked ini: %1 - + failed to open %1 - + "%1" is missing or inaccessible - - - - - + + + + + invalid index %1 - + Overwrite directory couldn't be parsed - + invalid priority %1 - + Delete profile-specific save games? - + Do you want to delete the profile-specific save games? (If you select "No", the save games will show up again if you re-enable profile-specific save games) - + Missing profile-specific game INI files! - + Some of your profile-specific game INI files were missing. They will now be copied from the vanilla game folder. You might want double-check your settings. Missing files: @@ -4798,12 +4889,12 @@ Missing files: - + Delete profile-specific game INI files? - + Do you want to delete the profile-specific game INI files? (If you select "No", the INI files will be used again if you re-enable profile-specific game INI files.) @@ -5322,7 +5413,7 @@ If the folder was still in use, restart MO and try again. - + failed to create %1 @@ -5465,7 +5556,7 @@ If the folder was still in use, restart MO and try again. - + <Manage...> @@ -5506,12 +5597,12 @@ If the folder was still in use, restart MO and try again. - + failed to access %1 - + failed to set file time %1 @@ -6714,7 +6805,7 @@ On Windows XP: UsvfsConnector - + Preparing vfs diff --git a/src/organizercore.cpp b/src/organizercore.cpp index c4029a6d..39cb4d13 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1199,10 +1199,15 @@ QStringList OrganizerCore::modsSortedByProfilePriority() const return res; } -void OrganizerCore::spawnBinary(const QFileInfo &binary, const QString &arguments, const QDir ¤tDirectory, const QString &steamAppID, const QString &customOverwrite) +void OrganizerCore::spawnBinary(const QFileInfo &binary, + const QString &arguments, + const QDir ¤tDirectory, + const QString &steamAppID, + const QString &customOverwrite, + const QList &forcedLibraries) { DWORD processExitCode = 0; - HANDLE processHandle = spawnBinaryDirect(binary, arguments, m_CurrentProfile->name(), currentDirectory, steamAppID, customOverwrite, &processExitCode); + HANDLE processHandle = spawnBinaryDirect(binary, arguments, m_CurrentProfile->name(), currentDirectory, steamAppID, customOverwrite, forcedLibraries, &processExitCode); if (processHandle != INVALID_HANDLE_VALUE) { refreshDirectoryStructure(); // need to remove our stored load order because it may be outdated if a foreign tool changed the @@ -1227,9 +1232,10 @@ HANDLE OrganizerCore::spawnBinaryDirect(const QFileInfo &binary, const QDir ¤tDirectory, const QString &steamAppID, const QString &customOverwrite, + const QList &forcedLibraries, LPDWORD exitCode) { - HANDLE processHandle = spawnBinaryProcess(binary, arguments, profileName, currentDirectory, steamAppID, customOverwrite); + HANDLE processHandle = spawnBinaryProcess(binary, arguments, profileName, currentDirectory, steamAppID, customOverwrite, forcedLibraries); if (Settings::instance().lockGUI() && processHandle != INVALID_HANDLE_VALUE) { std::unique_ptr dlg; ILockedWaitingForProcess* uilock = nullptr; @@ -1264,7 +1270,8 @@ HANDLE OrganizerCore::spawnBinaryProcess(const QFileInfo &binary, const QString &profileName, const QDir ¤tDirectory, const QString &steamAppID, - const QString &customOverwrite) + const QString &customOverwrite, + const QList &forcedLibraries) { prepareStart(); @@ -1324,6 +1331,8 @@ HANDLE OrganizerCore::spawnBinaryProcess(const QFileInfo &binary, if (m_AboutToRun(binary.absoluteFilePath())) { try { m_USVFS.updateMapping(fileMapping(profileName, customOverwrite)); + m_USVFS.updateForcedLibraries(forcedLibraries); + } catch (const UsvfsConnectorException &e) { qDebug(e.what()); return INVALID_HANDLE_VALUE; @@ -1416,6 +1425,10 @@ HANDLE OrganizerCore::runShortcut(const MOShortcut& shortcut) .toLocal8Bit().constData()); Executable& exe = m_ExecutablesList.find(shortcut.executable()); + auto forcedLibaries = m_CurrentProfile->determineForcedLibraries(shortcut.executable()); + if (!m_CurrentProfile->forcedLibrariesEnabled(exe.m_BinaryInfo.fileName())) { + forcedLibaries.clear(); + } return spawnBinaryDirect( exe.m_BinaryInfo, exe.m_Arguments, @@ -1423,7 +1436,9 @@ HANDLE OrganizerCore::runShortcut(const MOShortcut& shortcut) exe.m_WorkingDirectory.length() != 0 ? exe.m_WorkingDirectory : exe.m_BinaryInfo.absolutePath(), - exe.m_SteamAppID, ""); + exe.m_SteamAppID, + "", + forcedLibaries); } HANDLE OrganizerCore::startApplication(const QString &executable, @@ -1444,6 +1459,7 @@ HANDLE OrganizerCore::startApplication(const QString &executable, } QString steamAppID; QString customOverwrite; + QList forcedLibraries; if (executable.contains('\\') || executable.contains('/')) { // file path @@ -1462,6 +1478,9 @@ HANDLE OrganizerCore::startApplication(const QString &executable, customOverwrite = m_CurrentProfile->setting("custom_overwrites", exe.m_Title) .toString(); + if (m_CurrentProfile->forcedLibrariesEnabled(exe.m_Title)) { + forcedLibraries = m_CurrentProfile->determineForcedLibraries(exe.m_Title); + } } catch (const std::runtime_error &) { // nop } @@ -1473,6 +1492,9 @@ HANDLE OrganizerCore::startApplication(const QString &executable, customOverwrite = m_CurrentProfile->setting("custom_overwrites", exe.m_Title) .toString(); + if (m_CurrentProfile->forcedLibrariesEnabled(exe.m_Title)) { + forcedLibraries = m_CurrentProfile->determineForcedLibraries(exe.m_Title); + } if (arguments == "") { arguments = exe.m_Arguments; } @@ -1487,7 +1509,7 @@ HANDLE OrganizerCore::startApplication(const QString &executable, } } - return spawnBinaryDirect(binary, arguments, profileName, currentDirectory, steamAppID, customOverwrite); + return spawnBinaryDirect(binary, arguments, profileName, currentDirectory, steamAppID, customOverwrite, forcedLibraries); } bool OrganizerCore::waitForApplication(HANDLE handle, LPDWORD exitCode) diff --git a/src/organizercore.h b/src/organizercore.h index 086fa11d..61020acd 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -20,6 +20,7 @@ #include #include #include +#include "executableinfo.h" class ModListSortProxy; class PluginListSortProxy; @@ -141,20 +142,23 @@ public: void spawnBinary(const QFileInfo &binary, const QString &arguments = "", const QDir ¤tDirectory = QDir(), const QString &steamAppID = "", - const QString &customOverwrite = ""); + const QString &customOverwrite = "", + const QList &forcedLibraries = QList()); HANDLE spawnBinaryDirect(const QFileInfo &binary, const QString &arguments, const QString &profileName, const QDir ¤tDirectory, const QString &steamAppID, const QString &customOverwrite, + const QList &forcedLibraries = QList(), LPDWORD exitCode = nullptr); HANDLE spawnBinaryProcess(const QFileInfo &binary, const QString &arguments, const QString &profileName, const QDir ¤tDirectory, const QString &steamAppID, - const QString &customOverwrite); + const QString &customOverwrite, + const QList &forcedLibraries = QList()); void loginSuccessfulUpdate(bool necessary); void loginFailedUpdate(const QString &message); diff --git a/src/profile.cpp b/src/profile.cpp index 09c2a5f5..02257de9 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -884,7 +884,6 @@ QVariant Profile::setting(const QString §ion, const QString &name, return m_Settings->value(section + "/" + name, fallback); } - void Profile::storeSetting(const QString §ion, const QString &name, const QVariant &value) { @@ -906,7 +905,124 @@ void Profile::removeSetting(const QString &name) removeSetting("", name); } +QVariantMap Profile::settingsByGroup(const QString §ion) const +{ + QVariantMap results; + m_Settings->beginGroup(section); + for (auto key : m_Settings->childKeys()) { + results[key] = m_Settings->value(key); + } + m_Settings->endGroup(); + return results; +} + +void Profile::storeSettingsByGroup(const QString §ion, const QVariantMap &values) +{ + m_Settings->beginGroup(section); + for (auto key : values.keys()) { + m_Settings->setValue(key, values[key]); + } + m_Settings->endGroup(); +} + +QList Profile::settingsByArray(const QString &prefix) const +{ + QList results; + int size = m_Settings->beginReadArray(prefix); + for (int i = 0; i < size; i++) { + m_Settings->setArrayIndex(i); + QVariantMap item; + for (auto key : m_Settings->childKeys()) { + item[key] = m_Settings->value(key); + } + results.append(item); + } + m_Settings->endArray(); + return results; +} + +void Profile::storeSettingsByArray(const QString &prefix, const QList &values) +{ + m_Settings->beginWriteArray(prefix); + for (int i = 0; i < values.length(); i++) { + m_Settings->setArrayIndex(i); + for (auto key : values.at(i).keys()) { + m_Settings->setValue(key, values.at(i)[key]); + } + } + m_Settings->endArray(); +} + int Profile::getPriorityMinimum() const { return m_ModIndexByPriority.begin()->first; } + +bool Profile::forcedLibrariesEnabled(const QString &executable) +{ + return setting("forced_libraries", executable + "/enabled", false).toBool(); +} + +void Profile::setForcedLibrariesEnabled(const QString &executable, bool enabled) +{ + storeSetting("forced_libraries", executable + "/enabled", enabled); +} + +QList Profile::determineForcedLibraries(const QString &executable) +{ + QList results; + + auto rawSettings = settingsByArray("forced_libraries/" + executable); + auto forcedLoads = m_GamePlugin->executableForcedLoads(); + + // look for enabled status on forced loads and add those + for (auto forcedLoad : forcedLoads) { + bool found = false; + for (auto rawSetting : rawSettings) { + if ((rawSetting.value("process").toString().compare(forcedLoad.process(), Qt::CaseInsensitive) == 0) + && (rawSetting.value("library").toString().compare(forcedLoad.library(), Qt::CaseInsensitive) == 0)) + { + results.append(forcedLoad.withEnabled(rawSetting.value("enabled", false).toBool())); + found = true; + } + } + if (!found) { + results.append(forcedLoad); + } + } + + // add everything else + for (auto rawSetting : rawSettings) { + bool add = true; + for (auto forcedLoad : forcedLoads) { + if ((rawSetting.value("process").toString().compare(forcedLoad.process(), Qt::CaseInsensitive) == 0) + && (rawSetting.value("library").toString().compare(forcedLoad.library(), Qt::CaseInsensitive) == 0)) + { + add = false; + } + } + if (add) { + results.append( + ExecutableForcedLoadSetting( + rawSetting.value("process").toString(), + rawSetting.value("library").toString() + ).withEnabled(rawSetting.value("enabled", false).toBool()) + ); + } + } + + return results; +} + +void Profile::saveForcedLibraries(const QString &executable, const QList &values) +{ + QList rawSettings; + for (auto setting : values) { + QVariantMap rawSetting; + rawSetting["enabled"] = setting.enabled(); + rawSetting["process"] = setting.process(); + rawSetting["library"] = setting.library(); + rawSettings.append(rawSetting); + } + storeSettingsByArray("forced_libraries/" + executable, rawSettings); +} diff --git a/src/profile.h b/src/profile.h index 95a5c59d..d7fb7785 100644 --- a/src/profile.h +++ b/src/profile.h @@ -24,12 +24,14 @@ along with Mod Organizer. If not, see . #include "modinfo.h" #include #include +#include "executableinfo.h" #include #include #include #include #include +#include #include @@ -310,8 +312,19 @@ public: void removeSetting(const QString §ion, const QString &name = QString()); void removeSetting(const QString &name); + QVariantMap settingsByGroup(const QString §ion) const; + void storeSettingsByGroup(const QString §ion, const QVariantMap &values); + + QList settingsByArray(const QString &prefix) const; + void storeSettingsByArray(const QString &prefix, const QList &values); + int getPriorityMinimum() const; + bool forcedLibrariesEnabled(const QString &executable); + void setForcedLibrariesEnabled(const QString &executable, bool enabled); + QList determineForcedLibraries(const QString &executable); + void saveForcedLibraries(const QString &executable, const QList &values); + signals: /** diff --git a/src/settings.cpp b/src/settings.cpp index 5cfe427b..f981f811 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -161,8 +161,8 @@ void Settings::managedGameChanged(IPluginGame const *gamePlugin) void Settings::registerPlugin(IPlugin *plugin) { m_Plugins.push_back(plugin); - m_PluginSettings.insert(plugin->name(), QMap()); - m_PluginDescriptions.insert(plugin->name(), QMap()); + m_PluginSettings.insert(plugin->name(), QVariantMap()); + m_PluginDescriptions.insert(plugin->name(), QVariantMap()); for (const PluginSetting &setting : plugin->settings()) { QVariant temp = m_Settings.value("Plugins/" + plugin->name() + "/" + setting.key, setting.defaultValue); if (!temp.convert(setting.defaultValue.type())) { diff --git a/src/settings.h b/src/settings.h index 25f22911..a47c255c 100644 --- a/src/settings.h +++ b/src/settings.h @@ -543,8 +543,8 @@ private: std::vector m_Plugins; - QMap> m_PluginSettings; - QMap> m_PluginDescriptions; + QMap m_PluginSettings; + QMap m_PluginDescriptions; QSet m_PluginBlacklist; diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index b975fa75..3032a6c6 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -307,7 +307,7 @@ void SettingsDialog::on_resetDialogsButton_clicked() void SettingsDialog::storeSettings(QListWidgetItem *pluginItem) { if (pluginItem != nullptr) { - QMap settings = pluginItem->data(Qt::UserRole + 1).toMap(); + QVariantMap settings = pluginItem->data(Qt::UserRole + 1).toMap(); for (int i = 0; i < ui->pluginSettingsList->topLevelItemCount(); ++i) { const QTreeWidgetItem *item = ui->pluginSettingsList->topLevelItem(i); @@ -328,8 +328,8 @@ void SettingsDialog::on_pluginsList_currentItemChanged(QListWidgetItem *current, ui->versionLabel->setText(plugin->version().canonicalString()); ui->descriptionLabel->setText(plugin->description()); - QMap settings = current->data(Qt::UserRole + 1).toMap(); - QMap descriptions = current->data(Qt::UserRole + 2).toMap(); + QVariantMap settings = current->data(Qt::UserRole + 1).toMap(); + QVariantMap descriptions = current->data(Qt::UserRole + 2).toMap(); ui->pluginSettingsList->setEnabled(settings.count() != 0); for (auto iter = settings.begin(); iter != settings.end(); ++iter) { QTreeWidgetItem *newItem = new QTreeWidgetItem(QStringList(iter.key())); diff --git a/src/usvfsconnector.cpp b/src/usvfsconnector.cpp index ef7314c0..5ad19fb0 100644 --- a/src/usvfsconnector.cpp +++ b/src/usvfsconnector.cpp @@ -138,6 +138,8 @@ UsvfsConnector::UsvfsConnector() BlacklistExecutable(buf.data()); } + ClearLibraryForceLoads(); + m_LogWorker.moveToThread(&m_WorkerThread); connect(&m_WorkerThread, SIGNAL(started()), &m_LogWorker, SLOT(process())); @@ -203,7 +205,8 @@ void UsvfsConnector::updateMapping(const MappingType &mapping) */ } -void UsvfsConnector::updateParams(int logLevel, int crashDumpsType, QString executableBlacklist) { +void UsvfsConnector::updateParams(int logLevel, int crashDumpsType, QString executableBlacklist) +{ USVFSUpdateParams(::logLevel(logLevel), ::crashDumpsType(crashDumpsType)); ClearExecutableBlacklist(); for (auto exec : executableBlacklist.split(";")) { @@ -211,3 +214,16 @@ void UsvfsConnector::updateParams(int logLevel, int crashDumpsType, QString exec BlacklistExecutable(buf.data()); } } + +void UsvfsConnector::updateForcedLibraries(const QList &forcedLibraries) +{ + ClearLibraryForceLoads(); + for (auto setting : forcedLibraries) { + if (setting.enabled()) { + ForceLoadLibrary( + setting.process().toStdWString().data(), + setting.library().toStdWString().data() + ); + } + } +} diff --git a/src/usvfsconnector.h b/src/usvfsconnector.h index 3aefb703..8a88bde5 100644 --- a/src/usvfsconnector.h +++ b/src/usvfsconnector.h @@ -27,7 +27,9 @@ along with Mod Organizer. If not, see . #include #include #include +#include #include +#include "executableinfo.h" class LogWorker : public QThread { @@ -83,6 +85,7 @@ public: void updateMapping(const MappingType &mapping); void updateParams(int logLevel, int crashDumpsType, QString executableBlacklist); + void updateForcedLibraries(const QList &forcedLibraries); private: -- cgit v1.3.1 From 96b6677ed9d3b647e30bb40d7bb820f1894edbca Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 11 Jan 2019 03:14:41 -0600 Subject: Fixes to library load widget --- src/editexecutablesdialog.cpp | 5 +++-- src/editexecutablesdialog.h | 4 ++++ src/forcedloaddialog.cpp | 9 +++++---- src/forcedloaddialog.h | 4 +++- src/forcedloaddialogwidget.cpp | 33 +++++++++++++++++++++++++++------ src/forcedloaddialogwidget.h | 5 ++++- src/forcedloaddialogwidget.ui | 12 ++++++++++++ src/mainwindow.cpp | 3 ++- 8 files changed, 60 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp index 212993f1..4b1cdb5d 100644 --- a/src/editexecutablesdialog.cpp +++ b/src/editexecutablesdialog.cpp @@ -33,12 +33,13 @@ using namespace MOShared; EditExecutablesDialog::EditExecutablesDialog( const ExecutablesList &executablesList, const ModList &modList, - Profile *profile, QWidget *parent) + Profile *profile, const IPluginGame *game, QWidget *parent) : TutorableDialog("EditExecutables", parent) , ui(new Ui::EditExecutablesDialog) , m_CurrentItem(nullptr) , m_ExecutablesList(executablesList) , m_Profile(profile) + , m_GamePlugin(game) { ui->setupUi(this); @@ -139,7 +140,7 @@ void EditExecutablesDialog::delayedRefresh() void EditExecutablesDialog::on_forceLoadButton_clicked() { - ForcedLoadDialog dialog(this); + ForcedLoadDialog dialog(m_GamePlugin, this); dialog.setValues(m_ForcedLibraries); if (dialog.exec() == QDialog::Accepted) { m_ForcedLibraries = dialog.values(); diff --git a/src/editexecutablesdialog.h b/src/editexecutablesdialog.h index 82e63e15..0169b8ca 100644 --- a/src/editexecutablesdialog.h +++ b/src/editexecutablesdialog.h @@ -25,6 +25,7 @@ along with Mod Organizer. If not, see . #include #include "executableslist.h" #include "profile.h" +#include "iplugingame.h" namespace Ui { class EditExecutablesDialog; @@ -52,6 +53,7 @@ public: explicit EditExecutablesDialog(const ExecutablesList &executablesList, const ModList &modList, Profile *profile, + const MOBase::IPluginGame *game, QWidget *parent = 0); ~EditExecutablesDialog(); @@ -114,6 +116,8 @@ private: Profile *m_Profile; QList m_ForcedLibraries; + + const MOBase::IPluginGame *m_GamePlugin; }; #endif // EDITEXECUTABLESDIALOG_H diff --git a/src/forcedloaddialog.cpp b/src/forcedloaddialog.cpp index ad30a58c..ab0bd583 100644 --- a/src/forcedloaddialog.cpp +++ b/src/forcedloaddialog.cpp @@ -8,9 +8,10 @@ using namespace MOBase; -ForcedLoadDialog::ForcedLoadDialog(QWidget *parent) : +ForcedLoadDialog::ForcedLoadDialog(const IPluginGame *game, QWidget *parent) : QDialog(parent), - ui(new Ui::ForcedLoadDialog) + ui(new Ui::ForcedLoadDialog), + m_GamePlugin(game) { ui->setupUi(this); } @@ -25,7 +26,7 @@ void ForcedLoadDialog::setValues(QList &val ui->tableWidget->clearContents(); for (int i = 0; i < values.count(); i++) { - ForcedLoadDialogWidget *item = new ForcedLoadDialogWidget(this); + ForcedLoadDialogWidget *item = new ForcedLoadDialogWidget(m_GamePlugin, this); item->setEnabled(values[i].enabled()); item->setProcess(values[i].process()); item->setLibraryPath(values[i].library()); @@ -59,7 +60,7 @@ void ForcedLoadDialog::on_addRowButton_clicked() { int row = ui->tableWidget->rowCount(); ui->tableWidget->insertRow(row); - ForcedLoadDialogWidget *item = new ForcedLoadDialogWidget(this); + ForcedLoadDialogWidget *item = new ForcedLoadDialogWidget(m_GamePlugin, this); ui->tableWidget->setCellWidget(row, 0, item); ui->tableWidget->resizeRowsToContents(); } diff --git a/src/forcedloaddialog.h b/src/forcedloaddialog.h index 68460d91..6a88bccf 100644 --- a/src/forcedloaddialog.h +++ b/src/forcedloaddialog.h @@ -5,6 +5,7 @@ #include #include "executableinfo.h" +#include "iplugingame.h" namespace Ui { class ForcedLoadDialog; @@ -15,7 +16,7 @@ class ForcedLoadDialog : public QDialog Q_OBJECT public: - explicit ForcedLoadDialog(QWidget *parent = nullptr); + explicit ForcedLoadDialog(const MOBase::IPluginGame *game, QWidget *parent = nullptr); ~ForcedLoadDialog(); void setValues(QList &values); @@ -27,6 +28,7 @@ private slots: private: Ui::ForcedLoadDialog *ui; + const MOBase::IPluginGame *m_GamePlugin; }; #endif // FORCEDLOADDIALOG_H diff --git a/src/forcedloaddialogwidget.cpp b/src/forcedloaddialogwidget.cpp index 61805068..10069c35 100644 --- a/src/forcedloaddialogwidget.cpp +++ b/src/forcedloaddialogwidget.cpp @@ -5,9 +5,12 @@ #include "executableinfo.h" -ForcedLoadDialogWidget::ForcedLoadDialogWidget(QWidget *parent) : +using namespace MOBase; + +ForcedLoadDialogWidget::ForcedLoadDialogWidget(const IPluginGame *game, QWidget *parent) : QWidget(parent), - ui(new Ui::ForcedLoadDialogWidget) + ui(new Ui::ForcedLoadDialogWidget), + m_GamePlugin(game) { ui->setupUi(this); } @@ -68,20 +71,38 @@ void ForcedLoadDialogWidget::on_enabledBox_toggled() void ForcedLoadDialogWidget::on_libraryPathBrowseButton_clicked() { - QDir gameDir("D:/Games/Steam Library/steamapps/common/Fallout 4"); + QDir gameDir(m_GamePlugin->gameDirectory()); QString startPath = gameDir.absolutePath(); QString result = QFileDialog::getOpenFileName(nullptr, "Select a library...", startPath, "Dynamic link library (*.dll)", nullptr, QFileDialog::ReadOnly); if (!result.isEmpty()) { - ui->libraryPathEdit->setText(result); + QFileInfo fileInfo(result); + QString relativePath = gameDir.relativeFilePath(fileInfo.filePath()); + QString filePath = fileInfo.filePath(); + if (!relativePath.startsWith("..")) { + filePath = relativePath; + } + + if (fileInfo.exists()) { + ui->libraryPathEdit->setText(filePath); + } else { + qCritical("%ls does not exist", filePath.toStdWString().c_str()); + } } } void ForcedLoadDialogWidget::on_processBrowseButton_clicked() { - QDir gameDir("D:/Games/Steam Library/steamapps/common/Fallout 4"); + QDir gameDir(m_GamePlugin->gameDirectory()); QString startPath = gameDir.absolutePath(); QString result = QFileDialog::getOpenFileName(nullptr, "Select a process...", startPath, "Executable (*.exe)", nullptr, QFileDialog::ReadOnly); if (!result.isEmpty()) { - ui->processEdit->setText(QFile(result).fileName()); + QFileInfo fileInfo(result); + QString fileName = fileInfo.fileName(); + + if (fileInfo.exists()) { + ui->processEdit->setText(fileName); + } else { + qCritical("%ls does not exist", fileInfo.filePath().toStdWString().c_str()); + } } } diff --git a/src/forcedloaddialogwidget.h b/src/forcedloaddialogwidget.h index 06ad0009..eb7c3f4d 100644 --- a/src/forcedloaddialogwidget.h +++ b/src/forcedloaddialogwidget.h @@ -2,6 +2,7 @@ #define FORCEDLOADDIALOGWIDGET_H #include +#include "iplugingame.h" namespace Ui { class ForcedLoadDialogWidget; @@ -12,7 +13,7 @@ class ForcedLoadDialogWidget : public QWidget Q_OBJECT public: - explicit ForcedLoadDialogWidget(QWidget *parent = nullptr); + explicit ForcedLoadDialogWidget(const MOBase::IPluginGame *game, QWidget *parent = nullptr); ~ForcedLoadDialogWidget(); bool getEnabled(); @@ -33,6 +34,8 @@ private slots: private: Ui::ForcedLoadDialogWidget *ui; bool m_Forced; + const MOBase::IPluginGame *m_GamePlugin; + }; #endif // FORCEDLOADDIALOGWIDGET_H diff --git a/src/forcedloaddialogwidget.ui b/src/forcedloaddialogwidget.ui index 4df78beb..d4766489 100644 --- a/src/forcedloaddialogwidget.ui +++ b/src/forcedloaddialogwidget.ui @@ -22,6 +22,12 @@ + + If checked, the specified library will be force loaded for the specified process. + + + If checked, the specified library will be force loaded for the specified process. + @@ -73,6 +79,12 @@ + + The path to the library to be loaded. This may be a path relative to the managed game's directory or may be an absolute path to somewhere else. + + + The path to the library to be loaded. This may be a path relative to the managed game's directory or may be an absolute path to somewhere else. + Library to load diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0ebad6ae..144d2371 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2069,7 +2069,8 @@ bool MainWindow::modifyExecutablesDialog() try { EditExecutablesDialog dialog(*m_OrganizerCore.executablesList(), *m_OrganizerCore.modList(), - m_OrganizerCore.currentProfile()); + m_OrganizerCore.currentProfile(), + m_OrganizerCore.managedGame()); QSettings &settings = m_OrganizerCore.settings().directInterface(); QString key = QString("geometry/%1").arg(dialog.objectName()); if (settings.contains(key)) { -- cgit v1.3.1 From 2d78ac26c85bd7432e3aa80b59adc71190f04929 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 11 Jan 2019 03:15:21 -0600 Subject: Change version to 2.1.7alpha6 --- src/version.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/version.rc b/src/version.rc index 92a70360..83a2eb5a 100644 --- a/src/version.rc +++ b/src/version.rc @@ -4,7 +4,7 @@ // Otherwise, if letters are used in VER_FILEVERSION_STR, uses the full MOBase::VersionInfo parser // Otherwise, uses the numbers from VER_FILEVERSION and sets the release type as pre-alpha #define VER_FILEVERSION 2,1,7 -#define VER_FILEVERSION_STR "2.1.7alpha5\0" +#define VER_FILEVERSION_STR "2.1.7alpha6\0" VS_VERSION_INFO VERSIONINFO FILEVERSION VER_FILEVERSION -- cgit v1.3.1 From cc7c3adcad973949ac976c3dc71bb8cf2677056c Mon Sep 17 00:00:00 2001 From: Al Date: Fri, 11 Jan 2019 13:50:51 +0100 Subject: Fix or ignore a number of compiler warnings. --- src/aboutdialog.ui | 10 +++++----- src/overwriteinfodialog.cpp | 2 +- src/pluginlist.cpp | 2 +- src/selfupdater.cpp | 3 +-- src/settings.cpp | 2 +- src/shared/leaktrace.cpp | 13 ++++++++++++- src/spawn.cpp | 2 +- 7 files changed, 22 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/aboutdialog.ui b/src/aboutdialog.ui index ac7db1fc..86b95c83 100644 --- a/src/aboutdialog.ui +++ b/src/aboutdialog.ui @@ -161,7 +161,7 @@ - + QAbstractItemView::NoSelection @@ -202,7 +202,7 @@ - + QAbstractItemView::NoSelection @@ -231,9 +231,9 @@ Translators - + - + QAbstractItemView::NoSelection @@ -363,7 +363,7 @@ Other Supporters && Contributors - + diff --git a/src/overwriteinfodialog.cpp b/src/overwriteinfodialog.cpp index 1fe3f645..4d35a2c3 100644 --- a/src/overwriteinfodialog.cpp +++ b/src/overwriteinfodialog.cpp @@ -220,7 +220,7 @@ void OverwriteInfoDialog::openFile(const QModelIndex &index) QString fileName = m_FileSystemModel->filePath(index); HINSTANCE res = ::ShellExecuteW(nullptr, L"open", ToWString(fileName).c_str(), nullptr, nullptr, SW_SHOW); - if ((int)res <= 32) { + if ((INT_PTR)res <= 32) { qCritical("failed to invoke %s: %d", fileName.toUtf8().constData(), res); } } diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 6f417331..25f9c545 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -153,7 +153,7 @@ void PluginList::highlightPlugins(const QItemSelectionModel *selection, const MO } } } - emit dataChanged(this->index(0, 0), this->index(m_ESPs.size() - 1, this->columnCount() - 1)); + emit dataChanged(this->index(0, 0), this->index(static_cast(m_ESPs.size()) - 1, this->columnCount() - 1)); } void PluginList::refresh(const QString &profileName diff --git a/src/selfupdater.cpp b/src/selfupdater.cpp index c913af6a..b5e7684c 100644 --- a/src/selfupdater.cpp +++ b/src/selfupdater.cpp @@ -338,9 +338,8 @@ void SelfUpdater::installUpdate() } else { reportError(tr("Failed to start %1: %2") .arg(m_UpdateFile.fileName()) - .arg((int)res)); + .arg((INT_PTR)res)); } - m_UpdateFile.remove(); } diff --git a/src/settings.cpp b/src/settings.cpp index f981f811..9267cccf 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -142,7 +142,7 @@ void Settings::registerAsNXMHandler(bool force) } parameters += L" \"" + executable + L"\""; HINSTANCE res = ::ShellExecuteW(nullptr, L"open", nxmPath.c_str(), parameters.c_str(), nullptr, SW_SHOWNORMAL); - if ((int)res <= 32) { + if ((INT_PTR)res <= 32) { QMessageBox::critical(nullptr, tr("Failed"), tr("Sorry, failed to start the helper application")); } diff --git a/src/shared/leaktrace.cpp b/src/shared/leaktrace.cpp index 1ff1fa9d..466162a4 100644 --- a/src/shared/leaktrace.cpp +++ b/src/shared/leaktrace.cpp @@ -1,3 +1,8 @@ +//disable warning messages 4302 , 4311 and 4312 +#pragma warning( disable : 4302 ) +#pragma warning( disable : 4311 ) +#pragma warning( disable : 4312 ) + #include "leaktrace.h" #include "stackdata.h" #include @@ -31,7 +36,7 @@ static struct __TraceData { for (auto iter = result.begin(); iter != result.end(); ++iter) { printf("-----------------------------------\n" "%d objects not freed, allocated at:\n%s", - iter->second.size(), iter->first.toString().c_str()); + static_cast(iter->second.size()), iter->first.toString().c_str()); printf("Addresses: "); for (int i = 0; i < (std::min)(5, static_cast(iter->second.size())); ++i) { @@ -55,3 +60,9 @@ void LeakTrace::TraceDealloc(void *ptr) { __trace.deregTrace(ptr); } + +//re-enable warning messages 4302 , 4311 and 4312 +#pragma warning( default : 4302 ) +#pragma warning( default : 4311 ) +#pragma warning( default : 4312 ) + diff --git a/src/spawn.cpp b/src/spawn.cpp index f8a7bb5f..e1de5c0f 100644 --- a/src/spawn.cpp +++ b/src/spawn.cpp @@ -94,7 +94,7 @@ static bool spawn(LPCWSTR binary, LPCWSTR arguments, LPCWSTR currentDirectory, PROCESS_INFORMATION pi; BOOL success = FALSE; if (hooked) { - qDebug() << "Creating process hooked: <" << QString::fromWCharArray(commandLine, length) <<">"; + qDebug() << "Creating process hooked: <" << QString::fromWCharArray(commandLine, static_cast(length)) <<">"; success = ::CreateProcessHooked(nullptr, commandLine, nullptr, nullptr, // no special process or thread attributes -- cgit v1.3.1 From 04a4346dc83a370f87c5aaa0c30a62bfc6d66411 Mon Sep 17 00:00:00 2001 From: Al Date: Fri, 11 Jan 2019 14:02:19 +0100 Subject: Save version even after downgrading. Otherwise the downgrade warning will appear forever. --- src/mainwindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 144d2371..a0cfd0a0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1836,12 +1836,14 @@ void MainWindow::processUpdates() { } } - if (currentVersion > lastVersion) - settings.setValue("version", currentVersion.toString()); - else if (currentVersion < lastVersion) + if (currentVersion > lastVersion) { + //NOP + } else if (currentVersion < lastVersion) qWarning() << tr("Notice: Your current MO version (%1) is lower than the previously used one (%2). " "The GUI may not downgrade gracefully, so you may experience oddities. " "However, there should be no serious issues.").arg(currentVersion.toString()).arg(lastVersion.toString()).toStdWString(); + //save version in all case + settings.setValue("version", currentVersion.toString()); } void MainWindow::storeSettings(QSettings &settings) { -- cgit v1.3.1 From f1572a2fc43d888b81da25689fc92e49f4fc046b Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 11 Jan 2019 07:56:28 -0600 Subject: Fix regex warning --- src/organizercore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 39cb4d13..4e399ac7 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1911,7 +1911,7 @@ void OrganizerCore::requestDownload(const QUrl &url, QNetworkReply *reply) QString gameName = ""; int modID = 0; int fileID = 0; - QRegExp nameExp("www\.nexusmods\.com/(\\a+)/"); + QRegExp nameExp("www\\.nexusmods\\.com/(\\a+)/"); if (nameExp.indexIn(url.toString()) != -1) { gameName = nameExp.cap(1); } -- cgit v1.3.1 From aa934e5fb31b74fcf2820b3b055188d80746062d Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 11 Jan 2019 08:10:53 -0600 Subject: Update Paper Automata theme to A2-2.0 --- src/stylesheets/Paper Automata.qss | 138 +++++++++++++++++++++++++------------ 1 file changed, 95 insertions(+), 43 deletions(-) (limited to 'src') diff --git a/src/stylesheets/Paper Automata.qss b/src/stylesheets/Paper Automata.qss index 572d3313..3c20e940 100644 --- a/src/stylesheets/Paper Automata.qss +++ b/src/stylesheets/Paper Automata.qss @@ -1,5 +1,5 @@ -/* v1.1 Paper Automata by 6788-00 */ -/* https://6788-00.tumblr.com/ */ +/* v2.0 Paper Automata by 6788-00 */ +/* https://6788-00.tumblr.com/ */ /* Color Palette */ /* Background - Main | #CDC8B0 */ @@ -55,6 +55,10 @@ QAbstractItemView { selection-color: #4E4B42; } +QAbstractItemView::item { + min-height: 22px; +} + QAbstractItemView::item:hover { /* rows on left and right pane when moused-over */ background: #B4AF9A; @@ -233,7 +237,7 @@ QGroupBox::title { background: transparent; subcontrol-origin: padding; subcontrol-position: top left; - padding: 8px; + padding: 4px 8px; } /* Text Fields */ @@ -335,90 +339,90 @@ QPushButton::menu-indicator { /* Icons */ -QPushButton#listOptionsBtn { +#listOptionsBtn { /* Options button */ qproperty-icon: url(./Paper/Automata/dots.svg); qproperty-iconSize: 16px; padding-left: 2px; } -QPushButton#openFolderMenu { +#openFolderMenu { /* Open Folder button */ qproperty-icon: url(./Paper/Automata/folder.svg); qproperty-iconSize: 14px; padding-left: 4px; } -QPushButton#restoreModsButton, -QPushButton#restoreButton { +#restoreModsButton, +#restoreButton { /* Restore Backup buttons */ qproperty-icon: url(./Paper/Automata/restore.svg); qproperty-iconSize: 14px; } -QPushButton#saveModsButton, -QPushButton#saveButton { +#saveModsButton, +#saveButton { /* Backup buttons */ qproperty-icon: url(./Paper/Automata/backup.svg); qproperty-iconSize: 14px; } -QPushButton#bossButton { +#bossButton { /* Sort button */ qproperty-icon: url(./Paper/Automata/sort.svg); qproperty-iconSize: 14px; } -QPushButton#linkButton { +#linkButton { /* Shortcuts button */ qproperty-icon: url(./Paper/Automata/shortcut.svg); qproperty-iconSize: 14px; } -QPushButton#btnRefreshData, -QPushButton#refreshButton { +#btnRefreshData, +#refreshButton { /* Refresh buttons */ qproperty-icon: url(./Paper/Automata/refresh.svg); qproperty-iconSize: 14px; } -QPushButton#endorseBtn { +#endorseBtn { /* Endorse button on the Nexus Info tab of the Information window */ qproperty-icon: url(./Paper/Automata/heart.svg); qproperty-iconSize: 14px; } -QPushButton#clearCacheButton { +#clearCacheButton { /* Clear Cache button on the Nexus tab of the Settings window */ qproperty-icon: url(./Paper/Automata/cross.svg); qproperty-iconSize: 14px; } -QToolButton#deactivateESP, -QToolButton#activateESP { +#deactivateESP, +#activateESP { /* activate and deactivate ESP buttons */ background: #DAD4BB; } -QToolButton:hover#deactivateESP, -QToolButton:hover#activateESP { +#deactivateESP:hover, +#activateESP:hover { /* activate and deactivate ESP buttons when moused-over */ background: #B4AF9A; } -QToolButton#deactivateESP { +#deactivateESP { /* icon for the deactivate ESP button */ qproperty-icon: url(./Paper/Automata/backup.svg); } -QToolButton#activateESP { +#activateESP { /* icon for the activate ESP button */ qproperty-icon: url(./Paper/Automata/restore-alt.svg); } /* Run button */ -QPushButton#startButton { +#startButton { /* Run button */ background: #4E4B42; color: #DAD4BB; @@ -427,7 +431,7 @@ QPushButton#startButton { padding: 6px; } -QPushButton:hover#startButton { +#startButton:hover { /* Run button when moused-over*/ background: #B4AF9A; color: #4E4B42; @@ -671,7 +675,7 @@ QToolTip { QProgressBar { /* progress bars when downloading */ - background: #DAD4BB; + background: transparent; text-align: center; border: 0px; margin: 0px 10px; @@ -747,7 +751,7 @@ QTabBar QToolButton:disabled { QLCDNumber { /* LCD number on the Conflicts tab */ background: #DAD4BB; - color: #CD664D; + color: #4E4B42; border: none; } @@ -791,7 +795,7 @@ QRadioButton::indicator:unchecked:hover { QTreeView::indicator:unchecked:selected, QRadioButton::indicator:unchecked:selected { /* a checkbox that is unchecked when clicked */ - image: url(./Paper/Automata/unchecked-alt.svg); + border: 2px solid #DAD4BB; } QTreeView::indicator:checked, @@ -887,52 +891,100 @@ QSlider::handle:hover { /* Downloads Tab */ -QWidget#downloadTab QAbstractScrollArea, +#downloadTab QAbstractScrollArea, DownloadListWidget { /* background of the entire downloads tab */ - background: transparent; + background: #DAD4BB; } -DownloadListWidget::item:!selected { +DownloadListWidget QFrame, +DownloadListWidgetCompact, +DownloadListWidgetCompact QLabel { + /* an entry on the Downloads tab */ background: #DAD4BB; } -DownloadListWidget[downloadView=standard]::item { - padding: 15px; - margin-bottom: 2px; +DownloadListWidget#frame { + /* outer box of an entry on the Downloads tab */ + border: 2px solid #DAD4BB; } -QProgressBar[downloadView=standard] { - margin: 4px 0px 6px 0px; +#installLabel { + /* installed/done label */ + color: none; +} + +DownloadListWidgetCompact, +DownloadListWidgetCompact QLabel { + /* an entry on the Downloads tab */ + background: #DAD4BB; } -/* Compact Downloads View */ +/* New Downloads View */ + +DownloadListWidget[downloadView=standard]::item { + /* Entries on the Standard Downloads View */ + min-height: 44px; + margin: -16px 0; +} DownloadListWidget[downloadView=compact]::item { - padding: 4px 4px 6px 4px; - margin-bottom: 2px; + /* Entries on the Compact Downloads View */ + min-height: 22px; + margin: -4px 0; +} + +QProgressBar[downloadView=standard] { + /* Progress Bars on the Standard Downloads View */ + background: transparent; + margin: 11px 0; } QProgressBar[downloadView=compact] { - margin: 1px 0px 3px 0px; + /* Progress Bars on the Compact Downloads View */ + background: transparent; } /* Categories Filter */ -QPushButton#displayCategoriesBtn { +#displayCategoriesBtn { /* Filter button */ min-width: 12px; } -QTreeWidget#categoriesList { +#categoriesList { /* Categories panel */ min-width: 200px; margin-bottom: 4px; } -QGroupBox#categoriesGroup { +#categoriesGroup { /* Categories group box */ - padding-bottom: 0px; + padding-bottom: 0; + margin-top: 3px; +} + +/* Fixes */ + +#executablesListBox { + /* Increase right margin of the select executables box */ + margin-right: 8px; +} + +#stepsStack QWidget { + /* Groupboxes on the FOMOD Installer Dialog */ + background: #CDC8B0; + border: none; +} + +#stepsStack QGroupBox { + /* Fix to reimplement styling for Groupboxes on the FOMOD Installer dialog */ + border: 2px solid #4E4B42; +} + +#activeModslabel, #activePluginsLabel { + /* Increase the left margin of the counters */ + padding-left: 6px; } -/* For the Glory of Mankind */ \ No newline at end of file +/* For the Glory of Mankind */ -- cgit v1.3.1 From 9c721c08ebd28250afcfb00abcfeaac1693dca36 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 11 Jan 2019 08:11:13 -0600 Subject: Update Paper Dark and Paper Light themes to 5.0 --- src/stylesheets/Paper Dark by 6788.qss | 101 ++++++++++----- src/stylesheets/Paper Light by 6788.qss | 98 +++++++++------ src/stylesheets/Paper/Dark/check.svg | 10 +- src/stylesheets/Paper/Dark/highlight.svg | 205 +++++++++++++++++++++++++++++++ 4 files changed, 341 insertions(+), 73 deletions(-) create mode 100644 src/stylesheets/Paper/Dark/highlight.svg (limited to 'src') diff --git a/src/stylesheets/Paper Dark by 6788.qss b/src/stylesheets/Paper Dark by 6788.qss index ae6ea77b..9b07e3fb 100644 --- a/src/stylesheets/Paper Dark by 6788.qss +++ b/src/stylesheets/Paper Dark by 6788.qss @@ -1,4 +1,4 @@ -/* v4.3 Paper Dark by 6788-00 */ +/* v5.0 Paper Dark by 6788-00 */ /* https://6788-00.tumblr.com/ */ /* Color Palette */ @@ -39,7 +39,7 @@ QAbstractItemView { } QAbstractItemView::item { - padding: 1px; + min-height: 22px; } QAbstractItemView::item:hover { @@ -190,14 +190,14 @@ QListView::item:hover { /* a row on the saves tab when moused-over */ background: #3D3D3D; color: #FFFFFF; - padding: 2px 0px; + padding: 0; } QListView::item:selected { /* a row on the saves tab when clicked */ background: #006868; color: #FFFFFF; - padding: 2px 0px; + padding: 0; } QTextEdit { @@ -206,12 +206,6 @@ QTextEdit { border-radius: 6px; } -QWebView { - /* Nexus Info window */ - background: #141414; - border-radius: 6px; -} - /* Group Boxes */ QGroupBox { @@ -682,6 +676,7 @@ QToolTip { QProgressBar { /* progress bars when downloading */ background: #141414; + color: #FFFFFF; text-align: center; border: 2px solid #242424; border-radius: 6px; @@ -705,10 +700,6 @@ QTabWidget::pane { border-radius: 10px; } -QTabWidget QAbstractScrollArea::item { - padding: 2px; -} - QTabWidget::tab-bar { /* tabs */ alignment: center; @@ -781,6 +772,7 @@ QLCDNumber { background: #141414; color: #006868; border-radius: 6px; + } /* Tables (Configure Mod Categories) */ @@ -912,37 +904,65 @@ QSlider::handle:hover { background: #3D3D3D; } -/* Downloads Tab */ +/* Pre-v2.1.7 Downloads Tab */ #downloadTab QAbstractScrollArea { /* background of the entire downloads tab */ - background: #242424; + background: #141414; +} + +DownloadListWidget QFrame, +DownloadListWidgetCompact, +DownloadListWidgetCompact QLabel { + /* an entry on the Downloads tab */ + background: #141414; +} + +DownloadListWidget#frame { + /* outer box of an entry on the Downloads tab */ + border: none; +} + +#installLabel { + /* installed/done label */ + color: none; +} + +DownloadListWidgetCompact, +DownloadListWidgetCompact QLabel { + /* an entry on the Downloads tab in Compact View */ + background: #141414; } +/* New Downloads View */ + DownloadListWidget[downloadView=standard]::item { - padding: 15px; - border-bottom: 2px solid #666666; + /* Entries on the Standard Downloads View */ + min-height: 44px; + margin: -16px 0; +} + +DownloadListWidget[downloadView=compact]::item { + /* Entries on the Compact Downloads View */ + min-height: 22px; + margin: -4px 0; } QProgressBar[downloadView=standard] { + /* Progress Bars on the Standard Downloads View */ background: transparent; - border: 2px solid #666666; - border-radius: 8px; - margin: 4px 0px 6px 0px; + margin: 11px 0; } -/* Compact Downloads View */ - -DownloadListWidget[downloadView=compact]::item { - padding: 3px; - border-bottom: 2px solid #666666; +QProgressBar[downloadView=standard]::chunk, +QProgressBar[downloadView=compact]::chunk { + /* The Loading Portion of Progress Bars on the Downloads View */ + border-right: 2px solid #242424; } QProgressBar[downloadView=compact] { + /* Progress Bars on the Compact Downloads View */ background: transparent; - border: 2px solid gray; - border-radius: 8px; - margin: 1px 0px 3px 0px; } /* Categories Filter */ @@ -965,7 +985,28 @@ QProgressBar[downloadView=compact] { /* Fixes */ +#executablesListBox { + /* Increase right margin of the select executables box */ + margin-right: 8px; +} + #executablesListBox::item { /* fixes the black text problem on the Modify Executables window */ color: #D3D3D3; -} \ No newline at end of file +} + +#stepsStack QWidget { + /* Groupboxes on the FOMOD Installer Dialog */ + border: none; +} + +#stepsStack QGroupBox { + /* Fix to reimplement styling for Groupboxes on the FOMOD Installer dialog */ + border: 2px solid #141414; + border-radius: 10px; +} + +#activeModslabel, #activePluginsLabel { + /* Increase the left margin of the counters */ + padding-left: 6px; +} diff --git a/src/stylesheets/Paper Light by 6788.qss b/src/stylesheets/Paper Light by 6788.qss index 5e69b79d..d78c26ea 100644 --- a/src/stylesheets/Paper Light by 6788.qss +++ b/src/stylesheets/Paper Light by 6788.qss @@ -1,4 +1,4 @@ -/* v4.3 Paper Light by 6788-00 */ +/* v5.0 Paper Light by 6788-00 */ /* https://6788-00.tumblr.com/ */ /* Color Palette */ @@ -38,6 +38,10 @@ QAbstractItemView { selection-color: #FFFFFF; } +QAbstractItemView::item { + min-height: 22px; +} + QAbstractItemView::item:hover { /* rows on left and right pane when moused-over */ background: #C2C2C2; @@ -187,22 +191,17 @@ QListView { border-radius: 6px; } -QListView::item { - /* Increases the line height of the Saves tab */ - padding: 2px 0px; -} - QListView::item:hover { /* uncertain, assumed: rows on the saves window when moused-over */ background: #C2C2C2; - padding: 2px 0px; + padding: 0; } QListView::item:selected { /*uncertain, assumed: rows on the saves window when clicked */ background: #008484; color: #FFFFFF; - padding: 2px 0px; + padding: 0; } QTextEdit { @@ -211,12 +210,6 @@ QTextEdit { border-radius: 6px; } -QWebView { - /* Nexus Info window */ - background: #FFFFFF; - border-radius: 6px; -} - /* Group Boxes */ QGroupBox { @@ -680,9 +673,10 @@ QToolTip { border-radius: 6px; } -/* Progress Bars */ +/* Progress Bars (Downloads) */ QProgressBar { + /* progress bars when downloading */ background: #FFFFFF; text-align: center; border: 0px; @@ -707,10 +701,6 @@ QTabWidget::pane { border-radius: 10px; } -QTabWidget QAbstractScrollArea::item { - padding: 2px; -} - QTabWidget::tab-bar { /* tabs */ alignment: center; @@ -921,37 +911,46 @@ QSlider::handle:hover { background: #008484; } -/* Downloads Tab */ +/* Pre-v2.1.7 Downloads Tab */ #downloadTab QAbstractScrollArea { /* background of the entire downloads tab */ - background: #EBEBEB; + background: #FFFFFF; } -DownloadListWidget[downloadView=standard]::item { - padding: 15px; - border-bottom: 2px solid #BBBBBB; +DownloadListWidget QFrame, +DownloadListWidgetCompact, +DownloadListWidgetCompact QLabel { + /* an entry on the Downloads tab */ + background: #FFFFFF; } -QProgressBar[downloadView=standard] { - background: transparent; - border: 2px solid gray; - border-radius: 8px; - margin: 4px 0px 6px 0px; +DownloadListWidget #frame { + /* outer box of an entry on the Downloads tab */ + border: none; +} + +#installLabel { + /* installed/done label */ + color: none; } -/* Compact Downloads View */ +DownloadListWidgetCompact, +DownloadListWidgetCompact QLabel { + /* an entry on the Downloads tab in Compacts View*/ + background: #FFFFFF; +} -DownloadListWidget[downloadView=compact]::item { - padding: 3px; - border-bottom: 2px solid #BBBBBB; +/* New Downloads View */ + +DownloadListWidget[downloadView=standard]::item { + /* an entry on the Downloads view */ + min-height: 44px; } -QProgressBar[downloadView=compact] { - background: transparent; - border: 2px solid gray; - border-radius: 8px; - margin: 1px 0px 3px 0px; +QProgressBar[downloadView=standard] { + /* a progress bar on the Downloads view */ + margin: 11px 0; } /* Categories Filter */ @@ -970,4 +969,27 @@ QProgressBar[downloadView=compact] { #categoriesGroup { /* Categories group box */ padding-bottom: 0px; +} + +/* Fixes */ + +#executablesListBox { + /* Increase right margin of the select executables box */ + margin-right: 8px; +} + +#stepsStack QWidget { + /* Groupboxes on the FOMOD Installer Dialog */ + border: none; +} + +#stepsStack QGroupBox { + /* Fix to reimplement styling for Groupboxes on the FOMOD Installer dialog */ + border: 2px solid #EBEBEB; + border-radius: 10px; +} + +#activeModslabel, #activePluginsLabel { + /* Increase the left margin of the counters */ + padding-left: 6px; } \ No newline at end of file diff --git a/src/stylesheets/Paper/Dark/check.svg b/src/stylesheets/Paper/Dark/check.svg index 101ee45e..2d113294 100644 --- a/src/stylesheets/Paper/Dark/check.svg +++ b/src/stylesheets/Paper/Dark/check.svg @@ -17,7 +17,7 @@ inkscape:export-filename="D:\Bethesda Game Modding\Mod Organizer 2\stylesheets\Paper\Dark\dots.png" inkscape:export-xdpi="307.20001" inkscape:export-ydpi="307.20001" - inkscape:version="0.92.1 r15371" + inkscape:version="0.92.3 (2405546, 2018-03-11)" sodipodi:docname="check.svg"> @@ -28,9 +28,9 @@ borderopacity="1.0" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:zoom="24.357491" - inkscape:cx="1.6266143" - inkscape:cy="5.0770231" + inkscape:zoom="11.625" + inkscape:cx="-3.537598" + inkscape:cy="-2.9645926" inkscape:document-units="px" inkscape:current-layer="layer25" showgrid="false" @@ -42,7 +42,7 @@ inkscape:bbox-nodes="true" inkscape:snap-bbox-edge-midpoints="true" inkscape:snap-bbox-midpoints="true" - showguides="true" + showguides="false" inkscape:guide-bbox="true" inkscape:window-width="1920" inkscape:window-height="1027" diff --git a/src/stylesheets/Paper/Dark/highlight.svg b/src/stylesheets/Paper/Dark/highlight.svg new file mode 100644 index 00000000..9dee51d8 --- /dev/null +++ b/src/stylesheets/Paper/Dark/highlight.svg @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + -- cgit v1.3.1 From e9c35cad2e5f3554114bf431996d84e49b8248f2 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 11 Jan 2019 09:02:06 -0600 Subject: Update translation file --- src/organizer_en.ts | 817 +++++++++++++++++++++++++++------------------------- 1 file changed, 422 insertions(+), 395 deletions(-) (limited to 'src') diff --git a/src/organizer_en.ts b/src/organizer_en.ts index 4291f3ae..5eef32ba 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -1016,7 +1016,7 @@ Right now the only case I know of where this needs to be overwritten is for the - + Add @@ -1037,54 +1037,54 @@ Right now the only case I know of where this needs to be overwritten is for the - + Select a binary - + Executable (%1) - + Java (32-bit) required - + MO requires 32-bit java to run this application. If you already have it installed, select javaw.exe from that installation as the binary. - + Select a directory - + Confirm - + Really remove "%1" from executables? - + Modify - - + + Save Changes? - - + + You made changes to the current executable, do you want to save them? @@ -1174,36 +1174,48 @@ Right now the only case I know of where this needs to be overwritten is for the - - - The name of the process that should be forced to load a library. + + + If checked, the specified library will be force loaded for the specified process. + + The name of the process that should be forced to load a library. + + + + Process name - - + + Browse for a process. - - + + ... - + + + The path to the library to be loaded. This may be a path relative to the managed game's directory or may be an absolute path to somewhere else. + + + + Library to load - - + + Browse for a library. @@ -1314,58 +1326,58 @@ p, li { white-space: pre-wrap; } - + File format "%1" not supported - + None of the available installer plugins were able to handle that archive. This is likely due to a corrupted or incompatible download or unrecognized archive format. - + no error - + 7z.dll not found - + 7z.dll isn't valid - + archive not found - + failed to open archive - + unsupported archive type - + internal library error - + archive invalid - + unknown archive error @@ -1548,7 +1560,7 @@ p, li { white-space: pre-wrap; } - + Create Backup @@ -1724,8 +1736,8 @@ p, li { white-space: pre-wrap; } - - + + Refresh @@ -1909,7 +1921,7 @@ p, li { white-space: pre-wrap; } - + Update @@ -1950,7 +1962,7 @@ Right now this has very limited functionality - + Endorse Mod Organizer @@ -2018,8 +2030,8 @@ Error: %1 - - + + Endorse @@ -2109,716 +2121,726 @@ Error: %1 - + Also in: <br> - + No conflict - + <Edit...> - + This bsa is enabled in the ini file so it may be required! - + Activating Network Proxy - + Notice: Your current MO version (%1) is lower than the previously used one (%2). The GUI may not downgrade gracefully, so you may experience oddities. However, there should be no serious issues. - + Choose Mod - + Mod Archive - + Start Tutorial? - + You're about to start a tutorial. For technical reasons it's not possible to end the tutorial early. Continue? - + failed to spawn notepad.exe: %1 - + failed to change origin name: %1 - + failed to move "%1" from mod "%2" to "%3": %4 - + <Contains %1> - + <Checked> - + <Unchecked> - + <Update> - + <Mod Backup> - + <Managed by MO> - + <Managed outside MO> - + <No category> - + <Conflicted> - + <Not Endorsed> - + failed to rename mod: %1 - + Overwrite? - + This will replace the existing mod "%1". Continue? - + failed to remove mod "%1" - - - + + + failed to rename "%1" to "%2" - - - - + + + + Confirm - + Remove the following mods?<br><ul>%1</ul> - + failed to remove mod: %1 - - + + Failed - + Installation file no longer exists - + Mods installed with old versions of MO can't be reinstalled in this way. - + Failed to create backup. - + You need to be logged in with Nexus to resume a download - - - - + + + + You need to be logged in with Nexus to endorse - - + + Endorsing multiple mods will take a while. Please wait... - - + + Unendorsing multiple mods will take a while. Please wait... - + Failed to display overwrite dialog: %1 - + Opening Nexus Links - + You are trying to open %1 links to Nexus Mods. Are you sure you want to do this? - + Nexus ID for this Mod is unknown - + + Opening Web Pages + + + + + You are trying to open %1 Web Pages. Are you sure you want to do this? + + + + Web page for this mod is unknown - + <table cellspacing="5"><tr><th>Type</th><th>All</th><th>Visible</th><tr><td>Enabled mods:&emsp;</td><td align=right>%1 / %2</td><td align=right>%3 / %4</td></tr><tr><td>Unmanaged/DLCs:&emsp;</td><td align=right>%5</td><td align=right>%6</td></tr><tr><td>Mod backups:&emsp;</td><td align=right>%7</td><td align=right>%8</td></tr><tr><td>Separators:&emsp;</td><td align=right>%9</td><td align=right>%10</td></tr></table> - + <table cellspacing="6"><tr><th>Type</th><th>Active </th><th>Total</th></tr><tr><td>All plugins:</td><td align=right>%1 </td><td align=right>%2</td></tr><tr><td>ESMs:</td><td align=right>%3 </td><td align=right>%4</td></tr><tr><td>ESPs:</td><td align=right>%7 </td><td align=right>%8</td></tr><tr><td>ESMs+ESPs:</td><td align=right>%9 </td><td align=right>%10</td></tr><tr><td>ESLs:</td><td align=right>%5 </td><td align=right>%6</td></tr></table> - - - + + + Create Mod... - + This will create an empty mod. Please enter a name: - - + + A mod with this name already exists - + Create Separator... - + This will create a new separator. Please enter a name: - + A separator with this name already exists - + This will move all files from overwrite into a new, regular mod. Please enter a name: - - + + Are you sure? - + About to recursively delete: - + Not logged in, endorsement information will be wrong - + Continue? - + The versioning scheme decides which version is considered newer than another. This function will guess the versioning scheme under the assumption that the installed version is outdated. - - + + Sorry - + I don't know a versioning scheme where %1 is newer than %2. - + Really enable all visible mods? - + Really disable all visible mods? - + Export to csv - + CSV (Comma Separated Values) is a format that can be imported in programs like Excel to create a spreadsheet. You can also use online editors and converters instead. - + Select what mods you want export: - + All installed mods - + Only active (checked) mods from your current profile - + All currently visible mods in the mod list - + Choose what Columns to export: - + Mod_Priority - + Mod_Name - + Notes_column - + Mod_Status - + Primary_Category - + Nexus_ID - + Mod_Nexus_URL - + Mod_Version - + Install_Date - + Download_File_Name - + export failed: %1 - + Open Game folder - + Open MyGames folder - + Open INIs folder - + Open Instance folder - + Open Mods folder - + Open Profile folder - + Open Downloads folder - + Open MO2 Install folder - + Open MO2 Plugins folder - + Open MO2 Logs folder - + Install Mod... - + Create empty mod - + Create Separator - + Enable all visible - + Disable all visible - + Check all for update - + Export to csv... - - + + Send to - - + + Top - - + + Bottom - - + + Priority... - + Separator... - + All Mods - + Sync to Mods... - + Clear Overwrite... - - + + Open in Explorer - + Restore Backup - + Remove Backup... - - + + Change Categories - - + + Primary Category - + Rename Separator... - + Remove Separator... - + Select Color... - + Reset Color - + Change versioning scheme - + Un-ignore update - + Ignore update - - + + Enable selected - - + + Disable selected - + Rename Mod... - + Reinstall Mod - + Remove Mod... - + Un-Endorse - + Won't endorse - + Endorsement state unknown - + Ignore missing data - + Mark as converted/working - + Visit on Nexus - + Visit web page - + Information... - - + + Exception: - - + + Unknown exception - + <All> - + <Multiple> - + %1 more - + 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. @@ -2826,12 +2848,12 @@ You can also use online editors and converters instead. - + Enable Mods... - + Delete %n save(s) @@ -2839,22 +2861,22 @@ You can also use online editors and converters instead. - + failed to remove %1 - + failed to create %1 - + Restarting MO - + Changing the managed game directory requires restarting MO. Any pending downloads will be paused. @@ -2862,335 +2884,335 @@ Click OK to restart MO now. - + Can't change download directory while downloads are in progress! - + failed to write to file %1 - + %1 written - + Select binary - + Binary - + Enter Name - + Please enter a name for the executable - + Not an executable - + This is not a recognized executable. - - + + Replace file? - + There already is a hidden version of this file. Replace it? - - + + File operation failed - - + + Failed to remove "%1". Maybe you lack the required file permissions? - + There already is a visible version of this file. Replace it? - - + + Set Priority - + Set the priority of the selected plugins - + file not found: %1 - + failed to generate preview for %1 - + Sorry, can't preview anything. This function currently does not support extracting from bsas. - + Update available - + Open/Execute - + Add as Executable - + Preview - + Un-Hide - + Hide - + Write To File... - + Do you want to endorse Mod Organizer on %1 now? - + Thank you! - + Thank you for your endorsement! - + Request to Nexus failed: %1 - - + + failed to read %1: %2 - - + + Error - + failed to extract %1 (errorcode %2) - + Extract BSA - + This archive contains invalid hashes. Some files may be broken. - + Extract... - + This will restart MO, continue? - + Edit Categories... - + Deselect filter - + Remove - + Enable all - + Disable all - + Unlock load order - + Lock load order - + Open Origin in Explorer - + Open Origin Info... - + depends on missing "%1" - + incompatible with "%1" - + Please wait while LOOT is running - + loot failed. Exit code was: %1 - + failed to start loot - + failed to run loot: %1 - + Errors occured - + Backup of load order created - + Choose backup to restore - + No Backups - + There are no backups to restore - - + + Restore failed - - + + Failed to restore the backup. Errorcode: %1 - + Backup of modlist created - + A file with the same name has already been downloaded. What would you like to do? - + Overwrite - + Rename new file - + Ignore file - + Set the priority of the selected mods @@ -3562,41 +3584,46 @@ p, li { white-space: pre-wrap; } - + + Web page URL (only used if invalid NexusID) : + + + + Notes - - - + + + Enter comments about the mod here. These are displayed in the notes column of the mod list. - - - + + + Enter notes about the mod here. These can be viewed in the mod list by hovering over the notes column or the flags column. - + Filetree - + Open Mod in Explorer - + A directory view of this mod - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -3606,288 +3633,288 @@ p, li { white-space: pre-wrap; } - + Previous - + Next - + Close - + &Delete - + &Rename - + &Hide - + &Unhide - + &Open - + &New Folder - - + + Save changes? - - + + Save changes to "%1"? - + File Exists - + A file with that name exists, please enter a new one - + failed to move file - + failed to create directory "optional" - - + + Info requested, please wait - + Main - + Update - + Optional - + Old - + Misc - + Unknown - + Current Version: %1 - + No update available - + (description incomplete, please visit nexus) - + <a href="%1">Visit on Nexus</a> - + Failed to delete %1 - - - - + + + + Confirm - - + + Are sure you want to delete "%1"? - - + + Are sure you want to delete the selected files? - - + + New Folder - + Failed to create "%1" - - + + Replace file? - + There already is a hidden version of this file. Replace it? - - + + File operation failed - - + + Failed to remove "%1". Maybe you lack the required file permissions? - - + + failed to rename %1 to %2 - + There already is a visible version of this file. Replace it? - + Select binary - + Binary - + file not found: %1 - + failed to generate preview for %1 - + Sorry - + Sorry, can't preview anything. This function currently does not support extracting from bsas. - + Un-Hide - + Hide - - + + Open/Execute - - + + Preview - + Name - + Please enter a name - - + + Error - + Invalid name. Must be a valid file name - + A tweak by that name exists - + Create Tweak @@ -4388,135 +4415,135 @@ p, li { white-space: pre-wrap; } - + Executable "%1" not found - + Start Steam? - + Steam is required to be running already to correctly start the game. Should MO try to start steam now? - + Error - + Windows Event Log Error - + The Windows Event Log service is disabled and/or not running. This prevents USVFS from running properly. Your mods may not be working in the executable that you are launching. Note that you may have to restart MO and/or your PC after the service is fixed. Continue launching %1? - + Blacklisted Executable - + The executable you are attempted to launch is blacklisted in the virtual file system. This will likely prevent the executable, and any executables that are launched by this one, from seeing any mods. This could extend to INI files, save games and any other virtualized files. Continue launching %1? - + No profile set - + Failed to refresh list of esps: %1 - + Multiple esps/esls activated, please check that they don't conflict. - + Download? - + A download has been started but no installed page plugin recognizes it. If you download anyway no information (i.e. version) will be associated with the download. Continue? - + failed to update mod list: %1 - - + + login successful - + Login failed - + Login failed, try again? - + login failed: %1. Download will not be associated with an account - + login failed: %1 - + login failed: %1. You need to log-in with Nexus to update MO. - + MO1 "Script Extender" load mechanism has left hook.dll in your game folder - - + + Description missing - + <a href="%1">hook.dll</a> has been found in your game folder (right click to copy the full path). This is most likely a leftover of setting the ModOrganizer 1 load mechanism to "Script Extender", in which case you must remove this file either by changing the load mechanism in ModOrganizer 1 or manually removing the file, otherwise the game is likely to crash and burn. - + failed to save load order: %1 - + The designated write target "%1" is not enabled. @@ -5555,13 +5582,13 @@ If the folder was still in use, restart MO and try again. - - + + <Manage...> - + failed to parse profile %1: %2 @@ -5815,7 +5842,7 @@ Select Show Details option to see the full change-log. - + Error -- cgit v1.3.1 From b41c99b742bbb9eee854f177a26da3218f24f2ac Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 11 Jan 2019 10:29:47 -0600 Subject: Remove window title of widget --- src/forcedloaddialogwidget.ui | 3 --- src/organizer_en.ts | 23 +++++++++-------------- 2 files changed, 9 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/forcedloaddialogwidget.ui b/src/forcedloaddialogwidget.ui index d4766489..4be215eb 100644 --- a/src/forcedloaddialogwidget.ui +++ b/src/forcedloaddialogwidget.ui @@ -16,9 +16,6 @@ 0 - - Form - diff --git a/src/organizer_en.ts b/src/organizer_en.ts index 5eef32ba..91faa4d0 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -1169,53 +1169,48 @@ Right now the only case I know of where this needs to be overwritten is for the ForcedLoadDialogWidget - - Form - - - + - If checked, the specified library will be force loaded for the specified process. + - The name of the process that should be forced to load a library. - + Process name + - Browse for a process. - - + + ... + - The path to the library to be loaded. This may be a path relative to the managed game's directory or may be an absolute path to somewhere else. - + Library to load + - Browse for a library. -- cgit v1.3.1 From 64a242d9220868a5b564c32f75f191efb01ad18e Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 11 Jan 2019 16:21:43 -0600 Subject: Remove profile-specific executable settings when removing the executable --- src/editexecutablesdialog.cpp | 4 +++- src/profile.cpp | 7 ++++++- src/profile.h | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp index 4b1cdb5d..bea497ef 100644 --- a/src/editexecutablesdialog.cpp +++ b/src/editexecutablesdialog.cpp @@ -124,7 +124,7 @@ void EditExecutablesDialog::saveExecutable() m_Profile->removeSetting("custom_overwrites", ui->titleEdit->text()); } - m_Profile->saveForcedLibraries(ui->titleEdit->text(), m_ForcedLibraries); + m_Profile->storeForcedLibraries(ui->titleEdit->text(), m_ForcedLibraries); m_Profile->setForcedLibrariesEnabled(ui->titleEdit->text(), ui->forceLoadCheckBox->isChecked()); } @@ -218,6 +218,8 @@ void EditExecutablesDialog::on_removeButton_clicked() { if (QMessageBox::question(this, tr("Confirm"), tr("Really remove \"%1\" from executables?").arg(ui->titleEdit->text()), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { + m_Profile->removeSetting("custom_overwrites", ui->titleEdit->text()); + m_Profile->removeForcedLibraries(ui->titleEdit->text()); m_ExecutablesList.remove(ui->titleEdit->text()); } diff --git a/src/profile.cpp b/src/profile.cpp index 02257de9..afe6fdc7 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -1014,7 +1014,7 @@ QList Profile::determineForcedLibraries(const QStri return results; } -void Profile::saveForcedLibraries(const QString &executable, const QList &values) +void Profile::storeForcedLibraries(const QString &executable, const QList &values) { QList rawSettings; for (auto setting : values) { @@ -1026,3 +1026,8 @@ void Profile::saveForcedLibraries(const QString &executable, const QListremove("forced_libraries/" + executable); +} diff --git a/src/profile.h b/src/profile.h index d7fb7785..dea933ad 100644 --- a/src/profile.h +++ b/src/profile.h @@ -323,7 +323,8 @@ public: bool forcedLibrariesEnabled(const QString &executable); void setForcedLibrariesEnabled(const QString &executable, bool enabled); QList determineForcedLibraries(const QString &executable); - void saveForcedLibraries(const QString &executable, const QList &values); + void storeForcedLibraries(const QString &executable, const QList &values); + void removeForcedLibraries(const QString &executable); signals: -- cgit v1.3.1 From d24519501fdba4fb5418da3f99e2b36ccef07826 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 11 Jan 2019 17:51:09 -0600 Subject: Delete the settings array before writing a new one --- src/editexecutablesdialog.cpp | 1 + src/modinfodialog.cpp | 1 + src/modinforegular.cpp | 1 + src/organizercore.cpp | 1 + src/settings.cpp | 1 + 5 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp index bea497ef..78e1accb 100644 --- a/src/editexecutablesdialog.cpp +++ b/src/editexecutablesdialog.cpp @@ -124,6 +124,7 @@ void EditExecutablesDialog::saveExecutable() m_Profile->removeSetting("custom_overwrites", ui->titleEdit->text()); } + m_Profile->removeForcedLibraries(ui->titleEdit->text()); m_Profile->storeForcedLibraries(ui->titleEdit->text(), m_ForcedLibraries); m_Profile->setForcedLibrariesEnabled(ui->titleEdit->text(), ui->forceLoadCheckBox->isChecked()); } diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index ed77f596..40fae0e4 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -562,6 +562,7 @@ void ModInfoDialog::openIniFile(const QString &fileName) void ModInfoDialog::saveIniTweaks() { + m_Settings->remove("INI Tweaks"); m_Settings->beginWriteArray("INI Tweaks"); int countEnabled = 0; diff --git a/src/modinforegular.cpp b/src/modinforegular.cpp index 45c3985b..185f0495 100644 --- a/src/modinforegular.cpp +++ b/src/modinforegular.cpp @@ -162,6 +162,7 @@ void ModInfoRegular::saveMeta() metaFile.setValue("endorsed", m_EndorsedState); } + metaFile.remove("installedFiles"); metaFile.beginWriteArray("installedFiles"); int idx = 0; for (auto iter = m_InstalledFileIDs.begin(); iter != m_InstalledFileIDs.end(); ++iter) { diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 4e399ac7..e72b9a50 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -907,6 +907,7 @@ MOBase::IModInterface *OrganizerCore::createMod(GuessedValue &name) settingsFile.setValue("category", 0); settingsFile.setValue("installationFile", ""); + settingsFile.remove("installedFiles"); settingsFile.beginWriteArray("installedFiles", 0); settingsFile.endArray(); } diff --git a/src/settings.cpp b/src/settings.cpp index 9267cccf..c4228f65 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -592,6 +592,7 @@ void Settings::addBlacklistPlugin(const QString &fileName) void Settings::writePluginBlacklist() { + m_Settings.remove("pluginBlacklist"); m_Settings.beginWriteArray("pluginBlacklist"); int idx = 0; for (const QString &plugin : m_PluginBlacklist) { -- cgit v1.3.1 From 029da32412da206ee263634a071a8c90ef64b584 Mon Sep 17 00:00:00 2001 From: Al Date: Sat, 12 Jan 2019 11:48:36 +0100 Subject: Added Parchment theme by TheBobAbides. --- src/stylesheets/Parchment v1.1 by Bob.qss | 587 +++++++++++++++++++++ .../Parchment/checkbox-alt-unchecked-hover.png | Bin 0 -> 283 bytes .../Parchment/checkbox-alt-unchecked.png | Bin 0 -> 253 bytes .../Parchment/checkbox-checked-disabled.png | Bin 0 -> 309 bytes .../Parchment/checkbox-checked-hover.png | Bin 0 -> 339 bytes src/stylesheets/Parchment/checkbox-checked.png | Bin 0 -> 319 bytes src/stylesheets/Parchment/checkbox-disabled.png | Bin 0 -> 259 bytes src/stylesheets/Parchment/checkbox-hover.png | Bin 0 -> 339 bytes src/stylesheets/Parchment/checkbox.png | Bin 0 -> 259 bytes 9 files changed, 587 insertions(+) create mode 100644 src/stylesheets/Parchment v1.1 by Bob.qss create mode 100644 src/stylesheets/Parchment/checkbox-alt-unchecked-hover.png create mode 100644 src/stylesheets/Parchment/checkbox-alt-unchecked.png create mode 100644 src/stylesheets/Parchment/checkbox-checked-disabled.png create mode 100644 src/stylesheets/Parchment/checkbox-checked-hover.png create mode 100644 src/stylesheets/Parchment/checkbox-checked.png create mode 100644 src/stylesheets/Parchment/checkbox-disabled.png create mode 100644 src/stylesheets/Parchment/checkbox-hover.png create mode 100644 src/stylesheets/Parchment/checkbox.png (limited to 'src') diff --git a/src/stylesheets/Parchment v1.1 by Bob.qss b/src/stylesheets/Parchment v1.1 by Bob.qss new file mode 100644 index 00000000..da3546d1 --- /dev/null +++ b/src/stylesheets/Parchment v1.1 by Bob.qss @@ -0,0 +1,587 @@ +/* v1.1 Parchment by Bob */ + + +/* Special Thanks */ + +/* Parchment is based on Paper Themes for Mod Organizer 2 by 6788 +https://www.nexusmods.com/skyrim/mods/64439 +https://6788-00.tumblr.com/ + +and + +************************************* + Skyrim +**************************************** + Author: chintsu_kun + Version: 1.1.2 + Licence: GNU General Public License v3.0 (https://www.gnu.org/licenses/gpl-3.0.en.html) + Url: http://www.nexusmods.com/skyrim/mods/73817/? + +**************************************** + +For the Checkbox Coding and for the Picture Files which I Edited in Paint 3D */ + +/* Main Window */ + +QWidget { + background: #DBD399; + color: #000000; +} + +QWidget:disabled { + background: #DBD399; + color: #baae94; +} + +QMainWindow::separator { + border: 0px; +} + +QAbstractItemView { + background: #F7F6CF; + alternate-background-color: #EFE9BA; + show-decoration-selected: 1; + selection-background-color: #0CA6FF; + selection-color: #F7F6CF; +} + +QAbstractItemView::item:hover { + background: #008F8F; + color: #F7F6CF; +} + +QAbstractItemView::item:selected { + background: #0CA6FF; + color: #F7F6CF; +} + +QAbstractScrollArea::corner { + background: #F7F6CF; + border: 2px solid #DBD399; + border-bottom-right-radius: 6px; + margin: 0px -2px -2px 0px; +} + +/* Toolbar */ + +QToolBar { + background: #DBD399; + border: 1px solid #DBD399; +} + +QToolBar::separator { + background: #DBD399; +} + +QToolButton { + background: #F7F6CF; + padding: 4px 6px; + border-radius: 6px; + margin: 4px 4px 0px 4px; +} + +QToolButton:hover { + background: #008F8F; +} + +QToolButton:pressed { + background: #0CA6FF; +} + +/* Left Pane & File Trees */ + +QTreeView { + border-radius: 6px; +} + +QTreeView::branch:hover { + background: #008F8F; + color: #F7F6CF; +} + +QTreeView::branch:selected { + background: #0CA6FF; + color: #F7F6CF; +} + +QTreeView::item:selected { + background: #0CA6FF; + color: #F7F6CF; +} + +QTreeView::branch:has-children:!has-siblings:closed, +QTreeView::branch:closed:has-children:has-siblings { + image: url(:/stylesheet/branch-closed.png); + border: 0px; +} + +QTreeView::branch:open:has-children:!has-siblings, +QTreeView::branch:open:has-children:has-siblings { + image: url(:/stylesheet/branch-open.png); + border: 0px; +} + +QListView { + border-radius: 6px; +} + +QListView::item:hover { + background: #008F8F; + color: #F7F6CF; +} + +QListView::item:selected { + background: #0CA6FF; + color: #F7F6CF; +} + +QTextEdit { + background: #F7F6CF; + border-radius: 6px; +} + +QWebView { + background: #F7F6CF; + border-radius: 6px; +} + +/* Group Boxes */ + +QGroupBox { + padding: 24px 4px; + border: 2px solid #F7F6CF; + border-radius: 10px; +} + +QGroupBox::title { + subcontrol-origin: padding; + subcontrol-position: top left; + padding: 8px; +} + +/* Checkboxes and Radio buttons common #QCheckBox, #QRadioButton */ +/*common*/ +QGroupBox::indicator, +QTreeView::indicator, + +QCheckBox::indicator { + background-color: transparent; + border: none; + width: 14px; + height: 14px; +} + +QGroupBox::indicator:checked, QGroupBox::indicator:indeterminate, +QTreeView::indicator:checked, +QTreeView::indicator:indeterminate, +QCheckBox::indicator:checked, + +QCheckBox::indicator:indeterminate { + image: url(./Parchment/checkbox-checked.png); +} + +QGroupBox::indicator:checked:hover, QGroupBox::indicator:indeterminate:hover, +QTreeView::indicator:checked:hover, +QTreeView::indicator:indeterminate:hover, +QCheckBox::indicator:checked:hover, + +QCheckBox::indicator:indeterminate:hover { + image: url(./Parchment/checkbox-checked-hover.png); +} + + QGroupBox::indicator:checked:disabled, QGroupBox::indicator:indeterminate:disabled, + QTreeView::indicator:checked:disabled, + QTreeView::indicator:indeterminate:disabled, + QCheckBox::indicator:checked:disabled, + + QCheckBox::indicator:indeterminate:disabled { + image: url(./Parchment/checkbox-checked-disabled.png); +} + + QGroupBox::indicator:unchecked, + QTreeView::indicator:unchecked, + + QCheckBox::indicator:unchecked { + image: url(./Parchment/checkbox.png); +} + + QGroupBox::indicator:unchecked:hover, + QTreeView::indicator:unchecked:hover, + + QCheckBox::indicator:unchecked:hover { + image: url(./Parchment/checkbox-hover.png); +} + + QGroupBox::indicator:unchecked:disabled, + QTreeView::indicator:unchecked:disabled, + + QCheckBox::indicator:unchecked:disabled { + image: url(./Parchment/checkbox-disabled.png); +} + +/* Search Boxes */ + +QLineEdit { + background: #F7F6CF; + min-height: 14px; + padding: 2px; + border: 2px solid #F7F6CF; + border-radius: 6px; + margin-top: 3px; +} + +QLineEdit:hover { + border: 2px solid #008F8F; +} + +/* Most Dropdowns */ + +QComboBox { + background: #F7F6CF; + min-height: 20px; + padding-left: 5px; + border: 2px solid #F7F6CF; + border-radius: 6px; + margin: 3px 0px 1px 0px; +} + +QComboBox:hover { + border: 2px solid #008F8F; +} + +QComboBox:on { + background: #0CA6FF; + color: #F7F6CF; + border: 2px solid #0CA6FF; +} + +QComboBox::drop-down { + width: 20px; + subcontrol-origin: padding; + subcontrol-position: top right; + border: none; +} + +QComboBox QAbstractItemView { + border: 0px; +} + +QComboBox::down-arrow { + image: url(:/stylesheet/combobox-down.png); +} + +/* Most Buttons */ + +QPushButton { + background: #F7F6CF; + color: #000000; + min-height: 28px; + padding: 4px 22px; + border-radius: 9px; +} + +QPushButton:hover { + background: #008F8F; + color: #F7F6CF; +} + +QPushButton:pressed { + background: #0CA6FF; + color: #F7F6CF; +} + +QPushButton:checked { + background: #0CA6FF; + color: #0CA6FF; + margin: 4px; +} + +/* Scroll Bars */ + +/* Horizontal */ + +QScrollBar:horizontal { + background: #F7F6CF; + height: 20px; + border: 2px solid #DBD399; + margin: 0px 23px -2px 23px; +} + +QScrollBar::handle:horizontal { + background: #DBD399; + min-width: 32px; + border-radius: 6px; + margin: 2px; +} + +QScrollBar::add-line:horizontal { + background: #F7F6CF; + width: 23px; + subcontrol-position: right; + subcontrol-origin: margin; + border: 2px solid #DBD399; + margin: 0px -2px -2px 0px; +} + +QScrollBar::sub-line:horizontal { + background: #F7F6CF; + width: 23px; + subcontrol-position: left; + subcontrol-origin: margin; + border: 2px solid #DBD399; + border-bottom-left-radius: 6px; + margin: 0px 0px -2px -2px; +} + +/* Vertical */ + +QScrollBar:vertical { + background: #F7F6CF; + width: 20px; + border: 2px solid #DBD399; + margin: 23px -2px 23px 0px; +} + +QScrollBar::handle:vertical { + background: #DBD399; + min-height: 32px; + border-radius: 6px; + margin: 2px; +} + +QScrollBar::add-line:vertical { + background: #F7F6CF; + height: 23px; + subcontrol-position: bottom; + subcontrol-origin: margin; + border: 2px solid #DBD399; + border-bottom-right-radius: 6px; + margin: 0px -2px -2px 0px; +} + +QScrollBar::sub-line:vertical { + background: #F7F6CF; + height: 23px; + subcontrol-position: top; + subcontrol-origin: margin; + border: 2px solid #DBD399; + border-top-right-radius: 6px; + margin: -2px -2px 0px 0px; +} + +/* Combined */ + +QScrollBar::handle:horizontal:hover, +QScrollBar::handle:vertical:hover, +QScrollBar::add-line:horizontal:hover, +QScrollBar::sub-line:horizontal:hover, +QScrollBar::add-line:vertical:hover, +QScrollBar::sub-line:vertical:hover { + background: #008F8F; +} + +QScrollBar::handle:horizontal:pressed, +QScrollBar::handle:vertical:pressed, +QScrollBar::add-line:horizontal:pressed, +QScrollBar::sub-line:horizontal:pressed, +QScrollBar::add-line:vertical:pressed, +QScrollBar::sub-line:vertical:pressed { + background: #0CA6FF; +} + +QScrollBar::add-page:horizontal, +QScrollBar::sub-page:horizontal, +QScrollBar::add-page:vertical, +QScrollBar::sub-page:vertical { + background: transparent; +} + +QScrollBar::up-arrow:vertical, +QScrollBar::right-arrow:horizontal, +QScrollBar::down-arrow:vertical, +QScrollBar::left-arrow:horizontal { + height: 1px; + width: 1px; + border: 1px solid #DBD399; +} + +/* Header Rows */ + +QHeaderView { + background: #DBD399; +} + +QHeaderView::section { + background: #F7F6CF; + color: #000000; + height: 22px; + padding: 0px 5px; + border: 0px; + border-bottom: 2px solid #DBD399; + border-right: 2px solid #DBD399; +} + +QHeaderView::section:first { + border-top-left-radius: 6px; +} + +QHeaderView::section:last { + border-right: 0px; + border-top-right-radius: 6px; +} + +QHeaderView::section:hover { + background: #008F8F; + color: #F7F6CF; +} + +QHeaderView::down-arrow { + padding-right: 4px; + height: 10px; + width: 10px; +} + +/* Context Menus, Toolbar Dropdowns, & Tooltips */ + +QMenu { + background: #F7F6CF; + selection-color: #F7F6CF; + border: 0px; +} + +QMenu::item { + background: #F7F6CF; + selection-background-color: #008F8F; + padding: 4px 20px; +} + +QMenu::item:selected { + background: #008F8F; + color: #F7F6CF; +} + +QMenu::item:disabled { + background: #F7F6CF; + color: #444444; +} + +QMenu::separator { + background: #DBD399; + height: 2px; +} + +QMenu::icon { + margin: 1px; +} + +QToolTip { + background: #F7F6CF; + color: #000000; + padding: 1px; + border: 0px; +} + +/* Progress Bars (Downloads) */ + +QProgressBar { + background: #F7F6CF; + text-align: center; + border: 0px; + border-radius: 6px; + margin: 0px 10px; +} + +QProgressBar::chunk { + background: #008F8F; +} + +/* Right Pane and Tab Bars */ + +QTabWidget::pane { + top: 1px; + padding: 2px 2px 10px 2px; + border: 2px solid #F7F6CF; + border-radius: 10px; +} + +QTabWidget::tab-bar { + alignment: center; +} + +QTabBar::tab { + background: #F7F6CF; + color: #000000; + padding: 4px 1em; + border: 1px solid #DBD399; + border-top: 0px; + border-bottom: 0px; +} + +QTabBar::tab:!selected { + background: #F7F6CF; + color: #000000; +} + +QTabBar::tab:disabled { + background: #DBD399; + color: #444444; +} + +QTabBar::tab:selected { + color: #0CA6FF; + +} + +QTabBar::tab:!selected:hover { + background: #0CA6FF; + color: #F7F6CF; +} + +QTabBar::tab:first { + border-top-left-radius: 10px; + border-bottom-left-radius: 10px; +} + +QTabBar::tab:last { + border-top-right-radius: 10px; + border-bottom-right-radius: 10px; +} + +QTabBar QToolButton { + background: #008F8F; + padding: 1px; + border-radius: 6px; + margin: 1px; +} + +QTabBar QToolButton:disabled { + background: transparent; +} + +/* Sliders (Configurator) */ + +/* QSlider::groove:horizontal { + background: #F7F6CF; + height: 1px; + border: 1px solid #F7F6CF; +} + +QSlider::handle:horizontal { + background: #008F8F; + width: 10px; + border: 2px solid #008F8F; + border-radius: 6px; + margin: -10px 0px; +} + +QSlider::handle:horizontal:hover { + background: #0CA6FF; + border: 2px solid #0CA6FF; +} */ + +/* Tables (Configure Mod Categories) */ + +QTableView { + gridline-color: #DBD399; + border: 0px; +} \ No newline at end of file diff --git a/src/stylesheets/Parchment/checkbox-alt-unchecked-hover.png b/src/stylesheets/Parchment/checkbox-alt-unchecked-hover.png new file mode 100644 index 00000000..bf4cb027 Binary files /dev/null and b/src/stylesheets/Parchment/checkbox-alt-unchecked-hover.png differ diff --git a/src/stylesheets/Parchment/checkbox-alt-unchecked.png b/src/stylesheets/Parchment/checkbox-alt-unchecked.png new file mode 100644 index 00000000..35073ad7 Binary files /dev/null and b/src/stylesheets/Parchment/checkbox-alt-unchecked.png differ diff --git a/src/stylesheets/Parchment/checkbox-checked-disabled.png b/src/stylesheets/Parchment/checkbox-checked-disabled.png new file mode 100644 index 00000000..21e7e057 Binary files /dev/null and b/src/stylesheets/Parchment/checkbox-checked-disabled.png differ diff --git a/src/stylesheets/Parchment/checkbox-checked-hover.png b/src/stylesheets/Parchment/checkbox-checked-hover.png new file mode 100644 index 00000000..6603a99e Binary files /dev/null and b/src/stylesheets/Parchment/checkbox-checked-hover.png differ diff --git a/src/stylesheets/Parchment/checkbox-checked.png b/src/stylesheets/Parchment/checkbox-checked.png new file mode 100644 index 00000000..0f098137 Binary files /dev/null and b/src/stylesheets/Parchment/checkbox-checked.png differ diff --git a/src/stylesheets/Parchment/checkbox-disabled.png b/src/stylesheets/Parchment/checkbox-disabled.png new file mode 100644 index 00000000..d1d5a887 Binary files /dev/null and b/src/stylesheets/Parchment/checkbox-disabled.png differ diff --git a/src/stylesheets/Parchment/checkbox-hover.png b/src/stylesheets/Parchment/checkbox-hover.png new file mode 100644 index 00000000..92df6af4 Binary files /dev/null and b/src/stylesheets/Parchment/checkbox-hover.png differ diff --git a/src/stylesheets/Parchment/checkbox.png b/src/stylesheets/Parchment/checkbox.png new file mode 100644 index 00000000..e02aa21d Binary files /dev/null and b/src/stylesheets/Parchment/checkbox.png differ -- cgit v1.3.1 From 37e1009d9472a86c228eea0347d4306a75c3fd65 Mon Sep 17 00:00:00 2001 From: Al Date: Sat, 12 Jan 2019 12:12:04 +0100 Subject: Added missing Parchment theme file --- src/stylesheets/Parchment/checkbox-alt-checked.png | Bin 0 -> 301 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/stylesheets/Parchment/checkbox-alt-checked.png (limited to 'src') diff --git a/src/stylesheets/Parchment/checkbox-alt-checked.png b/src/stylesheets/Parchment/checkbox-alt-checked.png new file mode 100644 index 00000000..b2f32952 Binary files /dev/null and b/src/stylesheets/Parchment/checkbox-alt-checked.png differ -- cgit v1.3.1 From ea3df2e9bdb02f44f17acc2f389fb6280d0dc98b Mon Sep 17 00:00:00 2001 From: Al Date: Sat, 12 Jan 2019 14:35:09 +0100 Subject: Some more drag and drop related changes, still no fix though. --- src/mainwindow.ui | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 4f5400dd..83b99486 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -1322,11 +1322,14 @@ p, li { white-space: pre-wrap; } This is a list of mods you downloaded from Nexus. Double click one to install it. You can also drag an archive into here. - - QAbstractItemView::NoEditTriggers + + Qt::ScrollBarAlwaysOn + + + true - QAbstractItemView::DropOnly + QAbstractItemView::DragDrop Qt::MoveAction @@ -1334,6 +1337,9 @@ p, li { white-space: pre-wrap; } true + + QAbstractItemView::ScrollPerPixel + 0 -- cgit v1.3.1 From 864cab8c8afe9afc2a329d8849d2eee336a6898f Mon Sep 17 00:00:00 2001 From: Al Date: Sat, 12 Jan 2019 19:58:56 +0100 Subject: Fixed "check all for updates" not updating for the newly added mods. --- src/modlistsortproxy.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index 1a00d764..bff26e8d 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -58,11 +58,18 @@ void ModListSortProxy::updateFilterActive() void ModListSortProxy::setCategoryFilter(const std::vector &categories) { + m_CategoryFilter = categories; + updateFilterActive(); + invalidate(); + + //For better performance we could refresh only if the filter is different or + //categories contains CATEGORY_SPECIAL_UPDATEAVAILABLE + /* if (categories != m_CategoryFilter) { m_CategoryFilter = categories; updateFilterActive(); invalidate(); - } + }*/ } void ModListSortProxy::setContentFilter(const std::vector &content) -- cgit v1.3.1 From 821ca7416683a8ac1e9906bb28a31265f67dbb98 Mon Sep 17 00:00:00 2001 From: Al Date: Sat, 12 Jan 2019 20:24:10 +0100 Subject: Avoid refreshes unless it's specifically the update filter. --- src/modlistsortproxy.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index bff26e8d..94139715 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -58,18 +58,12 @@ void ModListSortProxy::updateFilterActive() void ModListSortProxy::setCategoryFilter(const std::vector &categories) { - m_CategoryFilter = categories; - updateFilterActive(); - invalidate(); - - //For better performance we could refresh only if the filter is different or - //categories contains CATEGORY_SPECIAL_UPDATEAVAILABLE - /* - if (categories != m_CategoryFilter) { + //avoid refreshing the filter unless we are checking all mods for update. + if (categories != m_CategoryFilter || categories.at(0) == CategoryFactory::CATEGORY_SPECIAL_UPDATEAVAILABLE) { m_CategoryFilter = categories; updateFilterActive(); invalidate(); - }*/ + } } void ModListSortProxy::setContentFilter(const std::vector &content) -- cgit v1.3.1 From 5efba39f86dd1bcd542f53d0839de521ec052fb5 Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 13 Jan 2019 13:42:56 +0100 Subject: Fixed invalid vector access on modInfoDialog closing. --- src/modlistsortproxy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index 94139715..35e496a0 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -59,7 +59,7 @@ void ModListSortProxy::updateFilterActive() void ModListSortProxy::setCategoryFilter(const std::vector &categories) { //avoid refreshing the filter unless we are checking all mods for update. - if (categories != m_CategoryFilter || categories.at(0) == CategoryFactory::CATEGORY_SPECIAL_UPDATEAVAILABLE) { + if (categories != m_CategoryFilter || (!categories.empty() && categories.at(0) == CategoryFactory::CATEGORY_SPECIAL_UPDATEAVAILABLE)) { m_CategoryFilter = categories; updateFilterActive(); invalidate(); -- cgit v1.3.1 From 643d2a772575e735cb20f608ae30173a275b43e4 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Mon, 14 Jan 2019 18:52:31 -0600 Subject: Add link to discord server in help menu --- src/mainwindow.cpp | 9 +++++++++ src/mainwindow.h | 1 + 2 files changed, 10 insertions(+) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index a0cfd0a0..bc0d991d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -748,6 +748,10 @@ void MainWindow::createHelpWidget() connect(wikiAction, SIGNAL(triggered()), this, SLOT(wikiTriggered())); buttonMenu->addAction(wikiAction); + QAction *discordAction = new QAction(tr("Chat on Discord"), buttonMenu); + connect(discordAction, SIGNAL(triggered()), this, SLOT(discordTriggered())); + buttonMenu->addAction(discordAction); + QAction *issueAction = new QAction(tr("Report Issue"), buttonMenu); connect(issueAction, SIGNAL(triggered()), this, SLOT(issueTriggered())); buttonMenu->addAction(issueAction); @@ -2119,6 +2123,11 @@ void MainWindow::wikiTriggered() QDesktopServices::openUrl(QUrl("http://wiki.step-project.com/Guide:Mod_Organizer")); } +void MainWindow::discordTriggered() +{ + QDesktopServices::openUrl(QUrl("https://discord.gg/cYwdcxj")); +} + void MainWindow::issueTriggered() { QDesktopServices::openUrl(QUrl("https://github.com/Modorganizer2/modorganizer/issues")); diff --git a/src/mainwindow.h b/src/mainwindow.h index a419b797..23c38f19 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -403,6 +403,7 @@ private slots: void helpTriggered(); void issueTriggered(); void wikiTriggered(); + void discordTriggered(); void tutorialTriggered(); void extractBSATriggered(); -- cgit v1.3.1 From 9c364c0dffa5dd5a6f2d665c678a23ca48897f93 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Mon, 14 Jan 2019 18:53:32 -0600 Subject: Redirect documentation link in help menu to github.io --- src/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index bc0d991d..5330c799 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -744,7 +744,7 @@ void MainWindow::createHelpWidget() connect(helpAction, SIGNAL(triggered()), this, SLOT(helpTriggered())); buttonMenu->addAction(helpAction); - QAction *wikiAction = new QAction(tr("Documentation Wiki"), buttonMenu); + QAction *wikiAction = new QAction(tr("Documentation"), buttonMenu); connect(wikiAction, SIGNAL(triggered()), this, SLOT(wikiTriggered())); buttonMenu->addAction(wikiAction); @@ -2120,7 +2120,7 @@ void MainWindow::helpTriggered() void MainWindow::wikiTriggered() { - QDesktopServices::openUrl(QUrl("http://wiki.step-project.com/Guide:Mod_Organizer")); + QDesktopServices::openUrl(QUrl("https://modorganizer2.github.io/")); } void MainWindow::discordTriggered() -- cgit v1.3.1 From 0d04ba18737385395d6ebcdfe49fb31bcb539038 Mon Sep 17 00:00:00 2001 From: Al Date: Fri, 18 Jan 2019 01:34:18 +0100 Subject: Added OR and AND based search to modlist and pluginlist. A space now means AND and "OR ; | ||" mean OR. OR always wins. --- src/modlistsortproxy.cpp | 109 ++++++++++++++++++++++++++++---------------- src/pluginlistsortproxy.cpp | 35 +++++++++++++- 2 files changed, 103 insertions(+), 41 deletions(-) (limited to 'src') diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index 35e496a0..464f9104 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -357,59 +357,90 @@ bool ModListSortProxy::filterMatchesModOr(ModInfo::Ptr info, bool enabled) const bool ModListSortProxy::filterMatchesMod(ModInfo::Ptr info, bool enabled) const { - bool display = true; if (!m_CurrentFilter.isEmpty()) { - display = false; + bool display = false; + QString filterCopy = QString(m_CurrentFilter); + filterCopy.replace("||", ";").replace("OR", ";").replace("|", ";"); + QStringList ORList = filterCopy.split(";", QString::SkipEmptyParts); + + bool segmentGood = true; + + //split in ORSegments that internally use AND logic + for (auto& ORSegment : ORList) { + QStringList ANDKeywords = ORSegment.split(" ", QString::SkipEmptyParts); + segmentGood = true; + bool foundKeyword = false; + + //check each word in the segment for match, each word needs to be matched but it doesn't matter where. + for (auto& currentKeyword : ANDKeywords) { + foundKeyword = false; + + //search keyword in name + if (m_EnabledColumns[ModList::COL_NAME] && + info->name().contains(currentKeyword, Qt::CaseInsensitive)) { + foundKeyword = true; + } - // Search by name - if (!display && - m_EnabledColumns[ModList::COL_NAME] && - info->name().contains(m_CurrentFilter, Qt::CaseInsensitive)) { - display = true; - } + // Search by notes + if (!foundKeyword && + m_EnabledColumns[ModList::COL_NOTES] && + info->comments().contains(currentKeyword, Qt::CaseInsensitive)) { + foundKeyword = true; + } - // Search by notes - if (!display && - m_EnabledColumns[ModList::COL_NOTES] && - info->comments().contains(m_CurrentFilter, Qt::CaseInsensitive)) { - display = true; - } + // Search by categories + if (!foundKeyword && + m_EnabledColumns[ModList::COL_CATEGORY]) { + for (auto category : info->categories()) { + if (category.contains(currentKeyword, Qt::CaseInsensitive)) { + foundKeyword = true; + break; + } + } + } - // Search by Nexus ID - if (!display && - m_EnabledColumns[ModList::COL_MODID]) { - bool ok; - int filterID = m_CurrentFilter.toInt(&ok); - if (ok) { - int modID = info->getNexusID(); - while (modID > 0) { - if (modID == filterID) { - display = true; - break; + // Search by Nexus ID + if (!foundKeyword && + m_EnabledColumns[ModList::COL_MODID]) { + bool ok; + int filterID = currentKeyword.toInt(&ok); + if (ok) { + int modID = info->getNexusID(); + while (modID > 0) { + if (modID == filterID) { + foundKeyword = true; + break; + } + modID = (int)(modID / 10); + } } - modID = (int)(modID / 10); } - } - } - // Search by categories - if (!display && - m_EnabledColumns[ModList::COL_CATEGORY]) { - for (auto category : info->categories()) { - if (category.contains(m_CurrentFilter, Qt::CaseInsensitive)) { - display = true; + if (!foundKeyword) { + //currentKeword is missing from everything, AND fails and we need to check next ORsegment + segmentGood = false; break; } + + }//for ANDKeywords loop + + if (segmentGood) { + //the last AND loop didn't break so the ORSegments is true so mod matches filter + display = true; + break; } + + }//for ORList loop + + if (!display) { + return false; } - } - if (!display) { - return false; - } + }//if (!m_CurrentFilter.isEmpty()) if (m_FilterMode == FILTER_AND) { return filterMatchesModAnd(info, enabled); - } else { + } + else { return filterMatchesModOr(info, enabled); } } diff --git a/src/pluginlistsortproxy.cpp b/src/pluginlistsortproxy.cpp index 1e131c4d..3d13798e 100644 --- a/src/pluginlistsortproxy.cpp +++ b/src/pluginlistsortproxy.cpp @@ -139,7 +139,38 @@ bool PluginListSortProxy::dropMimeData(const QMimeData *data, Qt::DropAction act bool PluginListSortProxy::filterMatchesPlugin(const QString &plugin) const { - return m_CurrentFilter.isEmpty() || - plugin.contains(m_CurrentFilter, Qt::CaseInsensitive); + if (!m_CurrentFilter.isEmpty()) { + + bool display = false; + QString filterCopy = QString(m_CurrentFilter); + filterCopy.replace("||", ";").replace("OR", ";").replace("|", ";"); + QStringList ORList = filterCopy.split(";", QString::SkipEmptyParts); + + bool segmentGood = true; + + //split in ORSegments that internally use AND logic + for (auto& ORSegment : ORList) { + QStringList ANDKeywords = ORSegment.split(" ", QString::SkipEmptyParts); + segmentGood = true; + + //check each word in the segment for match, each word needs to be matched but it doesn't matter where. + for (auto& currentKeyword : ANDKeywords) { + if (!plugin.contains(currentKeyword, Qt::CaseInsensitive)) { + segmentGood = false; + break; + } + } + + if (segmentGood) { + //the last AND loop didn't break so the ORSegments is true so mod matches filter + return true; + } + + }//for ORList loop + + return false; + } + else + return true; } -- cgit v1.3.1