https://git.reactos.org/?p=reactos.git;a=commitdiff;h=55e3feba539fa06753365…
commit 55e3feba539fa067533650aaf57d40752e54b805
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Mar 1 07:16:28 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Mar 1 07:16:28 2023 +0900
[NOTEPAD] Shift+F3 for backward search (#5101)
- Add Shift+F3 accelerator as command CMD_SEARCH_PREV.
- Extend DIALOG_SearchNext function with bDown argument for the action of
CMD_SEARCH_PREV.
- Modify the message loop for effective F3 key on Find/Replace dialog.
CORE-17064
---
base/applications/notepad/dialog.c | 7 ++++++-
base/applications/notepad/dialog.h | 2 +-
base/applications/notepad/lang/bg-BG.rc | 1 +
base/applications/notepad/lang/cs-CZ.rc | 1 +
base/applications/notepad/lang/da-DK.rc | 1 +
base/applications/notepad/lang/de-DE.rc | 1 +
base/applications/notepad/lang/el-GR.rc | 1 +
base/applications/notepad/lang/en-US.rc | 1 +
base/applications/notepad/lang/es-ES.rc | 1 +
base/applications/notepad/lang/et-EE.rc | 1 +
base/applications/notepad/lang/eu-ES.rc | 1 +
base/applications/notepad/lang/fi-FI.rc | 1 +
base/applications/notepad/lang/fr-FR.rc | 1 +
base/applications/notepad/lang/he-IL.rc | 1 +
base/applications/notepad/lang/hi-IN.rc | 1 +
base/applications/notepad/lang/hr-HR.rc | 1 +
base/applications/notepad/lang/hu-HU.rc | 1 +
base/applications/notepad/lang/hy-AM.rc | 1 +
base/applications/notepad/lang/id-ID.rc | 1 +
base/applications/notepad/lang/it-IT.rc | 1 +
base/applications/notepad/lang/ja-JP.rc | 1 +
base/applications/notepad/lang/lt-LT.rc | 1 +
base/applications/notepad/lang/ms-MY.rc | 1 +
base/applications/notepad/lang/nl-NL.rc | 1 +
base/applications/notepad/lang/no-NO.rc | 1 +
base/applications/notepad/lang/pl-PL.rc | 1 +
base/applications/notepad/lang/pt-BR.rc | 1 +
base/applications/notepad/lang/pt-PT.rc | 1 +
base/applications/notepad/lang/ro-RO.rc | 1 +
base/applications/notepad/lang/ru-RU.rc | 1 +
base/applications/notepad/lang/sk-SK.rc | 1 +
base/applications/notepad/lang/sl-SI.rc | 1 +
base/applications/notepad/lang/sq-AL.rc | 1 +
base/applications/notepad/lang/sv-SE.rc | 1 +
base/applications/notepad/lang/th-TH.rc | 1 +
base/applications/notepad/lang/tr-TR.rc | 1 +
base/applications/notepad/lang/uk-UA.rc | 1 +
base/applications/notepad/lang/uz-UZ.rc | 1 +
base/applications/notepad/lang/zh-CN.rc | 1 +
base/applications/notepad/lang/zh-HK.rc | 1 +
base/applications/notepad/lang/zh-TW.rc | 1 +
base/applications/notepad/main.c | 15 ++++++++++-----
base/applications/notepad/main.h | 2 +-
base/applications/notepad/notepad_res.h | 1 +
44 files changed, 58 insertions(+), 8 deletions(-)
diff --git a/base/applications/notepad/dialog.c b/base/applications/notepad/dialog.c
index b62c2768b09..72bb17a88dd 100644
--- a/base/applications/notepad/dialog.c
+++ b/base/applications/notepad/dialog.c
@@ -1070,8 +1070,13 @@ VOID DIALOG_Search(VOID)
DIALOG_SearchDialog(FindText);
}
-VOID DIALOG_SearchNext(VOID)
+VOID DIALOG_SearchNext(BOOL bDown)
{
+ if (bDown)
+ Globals.find.Flags |= FR_DOWN;
+ else
+ Globals.find.Flags &= ~FR_DOWN;
+
if (Globals.find.lpstrFindWhat != NULL)
NOTEPAD_FindNext(&Globals.find, FALSE, TRUE);
else
diff --git a/base/applications/notepad/dialog.h b/base/applications/notepad/dialog.h
index 5b9967af0ad..5ebe3b227b2 100644
--- a/base/applications/notepad/dialog.h
+++ b/base/applications/notepad/dialog.h
@@ -39,7 +39,7 @@ VOID DIALOG_EditTimeDate(VOID);
VOID DIALOG_EditWrap(VOID);
VOID DIALOG_Search(VOID);
-VOID DIALOG_SearchNext(VOID);
+VOID DIALOG_SearchNext(BOOL bDown);
VOID DIALOG_Replace(VOID);
VOID DIALOG_GoTo(VOID);
diff --git a/base/applications/notepad/lang/bg-BG.rc
b/base/applications/notepad/lang/bg-BG.rc
index 955ea84c56f..6f638b9ead2 100644
--- a/base/applications/notepad/lang/bg-BG.rc
+++ b/base/applications/notepad/lang/bg-BG.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/cs-CZ.rc
b/base/applications/notepad/lang/cs-CZ.rc
index c50c65a8b54..6b3a41a8673 100644
--- a/base/applications/notepad/lang/cs-CZ.rc
+++ b/base/applications/notepad/lang/cs-CZ.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/da-DK.rc
b/base/applications/notepad/lang/da-DK.rc
index f0b8b8e7acb..50e250611cf 100644
--- a/base/applications/notepad/lang/da-DK.rc
+++ b/base/applications/notepad/lang/da-DK.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/de-DE.rc
b/base/applications/notepad/lang/de-DE.rc
index 6143b98bbb9..367c4bf1c29 100644
--- a/base/applications/notepad/lang/de-DE.rc
+++ b/base/applications/notepad/lang/de-DE.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/el-GR.rc
b/base/applications/notepad/lang/el-GR.rc
index c362a1c76d5..5aab21d86ea 100644
--- a/base/applications/notepad/lang/el-GR.rc
+++ b/base/applications/notepad/lang/el-GR.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/en-US.rc
b/base/applications/notepad/lang/en-US.rc
index 2dd54fc24f9..50f5578e83d 100644
--- a/base/applications/notepad/lang/en-US.rc
+++ b/base/applications/notepad/lang/en-US.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/es-ES.rc
b/base/applications/notepad/lang/es-ES.rc
index b4d68c439cb..5e84bf21445 100644
--- a/base/applications/notepad/lang/es-ES.rc
+++ b/base/applications/notepad/lang/es-ES.rc
@@ -18,6 +18,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/et-EE.rc
b/base/applications/notepad/lang/et-EE.rc
index 08101d5ac6b..a0bcf0bf1c6 100644
--- a/base/applications/notepad/lang/et-EE.rc
+++ b/base/applications/notepad/lang/et-EE.rc
@@ -24,6 +24,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/eu-ES.rc
b/base/applications/notepad/lang/eu-ES.rc
index 55fce4b4ff5..7378bd87a34 100644
--- a/base/applications/notepad/lang/eu-ES.rc
+++ b/base/applications/notepad/lang/eu-ES.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/fi-FI.rc
b/base/applications/notepad/lang/fi-FI.rc
index fc140b42480..af260b19698 100644
--- a/base/applications/notepad/lang/fi-FI.rc
+++ b/base/applications/notepad/lang/fi-FI.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/fr-FR.rc
b/base/applications/notepad/lang/fr-FR.rc
index bbdaa8511c2..dc4f17032bb 100644
--- a/base/applications/notepad/lang/fr-FR.rc
+++ b/base/applications/notepad/lang/fr-FR.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/he-IL.rc
b/base/applications/notepad/lang/he-IL.rc
index a1a320a3850..c611b674a89 100644
--- a/base/applications/notepad/lang/he-IL.rc
+++ b/base/applications/notepad/lang/he-IL.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/hi-IN.rc
b/base/applications/notepad/lang/hi-IN.rc
index 15f70a0e759..67d9c87684d 100644
--- a/base/applications/notepad/lang/hi-IN.rc
+++ b/base/applications/notepad/lang/hi-IN.rc
@@ -23,6 +23,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/hr-HR.rc
b/base/applications/notepad/lang/hr-HR.rc
index 7cd1fea757e..6e201827d4d 100644
--- a/base/applications/notepad/lang/hr-HR.rc
+++ b/base/applications/notepad/lang/hr-HR.rc
@@ -23,6 +23,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/hu-HU.rc
b/base/applications/notepad/lang/hu-HU.rc
index ff0ed7099b0..6ee0bdaee9a 100644
--- a/base/applications/notepad/lang/hu-HU.rc
+++ b/base/applications/notepad/lang/hu-HU.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/hy-AM.rc
b/base/applications/notepad/lang/hy-AM.rc
index 78501b77a81..66574a6c560 100644
--- a/base/applications/notepad/lang/hy-AM.rc
+++ b/base/applications/notepad/lang/hy-AM.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/id-ID.rc
b/base/applications/notepad/lang/id-ID.rc
index c690e7d0c87..3c00fb80c68 100644
--- a/base/applications/notepad/lang/id-ID.rc
+++ b/base/applications/notepad/lang/id-ID.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/it-IT.rc
b/base/applications/notepad/lang/it-IT.rc
index 2bf7cb3c202..1c5c0766b95 100644
--- a/base/applications/notepad/lang/it-IT.rc
+++ b/base/applications/notepad/lang/it-IT.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/ja-JP.rc
b/base/applications/notepad/lang/ja-JP.rc
index ff0fbb033e6..cb5f34450aa 100644
--- a/base/applications/notepad/lang/ja-JP.rc
+++ b/base/applications/notepad/lang/ja-JP.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/lt-LT.rc
b/base/applications/notepad/lang/lt-LT.rc
index 55ea57b7134..f3f30f389c3 100644
--- a/base/applications/notepad/lang/lt-LT.rc
+++ b/base/applications/notepad/lang/lt-LT.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/ms-MY.rc
b/base/applications/notepad/lang/ms-MY.rc
index a261729f19c..c218b23f6ca 100644
--- a/base/applications/notepad/lang/ms-MY.rc
+++ b/base/applications/notepad/lang/ms-MY.rc
@@ -18,6 +18,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/nl-NL.rc
b/base/applications/notepad/lang/nl-NL.rc
index f1451f7edd0..a5767cb7e0d 100644
--- a/base/applications/notepad/lang/nl-NL.rc
+++ b/base/applications/notepad/lang/nl-NL.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/no-NO.rc
b/base/applications/notepad/lang/no-NO.rc
index bfd23c526cb..1612b9913c0 100644
--- a/base/applications/notepad/lang/no-NO.rc
+++ b/base/applications/notepad/lang/no-NO.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/pl-PL.rc
b/base/applications/notepad/lang/pl-PL.rc
index 6c064cfd089..fb9af935eb7 100644
--- a/base/applications/notepad/lang/pl-PL.rc
+++ b/base/applications/notepad/lang/pl-PL.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/pt-BR.rc
b/base/applications/notepad/lang/pt-BR.rc
index 9bf26297c29..ffc6ef44cce 100644
--- a/base/applications/notepad/lang/pt-BR.rc
+++ b/base/applications/notepad/lang/pt-BR.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/pt-PT.rc
b/base/applications/notepad/lang/pt-PT.rc
index 6eb677293c2..d9a5b8576e0 100644
--- a/base/applications/notepad/lang/pt-PT.rc
+++ b/base/applications/notepad/lang/pt-PT.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/ro-RO.rc
b/base/applications/notepad/lang/ro-RO.rc
index f8ee0a8a557..cd10206770f 100644
--- a/base/applications/notepad/lang/ro-RO.rc
+++ b/base/applications/notepad/lang/ro-RO.rc
@@ -21,6 +21,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/ru-RU.rc
b/base/applications/notepad/lang/ru-RU.rc
index 1b52362c6f8..1d27885d2f4 100644
--- a/base/applications/notepad/lang/ru-RU.rc
+++ b/base/applications/notepad/lang/ru-RU.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/sk-SK.rc
b/base/applications/notepad/lang/sk-SK.rc
index 7b7d740e85d..a27501ed73f 100644
--- a/base/applications/notepad/lang/sk-SK.rc
+++ b/base/applications/notepad/lang/sk-SK.rc
@@ -24,6 +24,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/sl-SI.rc
b/base/applications/notepad/lang/sl-SI.rc
index d3c655f8828..6a87df05d1c 100644
--- a/base/applications/notepad/lang/sl-SI.rc
+++ b/base/applications/notepad/lang/sl-SI.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/sq-AL.rc
b/base/applications/notepad/lang/sq-AL.rc
index 9ad098f2948..adc546e0411 100644
--- a/base/applications/notepad/lang/sq-AL.rc
+++ b/base/applications/notepad/lang/sq-AL.rc
@@ -20,6 +20,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/sv-SE.rc
b/base/applications/notepad/lang/sv-SE.rc
index 120eefdc5cc..55c6ff59785 100644
--- a/base/applications/notepad/lang/sv-SE.rc
+++ b/base/applications/notepad/lang/sv-SE.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/th-TH.rc
b/base/applications/notepad/lang/th-TH.rc
index 3af4eef7ea1..aacedd7305b 100644
--- a/base/applications/notepad/lang/th-TH.rc
+++ b/base/applications/notepad/lang/th-TH.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/tr-TR.rc
b/base/applications/notepad/lang/tr-TR.rc
index 78e609ca893..0401ea4a169 100644
--- a/base/applications/notepad/lang/tr-TR.rc
+++ b/base/applications/notepad/lang/tr-TR.rc
@@ -19,6 +19,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/uk-UA.rc
b/base/applications/notepad/lang/uk-UA.rc
index 854d1407c5a..a64d6e92276 100644
--- a/base/applications/notepad/lang/uk-UA.rc
+++ b/base/applications/notepad/lang/uk-UA.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/uz-UZ.rc
b/base/applications/notepad/lang/uz-UZ.rc
index 42a4d14afd0..3eaea09f591 100644
--- a/base/applications/notepad/lang/uz-UZ.rc
+++ b/base/applications/notepad/lang/uz-UZ.rc
@@ -16,6 +16,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/zh-CN.rc
b/base/applications/notepad/lang/zh-CN.rc
index 4808a2e015b..28fad41e6e6 100644
--- a/base/applications/notepad/lang/zh-CN.rc
+++ b/base/applications/notepad/lang/zh-CN.rc
@@ -24,6 +24,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/zh-HK.rc
b/base/applications/notepad/lang/zh-HK.rc
index 2ceb617aaed..2ed9942d2b5 100644
--- a/base/applications/notepad/lang/zh-HK.rc
+++ b/base/applications/notepad/lang/zh-HK.rc
@@ -24,6 +24,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/lang/zh-TW.rc
b/base/applications/notepad/lang/zh-TW.rc
index f83d9d8c80f..b4974b34d83 100644
--- a/base/applications/notepad/lang/zh-TW.rc
+++ b/base/applications/notepad/lang/zh-TW.rc
@@ -24,6 +24,7 @@ BEGIN
"^X", CMD_CUT
"^Z", CMD_UNDO
VK_F3, CMD_SEARCH_NEXT, VIRTKEY
+ VK_F3, CMD_SEARCH_PREV, VIRTKEY, SHIFT
VK_F5, CMD_TIME_DATE, VIRTKEY
END
diff --git a/base/applications/notepad/main.c b/base/applications/notepad/main.c
index e42b0c749e0..52370736318 100644
--- a/base/applications/notepad/main.c
+++ b/base/applications/notepad/main.c
@@ -5,7 +5,7 @@
* Copyright 1997,98 Marcel Baur <mbaur(a)g26.ethz.ch>
* Copyright 2002 Sylvain Petreolle <spetreolle(a)yahoo.fr>
* Copyright 2002 Andriy Palamarchuk
- * Copyright 2020 Katayama Hirofumi MZ
+ * Copyright 2020-2023 Katayama Hirofumi MZ
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -37,6 +37,7 @@ VOID NOTEPAD_EnableSearchMenu()
UINT uEnable = MF_BYCOMMAND | (bEmpty ? MF_GRAYED : MF_ENABLED);
EnableMenuItem(Globals.hMenu, CMD_SEARCH, uEnable);
EnableMenuItem(Globals.hMenu, CMD_SEARCH_NEXT, uEnable);
+ EnableMenuItem(Globals.hMenu, CMD_SEARCH_PREV, uEnable);
}
/***********************************************************************
@@ -83,9 +84,10 @@ static int NOTEPAD_MenuCommand(WPARAM wParam)
case CMD_TIME_DATE: DIALOG_EditTimeDate(); break;
case CMD_SEARCH: DIALOG_Search(); break;
- case CMD_SEARCH_NEXT: DIALOG_SearchNext(); break;
+ case CMD_SEARCH_NEXT: DIALOG_SearchNext(TRUE); break;
case CMD_REPLACE: DIALOG_Replace(); break;
case CMD_GOTO: DIALOG_GoTo(); break;
+ case CMD_SEARCH_PREV: DIALOG_SearchNext(FALSE); break;
case CMD_WRAP: DIALOG_EditWrap(); break;
case CMD_FONT: DIALOG_SelectFont(); break;
@@ -647,14 +649,17 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR
cmdline, int sh
hAccel = LoadAccelerators(hInstance, MAKEINTRESOURCE(ID_ACCEL));
- while (GetMessage(&msg, 0, 0, 0))
+ while (GetMessage(&msg, NULL, 0, 0))
{
- if (!IsDialogMessage(Globals.hFindReplaceDlg, &msg) &&
- !TranslateAccelerator(Globals.hMainWnd, hAccel, &msg))
+ if (!TranslateAccelerator(Globals.hMainWnd, hAccel, &msg) &&
+ !IsDialogMessage(Globals.hFindReplaceDlg, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
+
+ DestroyAcceleratorTable(hAccel);
+
return (int) msg.wParam;
}
diff --git a/base/applications/notepad/main.h b/base/applications/notepad/main.h
index 34d7e542670..a1ecae7e641 100644
--- a/base/applications/notepad/main.h
+++ b/base/applications/notepad/main.h
@@ -99,5 +99,5 @@ void NOTEPAD_LoadSettingsFromRegistry(void);
void NOTEPAD_SaveSettingsToRegistry(void);
/* from main.c */
-BOOL NOTEPAD_FindNext(FINDREPLACE *, BOOL , BOOL );
+BOOL NOTEPAD_FindNext(FINDREPLACE *pFindReplace, BOOL bReplace, BOOL bShowAlert);
VOID NOTEPAD_EnableSearchMenu(VOID);
diff --git a/base/applications/notepad/notepad_res.h
b/base/applications/notepad/notepad_res.h
index 460a7c8d3d4..179a1c73573 100644
--- a/base/applications/notepad/notepad_res.h
+++ b/base/applications/notepad/notepad_res.h
@@ -54,6 +54,7 @@
#define CMD_SEARCH_NEXT 0x121
#define CMD_REPLACE 0x122
#define CMD_GOTO 0x123
+#define CMD_SEARCH_PREV 0x124
#define CMD_WRAP 0x119
#define CMD_FONT 0x140