MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / LoadFlags

Function LoadFlags

src/Notepad2.c:5041–5092  ·  view source on GitHub ↗

============================================================================= LoadFlags()

Source from the content-addressed store, hash-verified

5039//
5040//
5041void LoadFlags()
5042{
5043 WCHAR *pIniSection = LocalAlloc ( LPTR, sizeof ( WCHAR ) * 32 * 1024 );
5044 int cchIniSection = ( int ) LocalSize ( pIniSection ) / sizeof ( WCHAR );
5045 LoadIniSection ( L"Settings2", pIniSection, cchIniSection );
5046 if ( !flagReuseWindow && !flagNoReuseWindow ) {
5047 if ( !IniSectionGetInt ( pIniSection, L"ReuseWindow", 0 ) ) {
5048 flagNoReuseWindow = 1;
5049 }
5050 if ( IniSectionGetInt ( pIniSection, L"SingleFileInstance", 0 ) ) {
5051 flagSingleFileInstance = 1;
5052 }
5053 }
5054 if ( flagMultiFileArg == 0 ) {
5055 if ( IniSectionGetInt ( pIniSection, L"MultiFileArg", 0 ) ) {
5056 flagMultiFileArg = 2;
5057 }
5058 }
5059 if ( IniSectionGetInt ( pIniSection, L"RelativeFileMRU", 1 ) ) {
5060 flagRelativeFileMRU = 1;
5061 }
5062 if ( IniSectionGetInt ( pIniSection, L"PortableMyDocs", flagRelativeFileMRU ) ) {
5063 flagPortableMyDocs = 1;
5064 }
5065 if ( IniSectionGetInt ( pIniSection, L"NoFadeHidden", 0 ) ) {
5066 flagNoFadeHidden = 1;
5067 }
5068 flagToolbarLook = IniSectionGetInt ( pIniSection, L"ToolbarLook", IsXP() ? 1 : 2 );
5069 flagToolbarLook = max ( min ( flagToolbarLook, 2 ), 0 );
5070 if ( IniSectionGetInt ( pIniSection, L"SimpleIndentGuides", 0 ) ) {
5071 flagSimpleIndentGuides = 1;
5072 }
5073 if ( IniSectionGetInt ( pIniSection, L"NoHTMLGuess", 0 ) ) {
5074 fNoHTMLGuess = 1;
5075 }
5076 if ( IniSectionGetInt ( pIniSection, L"NoCGIGuess", 0 ) ) {
5077 fNoCGIGuess = 1;
5078 }
5079 if ( IniSectionGetInt ( pIniSection, L"NoFileVariables", 0 ) ) {
5080 fNoFileVariables = 1;
5081 }
5082 if ( lstrlen ( g_wchAppUserModelID ) == 0 ) {
5083 IniSectionGetString ( pIniSection, L"ShellAppUserModelID", L"(default)",
5084 g_wchAppUserModelID, COUNTOF ( g_wchAppUserModelID ) );
5085 }
5086 if ( flagUseSystemMRU == 0 ) {
5087 if ( IniSectionGetInt ( pIniSection, L"ShellUseSystemMRU", 0 ) ) {
5088 flagUseSystemMRU = 2;
5089 }
5090 }
5091 LocalFree ( pIniSection );
5092}
5093//=============================================================================
5094//
5095// FindIniFile()

Callers 1

WinMainFunction · 0.85

Calls 2

IniSectionGetIntFunction · 0.85
IniSectionGetStringFunction · 0.85

Tested by

no test coverage detected