MCPcopy Create free account
hub / github.com/WinMerge/winmerge / LoadCustomSettings

Function LoadCustomSettings

Src/Plugins.cpp:881–895  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

879}
880
881static void LoadCustomSettings(const std::map<std::wstring, PluginArrayPtr>& plugins)
882{
883 for (const auto& [event, pluginAry] : plugins)
884 {
885 for (const auto& plugin : *pluginAry)
886 {
887 String uniqueName = event + _T(".") + plugin->m_name;
888 plugin->m_disabled = (GetCustomSetting(uniqueName, _T("disabled"), _T("false"))[0] != 'f');
889 plugin->m_bAutomatic = GetCustomSetting(uniqueName, _T("automatic"), plugin->m_bAutomaticDefault ? _T("true") : _T("false"))[0] == 't';
890 plugin->m_arguments = GetCustomSetting(uniqueName, _T("arguments"), plugin->m_argumentsDefault);
891 plugin->m_filtersText = GetCustomSetting(uniqueName, _T("filters"), plugin->m_filtersTextDefault);
892 plugin->LoadFilterString();
893 }
894 }
895}
896
897/**
898 * @brief Get available scriptlets for an event

Callers 2

GetAvailableScriptsFunction · 0.85
ReloadCustomSettingsMethod · 0.85

Calls 2

GetCustomSettingFunction · 0.85
LoadFilterStringMethod · 0.80

Tested by

no test coverage detected