From 30c177cb371e92fe5e4cfc600cf27586402cf0a8 Mon Sep 17 00:00:00 2001 From: Silarn Date: Mon, 16 Apr 2018 12:47:17 -0500 Subject: Support for multi-game downloads --- src/settings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/settings.cpp') diff --git a/src/settings.cpp b/src/settings.cpp index d1130e05..9510999d 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -584,9 +584,9 @@ void Settings::resetDialogs() } -void Settings::query(QWidget *parent) +void Settings::query(PluginContainer *pluginContainer, QWidget *parent) { - SettingsDialog dialog(parent); + SettingsDialog dialog(pluginContainer, parent); connect(&dialog, SIGNAL(resetDialogs()), this, SLOT(resetDialogs())); -- cgit v1.3.1 From d3c207193fe27c42ff958e3e74cbd2628c6a14a2 Mon Sep 17 00:00:00 2001 From: Silarn Date: Tue, 1 May 2018 13:01:44 -0500 Subject: Add all supported games to the nxmhandler config --- src/settings.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/settings.cpp') diff --git a/src/settings.cpp b/src/settings.cpp index 9510999d..4174c397 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -133,7 +133,11 @@ void Settings::registerAsNXMHandler(bool force) std::wstring nxmPath = ToWString(QCoreApplication::applicationDirPath() + "/nxmhandler.exe"); std::wstring executable = ToWString(QCoreApplication::applicationFilePath()); std::wstring mode = force ? L"forcereg" : L"reg"; - std::wstring parameters = mode + L" " + m_GamePlugin->gameShortName().toStdWString() + L" \"" + executable + L"\""; + std::wstring parameters = mode + L" " + m_GamePlugin->gameShortName().toStdWString(); + for (QString altGame : m_GamePlugin->validShortNames()) { + parameters += L"," + altGame.toStdWString(); + } + parameters += L" \"" + executable + L"\""; HINSTANCE res = ::ShellExecuteW(nullptr, L"open", nxmPath.c_str(), parameters.c_str(), nullptr, SW_SHOWNORMAL); if ((int)res <= 32) { QMessageBox::critical(nullptr, tr("Failed"), -- cgit v1.3.1 From 4bf7b4e10326aee4cbf1f55873e8f8a207042de5 Mon Sep 17 00:00:00 2001 From: Silarn Date: Tue, 1 May 2018 13:18:39 -0500 Subject: Update the NMM version --- src/settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/settings.cpp') diff --git a/src/settings.cpp b/src/settings.cpp index 4174c397..21c73dec 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -295,7 +295,7 @@ QString Settings::getOverwriteDirectory(bool resolve) const QString Settings::getNMMVersion() const { - static const QString MIN_NMM_VERSION = "0.61.13"; + static const QString MIN_NMM_VERSION = "0.65.2"; QString result = m_Settings.value("Settings/nmm_version", MIN_NMM_VERSION).toString(); if (VersionInfo(result) < VersionInfo(MIN_NMM_VERSION)) { result = MIN_NMM_VERSION; -- cgit v1.3.1 From 238c252b4c836433d41054387263bb91c07169a3 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Wed, 2 May 2018 17:11:54 +0100 Subject: Coalesce plugins with the same name in the settings dialogue (as they already share setting values) --- src/settings.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/settings.cpp') diff --git a/src/settings.cpp b/src/settings.cpp index 21c73dec..2bcf2d02 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -908,12 +908,16 @@ Settings::PluginsTab::PluginsTab(Settings *m_parent, SettingsDialog &m_dialog) , m_pluginBlacklistList(m_dialog.findChild("pluginBlacklist")) { // display plugin settings + QSet handledNames; for (IPlugin *plugin : m_parent->m_Plugins) { + if (handledNames.contains(plugin->name())) + continue; QListWidgetItem *listItem = new QListWidgetItem(plugin->name(), m_pluginsList); listItem->setData(Qt::UserRole, QVariant::fromValue((void*)plugin)); listItem->setData(Qt::UserRole + 1, m_parent->m_PluginSettings[plugin->name()]); listItem->setData(Qt::UserRole + 2, m_parent->m_PluginDescriptions[plugin->name()]); m_pluginsList->addItem(listItem); + handledNames.insert(plugin->name()); } // display plugin blacklist -- cgit v1.3.1