From 6c5cd602bc226eedf5a45c5864558fdc3734d43a Mon Sep 17 00:00:00 2001 From: spx Date: Thu, 21 Jun 2012 02:06:17 -0700 Subject: [PATCH] Minor fixes --- Language/Hungarian.h | Bin 17564 -> 17568 bytes Library/DialogAbout.cpp | 5 ++++- Library/MeasurePlugin.cpp | 11 +++++++---- Library/Rainmeter.h | 2 ++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Language/Hungarian.h b/Language/Hungarian.h index b78ffaa6176bfeece2bbdb83be62ac3167450f53..f77f4640a2ee216d126f53ccafa96d4561295bd1 100644 GIT binary patch delta 14 VcmbQ!$+)1Cal;%J7G4G}1^_3L1N;C0 delta 9 QcmZ3`$vCHzal;%J02AE<;Q#;t diff --git a/Library/DialogAbout.cpp b/Library/DialogAbout.cpp index 4fdf6a06..8a9123e8 100644 --- a/Library/DialogAbout.cpp +++ b/Library/DialogAbout.cpp @@ -1039,7 +1039,10 @@ void CDialogAbout::CTabPlugins::Initialize() }; findPlugins(Rainmeter->GetPluginPath()); - findPlugins(Rainmeter->GetUserPluginPath()); + if (Rainmeter->HasUserPluginPath()) + { + findPlugins(Rainmeter->GetUserPluginPath()); + } } /* diff --git a/Library/MeasurePlugin.cpp b/Library/MeasurePlugin.cpp index b135e45c..fb3186df 100644 --- a/Library/MeasurePlugin.cpp +++ b/Library/MeasurePlugin.cpp @@ -134,10 +134,13 @@ void CMeasurePlugin::ReadOptions(CConfigParser& parser, const WCHAR* section) m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str()); if (!m_Plugin) { - // Try from settings path - pluginFile = Rainmeter->GetUserPluginPath(); - pluginFile += pluginName; - m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str()); + if (Rainmeter->HasUserPluginPath()) + { + // Try from settings path + pluginFile = Rainmeter->GetUserPluginPath(); + pluginFile += pluginName; + m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str()); + } if (!m_Plugin) { LogWithArgs(LOG_ERROR, L"Plugin: \"%s\" not found", pluginName.c_str()); diff --git a/Library/Rainmeter.h b/Library/Rainmeter.h index e25b5276..ac5a4ccf 100644 --- a/Library/Rainmeter.h +++ b/Library/Rainmeter.h @@ -143,6 +143,8 @@ public: std::wstring GetUserPluginPath() { return m_SettingsPath + L"Plugins\\"; } std::wstring GetAddonPath() { return m_SettingsPath + L"Addons\\"; } + bool HasUserPluginPath() { return (_wcsicmp(m_Path.c_str(), m_SettingsPath.c_str()) != 0); } + std::wstring GetDefaultSkinPath() { return m_Path + L"Defaults\\Skins\\"; } std::wstring GetDefaultThemePath() { return m_Path + L"Defaults\\Themes\\"; } std::wstring GetDefaultPluginPath() { return m_Path + L"Defaults\\Plugins\\"; }