Minor fixes

This commit is contained in:
spx 2012-06-21 02:06:17 -07:00
parent 6456b6adb3
commit 6c5cd602bc
4 changed files with 13 additions and 5 deletions

Binary file not shown.

View File

@ -1039,8 +1039,11 @@ void CDialogAbout::CTabPlugins::Initialize()
}; };
findPlugins(Rainmeter->GetPluginPath()); findPlugins(Rainmeter->GetPluginPath());
if (Rainmeter->HasUserPluginPath())
{
findPlugins(Rainmeter->GetUserPluginPath()); findPlugins(Rainmeter->GetUserPluginPath());
} }
}
/* /*
** Resizes window and repositions controls. ** Resizes window and repositions controls.

View File

@ -133,11 +133,14 @@ void CMeasurePlugin::ReadOptions(CConfigParser& parser, const WCHAR* section)
pluginFile += pluginName; pluginFile += pluginName;
m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str()); m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str());
if (!m_Plugin) if (!m_Plugin)
{
if (Rainmeter->HasUserPluginPath())
{ {
// Try from settings path // Try from settings path
pluginFile = Rainmeter->GetUserPluginPath(); pluginFile = Rainmeter->GetUserPluginPath();
pluginFile += pluginName; pluginFile += pluginName;
m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str()); m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str());
}
if (!m_Plugin) if (!m_Plugin)
{ {
LogWithArgs(LOG_ERROR, L"Plugin: \"%s\" not found", pluginName.c_str()); LogWithArgs(LOG_ERROR, L"Plugin: \"%s\" not found", pluginName.c_str());

View File

@ -143,6 +143,8 @@ public:
std::wstring GetUserPluginPath() { return m_SettingsPath + L"Plugins\\"; } std::wstring GetUserPluginPath() { return m_SettingsPath + L"Plugins\\"; }
std::wstring GetAddonPath() { return m_SettingsPath + L"Addons\\"; } 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 GetDefaultSkinPath() { return m_Path + L"Defaults\\Skins\\"; }
std::wstring GetDefaultThemePath() { return m_Path + L"Defaults\\Themes\\"; } std::wstring GetDefaultThemePath() { return m_Path + L"Defaults\\Themes\\"; }
std::wstring GetDefaultPluginPath() { return m_Path + L"Defaults\\Plugins\\"; } std::wstring GetDefaultPluginPath() { return m_Path + L"Defaults\\Plugins\\"; }