============================================================================= SaveSettings()
| 4569 | // |
| 4570 | // |
| 4571 | void SaveSettings ( BOOL bSaveSettingsNow ) |
| 4572 | { |
| 4573 | WCHAR *pIniSection = NULL; |
| 4574 | int cchIniSection = 0; |
| 4575 | WCHAR wchTmp[MAX_PATH]; |
| 4576 | if ( lstrlen ( szIniFile ) == 0 ) { |
| 4577 | return; |
| 4578 | } |
| 4579 | CreateIniFile(); |
| 4580 | if ( !bSaveSettings && !bSaveSettingsNow ) { |
| 4581 | IniSetInt ( L"Settings", L"SaveSettings", bSaveSettings ); |
| 4582 | return; |
| 4583 | } |
| 4584 | pIniSection = LocalAlloc ( LPTR, sizeof ( WCHAR ) * 32 * 1024 ); |
| 4585 | cchIniSection = ( int ) LocalSize ( pIniSection ) / sizeof ( WCHAR ); |
| 4586 | // haccel |
| 4587 | IniSectionSetInt ( pIniSection, L"HightLightSelection", b_HL_highlight_selection ); |
| 4588 | IniSectionSetInt ( pIniSection, L"WheelScroll", b_HL_ctrl_wheel_scroll ); |
| 4589 | // |
| 4590 | IniSectionSetInt ( pIniSection, L"SaveSettings", bSaveSettings ); |
| 4591 | IniSectionSetInt ( pIniSection, L"SaveRecentFiles", bSaveRecentFiles ); |
| 4592 | IniSectionSetInt ( pIniSection, L"SaveFindReplace", bSaveFindReplace ); |
| 4593 | IniSectionSetInt ( pIniSection, L"CloseFind", efrData.bFindClose ); |
| 4594 | IniSectionSetInt ( pIniSection, L"CloseReplace", efrData.bReplaceClose ); |
| 4595 | IniSectionSetInt ( pIniSection, L"NoFindWrap", efrData.bNoFindWrap ); |
| 4596 | PathRelativeToApp ( tchOpenWithDir, wchTmp, COUNTOF ( wchTmp ), FALSE, TRUE, flagPortableMyDocs ); |
| 4597 | IniSectionSetString ( pIniSection, L"OpenWithDir", wchTmp ); |
| 4598 | PathRelativeToApp ( tchFavoritesDir, wchTmp, COUNTOF ( wchTmp ), FALSE, TRUE, flagPortableMyDocs ); |
| 4599 | IniSectionSetString ( pIniSection, L"Favorites", wchTmp ); |
| 4600 | IniSectionSetInt ( pIniSection, L"PathNameFormat", iPathNameFormat ); |
| 4601 | IniSectionSetInt ( pIniSection, L"WordWrap", fWordWrapG ); |
| 4602 | IniSectionSetInt ( pIniSection, L"WordWrapMode", iWordWrapMode ); |
| 4603 | IniSectionSetInt ( pIniSection, L"WordWrapIndent", iWordWrapIndent ); |
| 4604 | IniSectionSetInt ( pIniSection, L"WordWrapSymbols", iWordWrapSymbols ); |
| 4605 | IniSectionSetInt ( pIniSection, L"ShowWordWrapSymbols", bShowWordWrapSymbols ); |
| 4606 | IniSectionSetInt ( pIniSection, L"MatchBraces", bMatchBraces ); |
| 4607 | IniSectionSetInt ( pIniSection, L"AutoCloseTags", bAutoCloseTags ); |
| 4608 | IniSectionSetInt ( pIniSection, L"HighlightCurrentLine", bHiliteCurrentLine ); |
| 4609 | IniSectionSetInt ( pIniSection, L"AutoIndent", bAutoIndent ); |
| 4610 | IniSectionSetInt ( pIniSection, L"ShowIndentGuides", bShowIndentGuides ); |
| 4611 | IniSectionSetInt ( pIniSection, L"TabsAsSpaces", bTabsAsSpacesG ); |
| 4612 | IniSectionSetInt ( pIniSection, L"TabIndents", bTabIndentsG ); |
| 4613 | IniSectionSetInt ( pIniSection, L"BackspaceUnindents", bBackspaceUnindents ); |
| 4614 | IniSectionSetInt ( pIniSection, L"TabWidth", iTabWidthG ); |
| 4615 | IniSectionSetInt ( pIniSection, L"IndentWidth", iIndentWidthG ); |
| 4616 | IniSectionSetInt ( pIniSection, L"MarkLongLines", bMarkLongLines ); |
| 4617 | IniSectionSetInt ( pIniSection, L"LongLinesLimit", iLongLinesLimitG ); |
| 4618 | IniSectionSetInt ( pIniSection, L"LongLineMode", iLongLineMode ); |
| 4619 | IniSectionSetInt ( pIniSection, L"ShowSelectionMargin", bShowSelectionMargin ); |
| 4620 | IniSectionSetInt ( pIniSection, L"ShowLineNumbers", bShowLineNumbers ); |
| 4621 | IniSectionSetInt ( pIniSection, L"ViewWhiteSpace", bViewWhiteSpace ); |
| 4622 | IniSectionSetInt ( pIniSection, L"ViewEOLs", bViewEOLs ); |
| 4623 | IniSectionSetInt ( pIniSection, L"DefaultEncoding", Encoding_MapIniSetting ( FALSE, iDefaultEncoding ) ); |
| 4624 | IniSectionSetInt ( pIniSection, L"SkipUnicodeDetection", bSkipUnicodeDetection ); |
| 4625 | IniSectionSetInt ( pIniSection, L"LoadASCIIasUTF8", bLoadASCIIasUTF8 ); |
| 4626 | IniSectionSetInt ( pIniSection, L"NoEncodingTags", bNoEncodingTags ); |
| 4627 | IniSectionSetInt ( pIniSection, L"DefaultEOLMode", iDefaultEOLMode ); |
| 4628 | IniSectionSetInt ( pIniSection, L"FixLineEndings", bFixLineEndings ); |
no test coverage detected