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
July 2019
----- 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
22 participants
146 discussions
Start a n
N
ew thread
[reactos] 01/01: [MEDIA][FONTS] Add Greek MS Sans Serif (sserifeg.fon) CORE-16166
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=81a958b0735deed4bd0a4…
commit 81a958b0735deed4bd0a4bd99e8e0582e8b2e401 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Jul 11 16:09:24 2019 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Thu Jul 11 16:09:24 2019 +0900 [MEDIA][FONTS] Add Greek MS Sans Serif (sserifeg.fon) CORE-16166 --- media/fonts/CMakeLists.txt | 1 + media/fonts/sserifeg.fon | Bin 0 -> 65440 bytes 2 files changed, 1 insertion(+) diff --git a/media/fonts/CMakeLists.txt b/media/fonts/CMakeLists.txt index 396f0ff298d..36cf568d423 100644 --- a/media/fonts/CMakeLists.txt +++ b/media/fonts/CMakeLists.txt @@ -127,6 +127,7 @@ list(APPEND FONT_FILES SourceCodePro-Semibold.ttf SourceCodePro-SemiboldIt.ttf #sserife.fon + #sserifeg.fon #sserifer.fon UniVGA16.ttf) diff --git a/media/fonts/sserifeg.fon b/media/fonts/sserifeg.fon new file mode 100644 index 00000000000..ce4a199b808 Binary files /dev/null and b/media/fonts/sserifeg.fon differ
5 years, 5 months
1
0
0
0
[reactos] 02/02: [NTOS:PNP] Reduce the default buffer size in EnumerateDevices. CORE-15882
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2d419e90f92890f55d517…
commit 2d419e90f92890f55d5179ff8578d274cbfcc1f4 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sat Apr 20 10:49:13 2019 +0200 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Wed Jul 10 10:58:47 2019 +0200 [NTOS:PNP] Reduce the default buffer size in EnumerateDevices. CORE-15882 --- ntoskrnl/io/pnpmgr/pnproot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ntoskrnl/io/pnpmgr/pnproot.c b/ntoskrnl/io/pnpmgr/pnproot.c index 65ea5cc937b..03ae98131d6 100644 --- a/ntoskrnl/io/pnpmgr/pnproot.c +++ b/ntoskrnl/io/pnpmgr/pnproot.c @@ -461,7 +461,8 @@ EnumerateDevices( DeviceExtension = (PPNPROOT_FDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; KeAcquireGuardedMutex(&DeviceExtension->DeviceListLock); - KeyInfoSize = sizeof(KEY_BASIC_INFORMATION) + (MAX_PATH + 1) * sizeof(WCHAR); + /* Should hold most key names, but we reallocate below if it's too small */ + KeyInfoSize = FIELD_OFFSET(KEY_BASIC_INFORMATION, Name) + 64 * sizeof(WCHAR); KeyInfo = ExAllocatePoolWithTag(PagedPool, KeyInfoSize + sizeof(UNICODE_NULL), TAG_PNP_ROOT);
5 years, 5 months
1
0
0
0
[reactos] 01/02: [NTOS:PNP] Handle arbitrary subkey name lengths in EnumerateDevices. CORE-15882
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b8e091a44c9852fb759e9…
commit b8e091a44c9852fb759e9cb7f503bab74146a2d1 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sat Apr 20 10:48:43 2019 +0200 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Wed Jul 10 10:58:45 2019 +0200 [NTOS:PNP] Handle arbitrary subkey name lengths in EnumerateDevices. CORE-15882 This also makes it necessary to fix a bug in the previous code: ZwEnumerateKey will not account for space for a null terminator, so to ensure we have space, we must allocate the additional WCHAR, but not include it in the buffer size passed to the function. --- ntoskrnl/io/pnpmgr/pnproot.c | 53 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/ntoskrnl/io/pnpmgr/pnproot.c b/ntoskrnl/io/pnpmgr/pnproot.c index 34b529ad509..65ea5cc937b 100644 --- a/ntoskrnl/io/pnpmgr/pnproot.c +++ b/ntoskrnl/io/pnpmgr/pnproot.c @@ -450,7 +450,7 @@ EnumerateDevices( HANDLE KeyHandle = NULL; HANDLE SubKeyHandle = NULL; HANDLE DeviceKeyHandle = NULL; - ULONG BufferSize; + ULONG KeyInfoSize, SubKeyInfoSize; ULONG ResultSize; ULONG Index1, Index2; BUFFER Buffer1, Buffer2; @@ -461,15 +461,20 @@ EnumerateDevices( DeviceExtension = (PPNPROOT_FDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; KeAcquireGuardedMutex(&DeviceExtension->DeviceListLock); - BufferSize = sizeof(KEY_BASIC_INFORMATION) + (MAX_PATH + 1) * sizeof(WCHAR); - KeyInfo = ExAllocatePoolWithTag(PagedPool, BufferSize, TAG_PNP_ROOT); + KeyInfoSize = sizeof(KEY_BASIC_INFORMATION) + (MAX_PATH + 1) * sizeof(WCHAR); + KeyInfo = ExAllocatePoolWithTag(PagedPool, + KeyInfoSize + sizeof(UNICODE_NULL), + TAG_PNP_ROOT); if (!KeyInfo) { DPRINT("ExAllocatePoolWithTag() failed\n"); Status = STATUS_NO_MEMORY; goto cleanup; } - SubKeyInfo = ExAllocatePoolWithTag(PagedPool, BufferSize, TAG_PNP_ROOT); + SubKeyInfoSize = KeyInfoSize; + SubKeyInfo = ExAllocatePoolWithTag(PagedPool, + SubKeyInfoSize + sizeof(UNICODE_NULL), + TAG_PNP_ROOT); if (!SubKeyInfo) { DPRINT("ExAllocatePoolWithTag() failed\n"); @@ -496,13 +501,30 @@ EnumerateDevices( Index1, KeyBasicInformation, KeyInfo, - BufferSize, + KeyInfoSize, &ResultSize); if (Status == STATUS_NO_MORE_ENTRIES) { Status = STATUS_SUCCESS; break; } + else if (Status == STATUS_BUFFER_OVERFLOW || + Status == STATUS_BUFFER_TOO_SMALL) + { + ASSERT(KeyInfoSize < ResultSize); + KeyInfoSize = ResultSize; + ExFreePoolWithTag(KeyInfo, TAG_PNP_ROOT); + KeyInfo = ExAllocatePoolWithTag(PagedPool, + KeyInfoSize + sizeof(UNICODE_NULL), + TAG_PNP_ROOT); + if (!KeyInfo) + { + DPRINT1("ExAllocatePoolWithTag(%lu) failed\n", KeyInfoSize); + Status = STATUS_NO_MEMORY; + goto cleanup; + } + continue; + } else if (!NT_SUCCESS(Status)) { DPRINT("ZwEnumerateKey() failed with status 0x%08lx\n", Status); @@ -539,10 +561,29 @@ EnumerateDevices( Index2, KeyBasicInformation, SubKeyInfo, - BufferSize, + SubKeyInfoSize, &ResultSize); if (Status == STATUS_NO_MORE_ENTRIES) + { break; + } + else if (Status == STATUS_BUFFER_OVERFLOW || + Status == STATUS_BUFFER_TOO_SMALL) + { + ASSERT(SubKeyInfoSize < ResultSize); + SubKeyInfoSize = ResultSize; + ExFreePoolWithTag(SubKeyInfo, TAG_PNP_ROOT); + SubKeyInfo = ExAllocatePoolWithTag(PagedPool, + SubKeyInfoSize + sizeof(UNICODE_NULL), + TAG_PNP_ROOT); + if (!SubKeyInfo) + { + DPRINT1("ExAllocatePoolWithTag(%lu) failed\n", SubKeyInfoSize); + Status = STATUS_NO_MEMORY; + goto cleanup; + } + continue; + } else if (!NT_SUCCESS(Status)) { DPRINT("ZwEnumerateKey() failed with status 0x%08lx\n", Status);
5 years, 5 months
1
0
0
0
[reactos] 01/01: [SHELL32] Fix SHCreateDirectoryExW showing an error on success CORE-15145
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b5423ba70b0a1e7022a04…
commit b5423ba70b0a1e7022a04a7c7b3b7b0de447f6b8 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Tue Jul 9 22:52:17 2019 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Tue Jul 9 22:52:17 2019 +0200 [SHELL32] Fix SHCreateDirectoryExW showing an error on success CORE-15145 --- dll/win32/shell32/shlfileop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/shell32/shlfileop.cpp b/dll/win32/shell32/shlfileop.cpp index 211b3311c7b..499f4d3079e 100644 --- a/dll/win32/shell32/shlfileop.cpp +++ b/dll/win32/shell32/shlfileop.cpp @@ -880,7 +880,7 @@ int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES s } } - if (ret && hWnd && (ERROR_CANCELLED != ret)) + if (ret && hWnd && (ERROR_CANCELLED != ret && ERROR_ALREADY_EXISTS != ret)) { ShellMessageBoxW(shell32_hInstance, hWnd, MAKEINTRESOURCEW(IDS_CREATEFOLDER_DENIED), MAKEINTRESOURCEW(IDS_CREATEFOLDER_CAPTION), MB_ICONEXCLAMATION | MB_OK, path);
5 years, 5 months
1
0
0
0
[reactos] 01/01: [MEDIA][FONTS] Add Cyrillic MS Sans Serif (sserifer.fon)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=96beae8f523937bfe9edb…
commit 96beae8f523937bfe9edbf6d8b7c3d5f4d7a2eb2 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Jul 9 12:56:09 2019 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Tue Jul 9 12:56:09 2019 +0900 [MEDIA][FONTS] Add Cyrillic MS Sans Serif (sserifer.fon) --- media/fonts/CMakeLists.txt | 1 + media/fonts/sserifer.fon | Bin 0 -> 68832 bytes 2 files changed, 1 insertion(+) diff --git a/media/fonts/CMakeLists.txt b/media/fonts/CMakeLists.txt index d28e48ba019..396f0ff298d 100644 --- a/media/fonts/CMakeLists.txt +++ b/media/fonts/CMakeLists.txt @@ -127,6 +127,7 @@ list(APPEND FONT_FILES SourceCodePro-Semibold.ttf SourceCodePro-SemiboldIt.ttf #sserife.fon + #sserifer.fon UniVGA16.ttf) foreach(item ${FONT_FILES}) diff --git a/media/fonts/sserifer.fon b/media/fonts/sserifer.fon new file mode 100644 index 00000000000..4aa44ae2cbb Binary files /dev/null and b/media/fonts/sserifer.fon differ
5 years, 5 months
1
0
0
0
[reactos] 01/01: [SETUPAPI] CM_Delete_DevNode_Key[_Ex]: Use DEVINST instead of DEVNODE because we are using DEVINST anywhere else.
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=93f77f2625c40e8eb2fbb…
commit 93f77f2625c40e8eb2fbbc9d7e491c4d72f2b30c Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Mon Jul 8 00:08:22 2019 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Mon Jul 8 00:08:22 2019 +0200 [SETUPAPI] CM_Delete_DevNode_Key[_Ex]: Use DEVINST instead of DEVNODE because we are using DEVINST anywhere else. --- dll/win32/setupapi/cfgmgr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c index 55c3d64dccc..1362f9969f5 100644 --- a/dll/win32/setupapi/cfgmgr.c +++ b/dll/win32/setupapi/cfgmgr.c @@ -1567,14 +1567,14 @@ CM_Delete_Class_Key_Ex( CONFIGRET WINAPI CM_Delete_DevNode_Key( - _In_ DEVNODE dnDevNode, + _In_ DEVINST dnDevInst, _In_ ULONG ulHardwareProfile, _In_ ULONG ulFlags) { TRACE("CM_Delete_DevNode_Key(%p %lu %lx)\n", - dnDevNode, ulHardwareProfile, ulFlags); + dnDevInst, ulHardwareProfile, ulFlags); - return CM_Delete_DevNode_Key_Ex(dnDevNode, ulHardwareProfile, ulFlags, + return CM_Delete_DevNode_Key_Ex(dnDevInst, ulHardwareProfile, ulFlags, NULL); } @@ -1585,13 +1585,13 @@ CM_Delete_DevNode_Key( CONFIGRET WINAPI CM_Delete_DevNode_Key_Ex( - _In_ DEVNODE dnDevNode, + _In_ DEVINST dnDevInst, _In_ ULONG ulHardwareProfile, _In_ ULONG ulFlags, _In_opt_ HANDLE hMachine) { FIXME("CM_Delete_DevNode_Key_Ex(%p %lu %lx %p)\n", - dnDevNode, ulHardwareProfile, ulFlags, hMachine); + dnDevInst, ulHardwareProfile, ulFlags, hMachine); return CR_CALL_NOT_IMPLEMENTED; }
5 years, 5 months
1
0
0
0
[reactos] 01/01: [SETUPAPI] CMP_RegisterNotification: When a window is registered, pass the window text to PNP_RegisterNotification().
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=86e8a477b608a9c4b1aa5…
commit 86e8a477b608a9c4b1aa5a6c5589e449c94add14 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Jul 7 23:46:25 2019 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun Jul 7 23:47:01 2019 +0200 [SETUPAPI] CMP_RegisterNotification: When a window is registered, pass the window text to PNP_RegisterNotification(). --- dll/win32/setupapi/cfgmgr.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/dll/win32/setupapi/cfgmgr.c b/dll/win32/setupapi/cfgmgr.c index 0624ed8f5c8..55c3d64dccc 100644 --- a/dll/win32/setupapi/cfgmgr.c +++ b/dll/win32/setupapi/cfgmgr.c @@ -602,8 +602,9 @@ CMP_RegisterNotification( RPC_BINDING_HANDLE BindingHandle = NULL; PNOTIFY_DATA pNotifyData = NULL; WCHAR szNameBuffer[256]; - DWORD dwError; + INT nLength; DWORD ulUnknown9 = 0; + DWORD dwError; CONFIGRET ret = CR_SUCCESS; FIXME("CMP_RegisterNotification(%p %p %lu %p)\n", @@ -635,8 +636,16 @@ CMP_RegisterNotification( { FIXME("Register a window\n"); - /* FIXME */ - szNameBuffer[0] = UNICODE_NULL; + nLength = GetWindowTextW((HWND)hRecipient, + szNameBuffer, + ARRAYSIZE(szNameBuffer)); + if (nLength == 0) + { + HeapFree(GetProcessHeap(), 0, pNotifyData); + return CR_INVALID_DATA; + } + + FIXME("Register window: %S\n", szNameBuffer); } else if ((ulFlags & DEVICE_NOTIFY_SERVICE_HANDLE) == DEVICE_NOTIFY_SERVICE_HANDLE) {
5 years, 5 months
1
0
0
0
[reactos] 01/01: [WIN32SS][FREETYPE] Fix performance regression FreeBASIC console output CORE-16177
by Joachim Henze
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b5478a7873d48c678ef9c…
commit b5478a7873d48c678ef9c344f45ffe0b1c0e4989 Author: Joachim Henze <Joachim.Henze(a)reactos.org> AuthorDate: Sun Jul 7 20:50:30 2019 +0200 Commit: Joachim Henze <Joachim.Henze(a)reactos.org> CommitDate: Sun Jul 7 20:50:30 2019 +0200 [WIN32SS][FREETYPE] Fix performance regression FreeBASIC console output CORE-16177 By restoring historic state of GreExtTextOutW() / IntExtTextOutW() This reverts guilty rev 0.4.12-dev-190-g d6cfeaef5105dc6db2f12682bc48f17f9caacdcc as well as some follow ups that dealt with new errors popping up afterwards. The revert got ack of Katayama Hirofumi MZ. Test VBox on master:
https://reactos.org/testman/compare.php?ids=68471,68475
Test KVM on master:
https://reactos.org/testman/compare.php?ids=68472,68476
Analog revert was applied before to 0.4.12-RC-42-g 021f498cb2bf50ea210696431786d24536da2691 --- win32ss/gdi/ntgdi/freetype.c | 320 ++++++++++++++++++++++++++++--------------- 1 file changed, 209 insertions(+), 111 deletions(-) diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index 027ccdb66e2..854085d01e0 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -5618,7 +5618,7 @@ IntExtTextOutW( FT_GlyphSlot glyph; FT_BitmapGlyph realglyph; LONGLONG TextLeft, RealXStart; - ULONG TextTop, previous; + ULONG TextTop, previous, BackgroundLeft; FT_Bool use_kerning; RECTL DestRect, MaskRect; POINTL SourcePoint, BrushOrigin; @@ -5642,7 +5642,6 @@ IntExtTextOutW( BOOL EmuBold, EmuItalic; int thickness; BOOL bResult; - ULONGLONG TextWidth; /* Check if String is valid */ if ((Count > 0xFFFF) || (Count > 0 && String == NULL)) @@ -5812,29 +5811,145 @@ IntExtTextOutW( yoff = fixAscender >> 6; #undef VALIGN_MASK + use_kerning = FT_HAS_KERNING(face); + previous = 0; + /* - * Calculate width of the text. + * Process the horizontal alignment and modify XStart accordingly. */ - TextWidth = 0; DxShift = fuOptions & ETO_PDY ? 1 : 0; - use_kerning = FT_HAS_KERNING(face); - previous = 0; - if ((fuOptions & ETO_OPAQUE) || - (pdcattr->lTextAlign & (TA_CENTER | TA_RIGHT))) + if (pdcattr->lTextAlign & (TA_RIGHT | TA_CENTER)) { + ULONGLONG TextWidth = 0; + LPCWSTR TempText = String; + int iStart; + + /* + * Calculate width of the text. + */ + + if (NULL != Dx) + { + iStart = Count < 2 ? 0 : Count - 2; + TextWidth = Count < 2 ? 0 : (Dx[(Count-2)<<DxShift] << 6); + } + else + { + iStart = 0; + } + TempText = String + iStart; + + for (i = iStart; i < Count; i++) + { + glyph_index = get_glyph_index_flagged(face, *TempText, ETO_GLYPH_INDEX, fuOptions); + + if (EmuBold || EmuItalic) + realglyph = NULL; + else + realglyph = ftGdiGlyphCacheGet(face, glyph_index, plf->lfHeight, + RenderMode, pmxWorldToDevice); + if (!realglyph) + { + error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT); + if (error) + { + DPRINT1("WARNING: Failed to load and render glyph! [index: %d]\n", glyph_index); + } + + glyph = face->glyph; + if (EmuBold || EmuItalic) + { + if (EmuBold) + FT_GlyphSlot_Embolden(glyph); + if (EmuItalic) + FT_GlyphSlot_Oblique(glyph); + realglyph = ftGdiGlyphSet(face, glyph, RenderMode); + } + else + { + realglyph = ftGdiGlyphCacheSet(face, + glyph_index, + plf->lfHeight, + pmxWorldToDevice, + glyph, + RenderMode); + } + if (!realglyph) + { + DPRINT1("Failed to render glyph! [index: %d]\n", glyph_index); + IntUnLockFreeType(); + goto Cleanup; + } + + } + /* Retrieve kerning distance */ + if (use_kerning && previous && glyph_index) + { + FT_Vector delta; + FT_Get_Kerning(face, previous, glyph_index, 0, &delta); + TextWidth += delta.x; + } + + TextWidth += realglyph->root.advance.x >> 10; + + if (EmuBold || EmuItalic) + { + FT_Done_Glyph((FT_Glyph)realglyph); + realglyph = NULL; + } + + previous = glyph_index; + TempText++; + } + + previous = 0; + + if ((pdcattr->lTextAlign & TA_CENTER) == TA_CENTER) + { + RealXStart -= TextWidth / 2; + } + else + { + RealXStart -= TextWidth; + } + } + + psurf = dc->dclevel.pSurface; + SurfObj = &psurf->SurfObj ; + + if ((fuOptions & ETO_OPAQUE) && (dc->pdcattr->ulDirty_ & DIRTY_BACKGROUND)) + DC_vUpdateBackgroundBrush(dc) ; + + if(dc->pdcattr->ulDirty_ & DIRTY_TEXT) + DC_vUpdateTextBrush(dc) ; + + if (!face->units_per_EM) + { + thickness = 1; + } + else + { + thickness = face->underline_thickness * + face->size->metrics.y_ppem / face->units_per_EM; + if (thickness <= 0) + thickness = 1; + } + + if ((fuOptions & ETO_OPAQUE) && plf->lfItalic) + { + /* Draw background */ TextLeft = RealXStart; TextTop = YStart; + BackgroundLeft = (RealXStart + 32) >> 6; for (i = 0; i < Count; ++i) { glyph_index = get_glyph_index_flagged(face, String[i], ETO_GLYPH_INDEX, fuOptions); - // FIXME: Use FT_LOAD_BITMAP_METRICS_ONLY or cache. error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT); if (error) { - DPRINT1("Failed to load glyph! [index: %d]\n", glyph_index); + DPRINT1("Failed to load and render glyph! [index: %d]\n", glyph_index); IntUnLockFreeType(); - bResult = FALSE; goto Cleanup; } @@ -5848,21 +5963,58 @@ IntExtTextOutW( { DPRINT1("Failed to render glyph! [index: %d]\n", glyph_index); IntUnLockFreeType(); - bResult = FALSE; goto Cleanup; } /* retrieve kerning distance and move pen position */ - if (use_kerning && previous && glyph_index && Dx == NULL) + if (use_kerning && previous && glyph_index && NULL == Dx) { FT_Vector delta; FT_Get_Kerning(face, previous, glyph_index, 0, &delta); TextLeft += delta.x; } + DPRINT("TextLeft: %I64d\n", TextLeft); + DPRINT("TextTop: %lu\n", TextTop); + DPRINT("Advance: %d\n", realglyph->root.advance.x); + + DestRect.left = BackgroundLeft; + DestRect.right = (TextLeft + (realglyph->root.advance.x >> 10) + 32) >> 6; + DestRect.top = TextTop + yoff - ((fixAscender + 32) >> 6); + DestRect.bottom = DestRect.top + ((fixAscender + fixDescender) >> 6); + MouseSafetyOnDrawStart(dc->ppdev, DestRect.left, DestRect.top, DestRect.right, DestRect.bottom); + if (dc->fs & (DC_ACCUM_APP|DC_ACCUM_WMGR)) + { + IntUpdateBoundsRect(dc, &DestRect); + } + IntEngBitBlt( + &psurf->SurfObj, + NULL, + NULL, + (CLIPOBJ *)&dc->co, + NULL, + &DestRect, + &SourcePoint, + &SourcePoint, + &dc->eboBackground.BrushObject, + &BrushOrigin, + ROP4_FROM_INDEX(R3_OPINDEX_PATCOPY)); + MouseSafetyOnDrawEnd(dc->ppdev); + BackgroundLeft = DestRect.right; + + DestRect.left = ((TextLeft + 32) >> 6) + realglyph->left; + DestRect.right = DestRect.left + realglyph->bitmap.width; + DestRect.top = TextTop + yoff - realglyph->top; + DestRect.bottom = DestRect.top + realglyph->bitmap.rows; - if (Dx == NULL) + bitSize.cx = realglyph->bitmap.width; + bitSize.cy = realglyph->bitmap.rows; + MaskRect.right = realglyph->bitmap.width; + MaskRect.bottom = realglyph->bitmap.rows; + + if (NULL == Dx) { TextLeft += realglyph->root.advance.x >> 10; + DPRINT("New TextLeft: %I64d\n", TextLeft); } else { @@ -5872,8 +6024,9 @@ IntExtTextOutW( FLOATOBJ_Set1(&Scale); /* do the shift before multiplying to preserve precision */ - FLOATOBJ_MulLong(&Scale, Dx[i << DxShift] << 6); + FLOATOBJ_MulLong(&Scale, Dx[i<<DxShift] << 6); TextLeft += FLOATOBJ_GetLong(&Scale); + DPRINT("New TextLeft2: %I64d\n", TextLeft); } if (DxShift) @@ -5883,86 +6036,12 @@ IntExtTextOutW( previous = glyph_index; - FT_Done_Glyph((FT_Glyph)realglyph); - } - - TextWidth = TextLeft - RealXStart; - } - - /* - * Process the horizontal alignment and modify XStart accordingly. - */ - if ((pdcattr->lTextAlign & TA_CENTER) == TA_CENTER) - { - RealXStart -= TextWidth / 2; - } - else if ((pdcattr->lTextAlign & TA_RIGHT) == TA_RIGHT) - { - RealXStart -= TextWidth; - if (((RealXStart + TextWidth + 32) >> 6) <= Start.x + dc->ptlDCOrig.x) - RealXStart += 1 << 6; - } - - psurf = dc->dclevel.pSurface; - SurfObj = &psurf->SurfObj ; - - if ((fuOptions & ETO_OPAQUE) && (dc->pdcattr->ulDirty_ & DIRTY_BACKGROUND)) - DC_vUpdateBackgroundBrush(dc) ; - - if(dc->pdcattr->ulDirty_ & DIRTY_TEXT) - DC_vUpdateTextBrush(dc) ; - - if (!face->units_per_EM) - { - thickness = 1; - } - else - { - thickness = face->underline_thickness * - face->size->metrics.y_ppem / face->units_per_EM; - if (thickness <= 0) - thickness = 1; - } - - if (fuOptions & ETO_OPAQUE) - { - /* Draw background */ - RECTL Rect; - - Rect.left = (RealXStart + 32) >> 6; - Rect.top = TextTop + yoff - ((fixAscender + 32) >> 6); - Rect.right = (RealXStart + TextWidth + 32) >> 6; - Rect.bottom = Rect.top + ((fixAscender + fixDescender) >> 6); - - if (dc->fs & (DC_ACCUM_APP | DC_ACCUM_WMGR)) - { - IntUpdateBoundsRect(dc, &Rect); + if (EmuBold || EmuItalic) + { + FT_Done_Glyph((FT_Glyph)realglyph); + realglyph = NULL; + } } - - if (pdcattr->ulDirty_ & DIRTY_BACKGROUND) - DC_vUpdateBackgroundBrush(dc); - if (dc->dctype == DCTYPE_DIRECT) - MouseSafetyOnDrawStart(dc->ppdev, Rect.left, Rect.top, Rect.right, Rect.bottom); - - SourcePoint.x = SourcePoint.y = 0; - BrushOrigin.x = BrushOrigin.y = 0; - - psurf = dc->dclevel.pSurface; - IntEngBitBlt( - &psurf->SurfObj, - NULL, - NULL, - (CLIPOBJ *)&dc->co, - NULL, - &Rect, - &SourcePoint, - &SourcePoint, - &dc->eboBackground.BrushObject, - &BrushOrigin, - ROP4_FROM_INDEX(R3_OPINDEX_PATCOPY)); - - if (dc->dctype == DCTYPE_DIRECT) - MouseSafetyOnDrawEnd(dc->ppdev); } EXLATEOBJ_vInitialize(&exloRGB2Dst, &gpalRGB, psurf->ppal, 0, 0, 0); @@ -5976,7 +6055,7 @@ IntExtTextOutW( */ TextLeft = RealXStart; TextTop = YStart; - previous = 0; + BackgroundLeft = (RealXStart + 32) >> 6; for (i = 0; i < Count; ++i) { glyph_index = get_glyph_index_flagged(face, String[i], ETO_GLYPH_INDEX, fuOptions); @@ -6033,6 +6112,39 @@ IntExtTextOutW( DPRINT("TextTop: %lu\n", TextTop); DPRINT("Advance: %d\n", realglyph->root.advance.x); + if ((fuOptions & ETO_OPAQUE) && !plf->lfItalic) + { + DestRect.left = BackgroundLeft; + DestRect.right = (TextLeft + (realglyph->root.advance.x >> 10) + 32) >> 6; + DestRect.top = TextTop + yoff - ((fixAscender + 32) >> 6); + DestRect.bottom = DestRect.top + ((fixAscender + fixDescender) >> 6); + + if (dc->dctype == DCTYPE_DIRECT) + MouseSafetyOnDrawStart(dc->ppdev, DestRect.left, DestRect.top, DestRect.right, DestRect.bottom); + + if (dc->fs & (DC_ACCUM_APP|DC_ACCUM_WMGR)) + { + IntUpdateBoundsRect(dc, &DestRect); + } + IntEngBitBlt( + &psurf->SurfObj, + NULL, + NULL, + (CLIPOBJ *)&dc->co, + NULL, + &DestRect, + &SourcePoint, + &SourcePoint, + &dc->eboBackground.BrushObject, + &BrushOrigin, + ROP4_FROM_INDEX(R3_OPINDEX_PATCOPY)); + + if (dc->dctype == DCTYPE_DIRECT) + MouseSafetyOnDrawEnd(dc->ppdev); + + BackgroundLeft = DestRect.right; + } + DestRect.left = ((TextLeft + 32) >> 6) + realglyph->left; DestRect.right = DestRect.left + realglyph->bitmap.width; DestRect.top = TextTop + yoff - realglyph->top; @@ -6057,12 +6169,8 @@ IntExtTextOutW( if ( !HSourceGlyph ) { DPRINT1("WARNING: EngCreateBitmap() failed!\n"); + // FT_Done_Glyph(realglyph); bResult = FALSE; - if (EmuBold || EmuItalic) - { - FT_Done_Glyph((FT_Glyph)realglyph); - } - break; } SourceGlyphSurf = EngLockSurface((HSURF)HSourceGlyph); @@ -6071,11 +6179,6 @@ IntExtTextOutW( EngDeleteSurface((HSURF)HSourceGlyph); DPRINT1("WARNING: EngLockSurface() failed!\n"); bResult = FALSE; - if (EmuBold || EmuItalic) - { - FT_Done_Glyph((FT_Glyph)realglyph); - } - break; } @@ -6124,11 +6227,6 @@ IntExtTextOutW( if (DoBreak) { - if (EmuBold || EmuItalic) - { - FT_Done_Glyph((FT_Glyph)realglyph); - } - break; } @@ -6199,10 +6297,10 @@ IntExtTextOutW( previous = glyph_index; - /* No cache, so clean up */ if (EmuBold || EmuItalic) { FT_Done_Glyph((FT_Glyph)realglyph); + realglyph = NULL; } }
5 years, 5 months
1
0
0
0
[reactos] 02/02: [SHELL32] Recycle-Bin: Validate the MaxCapacity value with respect to the available disk space. (#1688)
by Bișoc George
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=019e3ffe5f0c15652a20a…
commit 019e3ffe5f0c15652a20ab84bbeb565199b0123f Author: Bișoc George <fraizeraust99(a)gmail.com> AuthorDate: Mon Jun 24 18:45:52 2019 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Jul 7 19:01:09 2019 +0200 [SHELL32] Recycle-Bin: Validate the MaxCapacity value with respect to the available disk space. (#1688) CORE-12313 Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> --- dll/win32/shell32/dialogs/recycler_prop.cpp | 31 +++++++++++++++++++++++++---- dll/win32/shell32/lang/bg-BG.rc | 2 +- dll/win32/shell32/lang/ca-ES.rc | 2 +- dll/win32/shell32/lang/cs-CZ.rc | 2 +- dll/win32/shell32/lang/da-DK.rc | 2 +- dll/win32/shell32/lang/de-DE.rc | 2 +- dll/win32/shell32/lang/el-GR.rc | 2 +- dll/win32/shell32/lang/en-GB.rc | 2 +- dll/win32/shell32/lang/en-US.rc | 2 +- dll/win32/shell32/lang/es-ES.rc | 2 +- dll/win32/shell32/lang/et-EE.rc | 2 +- dll/win32/shell32/lang/fi-FI.rc | 2 +- dll/win32/shell32/lang/fr-FR.rc | 2 +- dll/win32/shell32/lang/he-IL.rc | 2 +- dll/win32/shell32/lang/hi-IN.rc | 2 +- dll/win32/shell32/lang/hu-HU.rc | 2 +- dll/win32/shell32/lang/it-IT.rc | 2 +- dll/win32/shell32/lang/ja-JP.rc | 2 +- dll/win32/shell32/lang/ko-KR.rc | 2 +- dll/win32/shell32/lang/nl-NL.rc | 2 +- dll/win32/shell32/lang/no-NO.rc | 2 +- dll/win32/shell32/lang/pl-PL.rc | 2 +- dll/win32/shell32/lang/pt-BR.rc | 2 +- dll/win32/shell32/lang/pt-PT.rc | 2 +- dll/win32/shell32/lang/ro-RO.rc | 2 +- dll/win32/shell32/lang/ru-RU.rc | 2 +- dll/win32/shell32/lang/sk-SK.rc | 2 +- dll/win32/shell32/lang/sl-SI.rc | 2 +- dll/win32/shell32/lang/sq-AL.rc | 2 +- dll/win32/shell32/lang/sv-SE.rc | 2 +- dll/win32/shell32/lang/tr-TR.rc | 2 +- dll/win32/shell32/lang/uk-UA.rc | 2 +- dll/win32/shell32/lang/zh-CN.rc | 2 +- dll/win32/shell32/lang/zh-TW.rc | 2 +- 34 files changed, 60 insertions(+), 37 deletions(-) diff --git a/dll/win32/shell32/dialogs/recycler_prop.cpp b/dll/win32/shell32/dialogs/recycler_prop.cpp index f6efad5e4ad..10b13500d3a 100644 --- a/dll/win32/shell32/dialogs/recycler_prop.cpp +++ b/dll/win32/shell32/dialogs/recycler_prop.cpp @@ -25,6 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(CRecycleBin); typedef struct { + ULARGE_INTEGER FreeBytesAvailable; DWORD dwSerial; DWORD dwMaxCapacity; DWORD dwNukeOnDelete; @@ -122,12 +123,21 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive) pItem = (DRIVE_ITEM_CONTEXT *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DRIVE_ITEM_CONTEXT)); if (pItem) { + pItem->FreeBytesAvailable = FreeBytesAvailable; + pItem->dwSerial = dwSerial; + swprintf(szName, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\BitBucket\\Volume\\%04X-%04X", LOWORD(dwSerial), HIWORD(dwSerial)); + dwSize = sizeof(DWORD); RegGetValueW(HKEY_CURRENT_USER, szName, L"MaxCapacity", RRF_RT_DWORD, NULL, &pItem->dwMaxCapacity, &dwSize); + + /* Check if the maximum capacity doesn't exceed the available disk space (in megabytes), and truncate it if needed */ + FreeBytesAvailable.QuadPart = (FreeBytesAvailable.QuadPart / (1024 * 1024)); + pItem->dwMaxCapacity = min(pItem->dwMaxCapacity, FreeBytesAvailable.LowPart); + dwSize = sizeof(DWORD); RegGetValueW(HKEY_CURRENT_USER, szName, L"NukeOnDelete", RRF_RT_DWORD, NULL, &pItem->dwNukeOnDelete, &dwSize); - pItem->dwSerial = dwSerial; + li.mask = LVIF_PARAM; li.lParam = (LPARAM)pItem; (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); @@ -163,7 +173,7 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive) } ZeroMemory(&li, sizeof(li)); li.mask = LVIF_STATE; - li.stateMask = (UINT) - 1; + li.stateMask = (UINT)-1; li.state = LVIS_FOCUSED | LVIS_SELECTED; li.iItem = defIndex; (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); @@ -273,6 +283,7 @@ RecycleBinDlg( UINT uResult; PROPSHEETPAGE * page; DWORD dwStyle; + ULARGE_INTEGER FreeBytesAvailable; switch(uMsg) { @@ -320,7 +331,13 @@ RecycleBinDlg( { uResult = GetDlgItemInt(hwndDlg, 14002, &bSuccess, FALSE); if (bSuccess) - pItem->dwMaxCapacity = uResult; + { + /* Check if the maximum capacity doesn't exceed the available disk space (in megabytes), and truncate it if needed */ + FreeBytesAvailable = pItem->FreeBytesAvailable; + FreeBytesAvailable.QuadPart = (FreeBytesAvailable.QuadPart / (1024 * 1024)); + pItem->dwMaxCapacity = min(uResult, FreeBytesAvailable.LowPart); + SetDlgItemInt(hwndDlg, 14002, pItem->dwMaxCapacity, FALSE); + } if (SendDlgItemMessageW(hwndDlg, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED) pItem->dwNukeOnDelete = TRUE; else @@ -356,7 +373,13 @@ RecycleBinDlg( /* kill focus */ uResult = GetDlgItemInt(hwndDlg, 14002, &bSuccess, FALSE); if (bSuccess) - pItem->dwMaxCapacity = uResult; + { + /* Check if the maximum capacity doesn't exceed the available disk space (in megabytes), and truncate it if needed */ + FreeBytesAvailable = pItem->FreeBytesAvailable; + FreeBytesAvailable.QuadPart = (FreeBytesAvailable.QuadPart / (1024 * 1024)); + pItem->dwMaxCapacity = min(uResult, FreeBytesAvailable.LowPart); + SetDlgItemInt(hwndDlg, 14002, pItem->dwMaxCapacity, FALSE); + } if (SendDlgItemMessageW(hwndDlg, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED) pItem->dwNukeOnDelete = TRUE; else diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc index ac39de99557..f0e31d51e3f 100644 --- a/dll/win32/shell32/lang/bg-BG.rc +++ b/dll/win32/shell32/lang/bg-BG.rc @@ -386,7 +386,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Свойства на кошчето" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Настройки за избраното място", -1, 10, 72, 220, 70 RADIOBUTTON "У&казан размер:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc index 0ced2ba62a3..2153e26e6a7 100644 --- a/dll/win32/shell32/lang/ca-ES.rc +++ b/dll/win32/shell32/lang/ca-ES.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Recycle Bin Properties" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc index 539b04993e6..545c5e972b7 100644 --- a/dll/win32/shell32/lang/cs-CZ.rc +++ b/dll/win32/shell32/lang/cs-CZ.rc @@ -391,7 +391,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Vlastnosti Koše" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Nastavení pro vybrané umístění", -1, 10, 72, 220, 70 RADIOBUTTON "&Zvolená velikost:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc index 28c706afbbe..a56235c52bf 100644 --- a/dll/win32/shell32/lang/da-DK.rc +++ b/dll/win32/shell32/lang/da-DK.rc @@ -391,7 +391,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Recycle Bin Properties" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc index 78801725b81..b7ce728a5d8 100644 --- a/dll/win32/shell32/lang/de-DE.rc +++ b/dll/win32/shell32/lang/de-DE.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Papierkorb-Einstellungen" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Einstellungen für gewählten Ort", -1, 10, 72, 220, 70 RADIOBUTTON "&Definierte Größe:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc index 317c13710c4..a876002dbb9 100644 --- a/dll/win32/shell32/lang/el-GR.rc +++ b/dll/win32/shell32/lang/el-GR.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Ιδιότητες κάδου ανακύκλωσης" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Ρυθμίσεις για τον επιλεγμένο προορισμό", -1, 10, 80, 220, 70 RADIOBUTTON "&Προσαρμοσμένο μέγεθος:", 14001, 20, 90, 90, 10, WS_TABSTOP EDITTEXT 14002, 110, 90, 50, 10, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc index 3b641dac928..f131e8b1bc9 100644 --- a/dll/win32/shell32/lang/en-GB.rc +++ b/dll/win32/shell32/lang/en-GB.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Recycle Bin Properties" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc index 65d3b8ed2a1..c6e44d96579 100644 --- a/dll/win32/shell32/lang/en-US.rc +++ b/dll/win32/shell32/lang/en-US.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Recycle Bin Properties" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc index a538c76eaca..7cf3a777112 100644 --- a/dll/win32/shell32/lang/es-ES.rc +++ b/dll/win32/shell32/lang/es-ES.rc @@ -393,7 +393,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Propiedades de la Papelera" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Configuración para la unidad seleccionada ", -1, 10, 72, 220, 70 RADIOBUTTON "Tamaño &personalizado:", 14001, 20, 90, 88, 10, WS_TABSTOP EDITTEXT 14002, 120, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/et-EE.rc b/dll/win32/shell32/lang/et-EE.rc index d883bb5c919..db90fb67e79 100644 --- a/dll/win32/shell32/lang/et-EE.rc +++ b/dll/win32/shell32/lang/et-EE.rc @@ -392,7 +392,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Prügikasti atribuudid" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Seaded valitud asukohale", -1, 10, 72, 220, 70 RADIOBUTTON "&Kohandatud maht:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc index 170aca7d539..aeff7c4c89b 100644 --- a/dll/win32/shell32/lang/fi-FI.rc +++ b/dll/win32/shell32/lang/fi-FI.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Recycle Bin Properties" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc index edbfb089e61..c735210e0e5 100644 --- a/dll/win32/shell32/lang/fr-FR.rc +++ b/dll/win32/shell32/lang/fr-FR.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Propriétés de la corbeille" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Paramètres pour la localisation sélectionnée", -1, 10, 72, 220, 70 RADIOBUTTON "Taille personnalisée :", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc index d2bb2866786..348c205824f 100644 --- a/dll/win32/shell32/lang/he-IL.rc +++ b/dll/win32/shell32/lang/he-IL.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "מאפייני סל המיחזור" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "הגדרות עבור המיקום הנבחר", -1, 10, 72, 220, 70 RADIOBUTTON "&גודל מותאם אישית:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/hi-IN.rc b/dll/win32/shell32/lang/hi-IN.rc index 97de5a4ccc4..41202f52043 100644 --- a/dll/win32/shell32/lang/hi-IN.rc +++ b/dll/win32/shell32/lang/hi-IN.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "रीसायकल बिन का गुण" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "चयनित स्थान के लिए सेटिंग्स", -1, 10, 72, 220, 70 RADIOBUTTON "&कस्टम साइज:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc index 6ce780f28c1..517757aa5e8 100644 --- a/dll/win32/shell32/lang/hu-HU.rc +++ b/dll/win32/shell32/lang/hu-HU.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Recycle Bin Properties" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc index 25fe7a7f3e8..9554b6e5160 100644 --- a/dll/win32/shell32/lang/it-IT.rc +++ b/dll/win32/shell32/lang/it-IT.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Proprietà del cestino" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Impostazioni per la posizione indicata", -1, 10, 72, 220, 70 RADIOBUTTON "&Dimensione personalizzata:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc index a83453cfff0..e2dc4a5b2f2 100644 --- a/dll/win32/shell32/lang/ja-JP.rc +++ b/dll/win32/shell32/lang/ja-JP.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "ごみ箱のプロパティ" FONT 9, "MS UI Gothic", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "選択された場所の設定", -1, 10, 72, 220, 70 RADIOBUTTON "カスタムサイズ(&C):", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc index b7e66006125..731b8530e74 100644 --- a/dll/win32/shell32/lang/ko-KR.rc +++ b/dll/win32/shell32/lang/ko-KR.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Recycle Bin Properties" FONT 9, "굴림", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc index 40ac2318e34..0adeadbeb4a 100644 --- a/dll/win32/shell32/lang/nl-NL.rc +++ b/dll/win32/shell32/lang/nl-NL.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Recycle Bin Properties" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc index d263a92d95e..405d41ca157 100644 --- a/dll/win32/shell32/lang/no-NO.rc +++ b/dll/win32/shell32/lang/no-NO.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Papirkurv egenskaper" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Innstilling for valgte sted", -1, 10, 72, 220, 70 RADIOBUTTON "&Tilpasse størrelse:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc index 3f133a17eeb..81471353f59 100644 --- a/dll/win32/shell32/lang/pl-PL.rc +++ b/dll/win32/shell32/lang/pl-PL.rc @@ -390,7 +390,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Właściwości Kosza" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Ustawienia dla wybranej lokalizacji", -1, 10, 72, 220, 70 RADIOBUTTON "&Rozmiar niestandardowy", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 116, 102, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc index e0801b1a121..2cf3ca3d91b 100644 --- a/dll/win32/shell32/lang/pt-BR.rc +++ b/dll/win32/shell32/lang/pt-BR.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Propriedades da Lixeira" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Configurações para local selecionado", -1, 10, 72, 220, 70 RADIOBUTTON "&Tamanho personalizado:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc index 03e53e2af66..75217661774 100644 --- a/dll/win32/shell32/lang/pt-PT.rc +++ b/dll/win32/shell32/lang/pt-PT.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "propriedades da Reciclagem" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "propriedades para as localizações seleccionadas", -1, 10, 72, 220, 70 RADIOBUTTON "&Tamanho personalizado:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc index 7be0d9c8474..c240a1ffc43 100644 --- a/dll/win32/shell32/lang/ro-RO.rc +++ b/dll/win32/shell32/lang/ro-RO.rc @@ -387,7 +387,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Generale" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Preferințe pentru locația aleasă", -1, 10, 72, 220, 70 RADIOBUTTON "&Dimensiune specificată:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 110, 90, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc index 4c8d1ac811d..bb4c4739f5c 100644 --- a/dll/win32/shell32/lang/ru-RU.rc +++ b/dll/win32/shell32/lang/ru-RU.rc @@ -392,7 +392,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Свойства: Корзина" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Установки для выбранного расположения", -1, 10, 72, 220, 70 RADIOBUTTON "&Другой размер:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc index ad004463be9..cbf72b27f09 100644 --- a/dll/win32/shell32/lang/sk-SK.rc +++ b/dll/win32/shell32/lang/sk-SK.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Kôš - vlastnosti" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Nastavenia pre zvolené umiestnenie", -1, 10, 72, 220, 70 RADIOBUTTON "&Vlastná veľkosť:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc index 6cfdab38b31..9ae2492e694 100644 --- a/dll/win32/shell32/lang/sl-SI.rc +++ b/dll/win32/shell32/lang/sl-SI.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Recycle Bin Properties" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Settings for selected location", -1, 10, 72, 220, 70 RADIOBUTTON "&Custom size:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/sq-AL.rc b/dll/win32/shell32/lang/sq-AL.rc index 5cfa53a5058..894df616f8e 100644 --- a/dll/win32/shell32/lang/sq-AL.rc +++ b/dll/win32/shell32/lang/sq-AL.rc @@ -389,7 +389,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Cilësimet Koshit" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Parametrat për vendndodhjen e përzgjedhur", -1, 10, 72, 220, 70 RADIOBUTTON "Masë me porosi:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc index 45ffc3fa973..5bd672219da 100644 --- a/dll/win32/shell32/lang/sv-SE.rc +++ b/dll/win32/shell32/lang/sv-SE.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Egenskaper för Papperskorgen" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Inställningar för vald plats", -1, 10, 72, 220, 70 RADIOBUTTON "&Användardefinierad storlek:", 14001, 20, 90, 100, 10, WS_TABSTOP EDITTEXT 14002, 132, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc index 12be0638683..707daa2bb5b 100644 --- a/dll/win32/shell32/lang/tr-TR.rc +++ b/dll/win32/shell32/lang/tr-TR.rc @@ -387,7 +387,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Geri Dönüşüm Kutusu Seçenekleri" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Seçili Konum İçin Ayarlar", -1, 10, 72, 220, 70 RADIOBUTTON "&Husûsî Boyut:", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc index 26a58f7bf70..44bf966633b 100644 --- a/dll/win32/shell32/lang/uk-UA.rc +++ b/dll/win32/shell32/lang/uk-UA.rc @@ -385,7 +385,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Властивості кошика" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "Налаштування для вибраного розташування", -1, 10, 72, 220, 70 RADIOBUTTON "&Особливий розмір:", 14001, 20, 90, 92, 10, WS_TABSTOP EDITTEXT 14002, 120, 100, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc index 5d42cc96891..8dc96b14aa9 100644 --- a/dll/win32/shell32/lang/zh-CN.rc +++ b/dll/win32/shell32/lang/zh-CN.rc @@ -395,7 +395,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "回收站属性" FONT 9, "宋体", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "选定位置的设置", -1, 10, 72, 220, 70 RADIOBUTTON "自定义大小(&C):", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc index 86e45333847..c0318181a0c 100644 --- a/dll/win32/shell32/lang/zh-TW.rc +++ b/dll/win32/shell32/lang/zh-TW.rc @@ -394,7 +394,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "資源回收筒內容" FONT 9, "新細明體", 0, 0, 0x0 BEGIN - CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 + CONTROL "", 14000, "SysListView32", LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP, 10, 10, 220, 50 GROUPBOX "所選位置的設定", -1, 10, 72, 220, 70 RADIOBUTTON "自訂大小(&C):", 14001, 20, 90, 80, 10, WS_TABSTOP EDITTEXT 14002, 106, 87, 50, 14, WS_TABSTOP | ES_NUMBER
5 years, 5 months
1
0
0
0
[reactos] 01/02: [SHELL32] Recycle-Bin: Minor code enhancements.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8a3080151668efc99be9e…
commit 8a3080151668efc99be9e7a2fb22a24392c85ea3 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Jul 7 15:57:01 2019 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Jul 7 17:56:51 2019 +0200 [SHELL32] Recycle-Bin: Minor code enhancements. - Use _countof() and ZeroMemory(). - Fix case of 'BitBucket' registry key (Windows-compatible). - Simplify code. - Minor code formatting. --- boot/bootdata/hivesft.inf | 4 +- dll/win32/shell32/dialogs/recycler_prop.cpp | 67 +++++++++++------------------ dll/win32/shell32/folders/CRecycleBin.cpp | 24 +++++------ 3 files changed, 40 insertions(+), 55 deletions(-) diff --git a/boot/bootdata/hivesft.inf b/boot/bootdata/hivesft.inf index 330101a29db..818d26745a4 100644 --- a/boot/bootdata/hivesft.inf +++ b/boot/bootdata/hivesft.inf @@ -456,8 +456,8 @@ HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","
InstallRoot.NET
",0x000 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu","{208D2C60-3AEA-1069-A2D7-08002B30309D}",0x00010001,0x00000000 -HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Bitbucket",,0x00000012 -HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Bitbucket\Volume",,0x00000012 +HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\BitBucket",,0x00000012 +HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume",,0x00000012 ; CMD Settings HKLM,"SOFTWARE\Microsoft\Command Processor","AutoRun",0x00020000,"" diff --git a/dll/win32/shell32/dialogs/recycler_prop.cpp b/dll/win32/shell32/dialogs/recycler_prop.cpp index 95840be7699..f6efad5e4ad 100644 --- a/dll/win32/shell32/dialogs/recycler_prop.cpp +++ b/dll/win32/shell32/dialogs/recycler_prop.cpp @@ -25,9 +25,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(CRecycleBin); typedef struct { - DWORD dwNukeOnDelete; DWORD dwSerial; DWORD dwMaxCapacity; + DWORD dwNukeOnDelete; } DRIVE_ITEM_CONTEXT, *PDRIVE_ITEM_CONTEXT; static void toggleNukeOnDeleteOption(HWND hwndDlg, BOOL bEnable) @@ -46,11 +46,9 @@ static void toggleNukeOnDeleteOption(HWND hwndDlg, BOOL bEnable) } } - static VOID InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive) { - WCHAR CurDrive = L'A'; WCHAR szDrive[] = L"A:\\"; DWORD dwDrives; WCHAR szName[100]; @@ -70,12 +68,12 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive) hDlgCtrl = GetDlgItem(hwndDlg, 14000); - if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_LOCATION, szVolume, sizeof(szVolume) / sizeof(WCHAR))) + if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_LOCATION, szVolume, _countof(szVolume))) szVolume[0] = 0; GetClientRect(hDlgCtrl, &rect); - memset(&lc, 0, sizeof(LV_COLUMN) ); + ZeroMemory(&lc, sizeof(lc)); lc.mask = LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM | LVCF_FMT; columnSize = 140; //FIXME @@ -86,7 +84,7 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive) lc.pszText = szVolume; (void)SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, 0, (LPARAM)&lc); - if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_DISKSPACE, szVolume, sizeof(szVolume) / sizeof(WCHAR))) + if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_DISKSPACE, szVolume, _countof(szVolume))) szVolume[0] = 0; lc.iSubItem = 1; @@ -99,33 +97,32 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive) itemCount = 0; do { - if ((dwDrives & 0x1)) + if (dwDrives & 0x1) { UINT Type = GetDriveTypeW(szDrive); if (Type == DRIVE_FIXED) //FIXME { - if (!GetVolumeInformationW(szDrive, szName, sizeof(szName) / sizeof(WCHAR), &dwSerial, &MaxComponent, &Flags, NULL, 0)) + if (!GetVolumeInformationW(szDrive, szName, _countof(szName), &dwSerial, &MaxComponent, &Flags, NULL, 0)) { szName[0] = 0; dwSerial = -1; } swprintf(szVolume, L"%s (%c:)", szName, szDrive[0]); - memset(&li, 0x0, sizeof(LVITEMW)); + ZeroMemory(&li, sizeof(li)); li.mask = LVIF_TEXT | LVIF_PARAM; li.iSubItem = 0; li.pszText = szVolume; li.iItem = itemCount; SendMessageW(hDlgCtrl, LVM_INSERTITEMW, 0, (LPARAM)&li); - if (GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable , &TotalNumberOfBytes, &TotalNumberOfFreeBytes)) + if (GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable, &TotalNumberOfBytes, &TotalNumberOfFreeBytes)) { - if (StrFormatByteSizeW(TotalNumberOfFreeBytes.QuadPart, szVolume, sizeof(szVolume) / sizeof(WCHAR))) + if (StrFormatByteSizeW(TotalNumberOfFreeBytes.QuadPart, szVolume, _countof(szVolume))) { - pItem = (DRIVE_ITEM_CONTEXT *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DRIVE_ITEM_CONTEXT)); if (pItem) { - swprintf(szName, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume\\%04X-%04X", LOWORD(dwSerial), HIWORD(dwSerial)); + swprintf(szName, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\BitBucket\\Volume\\%04X-%04X", LOWORD(dwSerial), HIWORD(dwSerial)); dwSize = sizeof(DWORD); RegGetValueW(HKEY_CURRENT_USER, szName, L"MaxCapacity", RRF_RT_DWORD, NULL, &pItem->dwMaxCapacity, &dwSize); dwSize = sizeof(DWORD); @@ -134,7 +131,7 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive) li.mask = LVIF_PARAM; li.lParam = (LPARAM)pItem; (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); - if (CurDrive == DefaultDrive) + if (szDrive[0] == DefaultDrive) { defIndex = itemCount; pDefault = pItem; @@ -153,10 +150,9 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive) itemCount++; } } - CurDrive++; - szDrive[0] = CurDrive; + szDrive[0]++; dwDrives = (dwDrives >> 1); - } while(dwDrives); + } while (dwDrives); if (!pDefault) pDefault = pFirst; @@ -171,7 +167,6 @@ InitializeRecycleBinDlg(HWND hwndDlg, WCHAR DefaultDrive) li.state = LVIS_FOCUSED | LVIS_SELECTED; li.iItem = defIndex; (void)SendMessageW(hDlgCtrl, LVM_SETITEMW, 0, (LPARAM)&li); - } static BOOL StoreDriveSettings(HWND hwndDlg) @@ -184,8 +179,7 @@ static BOOL StoreDriveSettings(HWND hwndDlg) WCHAR szSerial[20]; DWORD dwSize; - - if (RegCreateKeyExW(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume", 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) + if (RegCreateKeyExW(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\BitBucket\\Volume", 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) != ERROR_SUCCESS) return FALSE; iCount = ListView_GetItemCount(hDlgCtrl); @@ -193,7 +187,7 @@ static BOOL StoreDriveSettings(HWND hwndDlg) ZeroMemory(&li, sizeof(li)); li.mask = LVIF_PARAM; - for(iIndex = 0; iIndex < iCount; iIndex++) + for (iIndex = 0; iIndex < iCount; iIndex++) { li.iItem = iIndex; if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&li)) @@ -202,17 +196,16 @@ static BOOL StoreDriveSettings(HWND hwndDlg) swprintf(szSerial, L"%04X-%04X", LOWORD(pItem->dwSerial), HIWORD(pItem->dwSerial)); if (RegCreateKeyExW(hKey, szSerial, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) { - dwSize = sizeof(DWORD); - RegSetValueExW(hSubKey, L"NukeOnDelete", 0, REG_DWORD, (LPBYTE)&pItem->dwNukeOnDelete, dwSize); dwSize = sizeof(DWORD); RegSetValueExW(hSubKey, L"MaxCapacity", 0, REG_DWORD, (LPBYTE)&pItem->dwMaxCapacity, dwSize); + dwSize = sizeof(DWORD); + RegSetValueExW(hSubKey, L"NukeOnDelete", 0, REG_DWORD, (LPBYTE)&pItem->dwNukeOnDelete, dwSize); RegCloseKey(hSubKey); } } } RegCloseKey(hKey); return TRUE; - } static VOID FreeDriveItemContext(HWND hwndDlg) @@ -226,18 +219,18 @@ static VOID FreeDriveItemContext(HWND hwndDlg) ZeroMemory(&li, sizeof(li)); li.mask = LVIF_PARAM; - for(iIndex = 0; iIndex < iCount; iIndex++) + for (iIndex = 0; iIndex < iCount; iIndex++) { li.iItem = iIndex; if (SendMessageW(hDlgCtrl, LVM_GETITEMW, 0, (LPARAM)&li)) { - HeapFree(GetProcessHeap(), 0, (LPVOID)li.lParam); + HeapFree(GetProcessHeap(), 0, (PVOID)li.lParam); } } } static INT -GetDefaultItem(HWND hwndDlg, LVITEMW * li) +GetDefaultItem(HWND hwndDlg, LVITEMW* li) { HWND hDlgCtrl; UINT iItemCount, iIndex; @@ -252,7 +245,7 @@ GetDefaultItem(HWND hwndDlg, LVITEMW * li) ZeroMemory(li, sizeof(LVITEMW)); li->mask = LVIF_PARAM | LVIF_STATE; - li->stateMask = (UINT) - 1; + li->stateMask = (UINT)-1; for (iIndex = 0; iIndex < iItemCount; iIndex++) { li->iItem = iIndex; @@ -263,7 +256,6 @@ GetDefaultItem(HWND hwndDlg, LVITEMW * li) } } return -1; - } static INT_PTR CALLBACK @@ -271,8 +263,7 @@ RecycleBinDlg( HWND hwndDlg, UINT uMsg, WPARAM wParam, - LPARAM lParam -) + LPARAM lParam) { LPPSHNOTIFY lppsn; LPNMLISTVIEW lppl; @@ -387,12 +378,10 @@ BOOL SH_ShowRecycleBinProperties(WCHAR sDrive) HPROPSHEETPAGE hpsp[1]; PROPSHEETHEADERW psh; HPROPSHEETPAGE hprop; + INT_PTR ret; - BOOL ret; - - - ZeroMemory(&psh, sizeof(PROPSHEETHEADERW)); - psh.dwSize = sizeof(PROPSHEETHEADERW); + ZeroMemory(&psh, sizeof(psh)); + psh.dwSize = sizeof(psh); psh.dwFlags = PSP_DEFAULT | PSH_PROPTITLE; psh.pszCaption = MAKEINTRESOURCEW(IDS_RECYCLEBIN_FOLDER_NAME); psh.hwndParent = NULL; @@ -408,10 +397,6 @@ BOOL SH_ShowRecycleBinProperties(WCHAR sDrive) hpsp[psh.nPages] = hprop; psh.nPages++; - ret = PropertySheetW(&psh); - if (ret < 0) - return FALSE; - else - return TRUE; + return (ret >= 0); } diff --git a/dll/win32/shell32/folders/CRecycleBin.cpp b/dll/win32/shell32/folders/CRecycleBin.cpp index ad80c9dbc73..e2198897fdc 100644 --- a/dll/win32/shell32/folders/CRecycleBin.cpp +++ b/dll/win32/shell32/folders/CRecycleBin.cpp @@ -320,30 +320,30 @@ HRESULT WINAPI CRecycleBinItemContextMenu::QueryContextMenu(HMENU hMenu, UINT in TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", this, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - if (LoadStringW(shell32_hInstance, IDS_RESTORE, szBuffer, sizeof(szBuffer) / sizeof(WCHAR))) + if (LoadStringW(shell32_hInstance, IDS_RESTORE, szBuffer, _countof(szBuffer))) { - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + szBuffer[_countof(szBuffer)-1] = L'\0'; _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); Count++; } - if (LoadStringW(shell32_hInstance, IDS_CUT, szBuffer, sizeof(szBuffer) / sizeof(WCHAR))) + if (LoadStringW(shell32_hInstance, IDS_CUT, szBuffer, _countof(szBuffer))) { _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + szBuffer[_countof(szBuffer)-1] = L'\0'; _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); } - if (LoadStringW(shell32_hInstance, IDS_DELETE, szBuffer, sizeof(szBuffer) / sizeof(WCHAR))) + if (LoadStringW(shell32_hInstance, IDS_DELETE, szBuffer, _countof(szBuffer))) { - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + szBuffer[_countof(szBuffer)-1] = L'\0'; _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); } - if (LoadStringW(shell32_hInstance, IDS_PROPERTIES, szBuffer, sizeof(szBuffer) / sizeof(WCHAR))) + if (LoadStringW(shell32_hInstance, IDS_PROPERTIES, szBuffer, _countof(szBuffer))) { - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; + szBuffer[_countof(szBuffer)-1] = L'\0'; _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); } @@ -791,12 +791,12 @@ HRESULT WINAPI CRecycleBin::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT i if (!hMenu) return E_INVALIDARG; - memset(&mii, 0, sizeof(mii)); + ZeroMemory(&mii, sizeof(mii)); mii.cbSize = sizeof(mii); mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; mii.fState = RecycleBinIsEmpty() ? MFS_DISABLED : MFS_ENABLED; szBuffer[0] = L'\0'; - LoadStringW(shell32_hInstance, IDS_EMPTY_BITBUCKET, szBuffer, sizeof(szBuffer) / sizeof(WCHAR)); + LoadStringW(shell32_hInstance, IDS_EMPTY_BITBUCKET, szBuffer, _countof(szBuffer)); mii.dwTypeData = szBuffer; mii.cch = wcslen(mii.dwTypeData); mii.wID = idCmdFirst + id++; @@ -881,7 +881,7 @@ TRASH_CanTrashFile(LPCWSTR wszPath) DWORD FileSystemFlags, dwSize, dwDisposition; HKEY hKey; WCHAR szBuffer[10]; - WCHAR szKey[150] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume\\"; + WCHAR szKey[150] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\BitBucket\\Volume\\"; if (wszPath[1] != L':') { @@ -1116,7 +1116,7 @@ HRESULT WINAPI SHEmptyRecycleBinW(HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags) if (dwType != REG_EXPAND_SZ) /* type dismatch */ return S_OK; - szPath[(sizeof(szPath)/sizeof(WCHAR))-1] = L'\0'; + szPath[_countof(szPath)-1] = L'\0'; PlaySoundW(szPath, NULL, SND_FILENAME); } return S_OK;
5 years, 5 months
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Results per page:
10
25
50
100
200