This commit is contained in:
Birunthan Mohanathas 2013-03-08 17:45:06 +02:00
parent b4998d2cc4
commit e4bc729a42

View File

@ -1104,49 +1104,83 @@ void CDialogInstall::LaunchRainmeter()
} }
} }
// Helper for the IsIgnore... functions.
bool IsIgnoredName(const WCHAR* name, const WCHAR* names[], int namesCount)
{
for (int i = 0; i < namesCount; ++i)
{
if (_wcsicmp(name, names[i]) == 0)
{
return true;
}
}
return false;
}
bool CDialogInstall::IsIgnoredSkin(const WCHAR* name) bool CDialogInstall::IsIgnoredSkin(const WCHAR* name)
{ {
return _wcsicmp(name, L"Backup") == 0 || static const WCHAR* s_Skins[] =
_wcsicmp(name, L"@Backup") == 0; {
L"Backup",
L"@Backup"
};
return IsIgnoredName(name, s_Skins, _countof(s_Skins));
} }
bool CDialogInstall::IsIgnoredLayout(const WCHAR* name) bool CDialogInstall::IsIgnoredLayout(const WCHAR* name)
{ {
return _wcsicmp(name, L"Backup") == 0 || static const WCHAR* s_Layouts[] =
_wcsicmp(name, L"@Backup") == 0; {
L"Backup",
L"@Backup"
};
return IsIgnoredName(name, s_Layouts, _countof(s_Layouts));
} }
bool CDialogInstall::IsIgnoredAddon(const WCHAR* name) bool CDialogInstall::IsIgnoredAddon(const WCHAR* name)
{ {
return _wcsicmp(name, L"Backup") == 0 || static const WCHAR* s_Addons[] =
_wcsicmp(name, L"Rainstaller") == 0 || {
_wcsicmp(name, L"RainBackup") == 0; L"Backup",
L"Rainstaller",
L"RainBackup"
};
return IsIgnoredName(name, s_Addons, _countof(s_Addons));
} }
bool CDialogInstall::IsIgnoredPlugin(const WCHAR* name) bool CDialogInstall::IsIgnoredPlugin(const WCHAR* name)
{ {
return _wcsicmp(name, L"AdvancedCPU.dll") == 0 || static const WCHAR* s_Plugins[] =
_wcsicmp(name, L"CoreTemp.dll") == 0 || {
_wcsicmp(name, L"FileView.dll") == 0 || L"AdvancedCPU.dll",
_wcsicmp(name, L"FolderInfo.dll") == 0 || L"CoreTemp.dll",
_wcsicmp(name, L"InputText.dll") == 0 || L"FileView.dll",
_wcsicmp(name, L"iTunesPlugin.dll") == 0 || L"FolderInfo.dll",
_wcsicmp(name, L"MediaKey.dll") == 0 || L"InputText.dll",
_wcsicmp(name, L"NowPlaying.dll") == 0 || L"iTunesPlugin.dll",
_wcsicmp(name, L"PerfMon.dll") == 0 || L"MediaKey.dll",
_wcsicmp(name, L"PingPlugin.dll") == 0 || L"NowPlaying.dll",
_wcsicmp(name, L"PowerPlugin.dll") == 0 || L"PerfMon.dll",
_wcsicmp(name, L"Process.dll") == 0 || L"PingPlugin.dll",
_wcsicmp(name, L"QuotePlugin.dll") == 0 || L"PowerPlugin.dll",
_wcsicmp(name, L"RecycleManager.dll") == 0 || L"Process.dll",
_wcsicmp(name, L"ResMon.dll") == 0 || L"QuotePlugin.dll",
_wcsicmp(name, L"SpeedFanPlugin.dll") == 0 || L"RecycleManager.dll",
_wcsicmp(name, L"SysInfo.dll") == 0 || L"ResMon.dll",
_wcsicmp(name, L"VirtualDesktops.dll") == 0 || L"SpeedFanPlugin.dll",
_wcsicmp(name, L"WebParser.dll") == 0 || L"SysInfo.dll",
_wcsicmp(name, L"WifiStatus.dll") == 0 || L"VirtualDesktops.dll",
_wcsicmp(name, L"Win7AudioPlugin.dll") == 0 || L"WebParser.dll",
_wcsicmp(name, L"WindowMessagePlugin.dll") == 0; L"WifiStatus.dll",
L"Win7AudioPlugin.dll",
L"WindowMessagePlugin.dll"
};
return IsIgnoredName(name, s_Plugins, _countof(s_Plugins));
} }
/* /*