diff --git a/PowerEditor/installer/nativeLang/english.xml b/PowerEditor/installer/nativeLang/english.xml
index e5476708f..ac6c4704a 100644
--- a/PowerEditor/installer/nativeLang/english.xml
+++ b/PowerEditor/installer/nativeLang/english.xml
@@ -970,7 +970,8 @@ Translation note:
-
+
+
@@ -992,6 +993,12 @@ Translation note:
+
+
+
+
+
+
@@ -1001,7 +1008,8 @@ Translation note:
-
+
+
@@ -1085,6 +1093,7 @@ You can define several column markers by using white space to separate the diffe
+
diff --git a/PowerEditor/installer/nativeLang/english_customizable.xml b/PowerEditor/installer/nativeLang/english_customizable.xml
index 1ecf663bc..dba6e7445 100644
--- a/PowerEditor/installer/nativeLang/english_customizable.xml
+++ b/PowerEditor/installer/nativeLang/english_customizable.xml
@@ -970,6 +970,7 @@ Translation note:
+
@@ -992,6 +993,12 @@ Translation note:
+
+
+
+
+
+
@@ -1001,7 +1008,8 @@ Translation note:
-
+
+
diff --git a/PowerEditor/installer/nativeLang/french.xml b/PowerEditor/installer/nativeLang/french.xml
index bc5527d7d..48d6b9b25 100644
--- a/PowerEditor/installer/nativeLang/french.xml
+++ b/PowerEditor/installer/nativeLang/french.xml
@@ -970,7 +970,7 @@ Translation note:
-
+
@@ -992,6 +992,11 @@ Translation note:
+
+
+
+
+
@@ -1001,8 +1006,8 @@ Translation note:
-
-
+
+
diff --git a/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml b/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml
index 3020e4dfa..7823e2661 100644
--- a/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml
+++ b/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml
@@ -928,7 +928,7 @@
-
+
@@ -950,11 +950,23 @@
+
+
+
+
+
+
-
+
+
+
+
+
+
+
diff --git a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp
index 3f8cef5b1..289c6e867 100644
--- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp
+++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp
@@ -974,12 +974,12 @@ std::pair WordStyleDlg::goToPreferencesSettings()
}
else if (style._styleDesc == TEXT("EOL custom color"))
{
- result.first = 1;
+ result.first = 2;
result.second = IDC_CHECK_WITHCUSTOMCOLOR_CRLF;
}
else if (style._styleDesc == g_npcStyleName)
{
- result.first = 1;
+ result.first = 2;
result.second = IDC_CHECK_NPC_COLOR;
}
diff --git a/PowerEditor/src/WinControls/Preference/preference.rc b/PowerEditor/src/WinControls/Preference/preference.rc
index b462ffeaf..0b970b9ae 100644
--- a/PowerEditor/src/WinControls/Preference/preference.rc
+++ b/PowerEditor/src/WinControls/Preference/preference.rc
@@ -83,50 +83,51 @@ BEGIN
CONTROL "",IDC_CARETLINEFRAME_WIDTH_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | TBS_BOTH | TBS_NOTICKS | TBS_TRANSPARENTBKGND | WS_TABSTOP,68,59,57,13
LTEXT "1",IDC_CARETLINEFRAME_WIDTH_DISPLAY,127,60,12,8
- GROUPBOX "EOL (CRLF)",IDC_GB_STATIC_CRLF,11,83,150,59,BS_CENTER
- CONTROL "Default",IDC_RADIO_ROUNDCORNER_CRLF,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,17,96,100,10
- CONTROL "Plain Text",IDC_RADIO_PLEINTEXT_CRLF,"Button",BS_AUTORADIOBUTTON,17,111,100,10
- CONTROL "Custom Color",IDC_CHECK_WITHCUSTOMCOLOR_CRLF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,127,100,10
- PUSHBUTTON "...",IDC_BUTTON_LAUNCHSTYLECONF_CRLF,141,124,16,14
+ GROUPBOX "Caret Settings",IDC_CARETSETTING_STATIC,11,83,150,47,BS_CENTER
+ RTEXT "Width:",IDC_WIDTH_STATIC,30,99,37,8
+ COMBOBOX IDC_WIDTH_COMBO,73,97,40,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Blink rate:",IDC_BLINKRATE_STATIC,14,114,53,8
+ CONTROL "",IDC_CARETBLINKRATE_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | TBS_BOTH | TBS_NOTICKS | TBS_TRANSPARENTBKGND | WS_TABSTOP,81,113,57,13
+ LTEXT "S",IDC_CARETBLINKRATE_S_STATIC,140,114,12,8
+ RTEXT "F",IDC_CARETBLINKRATE_F_STATIC,68,114,12,8
- GROUPBOX "Caret Settings",IDC_CARETSETTING_STATIC,11,148,150,47,BS_CENTER
- RTEXT "Width:",IDC_WIDTH_STATIC,30,164,37,8
- COMBOBOX IDC_WIDTH_COMBO,73,162,40,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- RTEXT "Blink rate:",IDC_BLINKRATE_STATIC,14,179,53,8
- CONTROL "",IDC_CARETBLINKRATE_SLIDER,"msctls_trackbar32",TBS_AUTOTICKS | TBS_BOTH | TBS_NOTICKS | TBS_TRANSPARENTBKGND | WS_TABSTOP,81,178,57,13
- LTEXT "S",IDC_CARETBLINKRATE_S_STATIC,140,179,12,8
- RTEXT "F",IDC_CARETBLINKRATE_F_STATIC,68,179,12,8
+ GROUPBOX "Line Wrap",IDC_LW_GB_STATIC,11,138,150,59,BS_CENTER
+ CONTROL "Default",IDC_RADIO_LWDEF,"Button",BS_AUTORADIOBUTTON | WS_GROUP,16,151,68,10
+ CONTROL "Aligned",IDC_RADIO_LWALIGN,"Button",BS_AUTORADIOBUTTON,16,166,68,10
+ CONTROL "Indent",IDC_RADIO_LWINDENT,"Button",BS_AUTORADIOBUTTON,16,181,68,10
- GROUPBOX "Non-Printing Characters",IDC_GB_STATIC_NPC,171,3,188,74,BS_CENTER
- PUSHBUTTON "?",IDC_BUTTON_NPC_NOTE,339,14,16,14,NOT WS_TABSTOP
- CONTROL "Abbreviation",IDC_RADIO_NPC_ABBREVIATION,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,177,16,110,10
- CONTROL "Codepoint",IDC_RADIO_NPC_CODEPOINT,"Button",BS_AUTORADIOBUTTON,177,31,110,10
- CONTROL "Custom Color",IDC_CHECK_NPC_COLOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,177,47,110,10
- PUSHBUTTON "...",IDC_BUTTON_NPC_LAUNCHSTYLECONF,339,44,16,14
- CONTROL "Apply to C0, C1 && Unicode EOL",IDC_CHECK_NPC_INCLUDECCUNIEOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,177,62,178,10
-
- GROUPBOX "Line Wrap",IDC_LW_GB_STATIC,369,3,80,59,BS_CENTER
- CONTROL "Default",IDC_RADIO_LWDEF,"Button",BS_AUTORADIOBUTTON | WS_GROUP,375,16,68,10
- CONTROL "Aligned",IDC_RADIO_LWALIGN,"Button",BS_AUTORADIOBUTTON,375,31,68,10
- CONTROL "Indent",IDC_RADIO_LWINDENT,"Button",BS_AUTORADIOBUTTON,375,46,68,10
-
- CONTROL "Enable smooth font",IDC_CHECK_SMOOTHFONT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,88,270,10
- CONTROL "Enable virtual space",IDC_CHECK_VIRTUALSPACE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,103,270,10
- CONTROL "Make current level folding/unfolding commands toggleable",IDC_CHECK_FOLDINGTOGGLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,118,270,10
- CONTROL "Keep selection when right-click outside of selection", IDC_CHECK_RIGHTCLICKKEEPSSELECTION, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 173, 133, 270, 10
- CONTROL "Enable scrolling beyond last line",IDC_CHECK_SCROLLBEYONDLASTLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,148,270,10
- CONTROL "Disable advanced scrolling feature due to touchpad issue",IDC_CHECK_DISABLEADVANCEDSCROLL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,163,270,10
- CONTROL "Enable Copy/Cut Line without selection",IDC_CHECK_LINECUTCOPYWITHOUTSELECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,178,270,10
+ CONTROL "Enable smooth font",IDC_CHECK_SMOOTHFONT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,13,270,10
+ CONTROL "Enable virtual space",IDC_CHECK_VIRTUALSPACE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,28,270,10
+ CONTROL "Make current level folding/unfolding commands toggleable",IDC_CHECK_FOLDINGTOGGLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,43,270,10
+ CONTROL "Keep selection when right-click outside of selection",IDC_CHECK_RIGHTCLICKKEEPSSELECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,58,270,10
+ CONTROL "Enable scrolling beyond last line",IDC_CHECK_SCROLLBEYONDLASTLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,73,270,10
+ CONTROL "Disable advanced scrolling feature due to touchpad issue",IDC_CHECK_DISABLEADVANCEDSCROLL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,88,270,10
+ CONTROL "Enable Copy/Cut Line without selection",IDC_CHECK_LINECUTCOPYWITHOUTSELECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,103,270,10
END
-
IDD_PREFERENCE_SUB_EDITING2 DIALOGEX 115, 10, 460, 205
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- GROUPBOX "Multi-Editing",IDC_GB_STATIC_MULTIEDITING,80,25,290,50,BS_CENTER
- CONTROL "Enable Multi-Editing (Ctrl+Mouse click/selection)",IDC_CHECK_MULTISELECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,85,40,270,10
- CONTROL "Enable Column Selection to Multi-Editing",IDC_CHECK_COLUMN2MULTIEDITING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,55,270,10
+ GROUPBOX "Multi-Editing",IDC_GB_STATIC_MULTIEDITING,12,13,290,59,BS_CENTER
+ CONTROL "Enable Multi-Editing (Ctrl+Mouse click/selection)",IDC_CHECK_MULTISELECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,31,270,10
+ CONTROL "Enable Column Selection to Multi-Editing",IDC_CHECK_COLUMN2MULTIEDITING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,29,46,270,10
+
+ GROUPBOX "EOL (CRLF)",IDC_GB_STATIC_CRLF,318,13,131,59,BS_CENTER
+ CONTROL "Default",IDC_RADIO_ROUNDCORNER_CRLF,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,324,23,100,10
+ CONTROL "Plain Text",IDC_RADIO_PLEINTEXT_CRLF,"Button",BS_AUTORADIOBUTTON,324,37,100,10
+ CONTROL "Custom Color",IDC_CHECK_WITHCUSTOMCOLOR_CRLF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,324,57,100,10
+ PUSHBUTTON "...",IDC_BUTTON_LAUNCHSTYLECONF_CRLF,429,54,16,14
+
+ GROUPBOX "Non-Printing Characters",IDC_GB_STATIC_NPC,12,83,290,106,BS_CENTER
+ GROUPBOX "",IDC_STATIC,21,92,200,63,BS_CENTER
+ CONTROL "Abbreviation",IDC_RADIO_NPC_ABBREVIATION,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,33,101,110,10
+ PUSHBUTTON "?",IDC_BUTTON_NPC_NOTE,147,99,16,14,NOT WS_TABSTOP
+ CONTROL "Codepoint",IDC_RADIO_NPC_CODEPOINT,"Button",BS_AUTORADIOBUTTON,33,115,110,10
+ CONTROL "Custom Color",IDC_CHECK_NPC_COLOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,33,132,110,10
+ PUSHBUTTON "...",IDC_BUTTON_NPC_LAUNCHSTYLECONF,147,129,16,14
+ CONTROL "Apply to C0, C1 && Unicode EOL",IDC_CHECK_NPC_INCLUDECCUNIEOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,152,178,10
+ //CONTROL "Prevent control character (C0 code) typing into document",IDC_CHECK_NPC_NOC0CODETYPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,173,281,10
END
diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp
index 55d954a4f..c17ef9a70 100644
--- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp
+++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp
@@ -238,10 +238,10 @@ intptr_t CALLBACK PreferenceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
{
NppDarkMode::autoThemeChildControls(_hSelf);
- if (_editingSubDlg._tip != nullptr)
- NppDarkMode::setDarkTooltips(_editingSubDlg._tip, NppDarkMode::ToolTipsType::tooltip);
+ if (_editing2SubDlg._tip != nullptr)
+ NppDarkMode::setDarkTooltips(_editing2SubDlg._tip, NppDarkMode::ToolTipsType::tooltip);
- for (auto& tip : _editingSubDlg._tips)
+ for (auto& tip : _editing2SubDlg._tips)
{
if (tip != nullptr)
{
@@ -973,102 +973,6 @@ intptr_t CALLBACK EditingSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
::SendMessage(::GetDlgItem(_hSelf, IDC_CARETLINEFRAME_WIDTH_SLIDER), TBM_SETPOS, TRUE, svp._currentLineFrameWidth);
::SetDlgItemInt(_hSelf, IDC_CARETLINEFRAME_WIDTH_DISPLAY, svp._currentLineFrameWidth, FALSE);
-
- // defaul => (svp._eolMode == svp.roundedRectangleText)
- bool checkDefaultCRLF = true;
- bool checkPlainTextCRLF = false;
- bool checkWithColorCRLF = false;
-
- if (svp._eolMode == svp.plainText)
- {
- checkDefaultCRLF = false;
- checkPlainTextCRLF = true;
- checkWithColorCRLF = false;
- }
- else if (svp._eolMode == svp.plainTextCustomColor)
- {
- checkDefaultCRLF = false;
- checkPlainTextCRLF = true;
- checkWithColorCRLF = true;
- }
- else if (svp._eolMode == svp.roundedRectangleTextCustomColor)
- {
- checkDefaultCRLF = true;
- checkPlainTextCRLF = false;
- checkWithColorCRLF = true;
- }
- ::SendDlgItemMessage(_hSelf, IDC_RADIO_ROUNDCORNER_CRLF, BM_SETCHECK, checkDefaultCRLF, 0);
- ::SendDlgItemMessage(_hSelf, IDC_RADIO_PLEINTEXT_CRLF, BM_SETCHECK, checkPlainTextCRLF, 0);
- ::SendDlgItemMessage(_hSelf, IDC_CHECK_WITHCUSTOMCOLOR_CRLF, BM_SETCHECK, checkWithColorCRLF, 0);
-
-
- NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
- generic_string tip2show = pNativeSpeaker->getLocalizedStrFromID("eol-custom-color-tip", TEXT("Go to Style Configurator to change the default EOL custom color (\"EOL custom color\")."));
-
- _tip = CreateToolTip(IDC_BUTTON_LAUNCHSTYLECONF_CRLF, _hSelf, _hInst, const_cast(tip2show.c_str()), pNativeSpeaker->isRTL());
-
- const bool isNpcModeAbbrv = svp._npcMode == svp.abbreviation;
- setChecked(IDC_RADIO_NPC_ABBREVIATION, isNpcModeAbbrv);
- setChecked(IDC_RADIO_NPC_CODEPOINT, !isNpcModeAbbrv);
-
- setChecked(IDC_CHECK_NPC_COLOR, svp._npcCustomColor);
- setChecked(IDC_CHECK_NPC_INCLUDECCUNIEOL, svp._npcIncludeCcUniEol);
-
- generic_string tipNote2Show = pNativeSpeaker->getLocalizedStrFromID("npcNote-tip",
- L"Representation of selected \"non-ASCII\" whitespace and non-printing (control) characters.\n\n"\
- L"NOTE:\n"\
- L"Using representation will disable character effects on text.\n\n"\
- L"For the full list of selected whitespace and non-printing characters check User Manual.\n\n"\
- L"Click on this button to open website with User Manual.");
-
- generic_string tipAb2Show = pNativeSpeaker->getLocalizedStrFromID("npcAbbreviation-tip",
- L"Abbreviation : name\n"\
- L"NBSP : no-break space\n"\
- L"ZWSP : zero-width space\n"\
- L"ZWNBSP : zero-width no-break space\n\n"\
- L"For the full list check User Manual.\n"\
- L"Click on \"?\" button on right to open website with User Manual.");
-
- generic_string tipCp2Show = pNativeSpeaker->getLocalizedStrFromID("npcCodepoint-tip",
- L"Codepoint : name\n"\
- L"U+00A0 : no-break space\n"\
- L"U+200B : zero-width space\n"\
- L"U+FEFF : zero-width no-break space\n\n"\
- L"For the full list check User Manual.\n"\
- L"Click on \"?\" button on right to open website with User Manual.");
-
- generic_string tipNpcCol2show = pNativeSpeaker->getLocalizedStrFromID("npcCustomColor-tip",
- L"Go to Style Configurator to change the default custom color for selected whitespace and non-printing characters (\"Non-printing characters custom color\").");
-
- generic_string tipNpcInc2show = pNativeSpeaker->getLocalizedStrFromID("npcIncludeCcUniEol-tip",
- L"Apply non-printing characters appearance settings to C0, C1 control and Unicode EOL (next line, line separator and paragraph separator) characters.");
-
- _tipNote = CreateToolTip(IDC_BUTTON_NPC_NOTE, _hSelf, _hInst, const_cast(tipNote2Show.c_str()), pNativeSpeaker->isRTL());
- _tipAbb = CreateToolTip(IDC_RADIO_NPC_ABBREVIATION, _hSelf, _hInst, const_cast(tipAb2Show.c_str()), pNativeSpeaker->isRTL());
- _tipCodepoint = CreateToolTip(IDC_RADIO_NPC_CODEPOINT, _hSelf, _hInst, const_cast(tipCp2Show.c_str()), pNativeSpeaker->isRTL());
- _tipNpcColor = CreateToolTip(IDC_BUTTON_NPC_LAUNCHSTYLECONF, _hSelf, _hInst, const_cast(tipNpcCol2show.c_str()), pNativeSpeaker->isRTL());
- _tipNpcInclude = CreateToolTip(IDC_CHECK_NPC_INCLUDECCUNIEOL, _hSelf, _hInst, const_cast(tipNpcInc2show.c_str()), pNativeSpeaker->isRTL());
-
- _tips.push_back(_tipNote);
- _tips.push_back(_tipAbb);
- _tips.push_back(_tipCodepoint);
- _tips.push_back(_tipNpcColor);
- _tips.push_back(_tipNpcInclude);
-
- for (auto& tip : _tips)
- {
- if (tip != nullptr)
- {
- ::SendMessage(tip, TTM_SETMAXTIPWIDTH, 0, 260);
- }
- }
-
- if (_tipNote != nullptr)
- {
- // Make tip stay 30 seconds
- ::SendMessage(_tipNote, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELPARAM((30000), (0)));
- }
-
initScintParam();
return TRUE;
@@ -1159,6 +1063,229 @@ intptr_t CALLBACK EditingSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
changeLineHiliteMode(true);
return TRUE;
+ case IDC_CHECK_VIRTUALSPACE:
+ svp._virtualSpace = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_VIRTUALSPACE, BM_GETCHECK, 0, 0));
+ ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_VIRTUALSPACE, 0, 0);
+ return TRUE;
+
+ case IDC_CHECK_SCROLLBEYONDLASTLINE:
+ svp._scrollBeyondLastLine = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_SCROLLBEYONDLASTLINE, BM_GETCHECK, 0, 0));
+ ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_SCROLLBEYONDLASTLINE, 0, 0);
+ return TRUE;
+
+ case IDC_CHECK_LINECUTCOPYWITHOUTSELECTION:
+ {
+ bool isChecked = BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_LINECUTCOPYWITHOUTSELECTION, BM_GETCHECK, 0, 0);
+ svp._lineCopyCutWithoutSelection = isChecked;
+ ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_LINECUTCOPYWITHOUTSELECTION, 0, 0);
+ return TRUE;
+ }
+
+ case IDC_CHECK_RIGHTCLICKKEEPSSELECTION:
+ svp._rightClickKeepsSelection = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_RIGHTCLICKKEEPSSELECTION, BM_GETCHECK, 0, 0));
+ return TRUE;
+
+ case IDC_CHECK_DISABLEADVANCEDSCROLL:
+ svp._disableAdvancedScrolling = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_DISABLEADVANCEDSCROLL, BM_GETCHECK, 0, 0));
+ return TRUE;
+
+ case IDC_CHECK_FOLDINGTOGGLE:
+ nppGUI._enableFoldCmdToggable = isCheckedOrNot(IDC_CHECK_FOLDINGTOGGLE);
+ return TRUE;
+
+ case IDC_RADIO_LWDEF:
+ svp._lineWrapMethod = LINEWRAP_DEFAULT;
+ ::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_LWDEF, 0);
+ return TRUE;
+
+ case IDC_RADIO_LWALIGN:
+ svp._lineWrapMethod = LINEWRAP_ALIGNED;
+ ::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_LWALIGN, 0);
+ return TRUE;
+
+ case IDC_RADIO_LWINDENT:
+ svp._lineWrapMethod = LINEWRAP_INDENT;
+ ::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_LWINDENT, 0);
+ return TRUE;
+
+ default :
+ switch (HIWORD(wParam))
+ {
+ case CBN_SELCHANGE : // == case LBN_SELCHANGE :
+ {
+ if (LOWORD(wParam) == IDC_WIDTH_COMBO)
+ {
+ nppGUI._caretWidth = static_cast(::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_GETCURSEL, 0, 0));
+ ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_SETCARETWIDTH, 0, 0);
+ return TRUE;
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ return FALSE;
+}
+
+intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM /*lParam*/)
+{
+ NppParameters& nppParam = NppParameters::getInstance();
+ ScintillaViewParams& svp = (ScintillaViewParams&)nppParam.getSVP();
+
+ switch (message)
+ {
+ case WM_INITDIALOG:
+ {
+ // defaul => (svp._eolMode == svp.roundedRectangleText)
+ bool checkDefaultCRLF = true;
+ bool checkPlainTextCRLF = false;
+ bool checkWithColorCRLF = false;
+
+ if (svp._eolMode == svp.plainText)
+ {
+ checkDefaultCRLF = false;
+ checkPlainTextCRLF = true;
+ checkWithColorCRLF = false;
+ }
+ else if (svp._eolMode == svp.plainTextCustomColor)
+ {
+ checkDefaultCRLF = false;
+ checkPlainTextCRLF = true;
+ checkWithColorCRLF = true;
+ }
+ else if (svp._eolMode == svp.roundedRectangleTextCustomColor)
+ {
+ checkDefaultCRLF = true;
+ checkPlainTextCRLF = false;
+ checkWithColorCRLF = true;
+ }
+ ::SendDlgItemMessage(_hSelf, IDC_RADIO_ROUNDCORNER_CRLF, BM_SETCHECK, checkDefaultCRLF, 0);
+ ::SendDlgItemMessage(_hSelf, IDC_RADIO_PLEINTEXT_CRLF, BM_SETCHECK, checkPlainTextCRLF, 0);
+ ::SendDlgItemMessage(_hSelf, IDC_CHECK_WITHCUSTOMCOLOR_CRLF, BM_SETCHECK, checkWithColorCRLF, 0);
+
+
+ NppParameters& nppParam = NppParameters::getInstance();
+ ScintillaViewParams& svp = const_cast(nppParam.getSVP());
+ ::SendDlgItemMessage(_hSelf, IDC_CHECK_MULTISELECTION, BM_SETCHECK, svp._multiSelection, 0);
+ ::SendDlgItemMessage(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING, BM_SETCHECK, svp._columnSel2MultiEdit, 0);
+ ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING), svp._multiSelection);
+
+ NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
+ generic_string tip2show = pNativeSpeaker->getLocalizedStrFromID("eol-custom-color-tip", TEXT("Go to Style Configurator to change the default EOL custom color (\"EOL custom color\")."));
+
+ _tip = CreateToolTip(IDC_BUTTON_LAUNCHSTYLECONF_CRLF, _hSelf, _hInst, const_cast(tip2show.c_str()), pNativeSpeaker->isRTL());
+
+ const bool isNpcModeAbbrv = svp._npcMode == svp.abbreviation;
+ setChecked(IDC_RADIO_NPC_ABBREVIATION, isNpcModeAbbrv);
+ setChecked(IDC_RADIO_NPC_CODEPOINT, !isNpcModeAbbrv);
+
+ setChecked(IDC_CHECK_NPC_COLOR, svp._npcCustomColor);
+ setChecked(IDC_CHECK_NPC_INCLUDECCUNIEOL, svp._npcIncludeCcUniEol);
+
+ generic_string tipNote2Show = pNativeSpeaker->getLocalizedStrFromID("npcNote-tip",
+ L"Representation of selected \"non-ASCII\" whitespace and non-printing (control) characters.\n\n"\
+ L"NOTE:\n"\
+ L"Using representation will disable character effects on text.\n\n"\
+ L"For the full list of selected whitespace and non-printing characters check User Manual.\n\n"\
+ L"Click on this button to open website with User Manual.");
+
+ generic_string tipAb2Show = pNativeSpeaker->getLocalizedStrFromID("npcAbbreviation-tip",
+ L"Abbreviation : name\n"\
+ L"NBSP : no-break space\n"\
+ L"ZWSP : zero-width space\n"\
+ L"ZWNBSP : zero-width no-break space\n\n"\
+ L"For the full list check User Manual.\n"\
+ L"Click on \"?\" button on right to open website with User Manual.");
+
+ generic_string tipCp2Show = pNativeSpeaker->getLocalizedStrFromID("npcCodepoint-tip",
+ L"Codepoint : name\n"\
+ L"U+00A0 : no-break space\n"\
+ L"U+200B : zero-width space\n"\
+ L"U+FEFF : zero-width no-break space\n\n"\
+ L"For the full list check User Manual.\n"\
+ L"Click on \"?\" button on right to open website with User Manual.");
+
+ generic_string tipNpcCol2show = pNativeSpeaker->getLocalizedStrFromID("npcCustomColor-tip",
+ L"Go to Style Configurator to change the default custom color for selected whitespace and non-printing characters (\"Non-printing characters custom color\").");
+
+ generic_string tipNpcInc2show = pNativeSpeaker->getLocalizedStrFromID("npcIncludeCcUniEol-tip",
+ L"Apply non-printing characters appearance settings to C0, C1 control and Unicode EOL (next line, line separator and paragraph separator) characters.");
+
+ _tipNote = CreateToolTip(IDC_BUTTON_NPC_NOTE, _hSelf, _hInst, const_cast(tipNote2Show.c_str()), pNativeSpeaker->isRTL());
+ _tipAbb = CreateToolTip(IDC_RADIO_NPC_ABBREVIATION, _hSelf, _hInst, const_cast(tipAb2Show.c_str()), pNativeSpeaker->isRTL());
+ _tipCodepoint = CreateToolTip(IDC_RADIO_NPC_CODEPOINT, _hSelf, _hInst, const_cast(tipCp2Show.c_str()), pNativeSpeaker->isRTL());
+ _tipNpcColor = CreateToolTip(IDC_BUTTON_NPC_LAUNCHSTYLECONF, _hSelf, _hInst, const_cast(tipNpcCol2show.c_str()), pNativeSpeaker->isRTL());
+ _tipNpcInclude = CreateToolTip(IDC_CHECK_NPC_INCLUDECCUNIEOL, _hSelf, _hInst, const_cast(tipNpcInc2show.c_str()), pNativeSpeaker->isRTL());
+
+ _tips.push_back(_tipNote);
+ _tips.push_back(_tipAbb);
+ _tips.push_back(_tipCodepoint);
+ _tips.push_back(_tipNpcColor);
+ _tips.push_back(_tipNpcInclude);
+
+ for (auto& tip : _tips)
+ {
+ if (tip != nullptr)
+ {
+ ::SendMessage(tip, TTM_SETMAXTIPWIDTH, 0, 260);
+ }
+ }
+
+ if (_tipNote != nullptr)
+ {
+ // Make tip stay 30 seconds
+ ::SendMessage(_tipNote, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELPARAM((30000), (0)));
+ }
+ }
+ return TRUE;
+
+ case WM_CTLCOLOREDIT:
+ {
+ return NppDarkMode::onCtlColorSofter(reinterpret_cast(wParam));
+ }
+
+ case WM_CTLCOLORDLG:
+ case WM_CTLCOLORSTATIC:
+ {
+ return NppDarkMode::onCtlColorDarker(reinterpret_cast(wParam));
+ }
+
+ case WM_PRINTCLIENT:
+ {
+ if (NppDarkMode::isEnabled())
+ {
+ return TRUE;
+ }
+ break;
+ }
+
+ case WM_COMMAND:
+ {
+ NppParameters& nppParam = NppParameters::getInstance();
+ ScintillaViewParams& svp = const_cast(nppParam.getSVP());
+ switch (wParam)
+ {
+ case IDC_CHECK_MULTISELECTION:
+ {
+ svp._multiSelection = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_MULTISELECTION, BM_GETCHECK, 0, 0));
+ if (!svp._multiSelection)
+ {
+ ::SendDlgItemMessage(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING, BM_SETCHECK, FALSE, 0);
+ svp._columnSel2MultiEdit = false;
+ }
+
+ ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING), svp._multiSelection);
+ ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_SETMULTISELCTION, 0, 0);
+ }
+ return TRUE;
+
+ case IDC_CHECK_COLUMN2MULTIEDITING:
+ {
+ svp._columnSel2MultiEdit = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING, BM_GETCHECK, 0, 0));
+ }
+ return TRUE;
+
case IDC_RADIO_ROUNDCORNER_CRLF:
case IDC_RADIO_PLEINTEXT_CRLF:
case IDC_CHECK_WITHCUSTOMCOLOR_CRLF:
@@ -1243,131 +1370,6 @@ intptr_t CALLBACK EditingSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
::SendMessage(grandParent, NPPM_INTERNAL_SETNPC, IDC_CHECK_NPC_INCLUDECCUNIEOL, 0);
return TRUE;
}
-
- case IDC_CHECK_VIRTUALSPACE:
- svp._virtualSpace = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_VIRTUALSPACE, BM_GETCHECK, 0, 0));
- ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_VIRTUALSPACE, 0, 0);
- return TRUE;
-
- case IDC_CHECK_SCROLLBEYONDLASTLINE:
- svp._scrollBeyondLastLine = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_SCROLLBEYONDLASTLINE, BM_GETCHECK, 0, 0));
- ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_SCROLLBEYONDLASTLINE, 0, 0);
- return TRUE;
-
- case IDC_CHECK_LINECUTCOPYWITHOUTSELECTION:
- {
- bool isChecked = BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_LINECUTCOPYWITHOUTSELECTION, BM_GETCHECK, 0, 0);
- svp._lineCopyCutWithoutSelection = isChecked;
- ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_LINECUTCOPYWITHOUTSELECTION, 0, 0);
- return TRUE;
- }
-
- case IDC_CHECK_RIGHTCLICKKEEPSSELECTION:
- svp._rightClickKeepsSelection = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_RIGHTCLICKKEEPSSELECTION, BM_GETCHECK, 0, 0));
- return TRUE;
-
- case IDC_CHECK_DISABLEADVANCEDSCROLL:
- svp._disableAdvancedScrolling = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_DISABLEADVANCEDSCROLL, BM_GETCHECK, 0, 0));
- return TRUE;
-
- case IDC_CHECK_FOLDINGTOGGLE:
- nppGUI._enableFoldCmdToggable = isCheckedOrNot(IDC_CHECK_FOLDINGTOGGLE);
- return TRUE;
-
- case IDC_RADIO_LWDEF:
- svp._lineWrapMethod = LINEWRAP_DEFAULT;
- ::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_LWDEF, 0);
- return TRUE;
-
- case IDC_RADIO_LWALIGN:
- svp._lineWrapMethod = LINEWRAP_ALIGNED;
- ::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_LWALIGN, 0);
- return TRUE;
-
- case IDC_RADIO_LWINDENT:
- svp._lineWrapMethod = LINEWRAP_INDENT;
- ::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_LWINDENT, 0);
- return TRUE;
-
- default :
- switch (HIWORD(wParam))
- {
- case CBN_SELCHANGE : // == case LBN_SELCHANGE :
- {
- if (LOWORD(wParam) == IDC_WIDTH_COMBO)
- {
- nppGUI._caretWidth = static_cast(::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_GETCURSEL, 0, 0));
- ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_SETCARETWIDTH, 0, 0);
- return TRUE;
- }
- }
- break;
- }
- }
- }
- }
- return FALSE;
-}
-
-intptr_t CALLBACK Editing2SubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM /*lParam*/)
-{
- switch (message)
- {
- case WM_INITDIALOG:
- {
- NppParameters& nppParam = NppParameters::getInstance();
- ScintillaViewParams& svp = const_cast(nppParam.getSVP());
- ::SendDlgItemMessage(_hSelf, IDC_CHECK_MULTISELECTION, BM_SETCHECK, svp._multiSelection, 0);
- ::SendDlgItemMessage(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING, BM_SETCHECK, svp._columnSel2MultiEdit, 0);
- ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING), svp._multiSelection);
- }
- return TRUE;
-
- case WM_CTLCOLOREDIT:
- {
- return NppDarkMode::onCtlColorSofter(reinterpret_cast(wParam));
- }
-
- case WM_CTLCOLORDLG:
- case WM_CTLCOLORSTATIC:
- {
- return NppDarkMode::onCtlColorDarker(reinterpret_cast(wParam));
- }
-
- case WM_PRINTCLIENT:
- {
- if (NppDarkMode::isEnabled())
- {
- return TRUE;
- }
- break;
- }
-
- case WM_COMMAND:
- {
- NppParameters& nppParam = NppParameters::getInstance();
- ScintillaViewParams& svp = const_cast(nppParam.getSVP());
- switch (wParam)
- {
- case IDC_CHECK_MULTISELECTION:
- {
- svp._multiSelection = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_MULTISELECTION, BM_GETCHECK, 0, 0));
- if (!svp._multiSelection)
- {
- ::SendDlgItemMessage(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING, BM_SETCHECK, FALSE, 0);
- svp._columnSel2MultiEdit = false;
- }
-
- ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING), svp._multiSelection);
- ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_SETMULTISELCTION, 0, 0);
- }
- return TRUE;
-
- case IDC_CHECK_COLUMN2MULTIEDITING:
- {
- svp._columnSel2MultiEdit = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_COLUMN2MULTIEDITING, BM_GETCHECK, 0, 0));
- }
- return TRUE;
}
}
return TRUE;
diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.h b/PowerEditor/src/WinControls/Preference/preferenceDlg.h
index 7ef31a71a..c4063c6eb 100644
--- a/PowerEditor/src/WinControls/Preference/preferenceDlg.h
+++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.h
@@ -47,7 +47,20 @@ class EditingSubDlg : public StaticDialog
friend class PreferenceDlg;
public :
EditingSubDlg() = default;
- ~EditingSubDlg() {
+ ~EditingSubDlg() = default;
+
+private :
+ intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
+ void initScintParam();
+ void changeLineHiliteMode(bool enableSlider);
+};
+
+class Editing2SubDlg : public StaticDialog
+{
+friend class PreferenceDlg;
+public :
+ Editing2SubDlg() = default;
+ ~Editing2SubDlg() {
if (_tip != nullptr)
{
::DestroyWindow(_tip);
@@ -63,8 +76,8 @@ public :
}
}
};
-
-private :
+
+private:
HWND _tip = nullptr;
HWND _tipNote = nullptr;
HWND _tipAbb = nullptr;
@@ -73,20 +86,6 @@ private :
HWND _tipNpcInclude = nullptr;
std::vector _tips;
-
- intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
- void initScintParam();
- void changeLineHiliteMode(bool enableSlider);
-};
-
-class Editing2SubDlg : public StaticDialog
-{
-friend class PreferenceDlg;
-public :
- Editing2SubDlg() = default;
- ~Editing2SubDlg() = default;
-
-private:
intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
};
diff --git a/PowerEditor/src/WinControls/Preference/preference_rc.h b/PowerEditor/src/WinControls/Preference/preference_rc.h
index 1a0202e94..41ca942c4 100644
--- a/PowerEditor/src/WinControls/Preference/preference_rc.h
+++ b/PowerEditor/src/WinControls/Preference/preference_rc.h
@@ -166,6 +166,7 @@
#define IDC_CHECK_NPC_COLOR (IDD_PREFERENCE_SUB_EDITING + 56)
#define IDC_BUTTON_NPC_LAUNCHSTYLECONF (IDD_PREFERENCE_SUB_EDITING + 57)
#define IDC_CHECK_NPC_INCLUDECCUNIEOL (IDD_PREFERENCE_SUB_EDITING + 58)
+ #define IDC_CHECK_NPC_NOC0CODETYPING (IDD_PREFERENCE_SUB_EDITING + 59)
#define IDD_PREFERENCE_SUB_DELIMITER 6250 //(IDD_PREFERENCE_BOX + 250)
#define IDC_DELIMITERSETTINGS_GB_STATIC (IDD_PREFERENCE_SUB_DELIMITER + 1)
diff --git a/PowerEditor/src/localization.cpp b/PowerEditor/src/localization.cpp
index d8560bee0..8635d5093 100644
--- a/PowerEditor/src/localization.cpp
+++ b/PowerEditor/src/localization.cpp
@@ -944,6 +944,13 @@ void NativeLangSpeaker::changePrefereceDlgLang(PreferenceDlg & preference)
preference.renameDialogTitle(TEXT("Scintillas"), nameW);
}
+ changeDlgLang(preference._editing2SubDlg.getHSelf(), "Scintillas2", titre, titreMaxSize);
+ if (titre[0] != '\0')
+ {
+ const wchar_t *nameW = wmc.char2wchar(titre, _nativeLangEncoding);
+ preference.renameDialogTitle(TEXT("Scintillas2"), nameW);
+ }
+
changeDlgLang(preference._darkModeSubDlg.getHSelf(), "DarkMode", titre, titreMaxSize);
if (titre[0] != '\0')
{