summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-01-04 15:57:14 +0100
committerTannin <devnull@localhost>2014-01-04 15:57:14 +0100
commit4dc3538a7d14dd0f1aaa2e6c172745b63e251c86 (patch)
tree2242c92482306c5710b00dfb212cce11456e776d /src/settings.cpp
parent14ac234daf1680b0685f6bea3e74aa09dfcf38ef (diff)
- nxmhandler will now ask before registering itself
- downloads from nexus are now displayed before file information is retrieved - logging from the ui is now a bit more informative - download list now scrolls to bottom automatically
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 8086672a..895094f7 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -102,6 +102,15 @@ bool Settings::pluginBlacklisted(const QString &fileName) const
return m_PluginBlacklist.contains(fileName);
}
+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";
+ ::ShellExecuteW(NULL, L"open", nxmPath.c_str(),
+ (mode + L" " + GameInfo::instance().getGameShortName() + L" \"" + executable + L"\"").c_str(), NULL, SW_SHOWNORMAL);
+}
+
void Settings::registerPlugin(IPlugin *plugin)
{
m_Plugins.push_back(plugin);