From 1e66d1a3c2fbc036efe11952bf09b278e503a64a Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 17 Jun 2012 18:36:59 +0300 Subject: [PATCH] Cosmetics --- Library/MeasurePlugin.cpp | 6 ++++-- Library/Rainmeter.cpp | 7 ++----- SkinInstaller/DialogInstall.cpp | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Library/MeasurePlugin.cpp b/Library/MeasurePlugin.cpp index e6dd0034..b135e45c 100644 --- a/Library/MeasurePlugin.cpp +++ b/Library/MeasurePlugin.cpp @@ -129,12 +129,14 @@ void CMeasurePlugin::ReadOptions(CConfigParser& parser, const WCHAR* section) } // First try from program path - std::wstring pluginFile = Rainmeter->GetPluginPath() + pluginName; + std::wstring pluginFile = Rainmeter->GetPluginPath(); + pluginFile += pluginName; m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str()); if (!m_Plugin) { // Try from settings path - pluginFile = Rainmeter->GetUserPluginPath() + pluginName; + pluginFile = Rainmeter->GetUserPluginPath(); + pluginFile += pluginName; m_Plugin = CSystem::RmLoadLibrary(pluginFile.c_str()); if (!m_Plugin) { diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 623dbcb4..0902d3e0 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -884,12 +884,9 @@ int CRainmeter::Initialize(LPCWSTR iniPath) m_SkinPath.assign(buffer, len); ExpandEnvironmentVariables(m_SkinPath); - if (!m_SkinPath.empty()) + if (!m_SkinPath.empty() && !CSystem::IsPathSeparator(m_SkinPath[m_SkinPath.length() - 1])) { - if (!CSystem::IsPathSeparator(m_SkinPath[m_SkinPath.length() - 1])) - { - m_SkinPath += L'\\'; - } + m_SkinPath += L'\\'; } } else if (bDefaultIniLocation && diff --git a/SkinInstaller/DialogInstall.cpp b/SkinInstaller/DialogInstall.cpp index 051fa842..1ea1a965 100644 --- a/SkinInstaller/DialogInstall.cpp +++ b/SkinInstaller/DialogInstall.cpp @@ -489,8 +489,8 @@ bool CDialogInstall::ReadPackage() { m_PackageSkins.insert(item); } - else if (_wcsicmp(component, m_PackageFormat == PackageFormat::Old ? L"Themes" : L"Layouts") == 0 && - _wcsicmp(extension, m_PackageFormat == PackageFormat::Old ? L".thm" : L".ini") == 0 && + else if (_wcsicmp(component, m_PackageFormat == PackageFormat::New ? L"Layouts" : L"Themes") == 0 && + _wcsicmp(extension, m_PackageFormat == PackageFormat::New ? L".ini" : L".thm") == 0 && !IsIgnoredTheme(itemSz)) { m_PackageThemes.insert(item);