ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2023
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
97 discussions
Start a n
N
ew thread
[reactos] 01/01: [NOTEPAD] Shift+F3 for backward search (#5101)
by Katayama Hirofumi MZ
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
1 year, 10 months
1
0
0
0
[reactos] 01/01: [RAPPS] Style-addendum, no functional change (#5091)
by Joachim Henze
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a9b1e059f422ecb6d02f4…
commit a9b1e059f422ecb6d02f46720f8cc1e5b50decb1 Author: Joachim Henze <joachim.henze(a)reactos.org> AuthorDate: Tue Feb 28 01:00:29 2023 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Feb 28 01:00:29 2023 +0100 [RAPPS] Style-addendum, no functional change (#5091) * Just rename the 4 new files. Absolutely no other change. * CMakeLists.txt, adapt the filenames * Adapt all includes to make it compile * CApplicationDB->CAppDB * CApplicationInfo->CAppInfo * Follow Mark Jansens good example and antipad the headers --- base/applications/rapps/CMakeLists.txt | 8 ++--- .../rapps/{applicationdb.cpp => appdb.cpp} | 36 +++++++++++----------- .../rapps/{applicationinfo.cpp => appinfo.cpp} | 12 ++++---- base/applications/rapps/appview.cpp | 10 +++--- base/applications/rapps/asyncinet.cpp | 2 +- base/applications/rapps/cabinet.cpp | 2 +- base/applications/rapps/gui.cpp | 28 ++++++++--------- base/applications/rapps/include/appdb.h | 35 +++++++++++++++++++++ .../rapps/include/{applicationinfo.h => appinfo.h} | 10 +++--- base/applications/rapps/include/applicationdb.h | 35 --------------------- base/applications/rapps/include/appview.h | 6 ++-- base/applications/rapps/include/dialogs.h | 8 ++--- base/applications/rapps/include/gui.h | 10 +++--- base/applications/rapps/include/rapps.h | 4 +-- base/applications/rapps/include/rosui.h | 2 +- base/applications/rapps/loaddlg.cpp | 18 +++++------ base/applications/rapps/misc.cpp | 4 +-- base/applications/rapps/settings.cpp | 2 +- base/applications/rapps/settingsdlg.cpp | 4 +-- base/applications/rapps/unattended.cpp | 26 ++++++++-------- base/applications/rapps/winmain.cpp | 4 +-- 21 files changed, 133 insertions(+), 133 deletions(-) diff --git a/base/applications/rapps/CMakeLists.txt b/base/applications/rapps/CMakeLists.txt index 0e22cea8134..5f3bbcc3cca 100644 --- a/base/applications/rapps/CMakeLists.txt +++ b/base/applications/rapps/CMakeLists.txt @@ -5,8 +5,8 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils) include_directories(include) list(APPEND SOURCE - applicationdb.cpp - applicationinfo.cpp + appdb.cpp + appinfo.cpp appview.cpp asyncinet.cpp cabinet.cpp @@ -19,8 +19,8 @@ list(APPEND SOURCE settingsdlg.cpp unattended.cpp winmain.cpp - include/applicationdb.h - include/applicationinfo.h + include/appdb.h + include/appinfo.h include/appview.h include/asyncinet.h include/configparser.h diff --git a/base/applications/rapps/applicationdb.cpp b/base/applications/rapps/appdb.cpp similarity index 87% rename from base/applications/rapps/applicationdb.cpp rename to base/applications/rapps/appdb.cpp index f1044c57ba8..b6fb33214ac 100644 --- a/base/applications/rapps/applicationdb.cpp +++ b/base/applications/rapps/appdb.cpp @@ -2,13 +2,13 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: Classes for working with available applications - * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) - * Copyright 2020 He Yang (1160386205(a)qq.com) + * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) + * Copyright 2020 He Yang (1160386205(a)qq.com) * Copyright 2021-2023 Mark Jansen <mark.jansen(a)reactos.org> */ #include "rapps.h" -#include "applicationdb.h" +#include "appdb.h" #include "configparser.h" #include "settings.h" @@ -18,29 +18,29 @@ static REGSAM g_RegSamEnum[3] = {KEY_WOW64_32KEY, KEY_WOW64_32KEY, KEY_WOW64_64K #define UNINSTALL_SUBKEY L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall" static VOID -ClearList(CAtlList<CApplicationInfo *> &list) +ClearList(CAtlList<CAppInfo *> &list) { POSITION InfoListPosition = list.GetHeadPosition(); while (InfoListPosition) { - CApplicationInfo *Info = list.GetNext(InfoListPosition); + CAppInfo *Info = list.GetNext(InfoListPosition); delete Info; } list.RemoveAll(); } -CApplicationDB::CApplicationDB(const CStringW &path) : m_BasePath(path) +CAppDB::CAppDB(const CStringW &path) : m_BasePath(path) { m_BasePath.Canonicalize(); } -CApplicationInfo * -CApplicationDB::FindByPackageName(const CStringW &name) +CAppInfo * +CAppDB::FindByPackageName(const CStringW &name) { POSITION CurrentListPosition = m_Available.GetHeadPosition(); while (CurrentListPosition) { - CApplicationInfo *Info = m_Available.GetNext(CurrentListPosition); + CAppInfo *Info = m_Available.GetNext(CurrentListPosition); if (Info->szIdentifier == name) { return Info; @@ -50,16 +50,16 @@ CApplicationDB::FindByPackageName(const CStringW &name) } void -CApplicationDB::GetApps(CAtlList<CApplicationInfo *> &List, AppsCategories Type) const +CAppDB::GetApps(CAtlList<CAppInfo *> &List, AppsCategories Type) const { const BOOL UseInstalled = IsInstalledEnum(Type); - const CAtlList<CApplicationInfo *> &list = UseInstalled ? m_Installed : m_Available; + const CAtlList<CAppInfo *> &list = UseInstalled ? m_Installed : m_Available; const BOOL IncludeAll = UseInstalled ? (Type == ENUM_ALL_INSTALLED) : (Type == ENUM_ALL_AVAILABLE); POSITION CurrentListPosition = list.GetHeadPosition(); while (CurrentListPosition) { - CApplicationInfo *Info = list.GetNext(CurrentListPosition); + CAppInfo *Info = list.GetNext(CurrentListPosition); if (IncludeAll || Type == Info->iCategory) { @@ -69,7 +69,7 @@ CApplicationDB::GetApps(CAtlList<CApplicationInfo *> &List, AppsCategories Type) } BOOL -CApplicationDB::EnumerateFiles() +CAppDB::EnumerateFiles() { ClearList(m_Available); @@ -91,7 +91,7 @@ CApplicationDB::EnumerateFiles() PathRemoveExtensionW(szPkgName.GetBuffer(MAX_PATH)); szPkgName.ReleaseBuffer(); - CApplicationInfo *Info = FindByPackageName(szPkgName); + CAppInfo *Info = FindByPackageName(szPkgName); ATLASSERT(Info == NULL); if (!Info) { @@ -118,7 +118,7 @@ CApplicationDB::EnumerateFiles() } VOID -CApplicationDB::UpdateAvailable() +CAppDB::UpdateAvailable() { if (!CreateDirectoryW(m_BasePath, NULL) && GetLastError() != ERROR_ALREADY_EXISTS) return; @@ -142,7 +142,7 @@ CApplicationDB::UpdateAvailable() } VOID -CApplicationDB::UpdateInstalled() +CAppDB::UpdateInstalled() { // Remove all old entries ClearList(m_Installed); @@ -239,7 +239,7 @@ DeleteWithWildcard(const CPathW &Dir, const CStringW &Filter) } VOID -CApplicationDB::RemoveCached() +CAppDB::RemoveCached() { // Delete icons CPathW AppsPath = m_BasePath; @@ -263,7 +263,7 @@ CApplicationDB::RemoveCached() } BOOL -CApplicationDB::RemoveInstalledAppFromRegistry(const CApplicationInfo *Info) +CAppDB::RemoveInstalledAppFromRegistry(const CAppInfo *Info) { // Validate that this is actually an installed app / update ATLASSERT(Info->iCategory == ENUM_INSTALLED_APPLICATIONS || Info->iCategory == ENUM_UPDATES); diff --git a/base/applications/rapps/applicationinfo.cpp b/base/applications/rapps/appinfo.cpp similarity index 97% rename from base/applications/rapps/applicationinfo.cpp rename to base/applications/rapps/appinfo.cpp index 942668e05de..765f02016bb 100644 --- a/base/applications/rapps/applicationinfo.cpp +++ b/base/applications/rapps/appinfo.cpp @@ -2,20 +2,20 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: Classes for working with available applications - * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) - * Copyright 2020 He Yang (1160386205(a)qq.com) + * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) + * Copyright 2020 He Yang (1160386205(a)qq.com) * Copyright 2021-2023 Mark Jansen <mark.jansen(a)reactos.org> */ #include "rapps.h" #include "appview.h" -CApplicationInfo::CApplicationInfo(const CStringW &Identifier, AppsCategories Category) +CAppInfo::CAppInfo(const CStringW &Identifier, AppsCategories Category) : szIdentifier(Identifier), iCategory(Category) { } -CApplicationInfo::~CApplicationInfo() +CAppInfo::~CAppInfo() { } @@ -24,7 +24,7 @@ CAvailableApplicationInfo::CAvailableApplicationInfo( const CStringW &PkgName, AppsCategories Category, const CPathW &BasePath) - : CApplicationInfo(PkgName, Category), m_Parser(Parser), m_ScrnshotRetrieved(false), m_LanguagesLoaded(false) + : CAppInfo(PkgName, Category), m_Parser(Parser), m_ScrnshotRetrieved(false), m_LanguagesLoaded(false) { m_Parser->GetString(L"Name", szDisplayName); m_Parser->GetString(L"Version", szDisplayVersion); @@ -369,7 +369,7 @@ CInstalledApplicationInfo::CInstalledApplicationInfo( const CStringW &KeyName, AppsCategories Category, int KeyIndex) - : CApplicationInfo(KeyName, Category), m_hKey(Key), iKeyIndex(KeyIndex) + : CAppInfo(KeyName, Category), m_hKey(Key), iKeyIndex(KeyIndex) { if (GetApplicationRegString(L"DisplayName", szDisplayName)) { diff --git a/base/applications/rapps/appview.cpp b/base/applications/rapps/appview.cpp index 5c1c548b6a6..3157f7634e2 100644 --- a/base/applications/rapps/appview.cpp +++ b/base/applications/rapps/appview.cpp @@ -914,7 +914,7 @@ CAppInfoDisplay::Create(HWND hwndParent) } VOID -CAppInfoDisplay::ShowAppInfo(CApplicationInfo *Info) +CAppInfoDisplay::ShowAppInfo(CAppInfo *Info) { CStringW ScrnshotLocation; if (Info->RetrieveScreenshot(ScrnshotLocation)) @@ -1280,7 +1280,7 @@ CAppsListView::SetViewMode(DWORD ViewMode) } BOOL -CAppsListView::AddApplication(CApplicationInfo *AppInfo, BOOL InitialCheckState) +CAppsListView::AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState) { if (ApplicationViewType == AppViewTypeInstalledApps) { @@ -1474,7 +1474,7 @@ CApplicationView::ProcessWindowMessage( if (ApplicationViewType == AppViewTypeAvailableApps) { m_MainWindow->InstallApplication( - (CApplicationInfo *)m_ListView->GetItemData(Item->iItem)); + (CAppInfo *)m_ListView->GetItemData(Item->iItem)); } } } @@ -1851,7 +1851,7 @@ CApplicationView::SetDisplayAppType(APPLICATION_VIEW_TYPE AppType) } BOOL -CApplicationView::AddApplication(CApplicationInfo *AppInfo, BOOL InitialCheckState) +CApplicationView::AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState) { return m_ListView->AddApplication(AppInfo, InitialCheckState); } @@ -1897,7 +1897,7 @@ CApplicationView::ItemGetFocus(LPVOID CallbackParam) { if (CallbackParam) { - CApplicationInfo *Info = static_cast<CApplicationInfo *>(CallbackParam); + CAppInfo *Info = static_cast<CAppInfo *>(CallbackParam); m_AppsInfo->ShowAppInfo(Info); if (ApplicationViewType == AppViewTypeInstalledApps) diff --git a/base/applications/rapps/asyncinet.cpp b/base/applications/rapps/asyncinet.cpp index 08be4839c77..f254c0ff944 100644 --- a/base/applications/rapps/asyncinet.cpp +++ b/base/applications/rapps/asyncinet.cpp @@ -2,7 +2,7 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: Async Internet operation using WinINet - * COPYRIGHT: Copyright 2020 He Yang (1160386205(a)qq.com) + * COPYRIGHT: Copyright 2020 He Yang (1160386205(a)qq.com) */ #include "rapps.h" diff --git a/base/applications/rapps/cabinet.cpp b/base/applications/rapps/cabinet.cpp index 609f28faf5b..a86ad8cecc2 100644 --- a/base/applications/rapps/cabinet.cpp +++ b/base/applications/rapps/cabinet.cpp @@ -2,7 +2,7 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: Cabinet extraction using FDI API - * COPYRIGHT: Copyright 2018 Alexander Shaposhnikov (sanchaez(a)reactos.org) + * COPYRIGHT: Copyright 2018 Alexander Shaposhnikov (sanchaez(a)reactos.org) */ #include "rapps.h" #include <debug.h> diff --git a/base/applications/rapps/gui.cpp b/base/applications/rapps/gui.cpp index d457cf148e9..43c641f9e0a 100644 --- a/base/applications/rapps/gui.cpp +++ b/base/applications/rapps/gui.cpp @@ -2,9 +2,9 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: GUI classes for RAPPS - * COPYRIGHT: Copyright 2015 David Quintana (gigaherz(a)gmail.com) - * Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) - * Copyright 2020 He Yang (1160386205(a)qq.com) + * COPYRIGHT: Copyright 2015 David Quintana (gigaherz(a)gmail.com) + * Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) + * Copyright 2020 He Yang (1160386205(a)qq.com) */ #include "rapps.h" @@ -86,7 +86,7 @@ CSideTreeView::~CSideTreeView() // **** CMainWindow **** -CMainWindow::CMainWindow(CApplicationDB *db) : m_ClientPanel(NULL), m_Db(db), SelectedEnumType(ENUM_ALL_INSTALLED) +CMainWindow::CMainWindow(CAppDB *db) : m_ClientPanel(NULL), m_Db(db), SelectedEnumType(ENUM_ALL_INSTALLED) { } @@ -276,7 +276,7 @@ CMainWindow::RemoveSelectedAppFromRegistry() if (MessageBoxW(szMsgText, szMsgTitle, MB_YESNO | MB_ICONQUESTION) == IDYES) { - CApplicationInfo *InstalledApp = (CApplicationInfo *)m_ApplicationView->GetFocusedItemData(); + CAppInfo *InstalledApp = (CAppInfo *)m_ApplicationView->GetFocusedItemData(); if (!InstalledApp) return FALSE; @@ -292,7 +292,7 @@ CMainWindow::UninstallSelectedApp(BOOL bModify) if (!IsInstalledEnum(SelectedEnumType)) return FALSE; - CApplicationInfo *InstalledApp = (CApplicationInfo *)m_ApplicationView->GetFocusedItemData(); + CAppInfo *InstalledApp = (CAppInfo *)m_ApplicationView->GetFocusedItemData(); if (!InstalledApp) return FALSE; @@ -517,7 +517,7 @@ CMainWindow::OnCommand(WPARAM wParam, LPARAM lParam) } else { - CApplicationInfo *App = (CApplicationInfo *)m_ApplicationView->GetFocusedItemData(); + CAppInfo *App = (CAppInfo *)m_ApplicationView->GetFocusedItemData(); if (App) { InstallApplication(App); @@ -578,12 +578,12 @@ CMainWindow::UpdateStatusBarText() } VOID -CMainWindow::AddApplicationsToView(CAtlList<CApplicationInfo *> &List) +CMainWindow::AddApplicationsToView(CAtlList<CAppInfo *> &List) { POSITION CurrentListPosition = List.GetHeadPosition(); while (CurrentListPosition) { - CApplicationInfo *Info = List.GetNext(CurrentListPosition); + CAppInfo *Info = List.GetNext(CurrentListPosition); if (szSearchPattern.IsEmpty() || SearchPatternMatch(Info->szDisplayName, szSearchPattern) || SearchPatternMatch(Info->szComments, szSearchPattern)) { @@ -613,7 +613,7 @@ CMainWindow::UpdateApplicationsList(AppsCategories EnumType, BOOL bReload) // set the display type of application-view. this will remove all the item in application-view too. m_ApplicationView->SetDisplayAppType(AppViewTypeInstalledApps); - CAtlList<CApplicationInfo *> List; + CAtlList<CAppInfo *> List; m_Db->GetApps(List, EnumType); AddApplicationsToView(List); } @@ -632,7 +632,7 @@ CMainWindow::UpdateApplicationsList(AppsCategories EnumType, BOOL bReload) } else { - CAtlList<CApplicationInfo *> List; + CAtlList<CAppInfo *> List; m_Db->GetApps(List, EnumType); AddApplicationsToView(List); } @@ -697,7 +697,7 @@ CMainWindow::ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam) if (bUpdating) return; - CApplicationInfo *Info = (CApplicationInfo *)CallbackParam; + CAppInfo *Info = (CAppInfo *)CallbackParam; if (bChecked) { @@ -720,7 +720,7 @@ CMainWindow::ItemCheckStateChanged(BOOL bChecked, LPVOID CallbackParam) // this function is called when one or more application(s) should be installed // if Info is not zero, this app should be installed. otherwise those checked apps should be installed BOOL -CMainWindow::InstallApplication(CApplicationInfo *Info) +CMainWindow::InstallApplication(CAppInfo *Info) { if (Info) { @@ -785,7 +785,7 @@ CMainWindow::HandleTabOrder(int direction) // **** CMainWindow **** VOID -MainWindowLoop(CApplicationDB *db, INT nShowCmd) +MainWindowLoop(CAppDB *db, INT nShowCmd) { HACCEL KeyBrd; MSG Msg; diff --git a/base/applications/rapps/include/appdb.h b/base/applications/rapps/include/appdb.h new file mode 100644 index 00000000000..4e9c5386b3b --- /dev/null +++ b/base/applications/rapps/include/appdb.h @@ -0,0 +1,35 @@ +#pragma once + +#include <atlcoll.h> +#include <atlpath.h> + +#include "appinfo.h" + +class CAppDB +{ + private: + CPathW m_BasePath; + CAtlList<CAppInfo *> m_Available; + CAtlList<CAppInfo *> m_Installed; + + BOOL + EnumerateFiles(); + + public: + CAppDB(const CStringW &path); + + VOID + GetApps(CAtlList<CAppInfo *> &List, AppsCategories Type) const; + CAppInfo * + FindByPackageName(const CStringW &name); + + VOID + UpdateAvailable(); + VOID + UpdateInstalled(); + VOID + RemoveCached(); + + BOOL + RemoveInstalledAppFromRegistry(const CAppInfo *Info); +}; diff --git a/base/applications/rapps/include/applicationinfo.h b/base/applications/rapps/include/appinfo.h similarity index 94% rename from base/applications/rapps/include/applicationinfo.h rename to base/applications/rapps/include/appinfo.h index fb152d26bba..7ea0c65e537 100644 --- a/base/applications/rapps/include/applicationinfo.h +++ b/base/applications/rapps/include/appinfo.h @@ -65,11 +65,11 @@ IsInstalledEnum(INT x) class CAppRichEdit; -class CApplicationInfo +class CAppInfo { public: - CApplicationInfo(const CStringW &Identifier, AppsCategories Category); - virtual ~CApplicationInfo(); + CAppInfo(const CStringW &Identifier, AppsCategories Category); + virtual ~CAppInfo(); const CStringW szIdentifier; // PkgName or KeyName const AppsCategories iCategory; @@ -97,7 +97,7 @@ class CApplicationInfo UninstallApplication(BOOL bModify) = 0; }; -class CAvailableApplicationInfo : public CApplicationInfo +class CAvailableApplicationInfo : public CAppInfo { class CConfigParser *m_Parser; CSimpleArray<CStringW> m_szScrnshotLocation; @@ -143,7 +143,7 @@ class CAvailableApplicationInfo : public CApplicationInfo UninstallApplication(BOOL bModify) override; }; -class CInstalledApplicationInfo : public CApplicationInfo +class CInstalledApplicationInfo : public CAppInfo { CRegKey m_hKey; CStringW m_szInstallDate; diff --git a/base/applications/rapps/include/applicationdb.h b/base/applications/rapps/include/applicationdb.h deleted file mode 100644 index c63b1698c05..00000000000 --- a/base/applications/rapps/include/applicationdb.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -#include <atlcoll.h> -#include <atlpath.h> - -#include "applicationinfo.h" - -class CApplicationDB -{ - private: - CPathW m_BasePath; - CAtlList<CApplicationInfo *> m_Available; - CAtlList<CApplicationInfo *> m_Installed; - - BOOL - EnumerateFiles(); - - public: - CApplicationDB(const CStringW &path); - - VOID - GetApps(CAtlList<CApplicationInfo *> &List, AppsCategories Type) const; - CApplicationInfo * - FindByPackageName(const CStringW &name); - - VOID - UpdateAvailable(); - VOID - UpdateInstalled(); - VOID - RemoveCached(); - - BOOL - RemoveInstalledAppFromRegistry(const CApplicationInfo *Info); -}; diff --git a/base/applications/rapps/include/appview.h b/base/applications/rapps/include/appview.h index fcf18a9d905..b563f2966e2 100644 --- a/base/applications/rapps/include/appview.h +++ b/base/applications/rapps/include/appview.h @@ -177,7 +177,7 @@ class CAppInfoDisplay : public CUiWindow<CWindowImpl<CAppInfoDisplay>> Create(HWND hwndParent); VOID - ShowAppInfo(CApplicationInfo *Info); + ShowAppInfo(CAppInfo *Info); VOID SetWelcomeText(); VOID @@ -263,7 +263,7 @@ class CAppsListView : public CUiWindow<CWindowImpl<CAppsListView, CListView>> SetViewMode(DWORD ViewMode); BOOL - AddApplication(CApplicationInfo *AppInfo, BOOL InitialCheckState); + AddApplication(CAppInfo *AppInfo, BOOL InitialCheckState); // this function is called when parent window receiving an notification about checkstate changing VOID @@ -397,7 +397,7 @@ class CApplicationView : public CUiWindow<CWindowImpl<CApplicationView>> SetDisplayAppType(APPLICATION_VIEW_TYPE AppType); BOOL - AddApplication(CApplicationInfo *InstAppInfo, BOOL InitialCheckState); + AddApplication(CAppInfo *InstAppInfo, BOOL InitialCheckState); VOID SetWatermark(const CStringW &Text); diff --git a/base/applications/rapps/include/dialogs.h b/base/applications/rapps/include/dialogs.h index 0301dbb7393..ee49f287d82 100644 --- a/base/applications/rapps/include/dialogs.h +++ b/base/applications/rapps/include/dialogs.h @@ -1,6 +1,6 @@ #pragma once -#include "applicationinfo.h" +#include "appinfo.h" #include <windef.h> #include <atlsimpcoll.h> @@ -11,12 +11,12 @@ CreateSettingsDlg(HWND hwnd); // Main window VOID -MainWindowLoop(class CApplicationDB *db, INT nShowCmd); +MainWindowLoop(class CAppDB *db, INT nShowCmd); // Download dialogs VOID DownloadApplicationsDB(LPCWSTR lpUrl, BOOL IsOfficial); BOOL -DownloadApplication(CApplicationInfo *pAppInfo); +DownloadApplication(CAppInfo *pAppInfo); BOOL -DownloadListOfApplications(const CAtlList<CApplicationInfo *> &AppsList, BOOL bIsModal); +DownloadListOfApplications(const CAtlList<CAppInfo *> &AppsList, BOOL bIsModal); diff --git a/base/applications/rapps/include/gui.h b/base/applications/rapps/include/gui.h index 48befeaf9f9..330f1118dac 100644 --- a/base/applications/rapps/include/gui.h +++ b/base/applications/rapps/include/gui.h @@ -54,8 +54,8 @@ class CMainWindow : public CWindowImpl<CMainWindow, CWindow, CFrameWinTraits> CApplicationView *m_ApplicationView = NULL; - CApplicationDB *m_Db; - CAtlList<CApplicationInfo *> m_Selected; + CAppDB *m_Db; + CAtlList<CAppInfo *> m_Selected; BOOL bUpdating = FALSE; @@ -63,7 +63,7 @@ class CMainWindow : public CWindowImpl<CMainWindow, CWindow, CFrameWinTraits> AppsCategories SelectedEnumType; public: - CMainWindow(CApplicationDB *db); + CMainWindow(CAppDB *db); ~CMainWindow(); @@ -106,7 +106,7 @@ class CMainWindow : public CWindowImpl<CMainWindow, CWindow, CFrameWinTraits> VOID UpdateApplicationsList(AppsCategories EnumType, BOOL bReload = FALSE); VOID - AddApplicationsToView(CAtlList<CApplicationInfo *> &List); + AddApplicationsToView(CAtlList<CAppInfo *> &List); public: static ATL::CWndClassInfo & @@ -123,7 +123,7 @@ class CMainWindow : public CWindowImpl<CMainWindow, CWindow, CFrameWinTraits> // this function is called when application-view is asked to install an application // if Info is not zero, this app should be installed. otherwise those checked apps should be installed BOOL - InstallApplication(CApplicationInfo *Info); + InstallApplication(CAppInfo *Info); // this function is called when search text is changed BOOL diff --git a/base/applications/rapps/include/rapps.h b/base/applications/rapps/include/rapps.h index 3a72072cadc..02cb22182ae 100644 --- a/base/applications/rapps/include/rapps.h +++ b/base/applications/rapps/include/rapps.h @@ -8,8 +8,8 @@ #include "defines.h" #include "dialogs.h" -#include "applicationinfo.h" -#include "applicationdb.h" +#include "appinfo.h" +#include "appdb.h" #include "misc.h" #include "configparser.h" diff --git a/base/applications/rapps/include/rosui.h b/base/applications/rapps/include/rosui.h index a68100a6118..48fb9a243a4 100644 --- a/base/applications/rapps/include/rosui.h +++ b/base/applications/rapps/include/rosui.h @@ -3,7 +3,7 @@ * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) * FILE: base/applications/rapps/include/rosui.h * PURPOSE: ATL Layout engine for RAPPS - * COPYRIGHT: Copyright 2015 David Quintana (gigaherz(a)gmail.com) + * COPYRIGHT: Copyright 2015 David Quintana (gigaherz(a)gmail.com) */ #pragma once diff --git a/base/applications/rapps/loaddlg.cpp b/base/applications/rapps/loaddlg.cpp index 618ac035e5c..9063954ece0 100644 --- a/base/applications/rapps/loaddlg.cpp +++ b/base/applications/rapps/loaddlg.cpp @@ -2,12 +2,12 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: Displaying a download dialog - * COPYRIGHT: Copyright 2001 John R. Sheets (for CodeWeavers) - * Copyright 2004 Mike McCormack (for CodeWeavers) - * Copyright 2005 Ge van Geldorp (gvg(a)reactos.org) - * Copyright 2009 Dmitry Chapyshev (dmitry(a)reactos.org) + * COPYRIGHT: Copyright 2001 John R. Sheets (for CodeWeavers) + * Copyright 2004 Mike McCormack (for CodeWeavers) + * Copyright 2005 Ge van Geldorp (gvg(a)reactos.org) + * Copyright 2009 Dmitry Chapyshev (dmitry(a)reactos.org) * Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros(a)gmail.com) - * Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) + * Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) */ /* @@ -85,7 +85,7 @@ struct DownloadInfo DownloadInfo() { } - DownloadInfo(const CApplicationInfo &AppInfo) : DLType(DLTYPE_APPLICATION) + DownloadInfo(const CAppInfo &AppInfo) : DLType(DLTYPE_APPLICATION) { AppInfo.GetDownloadInfo(szUrl, szSHA1, SizeInBytes); szName = AppInfo.szDisplayName; @@ -1052,7 +1052,7 @@ CDownloadManager::LaunchDownloadDialog(BOOL bIsModal) // CDownloadManager BOOL -DownloadListOfApplications(const CAtlList<CApplicationInfo *> &AppsList, BOOL bIsModal) +DownloadListOfApplications(const CAtlList<CAppInfo *> &AppsList, BOOL bIsModal) { if (AppsList.IsEmpty()) return FALSE; @@ -1060,7 +1060,7 @@ DownloadListOfApplications(const CAtlList<CApplicationInfo *> &AppsList, BOOL bI POSITION CurrentListPosition = AppsList.GetHeadPosition(); while (CurrentListPosition) { - const CApplicationInfo *Info = AppsList.GetNext(CurrentListPosition); + const CAppInfo *Info = AppsList.GetNext(CurrentListPosition); CDownloadManager::Add(DownloadInfo(*Info)); } @@ -1071,7 +1071,7 @@ DownloadListOfApplications(const CAtlList<CApplicationInfo *> &AppsList, BOOL bI } BOOL -DownloadApplication(CApplicationInfo *pAppInfo) +DownloadApplication(CAppInfo *pAppInfo) { if (!pAppInfo) return FALSE; diff --git a/base/applications/rapps/misc.cpp b/base/applications/rapps/misc.cpp index 3d7311f8a1e..a5da21d45ce 100644 --- a/base/applications/rapps/misc.cpp +++ b/base/applications/rapps/misc.cpp @@ -2,9 +2,9 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: Misc functions - * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry(a)reactos.org) + * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry(a)reactos.org) * Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros(a)gmail.com) - * Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) + * Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) */ #include "rapps.h" diff --git a/base/applications/rapps/settings.cpp b/base/applications/rapps/settings.cpp index bac3f908349..4a00186f2ec 100644 --- a/base/applications/rapps/settings.cpp +++ b/base/applications/rapps/settings.cpp @@ -2,7 +2,7 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: Functions to load / save settings from reg. - * COPYRIGHT: Copyright 2020 He Yang (1160386205(a)qq.com) + * COPYRIGHT: Copyright 2020 He Yang (1160386205(a)qq.com) */ #include "rapps.h" diff --git a/base/applications/rapps/settingsdlg.cpp b/base/applications/rapps/settingsdlg.cpp index c7db4c7c5dd..b75a136c0ff 100644 --- a/base/applications/rapps/settingsdlg.cpp +++ b/base/applications/rapps/settingsdlg.cpp @@ -2,8 +2,8 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: Settings Dialog - * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry(a)reactos.org) - * Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) + * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry(a)reactos.org) + * Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) */ #include "rapps.h" diff --git a/base/applications/rapps/unattended.cpp b/base/applications/rapps/unattended.cpp index 858f24ee23b..e5fe54ed2ea 100644 --- a/base/applications/rapps/unattended.cpp +++ b/base/applications/rapps/unattended.cpp @@ -3,7 +3,7 @@ * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: Functions to parse command-line flags and process them * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) - * Copyright 2020 He Yang (1160386205(a)qq.com) + * Copyright 2020 He Yang (1160386205(a)qq.com) */ #include "rapps.h" @@ -44,7 +44,7 @@ InitRappsConsole() } static BOOL -HandleInstallCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) +HandleInstallCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) { if (argcLeft < 1) { @@ -53,11 +53,11 @@ HandleInstallCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR return FALSE; } - CAtlList<CApplicationInfo *> Applications; + CAtlList<CAppInfo *> Applications; for (int i = 0; i < argcLeft; i++) { LPCWSTR PackageName = argvLeft[i]; - CApplicationInfo *AppInfo = db->FindByPackageName(PackageName); + CAppInfo *AppInfo = db->FindByPackageName(PackageName); if (AppInfo) { Applications.AddTail(AppInfo); @@ -68,7 +68,7 @@ HandleInstallCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR } static BOOL -HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) +HandleSetupCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) { if (argcLeft != 1) { @@ -77,7 +77,7 @@ HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *a return FALSE; } - CAtlList<CApplicationInfo *> Applications; + CAtlList<CAppInfo *> Applications; HINF InfHandle = SetupOpenInfFileW(argvLeft[0], NULL, INF_STYLE_WIN4, NULL); if (InfHandle == INVALID_HANDLE_VALUE) { @@ -92,7 +92,7 @@ HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *a { if (SetupGetStringFieldW(&Context, 1, szPkgName, _countof(szPkgName), NULL)) { - CApplicationInfo *AppInfo = db->FindByPackageName(szPkgName); + CAppInfo *AppInfo = db->FindByPackageName(szPkgName); if (AppInfo) { Applications.AddTail(AppInfo); @@ -106,7 +106,7 @@ HandleSetupCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *a } static BOOL -HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) +HandleFindCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) { if (argcLeft < 1) { @@ -114,7 +114,7 @@ HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar return FALSE; } - CAtlList<CApplicationInfo *> List; + CAtlList<CAppInfo *> List; db->GetApps(List, ENUM_ALL_AVAILABLE); for (int i = 0; i < argcLeft; i++) @@ -125,7 +125,7 @@ HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar POSITION CurrentListPosition = List.GetHeadPosition(); while (CurrentListPosition) { - CApplicationInfo *Info = List.GetNext(CurrentListPosition); + CAppInfo *Info = List.GetNext(CurrentListPosition); if (SearchPatternMatch(Info->szDisplayName, lpszSearch) || SearchPatternMatch(Info->szComments, lpszSearch)) { @@ -140,7 +140,7 @@ HandleFindCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar } static BOOL -HandleInfoCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) +HandleInfoCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft) { if (argcLeft < 1) { @@ -151,7 +151,7 @@ HandleInfoCommand(CApplicationDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *ar for (int i = 0; i < argcLeft; i++) { LPCWSTR PackageName = argvLeft[i]; - CApplicationInfo *AppInfo = db->FindByPackageName(PackageName); + CAppInfo *AppInfo = db->FindByPackageName(PackageName); if (!AppInfo) { ConResMsgPrintf(StdOut, NULL, IDS_CMD_PACKAGE_NOT_FOUND, PackageName); @@ -231,7 +231,7 @@ ParseCmdAndExecute(LPWSTR lpCmdLine, BOOL bIsFirstLaunch, int nCmdShow) CStringW Directory; GetStorageDirectory(Directory); - CApplicationDB db(Directory); + CAppDB db(Directory); if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch) { diff --git a/base/applications/rapps/winmain.cpp b/base/applications/rapps/winmain.cpp index cf3285a2783..3fb8e23d4b1 100644 --- a/base/applications/rapps/winmain.cpp +++ b/base/applications/rapps/winmain.cpp @@ -2,9 +2,9 @@ * PROJECT: ReactOS Applications Manager * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) * PURPOSE: Main program - * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry(a)reactos.org) + * COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry(a)reactos.org) * Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros(a)gmail.com) - * Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) + * Copyright 2017 Alexander Shaposhnikov (sanchaez(a)reactos.org) */ #include "rapps.h" #include "unattended.h"
1 year, 10 months
1
0
0
0
[reactos] 01/01: Fix ICO_ExtractIconExW causing explorer to crash when trying to display icon for bad EXE PE header.
by Doug Lyons
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=60851914a84bf3f38a024…
commit 60851914a84bf3f38a024de933579fa897c7e7c9 Author: Doug Lyons <douglyons(a)douglyons.com> AuthorDate: Sun Feb 26 13:03:53 2023 -0600 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Mon Feb 27 22:28:41 2023 +0100 Fix ICO_ExtractIconExW causing explorer to crash when trying to display icon for bad EXE PE header. See CORE-15879 Co-authored-by: Thomas Faber <thomas.faber(a)reactos.org> --- win32ss/user/user32/misc/exticon.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/win32ss/user/user32/misc/exticon.c b/win32ss/user/user32/misc/exticon.c index 09074c5c6a4..33f8f19b15f 100644 --- a/win32ss/user/user32/misc/exticon.c +++ b/win32ss/user/user32/misc/exticon.c @@ -616,6 +616,15 @@ static UINT ICO_ExtractIconExW( goto end; } +#ifdef __REACTOS__ + /* Check for boundary limit (and overflow) */ + if (((ULONG_PTR)(rootresdir + 1) < (ULONG_PTR)rootresdir) || + ((ULONG_PTR)(rootresdir + 1) > (ULONG_PTR)peimage + fsizel)) + { + goto end; + } +#endif + /* search for the group icon directory */ if (!(icongroupresdir = find_entry_by_id(rootresdir, LOWORD(RT_GROUP_ICON), rootresdir))) {
1 year, 10 months
1
0
0
0
[reactos] 01/01: [IMM32] Fix ImmGetCompositionStringA/W (#5105)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=781fb4a55e4cebf52b810…
commit 781fb4a55e4cebf52b810d01c510f5aa44da191f Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Feb 27 12:33:45 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Feb 27 12:33:45 2023 +0900 [IMM32] Fix ImmGetCompositionStringA/W (#5105) Fix some typos in Imm32GetCompStrA/W. CORE-11700 --- dll/win32/imm32/compstr.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/dll/win32/imm32/compstr.c b/dll/win32/imm32/compstr.c index 5486397f3f4..5b1c153d0f4 100644 --- a/dll/win32/imm32/compstr.c +++ b/dll/win32/imm32/compstr.c @@ -289,15 +289,15 @@ Imm32GetCompStrA(HIMC hIMC, const COMPOSITIONSTRING *pCS, DWORD dwIndex, case GCS_COMPREADATTR: dwBufLen = Imm32CompAttrWideToAnsi(CS_Attr(pCS, CompReadAttr), CS_Size(pCS, CompReadAttr), - CS_StrW(pCS, CompStr), - CS_SizeW(pCS, CompStr), + CS_StrW(pCS, CompReadStr), + CS_SizeW(pCS, CompReadStr), lpBuf, dwBufLen, uCodePage); break; case GCS_COMPREADCLAUSE: dwBufLen = Imm32CompClauseWideToAnsi(CS_Clause(pCS, CompReadClause), CS_Size(pCS, CompReadClause), - CS_StrW(pCS, CompStr), + CS_StrW(pCS, CompReadStr), lpBuf, dwBufLen, uCodePage); break; @@ -339,7 +339,7 @@ Imm32GetCompStrA(HIMC hIMC, const COMPOSITIONSTRING *pCS, DWORD dwIndex, case GCS_RESULTREADCLAUSE: dwBufLen = Imm32CompClauseWideToAnsi(CS_Clause(pCS, ResultReadClause), CS_Size(pCS, ResultReadClause), - CS_StrW(pCS, CompStr), + CS_StrW(pCS, ResultReadStr), lpBuf, dwBufLen, uCodePage); break; @@ -352,7 +352,7 @@ Imm32GetCompStrA(HIMC hIMC, const COMPOSITIONSTRING *pCS, DWORD dwIndex, case GCS_RESULTCLAUSE: dwBufLen = Imm32CompClauseWideToAnsi(CS_Clause(pCS, ResultClause), CS_Size(pCS, ResultClause), - CS_StrW(pCS, CompStr), + CS_StrW(pCS, ResultStr), lpBuf, dwBufLen, uCodePage); break; @@ -383,14 +383,15 @@ Imm32GetCompStrW(HIMC hIMC, const COMPOSITIONSTRING *pCS, DWORD dwIndex, case GCS_COMPREADATTR: dwBufLen = Imm32CompAttrAnsiToWide(CS_Attr(pCS, CompReadAttr), CS_Size(pCS, CompReadAttr), - CS_StrA(pCS, CompStr), CS_SizeA(pCS, CompStr), + CS_StrA(pCS, CompReadStr), + CS_SizeA(pCS, CompReadStr), lpBuf, dwBufLen, uCodePage); break; case GCS_COMPREADCLAUSE: dwBufLen = Imm32CompClauseAnsiToWide(CS_Clause(pCS, CompReadClause), CS_Size(pCS, CompReadClause), - CS_StrA(pCS, CompStr), + CS_StrA(pCS, CompReadStr), lpBuf, dwBufLen, uCodePage); break; @@ -431,7 +432,7 @@ Imm32GetCompStrW(HIMC hIMC, const COMPOSITIONSTRING *pCS, DWORD dwIndex, case GCS_RESULTREADCLAUSE: dwBufLen = Imm32CompClauseAnsiToWide(CS_Clause(pCS, ResultReadClause), CS_Size(pCS, ResultReadClause), - CS_StrA(pCS, CompStr), + CS_StrA(pCS, ResultReadStr), lpBuf, dwBufLen, uCodePage); break; @@ -444,7 +445,7 @@ Imm32GetCompStrW(HIMC hIMC, const COMPOSITIONSTRING *pCS, DWORD dwIndex, case GCS_RESULTCLAUSE: dwBufLen = Imm32CompClauseAnsiToWide(CS_Clause(pCS, ResultClause), CS_Size(pCS, ResultClause), - CS_StrA(pCS, CompStr), + CS_StrA(pCS, ResultStr), lpBuf, dwBufLen, uCodePage); break;
1 year, 10 months
1
0
0
0
[reactos] 01/01: [IMM32] Silence 'Out of boundary' log-spam
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=88b1d89e957ea8ed59f96…
commit 88b1d89e957ea8ed59f964d0379cd51d494f0be6 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Feb 26 11:57:44 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sun Feb 26 11:57:44 2023 +0900 [IMM32] Silence 'Out of boundary' log-spam CORE-18852 --- dll/win32/imm32/candidate.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dll/win32/imm32/candidate.c b/dll/win32/imm32/candidate.c index df976e407c8..9edddc82032 100644 --- a/dll/win32/imm32/candidate.c +++ b/dll/win32/imm32/candidate.c @@ -398,10 +398,6 @@ ImmGetCandidateWindow(HIMC hIMC, DWORD dwIndex, LPCANDIDATEFORM lpCandidate) *lpCandidate = *pCF; ret = TRUE; } - else - { - ERR("Out of boundary\n"); - } ImmUnlockIMC(hIMC); TRACE("ret: %d\n", ret);
1 year, 10 months
1
0
0
0
[reactos] 01/01: [SYSSETUP] Removed qemu credit entirely (#4971)
by Rexx J. Larsson
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=909b165c4ab993c99edf3…
commit 909b165c4ab993c99edf33b0beacfea758054d8f Author: Rexx J. Larsson <hello(a)rexx.icu> AuthorDate: Sat Feb 25 23:44:06 2023 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Feb 25 23:44:06 2023 +0100 [SYSSETUP] Removed qemu credit entirely (#4971) --- dll/win32/syssetup/syssetup.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/syssetup/syssetup.rc b/dll/win32/syssetup/syssetup.rc index 32b651c7836..d824093a43b 100644 --- a/dll/win32/syssetup/syssetup.rc +++ b/dll/win32/syssetup/syssetup.rc @@ -33,7 +33,7 @@ IDI_ICON5 ICON "resources/5.ico" STRINGTABLE BEGIN - IDS_ACKPROJECTS "Wine -
http://www.winehq.org\nFreeType
-
http://www.freetype.org\nSYSLINUX
-
http://syslinux.zytor.com\nMinGW
-
http://www.mingw.org\nBochs
-
http://bochs.sourceforge.net\nQEMU
-
http://fabrice.bellard.free.fr/qemu\nMesa3D
-
http://www.mesa3d.org\nadns
-
http://www.gnu.org/software/adns\nICU
-
http://www.icu-project.org/\nGraphApp
-
http://enchantia.com/software/graphapp/\nExt2
-
http://www.ext2fsd.com/\nGNU
FreeFont -
http://savannah.gnu.org/projects/freefont/\nDeja
[...] + IDS_ACKPROJECTS "Wine -
http://www.winehq.org\nFreeType
-
http://www.freetype.org\nSYSLINUX
-
http://syslinux.zytor.com\nMinGW
-
http://www.mingw.org\nBochs
-
http://bochs.sourceforge.net\nMesa3D
-
http://www.mesa3d.org\nadns
-
http://www.gnu.org/software/adns\nICU
-
http://www.icu-project.org/\nGraphApp
-
http://enchantia.com/software/graphapp/\nExt2
-
http://www.ext2fsd.com/\nGNU
FreeFont -
http://savannah.gnu.org/projects/freefont/\nDejaVu
Fonts -
http://dejavu.sourceforge.net\nLi
[...] END IDR_GPL RT_TEXT "COPYING"
1 year, 10 months
1
0
0
0
[reactos] 02/02: [USER32] Fix edit UAF by importing wine commit b40ddf42370e8344a862fbbc40384678db3871a9
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=76753cd34290d35e00132…
commit 76753cd34290d35e001322a8043e0eb289654aae Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Tue Jan 31 18:12:52 2023 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Feb 25 23:41:41 2023 +0100 [USER32] Fix edit UAF by importing wine commit b40ddf42370e8344a862fbbc40384678db3871a9 --- win32ss/user/user32/controls/edit.c | 59 ++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/win32ss/user/user32/controls/edit.c b/win32ss/user/user32/controls/edit.c index 38e17fc12d1..a65a4d6dab3 100644 --- a/win32ss/user/user32/controls/edit.c +++ b/win32ss/user/user32/controls/edit.c @@ -161,17 +161,15 @@ typedef struct #define SWAP_UINT32(x,y) do { UINT temp = (UINT)(x); (x) = (UINT)(y); (y) = temp; } while(0) #define ORDER_UINT(x,y) do { if ((UINT)(y) < (UINT)(x)) SWAP_UINT32((x),(y)); } while(0) -/* used for disabled or read-only edit control */ -#define EDIT_NOTIFY_PARENT(es, wNotifyCode) \ - do \ - { /* Notify parent which has created this edit control */ \ - TRACE("notification " #wNotifyCode " sent to hwnd=%p\n", es->hwndParent); \ - SendMessageW(es->hwndParent, WM_COMMAND, \ - MAKEWPARAM(GetWindowLongPtrW((es->hwndSelf),GWLP_ID), wNotifyCode), \ - (LPARAM)(es->hwndSelf)); \ - } while(0) - static const WCHAR empty_stringW[] = {0}; +static inline BOOL notify_parent(const EDITSTATE *es, INT code) +{ + HWND hwnd = es->hwndSelf; + TRACE("notification %d sent to %p.\n", code, es->hwndParent); + SendMessageW(es->hwndParent, WM_COMMAND, MAKEWPARAM(GetWindowLongPtrW(es->hwndSelf, GWLP_ID), code), (LPARAM)es->hwndSelf); + return IsWindow(hwnd); +} + static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap); /********************************************************************* @@ -1452,7 +1450,7 @@ static BOOL EDIT_MakeFit(EDITSTATE *es, UINT size) if (es->buffer_size < size) { WARN("FAILED ! We now have %d+1\n", es->buffer_size); - EDIT_NOTIFY_PARENT(es, EN_ERRSPACE); + notify_parent(es, EN_ERRSPACE); return FALSE; } else { TRACE("We now have %d+1\n", es->buffer_size); @@ -1499,7 +1497,7 @@ static void EDIT_UpdateTextRegion(EDITSTATE *es, HRGN hrgn, BOOL bErase) { if (es->flags & EF_UPDATE) { es->flags &= ~EF_UPDATE; - EDIT_NOTIFY_PARENT(es, EN_UPDATE); + if (!notify_parent(es, EN_UPDATE)) return; } InvalidateRgn(es->hwndSelf, hrgn, bErase); } @@ -1514,7 +1512,7 @@ static void EDIT_UpdateText(EDITSTATE *es, const RECT *rc, BOOL bErase) { if (es->flags & EF_UPDATE) { es->flags &= ~EF_UPDATE; - EDIT_NOTIFY_PARENT(es, EN_UPDATE); + if (!notify_parent(es, EN_UPDATE)) return; } InvalidateRect(es->hwndSelf, rc, bErase); } @@ -1790,9 +1788,9 @@ static BOOL EDIT_EM_LineScroll_internal(EDITSTATE *es, INT dx, INT dy) EDIT_UpdateScrollInfo(es); } if (dx && !(es->flags & EF_HSCROLL_TRACK)) - EDIT_NOTIFY_PARENT(es, EN_HSCROLL); + notify_parent(es, EN_HSCROLL); if (dy && !(es->flags & EF_VSCROLL_TRACK)) - EDIT_NOTIFY_PARENT(es, EN_VSCROLL); + notify_parent(es, EN_VSCROLL); return TRUE; } @@ -2652,8 +2650,9 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, LPCWSTR lpsz_replac /* Issue the EN_MAXTEXT notification and continue with replacing text * so that buffer limit is honored. */ - if ((honor_limit) && (size > es->buffer_limit)) { - EDIT_NOTIFY_PARENT(es, EN_MAXTEXT); + if ((honor_limit) && (size > es->buffer_limit)) + { + if (!notify_parent(es, EN_MAXTEXT)) return; /* Buffer limit can be smaller than the actual length of text in combobox */ if (es->buffer_limit < (tl - (e-s))) strl = 0; @@ -2711,7 +2710,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, LPCWSTR lpsz_replac strl = 0; e = s; hrgn = CreateRectRgn(0, 0, 0, 0); - EDIT_NOTIFY_PARENT(es, EN_MAXTEXT); + if (!notify_parent(es, EN_MAXTEXT)) return; } } else { @@ -2728,7 +2727,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, LPCWSTR lpsz_replac EDIT_CalcLineWidth_SL(es); } text_buffer_changed(es); - EDIT_NOTIFY_PARENT(es, EN_MAXTEXT); + if (!notify_parent(es, EN_MAXTEXT)) return; } } @@ -2819,7 +2818,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, LPCWSTR lpsz_replac if(send_update || (es->flags & EF_UPDATE)) { es->flags &= ~EF_UPDATE; - EDIT_NOTIFY_PARENT(es, EN_CHANGE); + if (!notify_parent(es, EN_CHANGE)) return; } EDIT_InvalidateUniscribeData(es); } @@ -3119,7 +3118,7 @@ static BOOL EDIT_EM_Undo(EDITSTATE *es) EDIT_EM_ReplaceSel(es, TRUE, utext, TRUE, TRUE); EDIT_EM_SetSel(es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE); /* send the notification after the selection start and end are set */ - EDIT_NOTIFY_PARENT(es, EN_CHANGE); + if (!notify_parent(es, EN_CHANGE)) return TRUE; EDIT_EM_ScrollCaret(es); HeapFree(GetProcessHeap(), 0, utext); @@ -3654,9 +3653,9 @@ static LRESULT EDIT_WM_KillFocus(EDITSTATE *es) /* throw away left over scroll when we lose focus */ es->wheelDeltaRemainder = 0; - if (es->hwndListBox == NULL) - EDIT_NOTIFY_PARENT(es, EN_KILLFOCUS); - else + if (es->hwndListBox == NULL) { + if (!notify_parent(es, EN_KILLFOCUS)) return 0; + } else { /* send the undocumented WM_CBLOSTTEXTFOCUS message to combobox */ hCombo = GetParent(es->hwndSelf); lStyles = GetWindowLong(hCombo, GWL_STYLE); @@ -3668,7 +3667,7 @@ static LRESULT EDIT_WM_KillFocus(EDITSTATE *es) DestroyCaret(); if(!(es->style & ES_NOHIDESEL)) EDIT_InvalidateText(es, es->selection_start, es->selection_end); - EDIT_NOTIFY_PARENT(es, EN_KILLFOCUS); + if (!notify_parent(es, EN_KILLFOCUS)) return 0; /* throw away left over scroll when we lose focus */ es->wheelDeltaRemainder = 0; #endif @@ -3917,7 +3916,7 @@ static void EDIT_WM_SetFocus(EDITSTATE *es) EDIT_SetCaretPos(es, es->selection_end, es->flags & EF_AFTER_WRAP); ShowCaret(es->hwndSelf); - EDIT_NOTIFY_PARENT(es, EN_SETFOCUS); + notify_parent(es, EN_SETFOCUS); } @@ -4029,8 +4028,8 @@ static void EDIT_WM_SetText(EDITSTATE *es, LPCWSTR text, BOOL unicode) */ if( !((es->style & ES_MULTILINE) || es->hwndListBox)) { - EDIT_NOTIFY_PARENT(es, EN_UPDATE); - EDIT_NOTIFY_PARENT(es, EN_CHANGE); + if (!notify_parent(es, EN_UPDATE)) return; + if (!notify_parent(es, EN_CHANGE)) return; } EDIT_EM_ScrollCaret(es); EDIT_UpdateScrollInfo(es); @@ -4231,7 +4230,7 @@ static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos) if (!dx) { /* force scroll info update */ EDIT_UpdateScrollInfo(es); - EDIT_NOTIFY_PARENT(es, EN_HSCROLL); + notify_parent(es, EN_HSCROLL); } break; case SB_ENDSCROLL: @@ -4354,7 +4353,7 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos) { /* force scroll info update */ EDIT_UpdateScrollInfo(es); - EDIT_NOTIFY_PARENT(es, EN_VSCROLL); + notify_parent(es, EN_VSCROLL); } break; case SB_ENDSCROLL:
1 year, 10 months
1
0
0
0
[reactos] 01/02: [COMCTL32] Fix edit UAF by importing wine commit fed0c33fe02a3fcb477086a32dc8d52c1e347889
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cf08f9271e4ec30bbf01f…
commit cf08f9271e4ec30bbf01f3072e6af045156c4f34 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Thu Oct 27 23:52:36 2022 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Feb 25 23:41:25 2023 +0100 [COMCTL32] Fix edit UAF by importing wine commit fed0c33fe02a3fcb477086a32dc8d52c1e347889 --- dll/win32/comctl32/edit.c | 58 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/dll/win32/comctl32/edit.c b/dll/win32/comctl32/edit.c index 07277740168..15365715bb3 100644 --- a/dll/win32/comctl32/edit.c +++ b/dll/win32/comctl32/edit.c @@ -160,15 +160,13 @@ typedef struct #define SWAP_UINT32(x,y) do { UINT temp = (UINT)(x); (x) = (UINT)(y); (y) = temp; } while(0) #define ORDER_UINT(x,y) do { if ((UINT)(y) < (UINT)(x)) SWAP_UINT32((x),(y)); } while(0) -/* used for disabled or read-only edit control */ -#define EDIT_NOTIFY_PARENT(es, wNotifyCode) \ - do \ - { /* Notify parent which has created this edit control */ \ - TRACE("notification " #wNotifyCode " sent to hwnd=%p\n", es->hwndParent); \ - SendMessageW(es->hwndParent, WM_COMMAND, \ - MAKEWPARAM(GetWindowLongPtrW((es->hwndSelf),GWLP_ID), wNotifyCode), \ - (LPARAM)(es->hwndSelf)); \ - } while(0) +static inline BOOL notify_parent(const EDITSTATE *es, INT code) +{ + HWND hwnd = es->hwndSelf; + TRACE("notification %d sent to %p.\n", code, es->hwndParent); + SendMessageW(es->hwndParent, WM_COMMAND, MAKEWPARAM(GetWindowLongPtrW(es->hwndSelf, GWLP_ID), code), (LPARAM)es->hwndSelf); + return IsWindow(hwnd); +} static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap); @@ -1293,7 +1291,7 @@ static BOOL EDIT_MakeFit(EDITSTATE *es, UINT size) if (es->buffer_size < size) { WARN("FAILED ! We now have %d+1\n", es->buffer_size); - EDIT_NOTIFY_PARENT(es, EN_ERRSPACE); + notify_parent(es, EN_ERRSPACE); return FALSE; } else { TRACE("We now have %d+1\n", es->buffer_size); @@ -1340,7 +1338,7 @@ static void EDIT_UpdateTextRegion(EDITSTATE *es, HRGN hrgn, BOOL bErase) { if (es->flags & EF_UPDATE) { es->flags &= ~EF_UPDATE; - EDIT_NOTIFY_PARENT(es, EN_UPDATE); + if (!notify_parent(es, EN_UPDATE)) return; } InvalidateRgn(es->hwndSelf, hrgn, bErase); } @@ -1355,7 +1353,7 @@ static void EDIT_UpdateText(EDITSTATE *es, const RECT *rc, BOOL bErase) { if (es->flags & EF_UPDATE) { es->flags &= ~EF_UPDATE; - EDIT_NOTIFY_PARENT(es, EN_UPDATE); + if (!notify_parent(es, EN_UPDATE)) return; } InvalidateRect(es->hwndSelf, rc, bErase); } @@ -1636,9 +1634,9 @@ static BOOL EDIT_EM_LineScroll_internal(EDITSTATE *es, INT dx, INT dy) EDIT_UpdateScrollInfo(es); } if (dx && !(es->flags & EF_HSCROLL_TRACK)) - EDIT_NOTIFY_PARENT(es, EN_HSCROLL); + notify_parent(es, EN_HSCROLL); if (dy && !(es->flags & EF_VSCROLL_TRACK)) - EDIT_NOTIFY_PARENT(es, EN_VSCROLL); + notify_parent(es, EN_VSCROLL); return TRUE; } @@ -2460,8 +2458,9 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r /* Issue the EN_MAXTEXT notification and continue with replacing text * so that buffer limit is honored. */ - if ((honor_limit) && (size > es->buffer_limit)) { - EDIT_NOTIFY_PARENT(es, EN_MAXTEXT); + if ((honor_limit) && (size > es->buffer_limit)) + { + if (!notify_parent(es, EN_MAXTEXT)) return; /* Buffer limit can be smaller than the actual length of text in combobox */ if (es->buffer_limit < (tl - (e-s))) strl = 0; @@ -2519,7 +2518,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r strl = 0; e = s; hrgn = CreateRectRgn(0, 0, 0, 0); - EDIT_NOTIFY_PARENT(es, EN_MAXTEXT); + if (!notify_parent(es, EN_MAXTEXT)) return; } } else { @@ -2536,7 +2535,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r EDIT_CalcLineWidth_SL(es); } text_buffer_changed(es); - EDIT_NOTIFY_PARENT(es, EN_MAXTEXT); + if (!notify_parent(es, EN_MAXTEXT)) return; } } @@ -2627,7 +2626,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r if(send_update || (es->flags & EF_UPDATE)) { es->flags &= ~EF_UPDATE; - EDIT_NOTIFY_PARENT(es, EN_CHANGE); + if (!notify_parent(es, EN_CHANGE)) return; } EDIT_InvalidateUniscribeData(es); } @@ -2877,7 +2876,7 @@ static BOOL EDIT_EM_Undo(EDITSTATE *es) EDIT_EM_ReplaceSel(es, TRUE, utext, ulength, TRUE, TRUE); EDIT_EM_SetSel(es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE); /* send the notification after the selection start and end are set */ - EDIT_NOTIFY_PARENT(es, EN_CHANGE); + if (!notify_parent(es, EN_CHANGE)) return TRUE; EDIT_EM_ScrollCaret(es); heap_free(utext); @@ -3379,8 +3378,8 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key) { if (EDIT_EM_SetSel(es, 0, get_text_length(es), FALSE)) { - EDIT_NOTIFY_PARENT(es, EN_UPDATE); - EDIT_NOTIFY_PARENT(es, EN_CHANGE); + if (!notify_parent(es, EN_UPDATE)) break; + notify_parent(es, EN_CHANGE); } } break; @@ -3397,19 +3396,20 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key) static LRESULT EDIT_WM_KillFocus(HTHEME theme, EDITSTATE *es) { UINT flags = RDW_INVALIDATE | RDW_UPDATENOW; + HWND hwndSelf = es->hwndSelf; es->flags &= ~EF_FOCUSED; DestroyCaret(); if (!(es->style & ES_NOHIDESEL)) EDIT_InvalidateText(es, es->selection_start, es->selection_end); - EDIT_NOTIFY_PARENT(es, EN_KILLFOCUS); + if (!notify_parent(es, EN_KILLFOCUS)) return 0; /* Throw away left over scroll when we lose focus */ es->wheelDeltaRemainder = 0; if (theme) flags |= RDW_FRAME; - RedrawWindow(es->hwndSelf, NULL, NULL, flags); + RedrawWindow(hwndSelf, NULL, NULL, flags); return 0; } @@ -3702,7 +3702,7 @@ static void EDIT_WM_SetFocus(HTHEME theme, EDITSTATE *es) #endif EDIT_SetCaretPos(es, es->selection_end, es->flags & EF_AFTER_WRAP); ShowCaret(es->hwndSelf); - EDIT_NOTIFY_PARENT(es, EN_SETFOCUS); + if (!notify_parent(es, EN_SETFOCUS)) return; if (theme) flags |= RDW_FRAME | RDW_ERASE; @@ -3806,8 +3806,8 @@ static void EDIT_WM_SetText(EDITSTATE *es, LPCWSTR text) */ if( !((es->style & ES_MULTILINE) || es->hwndListBox)) { - EDIT_NOTIFY_PARENT(es, EN_UPDATE); - EDIT_NOTIFY_PARENT(es, EN_CHANGE); + if (!notify_parent(es, EN_UPDATE)) return; + if (!notify_parent(es, EN_CHANGE)) return; } EDIT_EM_ScrollCaret(es); EDIT_UpdateScrollInfo(es); @@ -4008,7 +4008,7 @@ static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos) if (!dx) { /* force scroll info update */ EDIT_UpdateScrollInfo(es); - EDIT_NOTIFY_PARENT(es, EN_HSCROLL); + notify_parent(es, EN_HSCROLL); } break; case SB_ENDSCROLL: @@ -4131,7 +4131,7 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos) { /* force scroll info update */ EDIT_UpdateScrollInfo(es); - EDIT_NOTIFY_PARENT(es, EN_VSCROLL); + notify_parent(es, EN_VSCROLL); } break; case SB_ENDSCROLL:
1 year, 10 months
1
0
0
0
[reactos] 01/01: [SHELL32] Give a chance to rename new file or folder when created (#4950)
by Jose Carlos Jesus
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ed4b16b7ff3c38dc072db…
commit ed4b16b7ff3c38dc072db3a05a0424b2efdd9873 Author: Jose Carlos Jesus <zecarlos1957(a)hotmail.com> AuthorDate: Sat Feb 25 18:38:42 2023 -0400 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Feb 25 23:38:42 2023 +0100 [SHELL32] Give a chance to rename new file or folder when created (#4950) --- dll/win32/shell32/CDefView.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dll/win32/shell32/CDefView.cpp b/dll/win32/shell32/CDefView.cpp index 7cf9160df58..6b51d9e83cd 100644 --- a/dll/win32/shell32/CDefView.cpp +++ b/dll/win32/shell32/CDefView.cpp @@ -990,6 +990,7 @@ BOOLEAN CDefView::LV_ProdItem(PCUITEMID_CHILD pidl) lvItem.iImage = SHMapPIDLToSystemImageListIndex(m_pSFParent, pidl, 0); m_ListView.SetItem(&lvItem); m_ListView.Update(nItem); + m_ListView.EditLabel(nItem); return TRUE; }
1 year, 10 months
1
0
0
0
[reactos] 01/01: [COMDLG32] Follow-up of #5097 (f4bb0ae)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2284aa6e8bf5b38dbb5fe…
commit 2284aa6e8bf5b38dbb5fe8c6053cb7f01880a4de Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Feb 25 10:31:43 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sat Feb 25 10:31:43 2023 +0900 [COMDLG32] Follow-up of #5097 (f4bb0ae) Do not change flags unless necessary.
https://bugs.winehq.org/show_bug.cgi?id=54567
CORE-17064 --- dll/win32/comdlg32/finddlg.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/dll/win32/comdlg32/finddlg.c b/dll/win32/comdlg32/finddlg.c index fc13f8a7d54..459c4bdd0b2 100644 --- a/dll/win32/comdlg32/finddlg.c +++ b/dll/win32/comdlg32/finddlg.c @@ -89,9 +89,11 @@ static void COMDLG32_FR_HandleWMCommand(HWND hDlgWnd, COMDLG32_FR_Data *pData, i { DWORD flag; +#ifndef __REACTOS__ pData->user_fr.fra->Flags &= ~FR_MASK; /* Clear return flags */ if(pData->fr.Flags & FR_WINE_REPLACE) /* Replace always goes down... */ pData->user_fr.fra->Flags |= FR_DOWN; +#endif if(NotifyCode == BN_CLICKED) { @@ -100,6 +102,11 @@ static void COMDLG32_FR_HandleWMCommand(HWND hDlgWnd, COMDLG32_FR_Data *pData, i case IDOK: /* Find Next */ if(GetDlgItemTextA(hDlgWnd, edt1, pData->fr.lpstrFindWhat, pData->fr.wFindWhatLen) > 0) { +#ifdef __REACTOS__ + pData->user_fr.fra->Flags &= ~FR_MASK; /* Clear return flags */ + if(pData->fr.Flags & FR_WINE_REPLACE) /* Replace always goes down... */ + pData->user_fr.fra->Flags |= FR_DOWN; +#endif pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd) | FR_FINDNEXT; if(pData->fr.Flags & FR_WINE_UNICODE) { @@ -116,6 +123,11 @@ static void COMDLG32_FR_HandleWMCommand(HWND hDlgWnd, COMDLG32_FR_Data *pData, i break; case IDCANCEL: +#ifdef __REACTOS__ + pData->user_fr.fra->Flags &= ~FR_MASK; /* Clear return flags */ + if(pData->fr.Flags & FR_WINE_REPLACE) /* Replace always goes down... */ + pData->user_fr.fra->Flags |= FR_DOWN; +#endif pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd) | FR_DIALOGTERM; SendMessageA(pData->fr.hwndOwner, FindReplaceMessage, 0, (LPARAM)pData->user_fr.fra); DestroyWindow(hDlgWnd); @@ -133,6 +145,11 @@ Replace: { pData->fr.lpstrReplaceWith[0] = 0; /* In case the next GetDlgItemText Fails */ GetDlgItemTextA(hDlgWnd, edt2, pData->fr.lpstrReplaceWith, pData->fr.wReplaceWithLen); +#ifdef __REACTOS__ + pData->user_fr.fra->Flags &= ~FR_MASK; /* Clear return flags */ + if(pData->fr.Flags & FR_WINE_REPLACE) /* Replace always goes down... */ + pData->user_fr.fra->Flags |= FR_DOWN; +#endif pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd) | flag; if(pData->fr.Flags & FR_WINE_UNICODE) { @@ -153,6 +170,11 @@ Replace: break; case pshHelp: +#ifdef __REACTOS__ + pData->user_fr.fra->Flags &= ~FR_MASK; /* Clear return flags */ + if(pData->fr.Flags & FR_WINE_REPLACE) /* Replace always goes down... */ + pData->user_fr.fra->Flags |= FR_DOWN; +#endif pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd); SendMessageA(pData->fr.hwndOwner, HelpMessage, (WPARAM)hDlgWnd, (LPARAM)pData->user_fr.fra); break; @@ -168,12 +190,6 @@ Replace: EnableWindow(GetDlgItem(hDlgWnd, psh2), enable); } } -#ifdef __REACTOS__ - else if (NotifyCode == EN_KILLFOCUS && Id == edt1) - { - pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd); - } -#endif } /***********************************************************************
1 year, 10 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
10
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
Results per page:
10
25
50
100
200