From aed31459d390fc7ccd88622fd7c102e5bd27bc22 Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Wed, 8 Aug 2018 14:25:11 +0200 Subject: [PATCH] + chg: enable DirectWrite rendering technology and Bidirectional support via Settings Menu --- Build/Notepad3.ini | Bin 5868 -> 5760 bytes language/common_res.h | 9 + language/np3_af_za/menu_af_za.rc | Bin 41746 -> 42942 bytes language/np3_de_de/menu_de_de.rc | Bin 43414 -> 44650 bytes language/np3_en_gb/menu_en_gb.rc | Bin 41752 -> 43064 bytes language/np3_en_us/menu_en_us.rc | Bin 41726 -> 43038 bytes language/np3_es_es/menu_es_es.rc | Bin 41818 -> 43014 bytes language/np3_fr_fr/menu_fr_fr.rc | Bin 44296 -> 45492 bytes language/np3_nl_nl/menu_nl_nl.rc | Bin 43330 -> 44526 bytes language/np3_zh_cn/menu_zh_cn.rc | Bin 39854 -> 41050 bytes .../App/DefaultData/settings/Notepad3.ini | Bin 5868 -> 5760 bytes src/Notepad3.c | 215 +++++++++++------- src/SciCall.h | 2 +- 13 files changed, 139 insertions(+), 87 deletions(-) diff --git a/Build/Notepad3.ini b/Build/Notepad3.ini index a9e5e9298ebb4c75170bba579537cafdf8c9b463..91abfb0063fa61df817b734a37122457e8d97cc0 100644 GIT binary patch delta 12 TcmaE(+n~GQ7t7`});2)^CQ$_{ delta 104 zcmZqBeWSbK7fZAYLncEJLn=cuLkUATkd+CfQyD_QA{h*}346Y1$42cX$ l3^_m6-`C!=`hG2$Lh5{hW2bxr}`6bJAK>*g%7d`+0 diff --git a/language/common_res.h b/language/common_res.h index 2a3a79994..f1fce3aae 100644 --- a/language/common_res.h +++ b/language/common_res.h @@ -500,6 +500,13 @@ #define IDM_VIEW_TOGGLE_VIEW 40459 #define IDM_VIEW_CHASING_DOCTAIL 40460 #define IDM_VIEW_TOGGLETB 40461 +#define IDM_SET_RENDER_TECH_DEFAULT 40462 +#define IDM_SET_RENDER_TECH_D2D 40463 +#define IDM_SET_RENDER_TECH_D2DRETAIN 40464 +#define IDM_SET_RENDER_TECH_D2DDC 40465 +#define IDM_SET_BIDIRECTIONAL_NONE 40466 +#define IDM_SET_BIDIRECTIONAL_L2R 40467 +#define IDM_SET_BIDIRECTIONAL_R2L 40468 #define IDM_HELP_ABOUT 40500 #define IDM_HELP_CMD 40501 #define IDM_HELP_ONLINEDOCUMENTATION 40502 @@ -511,6 +518,8 @@ #define IDM_EDIT_INSERT_GUID 40605 + + #define IDS_ENC_ANSI 61000 #define IDS_ENC_OEM 61001 #define IDS_ENC_UTF16LEBOM 61002 diff --git a/language/np3_af_za/menu_af_za.rc b/language/np3_af_za/menu_af_za.rc index 25cad6669bf8cee1a6583c1359e4b2d3ea5ffffe..2930eb51f029dbc843740ef413b234f7c67e0c21 100644 GIT binary patch delta 602 zcmbPqjA`F_rVUFvCT|cDP!D2AWyoVl0g^=wnLt)Lg91YckeAGm0p#T~I-xbJ;2b$r^;LPB`5I^~# zwDRNwdUD#CKpQ~jmN0~a?J5EC6c{vsrnmrYhRGQLd72;-WpSDaRADsvqK@I@2SzN) z2%X5LssY`Q3bZK^Ud29nh0`z2!rEfM;TL9WcR3{xEAbRpsQUNoI$245;E0g z^21*7$qSOCfMLxi=>&953X)$lfnl2mbYl)EblLsDyi};)oftfUws?ZwYk6vdAn9K}CKQG^ByL8TxqX6a=A1RJa^q(#9FX|P3OON*MpQC~oZtL}XR z!Iy9p+{DGzsSn`b`4XW~M5sgZ-Q0Zl{O-Ny?m71U8oU3vlHvJOQiqK;dT8-|3JrCh z2RLG;k1n4>c=EPglgI9?p<@e0SXf4iH!a3Ha8QHEDu+5ID$JRT9A-=uP=X_uiKJYZ zTEnBh()O{($m7|j$_gt+e=_`99Z#PX8JS4OWpjSXjcP?H;gmjHvU=m|lcA=oBPWA> zqYUzDPxZ{jkv*B0{ZwDq-_4tM3ziyr&$N_DO#FEYLUbN~6k5i97l zz+Np>=|>J_x=}$@1{;RE8>nc|nN^$U;EWz9UFEsP+R%NU`QKgsi&CZ&Ct1T$ohn9D eElL@&$7k4N%pAw1d7F}_L{^&i>MqA4GFud+{JcekQxuyQNacOyR1xLA6Z$Sjfyrm5k0{k@0MY6%_GZbGb?g6 zae%VCEyU$wI$usvE1Kod0sDnGc&$3IbWSgeK{29eHs?M%A+7l#x#09E+Y-4pYk4y#UE4dz_yc|I%Z_fF;Al%cqZCWd0M<484 diff --git a/language/np3_en_us/menu_en_us.rc b/language/np3_en_us/menu_en_us.rc index bff40e49bc3d18979b3534136548393c86cced58..09cdf513778a15bb0ea3ddc1c9c1e52bfc6ea18b 100644 GIT binary patch delta 652 zcmb7>&q@MO6vjWLprvIoB>ji-U_oCkA6T1UN>%lasDJAC1`-0v;RTWDr| g0v35mxiYu4pIRSH(f`FNk`-_?8P%PKk3l5z4f|$<-T(jq delta 18 acmbPtf$85-rVTSXCSTz3+sxJ{Aq4*C>ZW?)O70amA2nMK zZ5hor)GQ}czvho=zV~CW!>v98yVxfmwzeA%o%Tyx$(hQS{zod8&5lOd9}136CeWT; zx(?7~E^UO&;zO*;&w9NZ>SR@>f?Njg=1hG^^!s-H;UupmqeDBIaulqEN_EbdTMy+- L^X6&serMqeUT%S5 delta 18 acmZp>z;x>v(}oKjlM|--Z9dg&BLx6ln+ZAq diff --git a/language/np3_fr_fr/menu_fr_fr.rc b/language/np3_fr_fr/menu_fr_fr.rc index 7feb5eac9d5454ea1a2eb2f166b16212df48ed15..5db4e6883019ef0f6791c60586cd5c19c5d9d1ff 100644 GIT binary patch delta 712 zcmb7BK}y3=6dZa0v2G+N8Wp30NK@AZ+azcpCNvgYh=gEc8YnGDq=*-Asr(c428y1h zE76NM|4T>(6|zY3=jFedd2b$OwYSgO^T(rjZ!GSFNH9X5?;B)1rO?qMy25~Hj3J*C zcfwrgIyURqh;hqm&U*%qVZ+5H_K94cPZ8k^4jCeZ{Q9gpJVmTHuyBG%jMukB!(6+} zs3>)EoGa~|NXIT&Z8|CbHHr4BDX^m{% zNu7&Q$M`YN_l9(KSk2qta-i6Gl)pM0 zxnJ8lPVZ}txf$J%$@%hBDy}%PAUpf{#S%AdrtU0eGCl6!RoQG;HER8#QPS!7dgn5? z_7O502Lbb#9jwUR)qF)|t5QwKWO6cQ?j54v@8%yyvf47tZiYV`->iZDgQnrEk@IPz NC?~hU7aJVaqsf~|L*CSh3MU7ejQoj*xNJgM~KL zIr>zW81U=iT26|`hR^d0oZ*V6f^{~U@Da+SxN4>(1&FBw?ou)WcsN2TYo)^-pX`yQ z3Y_Sh1eJwtGV=c%s*2*R{mNs7Bk$e%X1*`a{GLhBC+AVDtv^}hDd%mt^6j83$HvMG z*`D#M=cR8So+5AjM^<%9%X=zovq3+dTn-tN9n$4MWxEh-)m7ATiUva75o%{1y@g1a zt&51s#z>^=?3@0DOb5mQ diff --git a/np3portableapp/Notepad3Portable/App/DefaultData/settings/Notepad3.ini b/np3portableapp/Notepad3Portable/App/DefaultData/settings/Notepad3.ini index a9e5e9298ebb4c75170bba579537cafdf8c9b463..91abfb0063fa61df817b734a37122457e8d97cc0 100644 GIT binary patch delta 12 TcmaE(+n~GQ7t7`});2)^CQ$_{ delta 104 zcmZqBeWSbK7fZAYLncEJLn=cuLkUATkd+CfQyD_QA{h*}346Y1$42cX$ l3^_m6-`C!=`hG2$Lh5{hW2bxr}`6bJAK>*g%7d`+0 diff --git a/src/Notepad3.c b/src/Notepad3.c index 0a0906c7b..098b5db8f 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -246,9 +246,8 @@ int iCurrentLineHorizontalSlop = 0; int iCurrentLineVerticalSlop = 0; bool g_bChasingDocTail = false; -static int g_iSciDirectWriteTech = 0; -static bool bEnableBidirectionalSupport = false; +static int g_iRenderingTechnology = 0; const int DirectWriteTechnology[4] = { SC_TECHNOLOGY_DEFAULT , SC_TECHNOLOGY_DIRECTWRITE @@ -256,8 +255,16 @@ const int DirectWriteTechnology[4] = { , SC_TECHNOLOGY_DIRECTWRITEDC }; -int g_iSciFontQuality; +static int g_iBidirectional = 0; +const int SciBidirectional[3] = { + SC_BIDIRECTIONAL_DISABLED + , SC_BIDIRECTIONAL_L2R + , SC_BIDIRECTIONAL_R2L +}; + + +int g_iSciFontQuality = 0; const int FontQuality[4] = { SC_EFF_QUALITY_DEFAULT , SC_EFF_QUALITY_NON_ANTIALIASED @@ -265,6 +272,8 @@ const int FontQuality[4] = { , SC_EFF_QUALITY_LCD_OPTIMIZED }; + + static WININFO g_WinInfo = INIT_WININFO; static int g_WinCurrentWidth = 0; @@ -1588,12 +1597,11 @@ static void __fastcall _InitializeSciEditCtrl(HWND hwndEditCtrl) // Current platforms perform window buffering so it is almost always better for this option to be turned off. // There are some older platforms and unusual modes where buffering may still be useful - so keep it ON //~SciCall_SetBufferedDraw(true); // default is true - if (g_iSciDirectWriteTech >= 0) { - SciCall_SetTechnology(DirectWriteTechnology[g_iSciDirectWriteTech]); + if (g_iRenderingTechnology > 0) { + SciCall_SetTechnology(DirectWriteTechnology[g_iRenderingTechnology]); + SciCall_SetBufferedDraw(false); // experimental - if (bEnableBidirectionalSupport) { - SendMessage(hwndEditCtrl, SCI_SETBIDIRECTIONAL, SC_BIDIRECTIONAL_L2R, 0); - } + SciCall_SetBidirectional(SciBidirectional[g_iBidirectional]); } } Encoding_Current(g_iDefaultNewFileEncoding); @@ -2946,6 +2954,21 @@ bool MsgInitMenu(HWND hwnd, WPARAM wParam, LPARAM lParam) CheckCmd(hmenu,IDM_VIEW_TRANSPARENT,bTransparentMode && bTransparentModeAvailable); EnableCmd(hmenu,IDM_VIEW_TRANSPARENT,bTransparentModeAvailable); + i = IDM_SET_RENDER_TECH_DEFAULT + g_iRenderingTechnology; + CheckMenuRadioItem(hmenu, IDM_SET_RENDER_TECH_DEFAULT, IDM_SET_RENDER_TECH_D2DDC, i, MF_BYCOMMAND); + + if (g_iRenderingTechnology > 0) { + i = IDM_SET_BIDIRECTIONAL_NONE + g_iBidirectional; + CheckMenuRadioItem(hmenu, IDM_SET_BIDIRECTIONAL_NONE, IDM_SET_BIDIRECTIONAL_R2L, i, MF_BYCOMMAND); + } + else { + i = IDM_SET_BIDIRECTIONAL_NONE; + CheckMenuRadioItem(hmenu, IDM_SET_BIDIRECTIONAL_NONE, IDM_SET_BIDIRECTIONAL_R2L, i, MF_BYCOMMAND); + } + EnableCmd(hmenu, IDM_SET_BIDIRECTIONAL_NONE, (g_iRenderingTechnology > 0)); + EnableCmd(hmenu, IDM_SET_BIDIRECTIONAL_L2R, (g_iRenderingTechnology > 0)); + EnableCmd(hmenu, IDM_SET_BIDIRECTIONAL_R2L, (g_iRenderingTechnology > 0)); + CheckCmd(hmenu,IDM_VIEW_NOSAVERECENT,g_bSaveRecentFiles); CheckCmd(hmenu,IDM_VIEW_NOPRESERVECARET, g_bPreserveCaretPos); CheckCmd(hmenu,IDM_VIEW_NOSAVEFINDREPL,g_bSaveFindReplace); @@ -4984,23 +5007,30 @@ bool MsgCommand(HWND hwnd,WPARAM wParam, LPARAM lParam) SetWindowTransparentMode(hwnd,bTransparentMode); break; + case IDM_SET_RENDER_TECH_DEFAULT: + case IDM_SET_RENDER_TECH_D2D: + case IDM_SET_RENDER_TECH_D2DRETAIN: + case IDM_SET_RENDER_TECH_D2DDC: + g_iRenderingTechnology = (int)LOWORD(wParam) - IDM_SET_RENDER_TECH_DEFAULT; + if (g_iRenderingTechnology == 0) { + SciCall_SetBidirectional(SciBidirectional[0]); + } + SciCall_SetBufferedDraw((g_iRenderingTechnology == 0)); + SciCall_SetTechnology(DirectWriteTechnology[g_iRenderingTechnology]); + break; + case IDM_SET_BIDIRECTIONAL_NONE: + case IDM_SET_BIDIRECTIONAL_L2R: + case IDM_SET_BIDIRECTIONAL_R2L: + g_iBidirectional = (int)LOWORD(wParam) - IDM_SET_BIDIRECTIONAL_NONE; + SciCall_SetBidirectional(SciBidirectional[g_iBidirectional]); + break; + + case IDM_VIEW_SHOWFILENAMEONLY: - iPathNameFormat = 0; - StringCchCopy(szTitleExcerpt,COUNTOF(szTitleExcerpt),L""); - UpdateToolbar(); - break; - - case IDM_VIEW_SHOWFILENAMEFIRST: - iPathNameFormat = 1; - StringCchCopy(szTitleExcerpt,COUNTOF(szTitleExcerpt),L""); - UpdateToolbar(); - break; - - case IDM_VIEW_SHOWFULLPATH: - iPathNameFormat = 2; + iPathNameFormat = (int)LOWORD(wParam) - IDM_VIEW_SHOWFILENAMEONLY; StringCchCopy(szTitleExcerpt,COUNTOF(szTitleExcerpt),L""); UpdateToolbar(); break; @@ -5039,17 +5069,9 @@ bool MsgCommand(HWND hwnd,WPARAM wParam, LPARAM lParam) case IDM_VIEW_NOESCFUNC: - iEscFunction = 0; - break; - - case IDM_VIEW_ESCMINIMIZE: - iEscFunction = 1; - break; - - case IDM_VIEW_ESCEXIT: - iEscFunction = 2; + iEscFunction = (int)LOWORD(wParam) - IDM_VIEW_NOESCFUNC; break; @@ -6485,12 +6507,76 @@ void LoadSettings() WCHAR *pIniSection = LocalAlloc(LPTR, sizeof(WCHAR) * INISECTIONBUFCNT * HUGE_BUFFER); int cchIniSection = (int)LocalSize(pIniSection)/sizeof(WCHAR); + g_bEnableSaveSettings = true; // false: if settings-file is loaded in editor + g_bSaveSettings = IniGetBool(L"Settings2", L"SaveSettings", true); + + // first load "hard coded" .ini-Settings + // -------------------------------------------------------------------------- + LoadIniSection(L"Settings2", pIniSection, cchIniSection); + // -------------------------------------------------------------------------- + + IniSectionGetString(pIniSection, L"PreferedLanguageLocaleName", L"", + g_tchPrefLngLocName, COUNTOF(g_tchPrefLngLocName)); + + g_bStickyWinPos = IniSectionGetBool(pIniSection, L"StickyWindowPosition", false); + + IniSectionGetString(pIniSection, L"DefaultExtension", L"txt", g_tchDefaultExtension, COUNTOF(g_tchDefaultExtension)); + StrTrim(g_tchDefaultExtension, L" \t.\""); + + IniSectionGetString(pIniSection, L"DefaultDirectory", L"", g_tchDefaultDir, COUNTOF(g_tchDefaultDir)); + + ZeroMemory(g_tchFileDlgFilters, sizeof(WCHAR)*COUNTOF(g_tchFileDlgFilters)); + IniSectionGetString(pIniSection, L"FileDlgFilters", L"", g_tchFileDlgFilters, COUNTOF(g_tchFileDlgFilters) - 2); + + dwFileCheckInverval = IniSectionGetInt(pIniSection, L"FileCheckInverval", 2000); + dwAutoReloadTimeout = IniSectionGetInt(pIniSection, L"AutoReloadTimeout", 2000); + + // deprecated + g_iRenderingTechnology = IniSectionGetInt(pIniSection, L"SciDirectWriteTech", -111); + if ((g_iRenderingTechnology != -111) && g_bSaveSettings) { + // cleanup + IniSetString(L"Settings2", L"SciDirectWriteTech", NULL); + IniSetInt(L"Settings", L"RenderingTechnology", g_iRenderingTechnology); + } + g_iRenderingTechnology = max(min(g_iRenderingTechnology, 3), 0); + + // deprecated + g_iBidirectional = IniSectionGetInt(pIniSection, L"EnableBidirectionalSupport", -111); + if ((g_iBidirectional != -111) && g_bSaveSettings) { + // cleanup + IniSetString(L"Settings2", L"EnableBidirectionalSupport", NULL); + IniSetInt(L"Settings", L"Bidirectional", g_iBidirectional); + } + g_iBidirectional = (max(min(g_iBidirectional, 2), 0) > 0) ? 2 : 0; + + g_iSciFontQuality = IniSectionGetInt(pIniSection, L"SciFontQuality", FontQuality[3]); + g_iSciFontQuality = max(min(g_iSciFontQuality, 3), 0); + + g_iMarkOccurrencesMaxCount = IniSectionGetInt(pIniSection, L"MarkOccurrencesMaxCount", 2000); + g_iMarkOccurrencesMaxCount = (g_iMarkOccurrencesMaxCount <= 0) ? INT_MAX : g_iMarkOccurrencesMaxCount; + + iUpdateDelayHyperlinkStyling = IniSectionGetInt(pIniSection, L"UpdateDelayHyperlinkStyling", 100); + iUpdateDelayHyperlinkStyling = max(min(iUpdateDelayHyperlinkStyling, 10000), USER_TIMER_MINIMUM); + + iUpdateDelayMarkAllCoccurrences = IniSectionGetInt(pIniSection, L"UpdateDelayMarkAllCoccurrences", 50); + iUpdateDelayMarkAllCoccurrences = max(min(iUpdateDelayMarkAllCoccurrences, 10000), USER_TIMER_MINIMUM); + + g_bDenyVirtualSpaceAccess = IniSectionGetBool(pIniSection, L"DenyVirtualSpaceAccess", false); + g_bUseOldStyleBraceMatching = IniSectionGetBool(pIniSection, L"UseOldStyleBraceMatching", false); + + iCurrentLineHorizontalSlop = IniSectionGetInt(pIniSection, L"CurrentLineHorizontalSlop", 40); + iCurrentLineHorizontalSlop = max(min(iCurrentLineHorizontalSlop, 2000), 0); + + iCurrentLineVerticalSlop = IniSectionGetInt(pIniSection, L"CurrentLineVerticalSlop", 5); + iCurrentLineVerticalSlop = max(min(iCurrentLineVerticalSlop, 200), 0); + + IniSectionGetString(pIniSection, L"AdministrationTool.exe", L"", g_tchAdministrationExe, COUNTOF(g_tchAdministrationExe)); + + // -------------------------------------------------------------------------- LoadIniSection(L"Settings", pIniSection, cchIniSection); // -------------------------------------------------------------------------- - g_bEnableSaveSettings = true; // false: if settings-file is loaded in editor - g_bSaveSettings = IniSectionGetBool(pIniSection,L"SaveSettings",true); g_bSaveRecentFiles = IniSectionGetBool(pIniSection,L"SaveRecentFiles",true); g_bPreserveCaretPos = IniSectionGetBool(pIniSection, L"PreserveCaretPos",false); g_bSaveFindReplace = IniSectionGetBool(pIniSection,L"SaveFindReplace",false); @@ -6662,6 +6748,12 @@ void LoadSettings() bTransparentMode = IniSectionGetBool(pIniSection,L"TransparentMode",false); + g_iRenderingTechnology = IniSectionGetInt(pIniSection, L"RenderingTechnology", g_iRenderingTechnology); + g_iRenderingTechnology = max(min(g_iRenderingTechnology, 3), 0); + + g_iBidirectional = IniSectionGetInt(pIniSection, L"Bidirectional", g_iBidirectional); + g_iBidirectional = max(min(g_iBidirectional, 2), 0); + // Check if SetLayeredWindowAttributes() is available bTransparentModeAvailable = (GetProcAddress(GetModuleHandle(L"User32"),"SetLayeredWindowAttributes") != NULL); bTransparentModeAvailable = (bTransparentModeAvailable) ? true : false; @@ -6709,55 +6801,6 @@ void LoadSettings() xCustomSchemesDlg = IniSectionGetInt(pIniSection, L"CustomSchemesDlgPosX", 0); yCustomSchemesDlg = IniSectionGetInt(pIniSection, L"CustomSchemesDlgPosY", 0); - // -------------------------------------------------------------------------- - LoadIniSection(L"Settings2",pIniSection,cchIniSection); - // -------------------------------------------------------------------------- - - IniSectionGetString(pIniSection, L"PreferedLanguageLocaleName", L"", - g_tchPrefLngLocName, COUNTOF(g_tchPrefLngLocName)); - - g_bStickyWinPos = IniSectionGetBool(pIniSection,L"StickyWindowPosition",false); - - IniSectionGetString(pIniSection,L"DefaultExtension",L"txt", g_tchDefaultExtension,COUNTOF(g_tchDefaultExtension)); - StrTrim(g_tchDefaultExtension,L" \t.\""); - - IniSectionGetString(pIniSection,L"DefaultDirectory",L"", g_tchDefaultDir,COUNTOF(g_tchDefaultDir)); - - ZeroMemory(g_tchFileDlgFilters,sizeof(WCHAR)*COUNTOF(g_tchFileDlgFilters)); - IniSectionGetString(pIniSection,L"FileDlgFilters",L"", g_tchFileDlgFilters,COUNTOF(g_tchFileDlgFilters)-2); - - dwFileCheckInverval = IniSectionGetInt(pIniSection,L"FileCheckInverval",2000); - dwAutoReloadTimeout = IniSectionGetInt(pIniSection,L"AutoReloadTimeout",2000); - - g_iSciDirectWriteTech = IniSectionGetInt(pIniSection,L"SciDirectWriteTech", DirectWriteTechnology[0]); - g_iSciDirectWriteTech = max(min(g_iSciDirectWriteTech,3),-1); - - bEnableBidirectionalSupport = IniSectionGetBool(pIniSection, L"EnableBidirectionalSupport", false); - - g_iSciFontQuality = IniSectionGetInt(pIniSection,L"SciFontQuality", FontQuality[3]); - g_iSciFontQuality = max(min(g_iSciFontQuality, 3), 0); - - g_iMarkOccurrencesMaxCount = IniSectionGetInt(pIniSection,L"MarkOccurrencesMaxCount",2000); - g_iMarkOccurrencesMaxCount = (g_iMarkOccurrencesMaxCount <= 0) ? INT_MAX : g_iMarkOccurrencesMaxCount; - - iUpdateDelayHyperlinkStyling = IniSectionGetInt(pIniSection, L"UpdateDelayHyperlinkStyling", 100); - iUpdateDelayHyperlinkStyling = max(min(iUpdateDelayHyperlinkStyling, 10000), USER_TIMER_MINIMUM); - - iUpdateDelayMarkAllCoccurrences = IniSectionGetInt(pIniSection, L"UpdateDelayMarkAllCoccurrences", 50); - iUpdateDelayMarkAllCoccurrences = max(min(iUpdateDelayMarkAllCoccurrences, 10000), USER_TIMER_MINIMUM); - - g_bDenyVirtualSpaceAccess = IniSectionGetBool(pIniSection, L"DenyVirtualSpaceAccess", false); - g_bUseOldStyleBraceMatching = IniSectionGetBool(pIniSection, L"UseOldStyleBraceMatching", false); - - iCurrentLineHorizontalSlop = IniSectionGetInt(pIniSection, L"CurrentLineHorizontalSlop", 40); - iCurrentLineHorizontalSlop = max(min(iCurrentLineHorizontalSlop, 2000), 0); - - iCurrentLineVerticalSlop = IniSectionGetInt(pIniSection, L"CurrentLineVerticalSlop", 5); - iCurrentLineVerticalSlop = max(min(iCurrentLineVerticalSlop, 200), 0); - - IniSectionGetString(pIniSection, L"AdministrationTool.exe", L"", g_tchAdministrationExe, COUNTOF(g_tchAdministrationExe)); - - // -------------------------------------------------------------------------- LoadIniSection(L"Statusbar Settings", pIniSection, cchIniSection); // -------------------------------------------------------------------------- @@ -6852,18 +6895,16 @@ void LoadSettings() } // --- override by resolution specific settings --- - WCHAR tchSciDirectWriteTech[64]; - StringCchPrintf(tchSciDirectWriteTech,COUNTOF(tchSciDirectWriteTech),L"%ix%i SciDirectWriteTech",ResX,ResY); - g_iSciDirectWriteTech = IniSectionGetInt(pIniSection,tchSciDirectWriteTech,g_iSciDirectWriteTech); - g_iSciDirectWriteTech = max(min(g_iSciDirectWriteTech,3),-1); + StringCchPrintf(tchSciDirectWriteTech,COUNTOF(tchSciDirectWriteTech),L"%ix%i RenderingTechnology",ResX,ResY); + g_iRenderingTechnology = IniSectionGetInt(pIniSection,tchSciDirectWriteTech,g_iRenderingTechnology); + g_iRenderingTechnology = max(min(g_iRenderingTechnology,3),0); WCHAR tchSciFontQuality[64]; StringCchPrintf(tchSciFontQuality,COUNTOF(tchSciFontQuality),L"%ix%i SciFontQuality",ResX,ResY); g_iSciFontQuality = IniSectionGetInt(pIniSection,tchSciFontQuality,g_iSciFontQuality); g_iSciFontQuality = max(min(g_iSciFontQuality, SC_EFF_QUALITY_LCD_OPTIMIZED), SC_TECHNOLOGY_DEFAULT); - LocalFree(pIniSection); @@ -6998,6 +7039,8 @@ void SaveSettings(bool bSaveSettingsNow) { IniSectionSetBool(pIniSection, L"AlwaysOnTop", bAlwaysOnTop); IniSectionSetBool(pIniSection, L"MinimizeToTray", bMinimizeToTray); IniSectionSetBool(pIniSection, L"TransparentMode", bTransparentMode); + IniSectionSetInt(pIniSection, L"RenderingTechnology", g_iRenderingTechnology); + IniSectionSetInt(pIniSection, L"Bidirectional", g_iBidirectional); IniSectionSetBool(pIniSection, L"ShowToolbar", bShowToolbar); IniSectionSetBool(pIniSection, L"ShowStatusbar", bShowStatusbar); IniSectionSetInt(pIniSection, L"EncodingDlgSizeX", cxEncodingDlg); diff --git a/src/SciCall.h b/src/SciCall.h index 0c9b6f338..4d3cde763 100644 --- a/src/SciCall.h +++ b/src/SciCall.h @@ -382,7 +382,7 @@ DeclareSciCallV1(SetUndoCollection, SETUNDOCOLLECTION, bool, bCollectUndo) // DeclareSciCallV1(SetBufferedDraw, SETBUFFEREDDRAW, bool, value) DeclareSciCallV1(SetTechnology, SETTECHNOLOGY, int, technology) - +DeclareSciCallV1(SetBidirectional, SETBIDIRECTIONAL, int, direction) //============================================================================= //