summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp2
-rw-r--r--src/nexusinterface.cpp5
-rw-r--r--src/settings.cpp13
-rw-r--r--src/shared/fallout3info.cpp8
-rw-r--r--src/shared/fallout3info.h2
-rw-r--r--src/shared/falloutnvinfo.cpp8
-rw-r--r--src/shared/falloutnvinfo.h2
-rw-r--r--src/shared/gameinfo.h2
-rw-r--r--src/shared/oblivioninfo.cpp8
-rw-r--r--src/shared/oblivioninfo.h2
-rw-r--r--src/shared/skyriminfo.cpp8
-rw-r--r--src/shared/skyriminfo.h2
-rw-r--r--src/version.rc4
13 files changed, 45 insertions, 21 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b435cda0..17f2de09 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -3215,7 +3215,7 @@ void MainWindow::visitOnNexus_clicked()
{
int modID = m_ModList.data(m_ModList.index(m_ContextRow, 0), Qt::UserRole).toInt();
if (modID > 0) {
- nexusLinkActivated(QString("%1/mods/%2").arg(ToQString(GameInfo::instance().getNexusPage())).arg(modID));
+ nexusLinkActivated(QString("%1/mods/%2").arg(ToQString(GameInfo::instance().getNexusPage(false))).arg(modID));
} else {
MessageDialog::showMessage(tr("Nexus ID for this Mod is unknown"), this);
}
diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp
index 6b5cf19c..309915aa 100644
--- a/src/nexusinterface.cpp
+++ b/src/nexusinterface.cpp
@@ -381,6 +381,7 @@ void NexusInterface::nextRequest()
QString url;
if (!info.m_Reroute) {
+ bool hasParams = false;
switch (info.m_Type) {
case NXMRequestInfo::TYPE_DESCRIPTION: {
url = QString("%1/Mods/%2/").arg(info.m_URL).arg(info.m_ModID);
@@ -396,14 +397,16 @@ void NexusInterface::nextRequest()
} break;
case NXMRequestInfo::TYPE_TOGGLEENDORSEMENT: {
url = QString("%1/Mods/toggleendorsement/%2?lvote=%3").arg(info.m_URL).arg(info.m_ModID).arg(!info.m_Endorse);
+ hasParams = true;
} break;
case NXMRequestInfo::TYPE_GETUPDATES: {
QString modIDList = VectorJoin<int>(info.m_ModIDList, ",");
modIDList = "[" + modIDList + "]";
url = QString("%1/Mods/GetUpdates?ModList=%2").arg(info.m_URL).arg(modIDList);
+ hasParams = true;
} break;
}
- url.append(QString("?game_id=%1").arg(GameInfo::instance().getNexusGameID()));
+ url.append(QString("%1game_id=%2").arg(hasParams ? '&' : '?').arg(GameInfo::instance().getNexusGameID()));
} else {
url = info.m_URL;
}
diff --git a/src/settings.cpp b/src/settings.cpp
index 144049aa..8086672a 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -214,7 +214,12 @@ QString Settings::getModDirectory() const
QString Settings::getNMMVersion() const
{
- return m_Settings.value("Settings/nmm_version", "0.34.0").toString();
+ static const QString MIN_NMM_VERSION = "0.46.0";
+ QString result = m_Settings.value("Settings/nmm_version", MIN_NMM_VERSION).toString();
+ if (VersionInfo(result) < VersionInfo(MIN_NMM_VERSION)) {
+ result = MIN_NMM_VERSION;
+ }
+ return result;
}
bool Settings::getNexusLogin(QString &username, QString &password) const
@@ -583,9 +588,9 @@ void Settings::query(QWidget *parent)
downloadDirEdit->setText(getDownloadDirectory());
modDirEdit->setText(getModDirectory());
cacheDirEdit->setText(getCacheDirectory());
- offlineBox->setChecked(m_Settings.value("Settings/offline_mode", false).toBool());
- proxyBox->setChecked(m_Settings.value("Settings/use_proxy", false).toBool());
- nmmVersionEdit->setText(m_Settings.value("Settings/nmm_version", "0.33.1").toString());
+ offlineBox->setChecked(offlineMode());
+ proxyBox->setChecked(useProxy());
+ nmmVersionEdit->setText(getNMMVersion());
logLevelBox->setCurrentIndex(logLevel());
// display plugin settings
diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp
index cc90d6fa..1808d1d9 100644
--- a/src/shared/fallout3info.cpp
+++ b/src/shared/fallout3info.cpp
@@ -153,9 +153,13 @@ std::wstring Fallout3Info::getSEName()
}
-std::wstring Fallout3Info::getNexusPage()
+std::wstring Fallout3Info::getNexusPage(bool nmmScheme)
{
- return L"http://nmm.nexusmods.com/fallout3";
+ if (nmmScheme) {
+ return L"http://nmm.nexusmods.com/fallout3";
+ } else {
+ return L"http://www.nexusmods.com/fallout3";
+ }
}
diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h
index 4bcb9d37..9575103b 100644
--- a/src/shared/fallout3info.h
+++ b/src/shared/fallout3info.h
@@ -71,7 +71,7 @@ public:
virtual std::wstring getSEName();
- virtual std::wstring getNexusPage();
+ virtual std::wstring getNexusPage(bool nmmScheme = true);
static std::wstring getNexusInfoUrlStatic();
virtual std::wstring getNexusInfoUrl() { return Fallout3Info::getNexusInfoUrlStatic(); }
static int getNexusModIDStatic();
diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp
index abff9323..e7e747e2 100644
--- a/src/shared/falloutnvinfo.cpp
+++ b/src/shared/falloutnvinfo.cpp
@@ -207,9 +207,13 @@ std::wstring FalloutNVInfo::getSEName()
}
-std::wstring FalloutNVInfo::getNexusPage()
+std::wstring FalloutNVInfo::getNexusPage(bool nmmScheme)
{
- return L"http://nmm.nexusmods.com/newvegas";
+ if (nmmScheme) {
+ return L"http://nmm.nexusmods.com/newvegas";
+ } else {
+ return L"http://www.nexusmods.com/newvegas";
+ }
}
diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h
index e25d2e02..8767fdb0 100644
--- a/src/shared/falloutnvinfo.h
+++ b/src/shared/falloutnvinfo.h
@@ -72,7 +72,7 @@ public:
virtual std::wstring getSEName();
- virtual std::wstring getNexusPage();
+ virtual std::wstring getNexusPage(bool nmmScheme = true);
static std::wstring getNexusInfoUrlStatic();
virtual std::wstring getNexusInfoUrl() { return FalloutNVInfo::getNexusInfoUrlStatic(); }
static int getNexusModIDStatic();
diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h
index d517fc1b..10775e6c 100644
--- a/src/shared/gameinfo.h
+++ b/src/shared/gameinfo.h
@@ -142,7 +142,7 @@ public:
virtual std::wstring getSEName() = 0;
- virtual std::wstring getNexusPage() = 0;
+ virtual std::wstring getNexusPage(bool nmmScheme = true) = 0;
virtual std::wstring getNexusInfoUrl() = 0;
virtual int getNexusModID() = 0;
virtual int getNexusGameID() = 0;
diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp
index c84f8b88..d8daa0f7 100644
--- a/src/shared/oblivioninfo.cpp
+++ b/src/shared/oblivioninfo.cpp
@@ -189,9 +189,13 @@ std::wstring OblivionInfo::getSEName()
}
-std::wstring OblivionInfo::getNexusPage()
+std::wstring OblivionInfo::getNexusPage(bool nmmScheme)
{
- return L"http://nmm.nexusmods.com/oblivion";
+ if (nmmScheme) {
+ return L"http://nmm.nexusmods.com/oblivion";
+ } else {
+ return L"http://www.nexusmods.com/oblivion";
+ }
}
diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h
index dfa53575..ba27aa40 100644
--- a/src/shared/oblivioninfo.h
+++ b/src/shared/oblivioninfo.h
@@ -68,7 +68,7 @@ public:
virtual std::wstring getSEName();
- virtual std::wstring getNexusPage();
+ virtual std::wstring getNexusPage(bool nmmScheme = true);
static std::wstring getNexusInfoUrlStatic();
virtual std::wstring getNexusInfoUrl() { return OblivionInfo::getNexusInfoUrlStatic(); }
static int getNexusModIDStatic();
diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp
index 38b2cf37..1620bcc3 100644
--- a/src/shared/skyriminfo.cpp
+++ b/src/shared/skyriminfo.cpp
@@ -181,9 +181,13 @@ std::wstring SkyrimInfo::getSEName()
}
-std::wstring SkyrimInfo::getNexusPage()
+std::wstring SkyrimInfo::getNexusPage(bool nmmScheme)
{
- return L"http://nmm.nexusmods.com/skyrim";
+ if (nmmScheme) {
+ return L"http://nmm.nexusmods.com/skyrim";
+ } else {
+ return L"http://www.nexusmods.com/skyrim";
+ }
}
diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h
index 7da523a1..438beb41 100644
--- a/src/shared/skyriminfo.h
+++ b/src/shared/skyriminfo.h
@@ -75,7 +75,7 @@ public:
virtual std::wstring getSEName();
- virtual std::wstring getNexusPage();
+ virtual std::wstring getNexusPage(bool nmmScheme = true);
static std::wstring getNexusInfoUrlStatic();
virtual std::wstring getNexusInfoUrl() { return SkyrimInfo::getNexusInfoUrlStatic(); }
diff --git a/src/version.rc b/src/version.rc
index b91dce85..811ee7ca 100644
--- a/src/version.rc
+++ b/src/version.rc
@@ -1,7 +1,7 @@
#include "Winver.h"
-#define VER_FILEVERSION 1,0,10,0
-#define VER_FILEVERSION_STR "1,0,10,0\0"
+#define VER_FILEVERSION 1,0,11,0
+#define VER_FILEVERSION_STR "1,0,11,0\0"
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION