#include "pch.h"
#include <vector>
+#include <typeinfo>
#include "OptionsDef.h"
#include "OptionsMgr.h"
#include "RegOptionsMgr.h"
#include "OptionsDiffOptions.h"
#include "OptionsDiffColors.h"
#include "OptionsDirColors.h"
+#include "OptionsEditorSyntax.h"
#include "OptionsFont.h"
#include "DiffWrapper.h" // CMP_CONTENT
#include "paths.h"
*/
void Init(COptionsMgr *pOptions)
{
- static_cast<CRegOptionsMgr *>(pOptions)->SetRegRootKey(_T("Thingamahoochie\\WinMerge\\"));
+ if (typeid(*pOptions) == typeid(CRegOptionsMgr))
+ {
+ static_cast<CRegOptionsMgr*>(pOptions)->SetRegRootKey(_T("Thingamahoochie\\WinMerge\\"));
+ }
LANGID LangId = GetUserDefaultLangID();
pOptions->InitOption(OPT_SELECTED_LANGUAGE, static_cast<int>(LangId));
pOptions->InitOption(OPT_TAB_SIZE, (int)4);
pOptions->InitOption(OPT_TAB_TYPE, (int)0); // 0 means tabs inserted
- pOptions->InitOption(OPT_EXT_EDITOR_CMD, paths::ConcatPath(env::GetWindowsDirectory(), _T("NOTEPAD.EXE")));
+ pOptions->InitOption(OPT_EXT_EDITOR_CMD, _T("%windir%\\NOTEPAD.EXE"));
pOptions->InitOption(OPT_USE_RECYCLE_BIN, true);
- pOptions->InitOption(OPT_SINGLE_INSTANCE, false);
+ pOptions->InitOption(OPT_SINGLE_INSTANCE, 0);
pOptions->InitOption(OPT_MERGE_MODE, false);
// OPT_WORDDIFF_HIGHLIGHT is initialized above
pOptions->InitOption(OPT_BREAK_ON_WORDS, false);
pOptions->InitOption(OPT_CUSTOM_TEMP_PATH, _T(""));
pOptions->InitOption(OPT_LINEFILTER_ENABLED, false);
- pOptions->InitOption(OPT_IGNORED_SUBSTITUTIONS_ARE_ENABLED, false);
+ pOptions->InitOption(OPT_SUBSTITUTION_FILTERS_ENABLED, false);
pOptions->InitOption(OPT_FILEFILTER_CURRENT, _T("*.*"));
// CMainFrame initializes this when it is empty.
pOptions->InitOption(OPT_ARCHIVE_FILTER_INDEX, 1);
pOptions->InitOption(OPT_PLUGINS_ENABLED, true);
- pOptions->InitOption(OPT_PLUGINS_DISABLED_LIST, _T(""));
- pOptions->InitOption(OPT_PLUGINS_CUSTOM_FILTERS_LIST, _T(""));
- pOptions->InitOption(OPT_PLUGINS_UNPACKER_MODE, static_cast<int>(PLUGIN_MODE::PLUGIN_MANUAL));
- pOptions->InitOption(OPT_PLUGINS_PREDIFFER_MODE, static_cast<int>(PLUGIN_MODE::PLUGIN_MANUAL));
- pOptions->InitOption(OPT_PLUGINS_UNPACK_DONT_CHECK_EXTENSION, false);
+ pOptions->InitOption(OPT_PLUGINS_CUSTOM_SETTINGS_LIST, _T(""));
+ pOptions->InitOption(OPT_PLUGINS_UNPACKER_MODE, false);
+ pOptions->InitOption(OPT_PLUGINS_PREDIFFER_MODE, false);
+ pOptions->InitOption(OPT_PLUGINS_UNPACK_DONT_CHECK_EXTENSION, true);
+ pOptions->InitOption(OPT_PLUGINS_OPEN_IN_SAME_FRAME_TYPE, false);
pOptions->InitOption(OPT_PATCHCREATOR_PATCH_STYLE, 0);
pOptions->InitOption(OPT_PATCHCREATOR_CONTEXT_LINES, 0);
Options::DiffOptions::SetDefaults(pOptions);
Options::DiffColors::SetDefaults(pOptions);
Options::DirColors::SetDefaults(pOptions);
+ Options::EditorSyntax::SetDefaults(pOptions);
Options::Font::SetDefaults(pOptions);
}