From 4dc3538a7d14dd0f1aaa2e6c172745b63e251c86 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sat, 4 Jan 2014 15:57:14 +0100 Subject: - 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 --- src/settings.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/settings.cpp') 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); -- cgit v1.3.1