From 3040be2500cf2357b6d06a8212bf306083cf866f Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 22 Oct 2023 21:42:11 +0300 Subject: [PATCH 01/39] [ADVAPI32] Improve handling of unaligned key name in RegOpenKeyExW Check for unaligned buffer before calling NtOpenKey instead of checking the result for STATUS_DATATYPE_MISALIGNMENT. --- dll/win32/advapi32/reg/reg.c | 57 ++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/dll/win32/advapi32/reg/reg.c b/dll/win32/advapi32/reg/reg.c index 58515793c4e..b2c19533e24 100644 --- a/dll/win32/advapi32/reg/reg.c +++ b/dll/win32/advapi32/reg/reg.c @@ -3362,6 +3362,7 @@ RegOpenKeyExW(HKEY hKey, NTSTATUS Status; ULONG Attributes = OBJ_CASE_INSENSITIVE; LONG ErrorCode = ERROR_SUCCESS; + BOOLEAN SubKeyStringAllocated = FALSE; TRACE("RegOpenKeyExW hKey 0x%x lpSubKey %S ulOptions 0x%x samDesired 0x%x phkResult %p\n", hKey, lpSubKey, ulOptions, samDesired, phkResult); @@ -3398,10 +3399,31 @@ RegOpenKeyExW(HKEY hKey, Attributes |= OBJ_OPENLINK; if (lpSubKey == NULL || wcscmp(lpSubKey, L"\\") == 0) + { RtlInitUnicodeString(&SubKeyString, L""); + } else + { RtlInitUnicodeString(&SubKeyString, lpSubKey); + /* Handle unaligned lpSubKey */ + if ((ULONG_PTR)lpSubKey & 1) + { + UNICODE_STRING AlignedString; + + Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, + &SubKeyString, + &AlignedString); + if (!NT_SUCCESS(Status)) + { + goto Exit; + } + + SubKeyString = AlignedString; + SubKeyStringAllocated = TRUE; + } + } + InitializeObjectAttributes(&ObjectAttributes, &SubKeyString, Attributes, @@ -3412,37 +3434,11 @@ RegOpenKeyExW(HKEY hKey, samDesired, &ObjectAttributes); - if (Status == STATUS_DATATYPE_MISALIGNMENT) - { - HANDLE hAligned; - UNICODE_STRING AlignedString; - - Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, - &SubKeyString, - &AlignedString); - if (NT_SUCCESS(Status)) - { - /* Try again with aligned parameters */ - InitializeObjectAttributes(&ObjectAttributes, - &AlignedString, - Attributes, - KeyHandle, - NULL); - - Status = NtOpenKey(&hAligned, - samDesired, - &ObjectAttributes); - - RtlFreeUnicodeString(&AlignedString); +Exit: - if (NT_SUCCESS(Status)) - *phkResult = hAligned; - } - else - { - /* Restore the original error */ - Status = STATUS_DATATYPE_MISALIGNMENT; - } + if (SubKeyStringAllocated) + { + RtlFreeUnicodeString(&SubKeyString); } if (!NT_SUCCESS(Status)) @@ -3450,7 +3446,6 @@ RegOpenKeyExW(HKEY hKey, ErrorCode = RtlNtStatusToDosError(Status); } - ClosePredefKey(KeyHandle); return ErrorCode; From f9bd4de0b4070f62bfae7aa39a4c619302930973 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 07:33:58 +0900 Subject: [PATCH 02/39] [SHELL32][SDK] Implement ShortSizeFormatW --- dll/win32/shell32/shell32.spec | 2 +- dll/win32/shell32/stubs.cpp | 11 ----------- dll/win32/shell32/utils.cpp | 13 +++++++++++++ sdk/include/reactos/undocshell.h | 2 ++ 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/dll/win32/shell32/shell32.spec b/dll/win32/shell32/shell32.spec index 9cc8bfd8cdc..2aabb8efb2a 100644 --- a/dll/win32/shell32/shell32.spec +++ b/dll/win32/shell32/shell32.spec @@ -200,7 +200,7 @@ 201 stdcall -noname SHDesktopMessageLoop(ptr) 202 stub -noname DDEHandleViewFolderNotify 203 stdcall -noname AddCommasW(long wstr) -204 stdcall -noname ShortSizeFormatW(double) +204 stdcall -noname ShortSizeFormatW(long ptr) 205 stdcall -noname Printer_LoadIconsW(wstr ptr ptr) 206 stdcall ExtractAssociatedIconA(long str ptr) 207 stdcall ExtractAssociatedIconExA(long str long long) diff --git a/dll/win32/shell32/stubs.cpp b/dll/win32/shell32/stubs.cpp index f8518336906..7849de88700 100644 --- a/dll/win32/shell32/stubs.cpp +++ b/dll/win32/shell32/stubs.cpp @@ -14,17 +14,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); -/* - * Unimplemented - */ -EXTERN_C LPWSTR -WINAPI -ShortSizeFormatW(LONGLONG llNumber) -{ - FIXME("ShortSizeFormatW() stub\n"); - return NULL; -} - /* * Unimplemented */ diff --git a/dll/win32/shell32/utils.cpp b/dll/win32/shell32/utils.cpp index 57ade40713e..8dd12b53bb5 100644 --- a/dll/win32/shell32/utils.cpp +++ b/dll/win32/shell32/utils.cpp @@ -28,6 +28,19 @@ static BOOL OpenEffectiveToken(DWORD DesiredAccess, HANDLE *phToken) return ret; } +/************************************************************************* + * ShortSizeFormatW (SHELL32.204) + */ +EXTERN_C +LPWSTR WINAPI +ShortSizeFormatW( + _In_ DWORD dwNumber, + _Out_writes_z_(0x8FFF) LPWSTR pszBuffer) +{ + TRACE("(%lu, %p)\n", dwNumber, pszBuffer); + return StrFormatByteSizeW(dwNumber, pszBuffer, 0x8FFF); +} + /************************************************************************* * SHOpenEffectiveToken (SHELL32.235) */ diff --git a/sdk/include/reactos/undocshell.h b/sdk/include/reactos/undocshell.h index 1577466ab9f..ea2a7e02e17 100644 --- a/sdk/include/reactos/undocshell.h +++ b/sdk/include/reactos/undocshell.h @@ -684,6 +684,8 @@ LargeIntegerToString( _In_opt_ const NUMBERFMTW *pNumberFormat, _In_ DWORD dwNumberFlags); +LPWSTR WINAPI ShortSizeFormatW(_In_ DWORD dwNumber, _Out_writes_z_(0x8FFF) LPWSTR pszBuffer); + BOOL WINAPI SHOpenEffectiveToken(_Out_ LPHANDLE phToken); DWORD WINAPI SHGetUserSessionId(_In_opt_ HANDLE hToken); From d6a5b52f854db82974781b8d56f54b88f1f867cf Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 08:00:03 +0900 Subject: [PATCH 03/39] [SHELL32][SDK] Implement SHOpenPropSheetA --- dll/win32/shell32/stubs.cpp | 17 ----------------- dll/win32/shell32/utils.cpp | 32 ++++++++++++++++++++++++++++++++ sdk/include/reactos/undocshell.h | 10 ++++++++++ 3 files changed, 42 insertions(+), 17 deletions(-) diff --git a/dll/win32/shell32/stubs.cpp b/dll/win32/shell32/stubs.cpp index f8518336906..3870e808e3b 100644 --- a/dll/win32/shell32/stubs.cpp +++ b/dll/win32/shell32/stubs.cpp @@ -218,23 +218,6 @@ SHGetSetFolderCustomSettingsA(LPSHFOLDERCUSTOMSETTINGSA pfcs, return E_FAIL; } -/* - * Unimplemented - */ -EXTERN_C BOOL -WINAPI -SHOpenPropSheetA(LPCSTR lpCaption, - HKEY hKeys[], - UINT uCount, - const CLSID *pClsID, - IDataObject *pDataObject, - IShellBrowser *pShellBrowser, - LPCSTR lpStartPage) -{ - FIXME("SHOpenPropSheetA() stub\n"); - return FALSE; -} - /* * Unimplemented */ diff --git a/dll/win32/shell32/utils.cpp b/dll/win32/shell32/utils.cpp index 57ade40713e..64ba0694095 100644 --- a/dll/win32/shell32/utils.cpp +++ b/dll/win32/shell32/utils.cpp @@ -452,3 +452,35 @@ LargeIntegerToString( return Int64ToString(pLargeInt->QuadPart, pszOut, cchOut, bUseFormat, pNumberFormat, dwNumberFlags); } + +/************************************************************************* + * SHOpenPropSheetA [SHELL32.707] + */ +EXTERN_C +BOOL WINAPI +SHOpenPropSheetA( + _In_opt_z_ LPCSTR pszCaption, + _In_opt_ HKEY *ahKeys, + _In_ UINT cKeys, + _In_ const CLSID *pclsidDefault, + _In_ IDataObject *pDataObject, + _In_opt_ IShellBrowser *pShellBrowser, + _In_opt_z_ LPCSTR pszStartPage) +{ + LPCWSTR pszStartPageW = NULL; + WCHAR szStartPageW[MAX_PATH], szCaptionW[MAX_PATH]; + + TRACE("(%s, %p, %u, %p, %p, %p, %s)", pszCaption, ahKeys, cKeys, pclsidDefault, pDataObject, + pShellBrowser, pszStartPage); + + SHAnsiToUnicode(pszCaption, szCaptionW, _countof(szCaptionW)); + + if (pszStartPage) + { + SHAnsiToUnicode(pszStartPage, szStartPageW, _countof(szStartPageW)); + pszStartPageW = szStartPageW; + } + + return SHOpenPropSheetW(szCaptionW, ahKeys, cKeys, pclsidDefault, + pDataObject, pShellBrowser, pszStartPageW); +} diff --git a/sdk/include/reactos/undocshell.h b/sdk/include/reactos/undocshell.h index 1577466ab9f..7c06ed421d7 100644 --- a/sdk/include/reactos/undocshell.h +++ b/sdk/include/reactos/undocshell.h @@ -698,6 +698,16 @@ SHInvokePrivilegedFunctionW( BOOL WINAPI SHTestTokenPrivilegeW(_In_opt_ HANDLE hToken, _In_z_ LPCWSTR lpName); +BOOL WINAPI +SHOpenPropSheetA( + _In_opt_z_ LPCSTR pszCaption, + _In_opt_ HKEY *ahKeys, + _In_ UINT cKeys, + _In_ const CLSID *pclsidDefault, + _In_ IDataObject *pDataObject, + _In_opt_ IShellBrowser *pShellBrowser, + _In_opt_z_ LPCSTR pszStartPage); + /***************************************************************************** * Shell32 resources */ From cec0dfe9df6c6c0841824ef35ba3c25f93f1bb2e Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 08:04:29 +0900 Subject: [PATCH 04/39] improve --- dll/win32/shell32/utils.cpp | 2 ++ sdk/include/psdk/shlobj.h | 10 ++++++++++ sdk/include/reactos/undocshell.h | 10 ---------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/dll/win32/shell32/utils.cpp b/dll/win32/shell32/utils.cpp index 64ba0694095..bec4bd04f4c 100644 --- a/dll/win32/shell32/utils.cpp +++ b/dll/win32/shell32/utils.cpp @@ -455,6 +455,8 @@ LargeIntegerToString( /************************************************************************* * SHOpenPropSheetA [SHELL32.707] + * + * @see https://learn.microsoft.com/en-us/windows/win32/api/shlobj/nf-shlobj-shopenpropsheeta */ EXTERN_C BOOL WINAPI diff --git a/sdk/include/psdk/shlobj.h b/sdk/include/psdk/shlobj.h index 601fd58f30c..8facacf43a2 100644 --- a/sdk/include/psdk/shlobj.h +++ b/sdk/include/psdk/shlobj.h @@ -340,6 +340,16 @@ int WINAPI PathCleanupSpec(_In_opt_ LPCWSTR, _Inout_ LPWSTR); HINSTANCE WINAPI SHGetShellStyleHInstance(VOID); #endif +BOOL WINAPI +SHOpenPropSheetA( + _In_opt_z_ LPCSTR pszCaption, + _In_opt_ HKEY *ahKeys, + _In_ UINT cKeys, + _In_ const CLSID *pclsidDefault, + _In_ IDataObject *pDataObject, + _In_opt_ IShellBrowser *pShellBrowser, + _In_opt_z_ LPCSTR pszStartPage); + /***************************************************************************** * IContextMenu interface */ diff --git a/sdk/include/reactos/undocshell.h b/sdk/include/reactos/undocshell.h index 7c06ed421d7..1577466ab9f 100644 --- a/sdk/include/reactos/undocshell.h +++ b/sdk/include/reactos/undocshell.h @@ -698,16 +698,6 @@ SHInvokePrivilegedFunctionW( BOOL WINAPI SHTestTokenPrivilegeW(_In_opt_ HANDLE hToken, _In_z_ LPCWSTR lpName); -BOOL WINAPI -SHOpenPropSheetA( - _In_opt_z_ LPCSTR pszCaption, - _In_opt_ HKEY *ahKeys, - _In_ UINT cKeys, - _In_ const CLSID *pclsidDefault, - _In_ IDataObject *pDataObject, - _In_opt_ IShellBrowser *pShellBrowser, - _In_opt_z_ LPCSTR pszStartPage); - /***************************************************************************** * Shell32 resources */ From e66df6bc351dc28270a35b0855082efe7ab59381 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 08:08:58 +0900 Subject: [PATCH 05/39] improve 2 --- dll/win32/shell32/utils.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dll/win32/shell32/utils.cpp b/dll/win32/shell32/utils.cpp index bec4bd04f4c..29af3ef18ef 100644 --- a/dll/win32/shell32/utils.cpp +++ b/dll/win32/shell32/utils.cpp @@ -469,20 +469,26 @@ SHOpenPropSheetA( _In_opt_ IShellBrowser *pShellBrowser, _In_opt_z_ LPCSTR pszStartPage) { - LPCWSTR pszStartPageW = NULL; + LPCWSTR pszCaptionW, pszStartPageW; WCHAR szStartPageW[MAX_PATH], szCaptionW[MAX_PATH]; TRACE("(%s, %p, %u, %p, %p, %p, %s)", pszCaption, ahKeys, cKeys, pclsidDefault, pDataObject, pShellBrowser, pszStartPage); - SHAnsiToUnicode(pszCaption, szCaptionW, _countof(szCaptionW)); + pszCaptionW = NULL; + if (pszCaption) + { + SHAnsiToUnicode(pszCaption, szCaptionW, _countof(szCaptionW)); + pszCaptionW = szCaptionW; + } + pszStartPageW = NULL; if (pszStartPage) { SHAnsiToUnicode(pszStartPage, szStartPageW, _countof(szStartPageW)); pszStartPageW = szStartPageW; } - return SHOpenPropSheetW(szCaptionW, ahKeys, cKeys, pclsidDefault, + return SHOpenPropSheetW(pszCaptionW, ahKeys, cKeys, pclsidDefault, pDataObject, pShellBrowser, pszStartPageW); } From c235cabc5c6e845989d16470568ce6cd4e5f4fad Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 08:09:56 +0900 Subject: [PATCH 06/39] improve 3 --- dll/win32/shell32/utils.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dll/win32/shell32/utils.cpp b/dll/win32/shell32/utils.cpp index 29af3ef18ef..ca71640e5f4 100644 --- a/dll/win32/shell32/utils.cpp +++ b/dll/win32/shell32/utils.cpp @@ -469,20 +469,18 @@ SHOpenPropSheetA( _In_opt_ IShellBrowser *pShellBrowser, _In_opt_z_ LPCSTR pszStartPage) { - LPCWSTR pszCaptionW, pszStartPageW; WCHAR szStartPageW[MAX_PATH], szCaptionW[MAX_PATH]; + LPCWSTR pszCaptionW = NULL, pszStartPageW = NULL; TRACE("(%s, %p, %u, %p, %p, %p, %s)", pszCaption, ahKeys, cKeys, pclsidDefault, pDataObject, pShellBrowser, pszStartPage); - pszCaptionW = NULL; if (pszCaption) { SHAnsiToUnicode(pszCaption, szCaptionW, _countof(szCaptionW)); pszCaptionW = szCaptionW; } - pszStartPageW = NULL; if (pszStartPage) { SHAnsiToUnicode(pszStartPage, szStartPageW, _countof(szStartPageW)); From 8cef980ab96b7027120f759ccd467bbaa278302b Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 10:09:31 +0900 Subject: [PATCH 07/39] [REGEDIT] Use functions strictly (#5825) Use safer functions for buffer manipulation to avoid buffer overflow/overrun. CORE-18876 --- base/applications/regedit/childwnd.c | 9 +++++---- base/applications/regedit/edit.c | 26 ++++++++++++++------------ base/applications/regedit/find.c | 21 ++++++++++----------- base/applications/regedit/framewnd.c | 8 +++++--- base/applications/regedit/security.c | 3 +-- base/applications/regedit/txtproc.c | 5 +++-- 6 files changed, 38 insertions(+), 34 deletions(-) diff --git a/base/applications/regedit/childwnd.c b/base/applications/regedit/childwnd.c index 67a88bc90a5..d77ed1899b3 100644 --- a/base/applications/regedit/childwnd.c +++ b/base/applications/regedit/childwnd.c @@ -177,7 +177,7 @@ static void SuggestKeys(HKEY hRootKey, LPCWSTR pszKeyPath, LPWSTR pszSuggestions RegCloseKey(hOtherKey); bFound = TRUE; - wcscpy(szLastFound, szBuffer); + StringCbCopyW(szLastFound, sizeof(szLastFound), szBuffer); pszKeyPath = szLastFound; } } @@ -258,10 +258,11 @@ UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath, BOOL bSelectNone) if (fullPath) { /* set (correct) the address bar text */ - if (keyPath[0] != L'\0') - swprintf(fullPath, L"%s%s%s", rootName, keyPath[0]==L'\\'?L"":L"\\", keyPath); + if (keyPath[0] != UNICODE_NULL) + StringCbPrintfW(fullPath, cbFullPath, L"%s%s%s", rootName, + ((keyPath[0] == L'\\') ? L"" : L"\\"), keyPath); else - fullPath = wcscpy(fullPath, rootName); + StringCbCopyW(fullPath, cbFullPath, rootName); SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)fullPath); SendMessageW(g_pChildWnd->hAddressBarWnd, WM_SETTEXT, 0, (LPARAM)fullPath); diff --git a/base/applications/regedit/edit.c b/base/applications/regedit/edit.c index d84361c7a0a..8805ccb35e7 100644 --- a/base/applications/regedit/edit.c +++ b/base/applications/regedit/edit.c @@ -50,10 +50,10 @@ void error(HWND hwnd, INT resId, ...) hInstance = GetModuleHandle(0); if (!LoadStringW(hInstance, IDS_ERROR, title, ARRAY_SIZE(title))) - wcscpy(title, L"Error"); + StringCbCopyW(title, sizeof(title), L"Error"); if (!LoadStringW(hInstance, resId, errfmt, ARRAY_SIZE(errfmt))) - wcscpy(errfmt, L"Unknown error string!"); + StringCbCopyW(errfmt, sizeof(errfmt), L"Unknown error string!"); va_start(ap, resId); _vsnwprintf(errstr, ARRAY_SIZE(errstr), errfmt, ap); @@ -66,7 +66,7 @@ static void error_code_messagebox(HWND hwnd, DWORD error_code) { WCHAR title[256]; if (!LoadStringW(hInst, IDS_ERROR, title, ARRAY_SIZE(title))) - wcscpy(title, L"Error"); + StringCbCopyW(title, sizeof(title), L"Error"); ErrorMessageBox(hwnd, title, error_code); } @@ -81,13 +81,13 @@ void warning(HWND hwnd, INT resId, ...) hInstance = GetModuleHandle(0); if (!LoadStringW(hInstance, IDS_WARNING, title, ARRAY_SIZE(title))) - wcscpy(title, L"Warning"); + StringCbCopyW(title, sizeof(title), L"Warning"); if (!LoadStringW(hInstance, resId, errfmt, ARRAY_SIZE(errfmt))) - wcscpy(errfmt, L"Unknown error string!"); + StringCbCopyW(errfmt, sizeof(errfmt), L"Unknown error string!"); va_start(ap, resId); - _vsnwprintf(errstr, ARRAY_SIZE(errstr), errfmt, ap); + StringCbVPrintfW(errstr, sizeof(errstr), errfmt, ap); va_end(ap); MessageBoxW(hwnd, errstr, title, MB_OK | MB_ICONSTOP); @@ -304,7 +304,7 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP SetDlgItemTextW(hwndDlg, IDC_VALUE_NAME, buffer); } CheckRadioButton (hwndDlg, IDC_FORMAT_HEX, IDC_FORMAT_DEC, IDC_FORMAT_HEX); - swprintf(ValueString, L"%lx", dwordValueData); + StringCbPrintfW(ValueString, sizeof(ValueString), L"%lx", dwordValueData); SetDlgItemTextW(hwndDlg, IDC_VALUE_DATA, ValueString); SendMessage(GetDlgItem(hwndDlg, IDC_VALUE_DATA), EM_SETSEL, 0, -1); SetFocus(GetDlgItem(hwndDlg, IDC_VALUE_DATA)); @@ -327,7 +327,7 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP } } } - swprintf(ValueString, L"%lx", Value); + StringCbPrintfW(ValueString, sizeof(ValueString), L"%lx", Value); SetDlgItemTextW(hwndDlg, IDC_VALUE_DATA, ValueString); return TRUE; } @@ -347,7 +347,7 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP } } } - swprintf(ValueString, L"%lu", Value); + StringCbPrintfW(ValueString, sizeof(ValueString), L"%lu", Value); SetDlgItemTextW(hwndDlg, IDC_VALUE_DATA, ValueString); return TRUE; } @@ -1491,6 +1491,7 @@ LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName) LPCWSTR s; LPWSTR lpNewSubKey = NULL; LONG Ret = 0; + SIZE_T cbNewSubKey; if (!lpSubKey) return Ret; @@ -1499,11 +1500,12 @@ LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName) if (s) { s++; - lpNewSubKey = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, (s - lpSubKey + wcslen(lpNewName) + 1) * sizeof(WCHAR)); + cbNewSubKey = (s - lpSubKey + wcslen(lpNewName) + 1) * sizeof(WCHAR); + lpNewSubKey = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, cbNewSubKey); if (lpNewSubKey != NULL) { - memcpy(lpNewSubKey, lpSubKey, (s - lpSubKey) * sizeof(WCHAR)); - wcscpy(lpNewSubKey + (s - lpSubKey), lpNewName); + StringCbCopyNW(lpNewSubKey, cbNewSubKey, lpSubKey, (s - lpSubKey) * sizeof(WCHAR)); + StringCbCatW(lpNewSubKey, cbNewSubKey, lpNewName); lpNewName = lpNewSubKey; } else diff --git a/base/applications/regedit/find.c b/base/applications/regedit/find.c index 444f4a25952..9405271a916 100644 --- a/base/applications/regedit/find.c +++ b/base/applications/regedit/find.c @@ -144,7 +144,7 @@ BOOL RegFindRecurse( if(wcslen(pszSubKey) >= _countof(szSubKey)) return FALSE; - wcscpy(szSubKey, pszSubKey); + StringCbCopyW(szSubKey, sizeof(szSubKey), pszSubKey); hSubKey = NULL; lResult = RegOpenKeyExW(hKey, szSubKey, 0, KEY_ALL_ACCESS, &hSubKey); @@ -304,14 +304,14 @@ BOOL RegFindRecurse( ppszFoundValueName)) { LPWSTR psz = *ppszFoundSubKey; - *ppszFoundSubKey = malloc( - (wcslen(szSubKey) + wcslen(psz) + 2) * sizeof(WCHAR)); + SIZE_T cbFoundSubKey = (wcslen(szSubKey) + wcslen(psz) + 2) * sizeof(WCHAR); + *ppszFoundSubKey = malloc(cbFoundSubKey); if (*ppszFoundSubKey == NULL) goto err; if (szSubKey[0]) { - wcscpy(*ppszFoundSubKey, szSubKey); - wcscat(*ppszFoundSubKey, s_backslash); + StringCbCopyW(*ppszFoundSubKey, cbFoundSubKey, szSubKey); + StringCbCatW(*ppszFoundSubKey, cbFoundSubKey, s_backslash); } else **ppszFoundSubKey = 0; @@ -368,7 +368,7 @@ BOOL RegFindWalk( ppszFoundValueName)) return TRUE; - wcscpy(szSubKey, pszSubKey); + StringCbCopyW(szSubKey, sizeof(szSubKey), pszSubKey); while(szSubKey[0] != 0) { if (DoEvents()) @@ -460,15 +460,14 @@ BOOL RegFindWalk( ppszFoundSubKey, ppszFoundValueName)) { LPWSTR psz = *ppszFoundSubKey; - *ppszFoundSubKey = malloc( - (wcslen(szSubKey) + wcslen(psz) + 2) * - sizeof(WCHAR)); + SIZE_T cbFoundSubKey = (wcslen(szSubKey) + wcslen(psz) + 2) * sizeof(WCHAR); + *ppszFoundSubKey = malloc(cbFoundSubKey); if (*ppszFoundSubKey == NULL) goto err; if (szSubKey[0]) { - wcscpy(*ppszFoundSubKey, szSubKey); - wcscat(*ppszFoundSubKey, s_backslash); + StringCbCopyW(*ppszFoundSubKey, cbFoundSubKey, szSubKey); + StringCbCatW(*ppszFoundSubKey, cbFoundSubKey, s_backslash); } else **ppszFoundSubKey = 0; diff --git a/base/applications/regedit/framewnd.c b/base/applications/regedit/framewnd.c index 6b5b1c28cfb..6f382a072cd 100644 --- a/base/applications/regedit/framewnd.c +++ b/base/applications/regedit/framewnd.c @@ -138,7 +138,7 @@ static void OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu) { WCHAR str[100]; - wcscpy(str, L""); + str[0] = UNICODE_NULL; if (nFlags & MF_POPUP) { if (hSysMenu != GetMenu(hWnd)) @@ -814,6 +814,7 @@ BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName) WCHAR szBuffer[512]; HGLOBAL hGlobal; LPWSTR s; + SIZE_T cbGlobal; if (!OpenClipboard(hWnd)) goto done; @@ -825,12 +826,13 @@ BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName) if (!GetKeyName(szBuffer, ARRAY_SIZE(szBuffer), hRootKey, keyName)) goto done; - hGlobal = GlobalAlloc(GMEM_MOVEABLE, (wcslen(szBuffer) + 1) * sizeof(WCHAR)); + cbGlobal = (wcslen(szBuffer) + 1) * sizeof(WCHAR); + hGlobal = GlobalAlloc(GMEM_MOVEABLE, cbGlobal); if (!hGlobal) goto done; s = GlobalLock(hGlobal); - wcscpy(s, szBuffer); + StringCbCopyW(s, cbGlobal, szBuffer); GlobalUnlock(hGlobal); SetClipboardData(CF_UNICODETEXT, hGlobal); diff --git a/base/applications/regedit/security.c b/base/applications/regedit/security.c index 71251583e9c..0ea90092d91 100644 --- a/base/applications/regedit/security.c +++ b/base/applications/regedit/security.c @@ -782,8 +782,7 @@ CRegKeySecurity_fnConstructor(LPWSTR lpRegKey, obj->ObjectInfo = *ObjectInfo; obj->Btn = Btn; obj->hRootKey = hRootKey; - wcscpy(obj->szRegKey, - lpRegKey); + StringCbCopyW(obj->szRegKey, sizeof(obj->szRegKey), lpRegKey); } else SetLastError(ERROR_NOT_ENOUGH_MEMORY); diff --git a/base/applications/regedit/txtproc.c b/base/applications/regedit/txtproc.c index f5e3ea041c2..092930e6f7a 100644 --- a/base/applications/regedit/txtproc.c +++ b/base/applications/regedit/txtproc.c @@ -194,8 +194,9 @@ static WCHAR * txt_build_subkey_path(LPCWSTR path, DWORD path_len, LPCWSTR subkey_name, DWORD subkey_len) { WCHAR *subkey_path; - subkey_path = malloc((path_len + subkey_len + 2) * sizeof(WCHAR)); - swprintf(subkey_path, L"%s\\%s", path, subkey_name); + SIZE_T cb_subkey_path = (path_len + subkey_len + 2) * sizeof(WCHAR); + subkey_path = malloc(cb_subkey_path); + StringCbPrintfW(subkey_path, cb_subkey_path, L"%s\\%s", path, subkey_name); return subkey_path; } From 01768c212ad53c444aba7a3b2e1a775f2c681e9e Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 10:14:26 +0900 Subject: [PATCH 08/39] fix --- dll/win32/shell32/stubs.cpp | 17 ----------------- dll/win32/shell32/utils.cpp | 19 +++++++++++++++++++ sdk/include/psdk/shlobj.h | 9 +++++++++ 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/dll/win32/shell32/stubs.cpp b/dll/win32/shell32/stubs.cpp index 3870e808e3b..4d66865f90c 100644 --- a/dll/win32/shell32/stubs.cpp +++ b/dll/win32/shell32/stubs.cpp @@ -218,23 +218,6 @@ SHGetSetFolderCustomSettingsA(LPSHFOLDERCUSTOMSETTINGSA pfcs, return E_FAIL; } -/* - * Unimplemented - */ -EXTERN_C BOOL -WINAPI -SHOpenPropSheetW(LPCWSTR lpCaption, - HKEY hKeys[], - UINT uCount, - const CLSID *pClsID, - IDataObject *pDataObject, - IShellBrowser *pShellBrowser, - LPCWSTR lpStartPage) -{ - FIXME("SHOpenPropSheetW() stub\n"); - return FALSE; -} - /* * Unimplemented */ diff --git a/dll/win32/shell32/utils.cpp b/dll/win32/shell32/utils.cpp index ca71640e5f4..fbabcc0a90f 100644 --- a/dll/win32/shell32/utils.cpp +++ b/dll/win32/shell32/utils.cpp @@ -490,3 +490,22 @@ SHOpenPropSheetA( return SHOpenPropSheetW(pszCaptionW, ahKeys, cKeys, pclsidDefault, pDataObject, pShellBrowser, pszStartPageW); } + +/************************************************************************* + * SHOpenPropSheetW [SHELL32.80] + * + * @see https://learn.microsoft.com/en-us/windows/win32/api/shlobj/nf-shlobj-shopenpropsheetw + */ +BOOL WINAPI +SHOpenPropSheetW( + _In_opt_z_ LPCWSTR pszCaption, + _In_opt_ HKEY *ahKeys, + _In_ UINT cKeys, + _In_ const CLSID *pclsidDefault, + _In_ IDataObject *pDataObject, + _In_opt_ IShellBrowser *pShellBrowser, + _In_opt_z_ LPCWSTR pszStartPage) +{ + FIXME("SHOpenPropSheetW() stub\n"); + return FALSE; +} diff --git a/sdk/include/psdk/shlobj.h b/sdk/include/psdk/shlobj.h index 8facacf43a2..39124f6af41 100644 --- a/sdk/include/psdk/shlobj.h +++ b/sdk/include/psdk/shlobj.h @@ -349,6 +349,15 @@ SHOpenPropSheetA( _In_ IDataObject *pDataObject, _In_opt_ IShellBrowser *pShellBrowser, _In_opt_z_ LPCSTR pszStartPage); +BOOL WINAPI +SHOpenPropSheetW( + _In_opt_z_ LPCWSTR pszCaption, + _In_opt_ HKEY *ahKeys, + _In_ UINT cKeys, + _In_ const CLSID *pclsidDefault, + _In_ IDataObject *pDataObject, + _In_opt_ IShellBrowser *pShellBrowser, + _In_opt_z_ LPCWSTR pszStartPage); /***************************************************************************** * IContextMenu interface From fea414b9ed2cc7a81fddad18bc90f9d023beee15 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 10:39:12 +0900 Subject: [PATCH 09/39] [REGEDIT] Use functions strictly Part 2 (#5832) Follow-up to #5825. Use StringCchPrintfW instead of swprintf. CORE-18876 --- base/applications/regedit/regproc.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/base/applications/regedit/regproc.c b/base/applications/regedit/regproc.c index 8311a477712..f140b672381 100644 --- a/base/applications/regedit/regproc.c +++ b/base/applications/regedit/regproc.c @@ -1191,7 +1191,8 @@ static size_t export_value_name(FILE *fp, WCHAR *name, size_t len, BOOL unicode) WCHAR *str = REGPROC_escape_string(name, len, &line_len); WCHAR *buf = malloc((line_len + 4) * sizeof(WCHAR)); #ifdef __REACTOS__ - line_len = swprintf(buf, L"\"%s\"=", str); + StringCchPrintfW(buf, line_len + 4, L"\"%s\"=", str); + line_len = wcslen(buf); #else line_len = swprintf(buf, line_len + 4, L"\"%s\"=", str); #endif @@ -1218,7 +1219,7 @@ static void export_string_data(WCHAR **buf, WCHAR *data, size_t size) str = REGPROC_escape_string(data, len, &line_len); *buf = malloc((line_len + 3) * sizeof(WCHAR)); #ifdef __REACTOS__ - swprintf(*buf, L"\"%s\"", str); + StringCchPrintfW(*buf, line_len + 3, L"\"%s\"", str); #else swprintf(*buf, line_len + 3, L"\"%s\"", str); #endif @@ -1229,7 +1230,7 @@ static void export_dword_data(WCHAR **buf, DWORD *data) { *buf = malloc(15 * sizeof(WCHAR)); #ifdef __REACTOS__ - swprintf(*buf, L"dword:%08x", *data); + StringCchPrintfW(*buf, 15, L"dword:%08x", *data); #else swprintf(*buf, 15, L"dword:%08x", *data); #endif @@ -1249,7 +1250,8 @@ static size_t export_hex_data_type(FILE *fp, DWORD type, BOOL unicode) { WCHAR *buf = malloc(15 * sizeof(WCHAR)); #ifdef __REACTOS__ - line_len = swprintf(buf, L"hex(%x):", type); + StringCchPrintfW(buf, 15, L"hex(%x):", type); + line_len = wcslen(buf); #else line_len = swprintf(buf, 15, L"hex(%x):", type); #endif @@ -1280,7 +1282,8 @@ static void export_hex_data(FILE *fp, WCHAR **buf, DWORD type, DWORD line_len, for (i = 0, pos = 0; i < size; i++) { #ifdef __REACTOS__ - pos += swprintf(*buf + pos, L"%02x", ((BYTE *)data)[i]); + StringCchPrintfW(*buf + pos, 3, L"%02x", ((BYTE *)data)[i]); + pos += wcslen(*buf + pos); #else pos += swprintf(*buf + pos, 3, L"%02x", ((BYTE *)data)[i]); #endif @@ -1346,7 +1349,7 @@ static WCHAR *build_subkey_path(WCHAR *path, DWORD path_len, WCHAR *subkey_name, subkey_path = malloc((path_len + subkey_len + 2) * sizeof(WCHAR)); #ifdef __REACTOS__ - swprintf(subkey_path, L"%s\\%s", path, subkey_name); + StringCchPrintfW(subkey_path, path_len + subkey_len + 2, L"%s\\%s", path, subkey_name); #else swprintf(subkey_path, path_len + subkey_len + 2, L"%s\\%s", path, subkey_name); #endif @@ -1360,7 +1363,7 @@ static void export_key_name(FILE *fp, WCHAR *name, BOOL unicode) buf = malloc((lstrlenW(name) + 7) * sizeof(WCHAR)); #ifdef __REACTOS__ - swprintf(buf, L"\r\n[%s]\r\n", name); + StringCchPrintfW(buf, lstrlenW(name) + 7, L"\r\n[%s]\r\n", name); #else swprintf(buf, lstrlenW(name) + 7, L"\r\n[%s]\r\n", name); #endif From be8a6f8af19b7b9f7be29ea6b81ed8da029daa2c Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 19:57:42 +0900 Subject: [PATCH 10/39] [REGEDIT] Improve error handling (#5833) - Don't exit the main program on error. - Improve output_message function. - Use output_message instead of some error_exit function calls. CORE-19188 --- base/applications/regedit/regedit.c | 8 +++++--- base/applications/regedit/regproc.c | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/base/applications/regedit/regedit.c b/base/applications/regedit/regedit.c index 35fa13f037d..0e3cc27f669 100644 --- a/base/applications/regedit/regedit.c +++ b/base/applications/regedit/regedit.c @@ -37,9 +37,7 @@ static void output_writeconsole(const WCHAR *str, DWORD wlen) #ifdef __REACTOS__ /* This is win32gui application, don't ever try writing to console. * For the console version we have a separate reg.exe application. */ - WCHAR AppStr[255]; - LoadStringW(hInst, IDS_APP_TITLE, AppStr, ARRAY_SIZE(AppStr)); - MessageBoxW(NULL, str, AppStr, MB_OK | MB_ICONINFORMATION); + MessageBoxW(NULL, str, NULL, MB_ICONERROR); #else DWORD count; @@ -219,7 +217,11 @@ static void PerformRegAction(REGEDIT_ACTION action, WCHAR **argv, int *i) break; } default: +#ifdef __REACTOS__ + output_message(STRING_UNHANDLED_ACTION); +#else error_exit(STRING_UNHANDLED_ACTION); +#endif break; } } diff --git a/base/applications/regedit/regproc.c b/base/applications/regedit/regproc.c index f140b672381..1ef1fc9e6c2 100644 --- a/base/applications/regedit/regproc.c +++ b/base/applications/regedit/regproc.c @@ -1105,11 +1105,23 @@ void delete_registry_key(WCHAR *reg_key_name) if (!(key_class = parse_key_name(reg_key_name, &key_name))) { if (key_name) *(key_name - 1) = 0; +#ifdef __REACTOS__ + output_message(STRING_INVALID_SYSTEM_KEY, reg_key_name); + return; +#else error_exit(STRING_INVALID_SYSTEM_KEY, reg_key_name); +#endif } if (!key_name || !*key_name) +#ifdef __REACTOS__ + { + output_message(STRING_DELETE_FAILED, reg_key_name); + return; + } +#else error_exit(STRING_DELETE_FAILED, reg_key_name); +#endif #ifdef __REACTOS__ SHDeleteKey(key_class, key_name); @@ -1460,7 +1472,12 @@ static FILE *REGPROC_open_export_file(WCHAR *file_name, BOOL unicode) if (!file) { _wperror(L"regedit"); +#ifdef __REACTOS__ + output_message(STRING_CANNOT_OPEN_FILE, file_name); + return NULL; +#else error_exit(STRING_CANNOT_OPEN_FILE, file_name); +#endif } } @@ -1506,6 +1523,10 @@ static BOOL export_key(WCHAR *file_name, WCHAR *path, BOOL unicode) return FALSE; fp = REGPROC_open_export_file(file_name, unicode); +#ifdef __REACTOS__ + if (!fp) + return TRUE; /* Error message is already displayed */ +#endif export_registry_data(fp, key, path, unicode); export_newline(fp, unicode); fclose(fp); @@ -1522,6 +1543,10 @@ static BOOL export_all(WCHAR *file_name, WCHAR *path, BOOL unicode) WCHAR *class_name; fp = REGPROC_open_export_file(file_name, unicode); +#ifdef __REACTOS__ + if (!fp) + return TRUE; /* Error message is already displayed */ +#endif for (i = 0; i < ARRAY_SIZE(classes); i++) { From ed4c71c7a0c79204f31c2f6db6217b713952c87b Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 22:06:59 +0900 Subject: [PATCH 11/39] [IMM32][SDK] Add CtfAImmActivate function --- dll/win32/imm32/CtfImeTable.h | 9 ++ dll/win32/imm32/ctf.c | 148 +++++++++++++++++++++++++++++- dll/win32/imm32/imm32.spec | 1 + sdk/include/reactos/imm32_undoc.h | 1 + 4 files changed, 157 insertions(+), 2 deletions(-) create mode 100644 dll/win32/imm32/CtfImeTable.h diff --git a/dll/win32/imm32/CtfImeTable.h b/dll/win32/imm32/CtfImeTable.h new file mode 100644 index 00000000000..ae100ac93ac --- /dev/null +++ b/dll/win32/imm32/CtfImeTable.h @@ -0,0 +1,9 @@ +/* DEFINE_CTF_IME_FN(func_name, ret_type, params) */ +DEFINE_CTF_IME_FN(CtfImeCreateThreadMgr, HRESULT, (VOID)) +DEFINE_CTF_IME_FN(CtfImeDestroyThreadMgr, HRESULT, (VOID)) +DEFINE_CTF_IME_FN(CtfImeCreateInputContext, HRESULT, (HIMC hIMC)) +DEFINE_CTF_IME_FN(CtfImeDestroyInputContext, HRESULT, (HIMC hIMC)) +DEFINE_CTF_IME_FN(CtfImeSetActiveContextAlways, HRESULT, (DWORD dwFIXME1, DWORD dwFIXME2, DWORD dwFIXME3, DWORD dwFIXME4)) +DEFINE_CTF_IME_FN(CtfImeProcessCicHotkey, HRESULT, (DWORD dwFIXME1, DWORD dwFIXME2, DWORD dwFIXME3)) +DEFINE_CTF_IME_FN(CtfImeDispatchDefImeMessage, LRESULT, (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)) +DEFINE_CTF_IME_FN(CtfImeIsIME, BOOL, (HKL hKL)) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index 8495725ed0f..3cf1bc12384 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -17,10 +17,129 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm); * https://googleprojectzero.blogspot.com/2019/08/down-rabbit-hole.html */ -// Win: LoadCtfIme +/* Define the function types FN_... for CTF IME functions */ +#undef DEFINE_CTF_IME_FN +#define DEFINE_CTF_IME_FN(func_name, ret_type, params) \ + typedef ret_type (WINAPI *FN_##func_name)params; +#include "CtfImeTable.h" + +HINSTANCE g_hCtfIme = NULL; + +#define CTF_IME_FN(func_name) g_p##func_name + +/* Define the global variables for CTF IME functions */ +#undef DEFINE_CTF_IME_FN +#define DEFINE_CTF_IME_FN(func_name, ret_type, params) \ + FN_##func_name g_p##func_name = NULL; +#include "CtfImeTable.h" + +typedef BOOL (WINAPI *FN_ApphelpCheckIME)(LPCWSTR); + +/* FIXME: This is kernel32.dll function */ +BOOL +WINAPI +BaseCheckAppcompatCache(IN LPCWSTR ApplicationName, + IN HANDLE FileHandle, + IN LPCWSTR Environment, + OUT PULONG Reason); + +BOOL Imm32CheckAndApplyAppCompat(ULONG dwReason, LPCWSTR pszAppName) +{ + HINSTANCE hinstApphelp; + FN_ApphelpCheckIME pApphelpCheckIME; + + if (BaseCheckAppcompatCache(pszAppName, INVALID_HANDLE_VALUE, NULL, &dwReason)) + return TRUE; + + hinstApphelp = GetModuleHandleW(L"apphelp.dll"); + if (!hinstApphelp) + { + hinstApphelp = LoadLibraryW(L"apphelp.dll"); + if (!hinstApphelp) + return TRUE; + } + + pApphelpCheckIME = (FN_ApphelpCheckIME)GetProcAddress(hinstApphelp, "ApphelpCheckIME"); + if (!pApphelpCheckIME) + return TRUE; + + return pApphelpCheckIME(pszAppName); +} + HMODULE APIENTRY Imm32LoadCtfIme(VOID) { - return NULL; + BOOL bSuccess = FALSE; + IMEINFOEX ImeInfoEx; + WCHAR szImeFile[MAX_PATH]; + + RtlEnterCriticalSection(&gcsImeDpi); + do + { + if (g_hCtfIme) + break; + + /* + * NOTE: (HKL)0x04090409 is English US keyboard (default). + * The Cicero keyboard uses English US keyboard. + */ + if (!ImmLoadLayout((HKL)ULongToHandle(0x04090409), &ImeInfoEx)) + break; + + Imm32GetSystemLibraryPath(szImeFile, _countof(szImeFile), ImeInfoEx.wszImeFile); + + if (!Imm32CheckAndApplyAppCompat(0, szImeFile)) + break; + + g_hCtfIme = LoadLibraryW(szImeFile); + if (!g_hCtfIme) + break; + + bSuccess = TRUE; + +#undef DEFINE_CTF_IME_FN +#define DEFINE_CTF_IME_FN(func_name, ret_type, params) \ + CTF_IME_FN(func_name) = (FN_##func_name)GetProcAddress(g_hCtfIme, #func_name); \ + if (!CTF_IME_FN(func_name)) \ + { \ + bSuccess = FALSE; \ + break; \ + } +#include "CtfImeTable.h" + } while (0); + + if (g_hCtfIme && !bSuccess) + { +#undef DEFINE_CTF_IME_FN +#define DEFINE_CTF_IME_FN(func_name, ret_type, params) \ + CTF_IME_FN(func_name) = NULL; +#include "CtfImeTable.h" + + FreeLibrary(g_hCtfIme); + g_hCtfIme = NULL; + } + + RtlLeaveCriticalSection(&gcsImeDpi); + return g_hCtfIme; +} + +HRESULT Imm32CtfImeCreateThreadMgr(VOID) +{ + if (!Imm32LoadCtfIme() || CTF_IME_FN(CtfImeCreateThreadMgr) == NULL) + return E_FAIL; + return CTF_IME_FN(CtfImeCreateThreadMgr)(); +} + +HRESULT Imm32CtfImeCreateInputContext(HIMC hIMC) +{ + if (!Imm32LoadCtfIme() || CTF_IME_FN(CtfImeCreateInputContext) == NULL) + return E_FAIL; + return CTF_IME_FN(CtfImeCreateInputContext)(hIMC); +} + +BOOL CALLBACK Imm32EnumIMC(HIMC hIMC, LPARAM lParam) +{ + Imm32CtfImeCreateInputContext(hIMC); + return TRUE; } // Win: Internal_CtfImeDestroyInputContext @@ -53,6 +172,31 @@ HRESULT APIENTRY CtfImmTIMCreateInputContext(HIMC hIMC) return E_NOTIMPL; } +/*********************************************************************** + * CtfAImmActivate (IMM32.1) + */ +HRESULT WINAPI CtfAImmActivate(HINSTANCE *phinstCtfIme) +{ + HINSTANCE hinstCtfIme; + HRESULT hr; + + TRACE("(%p)\n", phinstCtfIme); + + hinstCtfIme = Imm32LoadCtfIme(); + hr = Imm32CtfImeCreateThreadMgr(); + if (hr == S_OK) + { + GetWin32ClientInfo()->CI_flags |= 0x800; /* FIXME */ + GetWin32ClientInfo()->CI_flags &= ~CI_TFSDISABLED; + ImmEnumInputContext(0, Imm32EnumIMC, 0); + } + + if (phinstCtfIme) + *phinstCtfIme = hinstCtfIme; + + return hr; +} + /*********************************************************************** * CtfImmIsCiceroEnabled (IMM32.@) */ diff --git a/dll/win32/imm32/imm32.spec b/dll/win32/imm32/imm32.spec index 92ac837fffd..b5e78e79577 100644 --- a/dll/win32/imm32/imm32.spec +++ b/dll/win32/imm32/imm32.spec @@ -1,3 +1,4 @@ +1 stdcall CtfAImmActivate(ptr) @ stdcall CtfImmIsCiceroEnabled() @ stdcall CtfImmIsTextFrameServiceDisabled() @ stdcall CtfImmTIMActivate(ptr) diff --git a/sdk/include/reactos/imm32_undoc.h b/sdk/include/reactos/imm32_undoc.h index dadff68b031..d742f32f66d 100644 --- a/sdk/include/reactos/imm32_undoc.h +++ b/sdk/include/reactos/imm32_undoc.h @@ -14,6 +14,7 @@ extern "C" { BOOL WINAPI ImmGetImeInfoEx(PIMEINFOEX pImeInfoEx, IMEINFOEXCLASS SearchType, PVOID pvSearchKey); +BOOL WINAPI ImmLoadLayout(HKL hKL, PIMEINFOEX pImeInfoEx); PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc); VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc); PIMEDPI WINAPI ImmLockImeDpi(HKL hKL); From 995f56d1d34a8a8a93deac5fb576f767a8552a85 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 23:27:45 +0900 Subject: [PATCH 12/39] [SHELL32][SDK] Implement IsSuspendAllowed (#5831) - Add IsShutdownAllowed helper function. - Add IsSuspendAllowed prototype to . - Implement IsSuspendAllowed function. --- dll/win32/shell32/stubs.cpp | 11 ----------- dll/win32/shell32/utils.cpp | 14 ++++++++++++++ sdk/include/reactos/undocshell.h | 1 + 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/dll/win32/shell32/stubs.cpp b/dll/win32/shell32/stubs.cpp index f8518336906..9ca95825c7f 100644 --- a/dll/win32/shell32/stubs.cpp +++ b/dll/win32/shell32/stubs.cpp @@ -783,17 +783,6 @@ DAD_DragEnterEx2(HWND hwndTarget, return FALSE; } -/* - * Unimplemented - */ -EXTERN_C BOOL -WINAPI -IsSuspendAllowed(VOID) -{ - FIXME("IsSuspendAllowed() stub\n"); - return FALSE; -} - /* * Unimplemented */ diff --git a/dll/win32/shell32/utils.cpp b/dll/win32/shell32/utils.cpp index 57ade40713e..f10cb11e290 100644 --- a/dll/win32/shell32/utils.cpp +++ b/dll/win32/shell32/utils.cpp @@ -164,6 +164,20 @@ SHTestTokenPrivilegeW(_In_opt_ HANDLE hToken, _In_z_ LPCWSTR lpName) return ret; } +BOOL IsShutdownAllowed(VOID) +{ + return SHTestTokenPrivilegeW(NULL, SE_SHUTDOWN_NAME); +} + +/************************************************************************* + * IsSuspendAllowed (SHELL32.53) + */ +BOOL WINAPI IsSuspendAllowed(VOID) +{ + TRACE("()\n"); + return IsShutdownAllowed() && IsPwrSuspendAllowed(); +} + /************************************************************************* * SHGetShellStyleHInstance (SHELL32.749) */ diff --git a/sdk/include/reactos/undocshell.h b/sdk/include/reactos/undocshell.h index 1577466ab9f..5b6953e9204 100644 --- a/sdk/include/reactos/undocshell.h +++ b/sdk/include/reactos/undocshell.h @@ -697,6 +697,7 @@ SHInvokePrivilegedFunctionW( BOOL WINAPI SHTestTokenPrivilegeW(_In_opt_ HANDLE hToken, _In_z_ LPCWSTR lpName); +BOOL WINAPI IsSuspendAllowed(VOID); /***************************************************************************** * Shell32 resources From 4eace8d762426e9ca7de0b357eb92d17299d9a9b Mon Sep 17 00:00:00 2001 From: Doug Lyons Date: Thu, 26 Oct 2023 11:45:44 -0500 Subject: [PATCH 13/39] [IPHLPAPI] Silence obsolete FIXME in GetAdaptersAddresses (#5834) --- dll/win32/iphlpapi/address.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/iphlpapi/address.c b/dll/win32/iphlpapi/address.c index fb40963c7d4..e3ac92588c5 100644 --- a/dll/win32/iphlpapi/address.c +++ b/dll/win32/iphlpapi/address.c @@ -331,8 +331,8 @@ GetAdaptersAddresses( DWORD MIN_SIZE = 15 * 1024; PIP_ADAPTER_ADDRESSES PreviousAA = NULL; - FIXME("GetAdaptersAddresses - Semi Stub: Family %u, Flags 0x%08x, Reserved %p, pAdapterAddress %p, pOutBufLen %p.\n", - Family, Flags, Reserved, pAdapterAddresses, pOutBufLen); + TRACE("Family %u, Flags 0x%08x, Reserved %p, pAdapterAddress %p, pOutBufLen %p\n", + Family, Flags, Reserved, pAdapterAddresses, pOutBufLen); if (!pOutBufLen) return ERROR_INVALID_PARAMETER; From c9c16500e2d83b65a9be3361afc31d28f59c87a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 24 Oct 2023 16:22:10 +0200 Subject: [PATCH 14/39] [USETUP] Rename some MUI string identifiers. STRING_CHOOSENEWPARTITION --> STRING_CHOOSE_NEW_PARTITION STRING_FORMATTINGDISK --> STRING_FORMATTINGPART STRING_HDDSIZE --> STRING_HDPARTSIZE STRING_HDINFOPARTCREATE_1 --> STRING_HDDISK1 STRING_HDINFOPARTDELETE_1 --> STRING_HDDISK2 STRING_HDDINFO_{1,2} --> STRING_HDDINFO{1,2} Move STRING_NEWPARTITION just before STRING_PARTFORMAT and renumber the STRING_* identifiers. --- base/setup/usetup/format.c | 2 +- base/setup/usetup/lang/bg-BG.h | 18 +++--- base/setup/usetup/lang/bn-BD.h | 18 +++--- base/setup/usetup/lang/cs-CZ.h | 18 +++--- base/setup/usetup/lang/da-DK.h | 18 +++--- base/setup/usetup/lang/de-DE.h | 18 +++--- base/setup/usetup/lang/el-GR.h | 18 +++--- base/setup/usetup/lang/en-US.h | 18 +++--- base/setup/usetup/lang/es-ES.h | 18 +++--- base/setup/usetup/lang/et-EE.h | 18 +++--- base/setup/usetup/lang/eu-ES.h | 18 +++--- base/setup/usetup/lang/fr-FR.h | 18 +++--- base/setup/usetup/lang/he-IL.h | 18 +++--- base/setup/usetup/lang/hr-HR.h | 18 +++--- base/setup/usetup/lang/hu-HU.h | 18 +++--- base/setup/usetup/lang/id-ID.h | 18 +++--- base/setup/usetup/lang/it-IT.h | 18 +++--- base/setup/usetup/lang/ja-JP.h | 18 +++--- base/setup/usetup/lang/lt-LT.h | 18 +++--- base/setup/usetup/lang/ms-MY.h | 18 +++--- base/setup/usetup/lang/nl-NL.h | 18 +++--- base/setup/usetup/lang/pl-PL.h | 18 +++--- base/setup/usetup/lang/pt-BR.h | 18 +++--- base/setup/usetup/lang/pt-PT.h | 18 +++--- base/setup/usetup/lang/ro-RO.h | 18 +++--- base/setup/usetup/lang/ru-RU.h | 18 +++--- base/setup/usetup/lang/sk-SK.h | 18 +++--- base/setup/usetup/lang/sq-AL.h | 18 +++--- base/setup/usetup/lang/sv-SE.h | 18 +++--- base/setup/usetup/lang/tr-TR.h | 18 +++--- base/setup/usetup/lang/uk-UA.h | 18 +++--- base/setup/usetup/mui.h | 114 ++++++++++++++++----------------- base/setup/usetup/partlist.c | 4 +- base/setup/usetup/usetup.c | 24 +++---- 34 files changed, 342 insertions(+), 342 deletions(-) diff --git a/base/setup/usetup/format.c b/base/setup/usetup/format.c index cc0603ed07b..21d4d1f87d5 100644 --- a/base/setup/usetup/format.c +++ b/base/setup/usetup/format.c @@ -103,7 +103,7 @@ DoFormat( 10, 24, TRUE, - MUIGetString(STRING_FORMATTINGDISK)); + MUIGetString(STRING_FORMATTINGPART)); ProgressSetStepCount(FormatProgressBar, 100); diff --git a/base/setup/usetup/lang/bg-BG.h b/base/setup/usetup/lang/bg-BG.h index 8537ccdf490..f7150ddcaa9 100644 --- a/base/setup/usetup/lang/bg-BG.h +++ b/base/setup/usetup/lang/bg-BG.h @@ -2253,16 +2253,18 @@ MUI_STRING bgBGStrings[] = " D = \210\247\342\340\250\251 \244\357\253 F3 = \210\247\345\256\244"}, {STRING_PARTITIONSIZE, "\220\240\247\254\245\340 \255\240 \255\256\242\250\357 \244\357\253:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "\210\247\241\340\240\253\250 \341\342\245 \244\240 \341\352\247\244\240\244\245\342\245 \255\256\242 \257\352\340\342\250\350\245\255 \244\357\253 \255\240"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "\210\247\241\340\240\253\250 \341\342\245 \244\240 \341\352\247\244\240\244\245\342\245 \340\240\247\350\250\340\250\342\245\253\245\255 \244\357\253 \255\240"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "\210\247\241\340\240\253\250 \341\342\245 \244\240 \341\352\247\244\240\244\245\342\245 \253\256\243\250\347\245\341\252\250 \244\357\253 \255\240"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "\202\352\242\245\244\245\342\245 \340\240\247\254\245\340\240 \255\240 \255\256\242\250\357 \244\357\253 (\242 \254\245\243\240\241\240\251\342\250)."}, {STRING_CREATEPARTITION, " ENTER = \221\352\247\244\240\242\240\255\245 \255\240 \244\357\253 ESC = \216\342\252\240\247 F3 = \210\247\345\256\244"}, + {STRING_NEWPARTITION, + "\201\245 \341\352\247\244\240\244\245\255 \255\256\242 \244\357\253 \255\240"}, {STRING_PARTFORMAT, "\217\340\245\244\341\342\256\250 \344\256\340\254\240\342\250\340\240\255\245 \255\240 \244\357\253\240."}, {STRING_NONFORMATTEDPART, @@ -2313,7 +2315,7 @@ MUI_STRING bgBGStrings[] = "\222\256\242\240 \341\245 \341\253\343\347\242\240 \255\240\251- \347\245\341\342\256 \257\340\250 \343\257\256\342\340\245\241\240 \255\240 USB \252\253\240\242\250\240\342\343\340\240\r\n"}, {STRING_CONSOLEFAIL3, "\217\256\244\244\340\352\246\252\240\342\240 \255\240 USB \245 \242\341\245 \256\351\245 \255\245\257\352\253\255\240\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "\224\256\340\254\240\342\250\340\240\255\245 \255\240 \244\250\341\252\240"}, {STRING_CHECKINGDISK, "\217\340\256\242\245\340\252\240 \255\240 \244\250\341\252\240"}, @@ -2323,20 +2325,18 @@ MUI_STRING bgBGStrings[] = " \224\256\340\254\240\342\250\340\240\255\245 \255\240 \244\357\253\240 \252\240\342\256 %S \344\240\251\253\256\242\240 \341\250\341\342\245\254\240 "}, {STRING_KEEPFORMAT, " \207\240\257\240\247\242\240\255\245 \255\240 \344\240\251\253\256\242\240\342\240 \341\250\341\342\245\254\240 (\241\245\247 \257\340\256\254\245\255\250) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "\255\240: %s."}, {STRING_PARTTYPE, "\242\250\244 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "\342\242\352\340\244 \244\250\341\252 %lu (%I64u %s), \210\247\242\256\244=%hu, \230\250\255\240=%hu, \216\223=%hu (%wZ) [%s]" "%I64u %s \342\242\352\340\244 \244\250\341\252 %lu (\210\247\242\256\244=%hu, \230\250\255\240=%hu, \216\223=%hu) \255\240 %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "\342\242\352\340\244 \244\250\341\252 %lu (%I64u %s), \210\247\242\256\244=%hu, \230\250\255\240=%hu, \216\223=%hu [%s]" "%I64u %s \342\242\352\340\244 \244\250\341\252 %lu (\210\247\242\256\244=%hu, \230\250\255\240=%hu, \216\223=%hu) [%s]"}, - {STRING_NEWPARTITION, - "\201\245 \341\352\247\244\240\244\245\255 \255\256\242 \244\357\253 \255\240"}, {STRING_UNPSPACE, "\215\245\247\240\244\245\253\245\255\256 \257\340\256\341\342\340\240\255\341\342\242\256"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/bn-BD.h b/base/setup/usetup/lang/bn-BD.h index ba42c1a058f..a8ece049194 100644 --- a/base/setup/usetup/lang/bn-BD.h +++ b/base/setup/usetup/lang/bn-BD.h @@ -2227,16 +2227,18 @@ MUI_STRING bnBDStrings[] = " D = Delete Partition F3 = Quit"}, {STRING_PARTITIONSIZE, "Size of new partition:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "You have chosen to create a primary partition on"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "You have chosen to create an extended partition on"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "You have chosen to create a logical partition on"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Please enter the size of the new partition in megabytes."}, {STRING_CREATEPARTITION, " ENTER = Create Partition ESC = Cancel F3 = Quit"}, + {STRING_NEWPARTITION, + "Setup created a new partition on"}, {STRING_PARTFORMAT, "This Partition will be formatted next."}, {STRING_NONFORMATTEDPART, @@ -2287,7 +2289,7 @@ MUI_STRING bnBDStrings[] = "The most common cause of this is using an USB keyboard\r\n"}, {STRING_CONSOLEFAIL3, "USB keyboards are not fully supported yet\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Setup is formatting your disk"}, {STRING_CHECKINGDISK, "Setup is checking your disk"}, @@ -2297,20 +2299,18 @@ MUI_STRING bnBDStrings[] = " Format partition as %S file system "}, {STRING_KEEPFORMAT, " Keep current file system (no changes) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "on %s."}, {STRING_PARTTYPE, "Type 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Setup created a new partition on"}, {STRING_UNPSPACE, "Unpartitioned space"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/cs-CZ.h b/base/setup/usetup/lang/cs-CZ.h index 9b8092616c1..e185fa42208 100644 --- a/base/setup/usetup/lang/cs-CZ.h +++ b/base/setup/usetup/lang/cs-CZ.h @@ -2235,16 +2235,18 @@ MUI_STRING csCZStrings[] = " D = Odstranit odd\241l F3 = Ukon\237it"}, {STRING_PARTITIONSIZE, "Velikost nov\202ho odd\241lu:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Zvolili jste vytvo\375en\241 nov\202ho prim\240rn\241ho odd\241lu na"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Zvolili jste vytvo\375en\241 nov\202ho roz\347\241\375en\202ho odd\241lu na"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Zvolili jste vytvo\375en\241 nov\202ho logick\202ho odd\241lu na"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Zadejte velikost nov\202ho odd\241lu v megabajtech."}, {STRING_CREATEPARTITION, " ENTER = Vytvo\375it odd\241l ESC = Zru\347it F3 = Ukon\237it"}, + {STRING_NEWPARTITION, + "Instalace vytvo\375ila nov\354 odd\241l na"}, {STRING_PARTFORMAT, "Tento odd\241l bude zform\240tov\240n."}, {STRING_NONFORMATTEDPART, @@ -2295,7 +2297,7 @@ MUI_STRING csCZStrings[] = "Nejb\330\247n\330j\347\241 p\375\241\237inou je pou\247\241v\240n\241 USB kl\240vesnice\r\n"}, {STRING_CONSOLEFAIL3, "USB kl\240vesnice zat\241m nejsou pln\330 podporov\240ny\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Instalace form\240tuje disk"}, {STRING_CHECKINGDISK, "Instalace kontroluje disk"}, @@ -2305,20 +2307,18 @@ MUI_STRING csCZStrings[] = " Zform\240tovat odd\241l na souborov\354 syst\202m %S "}, {STRING_KEEPFORMAT, " Ponechat sou\237asn\354 souborov\354 syst\202m (bez zm\330ny) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "na: %s."}, {STRING_PARTTYPE, "Typ 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) na %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Instalace vytvo\375ila nov\354 odd\241l na"}, {STRING_UNPSPACE, "M\241sto bez odd\241l\205"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/da-DK.h b/base/setup/usetup/lang/da-DK.h index 8485e176eb2..ab95b478df8 100644 --- a/base/setup/usetup/lang/da-DK.h +++ b/base/setup/usetup/lang/da-DK.h @@ -2237,16 +2237,18 @@ MUI_STRING daDKStrings[] = " D = Slet partition F3 = Afslut"}, {STRING_PARTITIONSIZE, "St\233rrelse p\206 den nye partition:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Du har valge at lave en ny prim\221r partition p\206"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Du har valgt at lave en ny udviddet partition p\206"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Du har valge at lave en ny logisk partition p\206"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Indtast st\233rrelsen p\206 den nye partition i megabytes."}, {STRING_CREATEPARTITION, " ENTER = Lav partition ESC = Annuller F3 = Afslut"}, + {STRING_NEWPARTITION, + "Installationen har lavet en ny partition p\206"}, {STRING_PARTFORMAT, "Denne partition vil blive formateret som det n\221ste."}, {STRING_NONFORMATTEDPART, @@ -2297,7 +2299,7 @@ MUI_STRING daDKStrings[] = "Dette skykdes ofte at du bruger et USB-tastatur\r\n"}, {STRING_CONSOLEFAIL3, "USB-tastatuere er endnu ikke fuldt underst\233ttet\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Installationen formatere din disk"}, {STRING_CHECKINGDISK, "Installationen tjekker din disk"}, @@ -2307,20 +2309,18 @@ MUI_STRING daDKStrings[] = " Formater partitionen som %S-filesystemet "}, {STRING_KEEPFORMAT, " Behold nuv\221rende filsystem (ingen \221ndringer) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "p\206 %s."}, {STRING_PARTTYPE, "Type 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) p\206 %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Installationen har lavet en ny partition p\206"}, {STRING_UNPSPACE, "Upartitioneret plads"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/de-DE.h b/base/setup/usetup/lang/de-DE.h index 0d095400c67..3834815ea04 100644 --- a/base/setup/usetup/lang/de-DE.h +++ b/base/setup/usetup/lang/de-DE.h @@ -2239,16 +2239,18 @@ MUI_STRING deDEStrings[] = " D = Partition l\224schen F3 = Installation abbrechen"}, {STRING_PARTITIONSIZE, "Gr\224\341e der neuen Partition:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Eine prim\204re Partition soll hier erstellt werden:"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Eine erweiterte Partition soll hier erstellt werden:"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Ein logisches Laufwerk soll hier erstellt werden:"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Bitte geben Sie die Gr\224\341e der neuen Partition in Megabyte ein."}, {STRING_CREATEPARTITION, " ENTER = Partition erstellen ESC = Abbrechen F3 = Installation abbrechen"}, + {STRING_NEWPARTITION, + "Setup erstellte eine neue Partition auf"}, {STRING_PARTFORMAT, "Diese Partition wird als n\204chstes formatiert."}, {STRING_NONFORMATTEDPART, @@ -2299,7 +2301,7 @@ MUI_STRING deDEStrings[] = "Der h\204ufigste Grund hierf\201r ist die Verwendung einer USB-Tastatur\r\n"}, {STRING_CONSOLEFAIL3, "USB-Tastaturen werden noch nicht vollst\204ndig unterst\201tzt\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Ihre Festplatte wird formatiert"}, {STRING_CHECKINGDISK, "Ihre Festplatte wird \201berpr\201ft"}, @@ -2309,20 +2311,18 @@ MUI_STRING deDEStrings[] = " Partition mit dem %S-Dateisystem formatieren "}, {STRING_KEEPFORMAT, " Dateisystem beibehalten (Keine Ver\204nderungen) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "auf %s."}, {STRING_PARTTYPE, "Typ 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Festplatte %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Festplatte %lu (Port=%hu, Bus=%hu, Id=%hu) auf %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Festplatte %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Festplatte %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Setup erstellte eine neue Partition auf"}, {STRING_UNPSPACE, "Unpartitionierter Speicher"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/el-GR.h b/base/setup/usetup/lang/el-GR.h index 401f7ae16fc..6e092a920c7 100644 --- a/base/setup/usetup/lang/el-GR.h +++ b/base/setup/usetup/lang/el-GR.h @@ -2251,17 +2251,19 @@ MUI_STRING elGRStrings[] = " D = Delete Partition F3 = Quit"}, {STRING_PARTITIONSIZE, "\213\342\232\234\237\246\252 \253\246\254 \244\342\246\254 partition:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "You have chosen to create a primary partition on"}, // "„§ ¢â¥˜«œ ¤˜ ›ž£ ¦¬¨šã©œ«œ ⤘ ¤â¦ partition on"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "You have chosen to create an extended partition on"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "You have chosen to create a logical partition on"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "\217\230\250\230\241\230\242\351 \233\351\251\253\234 \253\246 \243\342\232\234\237\246\252 \253\246\254 partition \251\234 megabytes."}, {STRING_CREATEPARTITION, " ENTER = \203\236\243\240\246\254\250\232\345\230 Partition ESC = \200\241\347\250\340\251\236 F3 = \200\247\246\256\351\250\236\251\236"}, + {STRING_NEWPARTITION, + "\206 \234\232\241\230\253\341\251\253\230\251\236 \233\236\243\240\246\347\250\232\236\251\234 \342\244\230 \244\342\246 partition \251\253\246"}, {STRING_PARTFORMAT, "\200\254\253\346 \253\246 Partition \237\230 \233\240\230\243\246\250\255\340\237\234\345 \243\234\253\341."}, {STRING_NONFORMATTEDPART, @@ -2312,7 +2314,7 @@ MUI_STRING elGRStrings[] = "The most common cause of this is using an USB keyboard\r\n"}, {STRING_CONSOLEFAIL3, "\222\230 USB \247\242\236\241\253\250\246\242\346\232\240\230 \233\234\244 \234\345\244\230\240 \247\242\343\250\340\252 \254\247\246\251\253\236\250\240\235\346\243\234\244\230 \230\241\346\243\230\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "\206 \234\232\241\230\253\341\251\253\230\251\236 \233\240\230\243\246\250\255\351\244\234\240 \253\246 \233\345\251\241\246 \251\230\252"}, {STRING_CHECKINGDISK, "\206 \234\232\241\230\253\341\251\253\230\251\236 \234\242\342\232\256\234\240 \253\246 \233\345\251\241\246 \251\230\252"}, @@ -2322,20 +2324,18 @@ MUI_STRING elGRStrings[] = " \203\240\230\243\346\250\255\340\251\236 \253\246\254 partition \340\252 %S \251\347\251\253\236\243\230 \230\250\256\234\345\340\244 "}, {STRING_KEEPFORMAT, " \214\230 \247\230\250\230\243\234\345\244\234\240 \253\246 \251\347\251\253\236\243\230 \230\250\256\234\345\340\244 \340\252 \342\256\234\240 (\241\230\243\345\230 \230\242\242\230\232\343) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "\251\253\246: %s."}, {STRING_PARTTYPE, "Type 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "\221\241\242\236\250\346\252 \233\345\251\241\246\252 %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s \221\241\242\236\250\346\252 \233\345\251\241\246\252 %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "\221\241\242\236\250\346\252 \233\345\251\241\246\252 %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s \221\241\242\236\250\346\252 \233\345\251\241\246\252 %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "\206 \234\232\241\230\253\341\251\253\230\251\236 \233\236\243\240\246\347\250\232\236\251\234 \342\244\230 \244\342\246 partition \251\253\246"}, {STRING_UNPSPACE, "Unpartitioned space"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/en-US.h b/base/setup/usetup/lang/en-US.h index 3354212a0a2..ae23370e7fa 100644 --- a/base/setup/usetup/lang/en-US.h +++ b/base/setup/usetup/lang/en-US.h @@ -2227,16 +2227,18 @@ MUI_STRING enUSStrings[] = " D = Delete Partition F3 = Quit"}, {STRING_PARTITIONSIZE, "Size of new partition:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "You have chosen to create a primary partition on"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "You have chosen to create an extended partition on"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "You have chosen to create a logical partition on"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Please enter the size of the new partition in megabytes."}, {STRING_CREATEPARTITION, " ENTER = Create Partition ESC = Cancel F3 = Quit"}, + {STRING_NEWPARTITION, + "Setup created a new partition on"}, {STRING_PARTFORMAT, "This Partition will be formatted next."}, {STRING_NONFORMATTEDPART, @@ -2287,7 +2289,7 @@ MUI_STRING enUSStrings[] = "The most common cause of this is using an USB keyboard\r\n"}, {STRING_CONSOLEFAIL3, "USB keyboards are not fully supported yet\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Setup is formatting your disk"}, {STRING_CHECKINGDISK, "Setup is checking your disk"}, @@ -2297,20 +2299,18 @@ MUI_STRING enUSStrings[] = " Format partition as %S file system "}, {STRING_KEEPFORMAT, " Keep current file system (no changes) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "on %s."}, {STRING_PARTTYPE, "Type 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Setup created a new partition on"}, {STRING_UNPSPACE, "Unpartitioned space"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/es-ES.h b/base/setup/usetup/lang/es-ES.h index 6f588779e21..77e54c61860 100644 --- a/base/setup/usetup/lang/es-ES.h +++ b/base/setup/usetup/lang/es-ES.h @@ -2240,16 +2240,18 @@ MUI_STRING esESStrings[] = " INTRO = Instalar D = Eliminar partici\242n F3 = Salir"}, {STRING_PARTITIONSIZE, "Tama\244o de la nueva Partici\242n:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Ha elegido crear una nueva Partici\242n Primaria en"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Ha elegido crear una nueva Partici\242n Extendida en"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Ha elegido crear una nueva Partici\242n L\242gica en"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Escriba el tama\244o de la nueva Partici\242n en megabytes."}, {STRING_CREATEPARTITION, " INTRO = Crear Partici\242n ESC = Cancelar F3 = Salir"}, + {STRING_NEWPARTITION, + "El instalador ha creado una nueva Partici\242n en"}, {STRING_PARTFORMAT, "A continuaci\242n se formatear\240 esta partici\242n."}, {STRING_NONFORMATTEDPART, @@ -2300,7 +2302,7 @@ MUI_STRING esESStrings[] = "La causa m\240s com\243n es la utilizaci\242n de un teclado USB\r\n"}, {STRING_CONSOLEFAIL3, "Todav\241a no hay soporte del todo para los teclados USB\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "El instalador est\240 formateando el disco"}, {STRING_CHECKINGDISK, "El instalador est\240 verificando el disco"}, @@ -2310,20 +2312,18 @@ MUI_STRING esESStrings[] = " Formatear la partici\242n con sistema de archivos %S "}, {STRING_KEEPFORMAT, " Mantener el sistema de archivos actual (sin cambios) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "en %s."}, {STRING_PARTTYPE, "Tipo 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Disco duro %lu (%I64u %s), Puerto=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Disco duro %lu (Puerto=%hu, Bus=%hu, Id=%hu) en %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Disco duro %lu (%I64u %s), Puerto=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Disco duro %lu (Puerto=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "El instalador ha creado una nueva Partici\242n en"}, {STRING_UNPSPACE, "Espacio sin particionar"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/et-EE.h b/base/setup/usetup/lang/et-EE.h index 881f99de721..9e78d2b53c1 100644 --- a/base/setup/usetup/lang/et-EE.h +++ b/base/setup/usetup/lang/et-EE.h @@ -2228,17 +2228,19 @@ MUI_STRING etEEStrings[] = " D = Kustuta partitsioon F3 = V\204lju"}, {STRING_PARTITIONSIZE, "Uue partitsiooni suurus:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "You have chosen to create a primary partition on"}, // "Oled valinud kettale uue partitsiooni loomise"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "You have chosen to create an extended partition on"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "You have chosen to create a logical partition on"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Sisesta uue partitsiooni suurus megabaitides."}, {STRING_CREATEPARTITION, " ENTER = Loo partitsioon ESC = Katkesta F3 = V\204lju"}, + {STRING_NEWPARTITION, + "Loodi uus partitsioon"}, {STRING_PARTFORMAT, "J\204rgmisena vormindatakse seda partitsiooni."}, {STRING_NONFORMATTEDPART, @@ -2289,7 +2291,7 @@ MUI_STRING etEEStrings[] = "T\344en\204oliselt on probleem USB klaviatuuri kasutamises\r\n"}, {STRING_CONSOLEFAIL3, "USB klaviatuurid ei ole veel toetatud\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "K\344vaketta vormindamine"}, {STRING_CHECKINGDISK, "K\344vaketta kontrollimine"}, @@ -2299,20 +2301,18 @@ MUI_STRING etEEStrings[] = " Vorminda partitsioon %S failis\201steemiga "}, {STRING_KEEPFORMAT, " \216ra muuda praegust failis\201steemi "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "%s."}, {STRING_PARTTYPE, "Type 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "K\344vaketas %lu (%I64u %s), Port=%hu, Siin=%hu, Id=%hu (%wZ) [%s]" "%I64u %s K\344vaketas %lu (Port=%hu, Siin=%hu, Id=%hu) - %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "K\344vaketas %lu (%I64u %s), Port=%hu, Siin=%hu, Id=%hu [%s]" "%I64u %s K\344vaketas %lu (Port=%hu, Siin=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Loodi uus partitsioon"}, {STRING_UNPSPACE, "Kasutamata kettaruum"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/eu-ES.h b/base/setup/usetup/lang/eu-ES.h index 0c2688a9d8e..b225211ebcf 100644 --- a/base/setup/usetup/lang/eu-ES.h +++ b/base/setup/usetup/lang/eu-ES.h @@ -2235,16 +2235,18 @@ MUI_STRING euESStrings[] = " D = Ezabatu Partitioa F3 = Irten"}, {STRING_PARTITIONSIZE, "Partizio berriaren tamainu:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Zu aukeratu duzu partizio nagusia sortu barruan"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Zu aukeratu duzu partizio luzatuta sortu barruan"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Zu aukeratu duzu partizio logika sortu barruan"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Mezedez osatu tamainua megabytes-en."}, {STRING_CREATEPARTITION, " SARTU = Sortu Partizioa ESC = Utzi F3 = Irten"}, + {STRING_NEWPARTITION, + "Instalazioa sortu du partizio berria barruan"}, {STRING_PARTFORMAT, "Partizio hau izango da formatuta gero."}, {STRING_NONFORMATTEDPART, @@ -2295,7 +2297,7 @@ MUI_STRING euESStrings[] = "Kausa arruntak da USB teklatua erabili\r\n"}, {STRING_CONSOLEFAIL3, "USB teklatua ez dago oraindik osoan euskarri\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Instalazioa zure disko formateatzen ari da"}, {STRING_CHECKINGDISK, "Instalazioa zure disko ikusten ari da"}, @@ -2305,20 +2307,18 @@ MUI_STRING euESStrings[] = " Formatu partizioa %S sistemaren fitxategia "}, {STRING_KEEPFORMAT, " Mantendu sistemaren fitxategia (aldaketarik ez) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "%s."}, {STRING_PARTTYPE, "Mota 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Disko gogor %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Disko gogor %lu (Port=%hu, Bus=%hu, Id=%hu) %wZn [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Disko gogor %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Disko gogor %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Instalazioa sortu du partizio berria barruan"}, {STRING_UNPSPACE, "Ezpartizionatu espazio"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/fr-FR.h b/base/setup/usetup/lang/fr-FR.h index 4c8d04461f7..77c51003330 100644 --- a/base/setup/usetup/lang/fr-FR.h +++ b/base/setup/usetup/lang/fr-FR.h @@ -2264,16 +2264,18 @@ MUI_STRING frFRStrings[] = " D = Supprimer partition F3 = Quitter"}, {STRING_PARTITIONSIZE, "Taille de la nouvelle partition :"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Vous avez choisi de cr\202er une partition primaire sur"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Vous avez choisi de cr\202er une partition \202tendue sur"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Vous avez choisi de cr\202er une partition logique sur"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Veuillez entrer la taille de la nouvelle partition en m\202gaoctets."}, {STRING_CREATEPARTITION, " ENTR\220E = Cr\202er partition \220CHAP = Annuler F3 = Quitter"}, + {STRING_NEWPARTITION, + "Setup a cr\202\202 une nouvelle partition sur"}, {STRING_PARTFORMAT, "Cette partition sera ensuite format\202e."}, {STRING_NONFORMATTEDPART, @@ -2324,7 +2326,7 @@ MUI_STRING frFRStrings[] = "La cause probable est l'utilisation d'un clavier USB\r\n"}, {STRING_CONSOLEFAIL3, "Les claviers USB ne sont pas compl\212tement support\202s actuellement\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Setup formate votre disque"}, {STRING_CHECKINGDISK, "Setup v\202rifie votre disque"}, @@ -2334,20 +2336,18 @@ MUI_STRING frFRStrings[] = " Formater la partition comme syst\212me de fichiers %S "}, {STRING_KEEPFORMAT, " Garder le syst\212me de fichiers courant (pas de changements) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "sur le %s."}, {STRING_PARTTYPE, "Type 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Disque dur %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Disque dur %lu (Port=%hu, Bus=%hu, Id=%hu) sur %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Disque dur %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Disque dur %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Setup a cr\202\202 une nouvelle partition sur"}, {STRING_UNPSPACE, "Espace non partitionn\202"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/he-IL.h b/base/setup/usetup/lang/he-IL.h index d0b6b7a5fda..6b644999fc8 100644 --- a/base/setup/usetup/lang/he-IL.h +++ b/base/setup/usetup/lang/he-IL.h @@ -2229,16 +2229,18 @@ MUI_STRING heILStrings[] = " \204\220\227\232\204 \214\205\210\211\201 = F3 \204\226\211\207\216 \227\207\216 = D"}, {STRING_PARTITIONSIZE, ":\204\231\203\207 \204\226\211\207\216 \214\231 \214\203\205\202"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "\214\222 \232\211\230\227\211\222 \204\226\211\207\216 \230\205\226\211\214 \232\230\207\201"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "\214\222 \232\201\207\230\205\216 \204\226\211\207\216 \230\205\226\211\214 \232\230\207\201"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "\214\222 \232\211\202\205\214 \204\226\211\207\216 \230\205\226\211\214 \232\230\207\201"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, ".\215\211\232\201-\204\202\216\201 \204\231\203\207\204 \204\226\211\207\216\204 \214\231 \214\203\205\202\204 \232\200 \203\214\227\204 \204\231\227\201\201"}, {STRING_CREATEPARTITION, " \204\220\227\232\204 \214\205\210\211\201 = F3 \214\205\210\211\201 = ESC \204\226\211\207\216 \230\205\226 = ENTER"}, + {STRING_NEWPARTITION, + "\214\222 \204\231\203\207 \204\226\211\207\216 \204\230\226\211 \204\220\227\232\204\204 \232\211\220\213\232"}, {STRING_PARTFORMAT, ".\212\231\216\204\201 \214\207\232\205\200\232 \232\200\206\204 \204\226\211\207\216\204"}, {STRING_NONFORMATTEDPART, @@ -2289,7 +2291,7 @@ MUI_STRING heILStrings[] = "USB \232\203\214\227\216\201 \231\205\216\211\231 \200\205\204 \204\206 \214\231 \204\226\205\224\220 \211\213\204 \204\201\211\221\204\r\n"}, {STRING_CONSOLEFAIL3, "\200\214\216 \217\224\205\200\201 \232\205\213\216\232\220 \200\214 \217\211\211\203\222 USB \232\205\203\214\227\216\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "\217\220\205\213\204 \232\200 \232\214\207\232\200\216 \204\220\227\232\204\204 \232\211\220\213\232"}, {STRING_CHECKINGDISK, "\217\220\205\213\204 \232\200 \232\227\203\205\201 \204\220\227\232\204\204 \232\211\220\213\232"}, @@ -2299,20 +2301,18 @@ MUI_STRING heILStrings[] = " %S \215\211\226\201\227 \232\213\230\222\216 \215\222 \204\226\211\207\216 \214\205\207\232\200 "}, {STRING_KEEPFORMAT, " (\211\205\220\211\231 \200\214\214( \232\211\207\213\205\220 \215\211\226\201\227 \232\213\230\222\216 \232\230\200\231\204 "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "on %s."}, {STRING_PARTTYPE, "Type 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "\214\222 \204\231\203\207 \204\226\211\207\216 \204\230\226\211 \204\220\227\232\204\204 \232\211\220\213\232"}, {STRING_UNPSPACE, "Unpartitioned space"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/hr-HR.h b/base/setup/usetup/lang/hr-HR.h index 798cd0738ee..9f0c2bd47d8 100644 --- a/base/setup/usetup/lang/hr-HR.h +++ b/base/setup/usetup/lang/hr-HR.h @@ -2258,16 +2258,18 @@ MUI_STRING hrHRStrings[] = " D = Izbri\347i particiju F3 = Iza\320i"}, {STRING_PARTITIONSIZE, "Veli\237ina nove particije:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Odabrali ste stvoriti primarnu particiju na"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Odabrali ste stvoriti pro\347irenu particiju na"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Odabrali ste stvoriti logi\237ku particiju na"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Molimo da unesite veli\237inu nove particije u MB."}, {STRING_CREATEPARTITION, " ENTER = Stvori particiju ESC = Odustani F3 = Iza\320i"}, + {STRING_NEWPARTITION, + "Instalacijski program je stvorio novu particiju na"}, {STRING_PARTFORMAT, "Ova \206e particija biti sljede\206a formatirana."}, {STRING_NONFORMATTEDPART, @@ -2318,7 +2320,7 @@ MUI_STRING hrHRStrings[] = "Naj\237e\347\206i uzrok tome je kori\347tenje USB tipkovnice\r\n"}, {STRING_CONSOLEFAIL3, "USB tipkovnice nisu jo\347 potupuno podr\247ane\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Instalacijski program formatira va\347 disk"}, {STRING_CHECKINGDISK, "Instalacijski sustav provjerava va\347 disk"}, @@ -2328,20 +2330,18 @@ MUI_STRING hrHRStrings[] = " Formatiraj particiju kao %S sustav datoteka "}, {STRING_KEEPFORMAT, " \254uvaj trenutni sustav datoteka (bez promjene) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "na %s."}, {STRING_PARTTYPE, "Vrsta 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Instalacijski program je stvorio novu particiju na"}, {STRING_UNPSPACE, "neparticiranom prostoru"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/hu-HU.h b/base/setup/usetup/lang/hu-HU.h index 84a5335e7d5..cb913f4b792 100644 --- a/base/setup/usetup/lang/hu-HU.h +++ b/base/setup/usetup/lang/hu-HU.h @@ -2125,16 +2125,18 @@ MUI_STRING huHUStrings[] = " D = Part\241ci\242 t\224rl\202se F3 = Kil\202p\202s"}, {STRING_PARTITIONSIZE, "Az \243j part\241ci\242 m\202rete:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Egy els\213dleges part\241ci\242 l\202trehoz\240s\240t v\240lasztotta itt:"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Egy kiterjesztett part\241ci\242 l\202trehoz\240s\240t v\240lasztotta itt:"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Egy logikai part\241ci\242 l\202trehoz\240s\240t v\240lasztotta itt:"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "K\202rem \241rja be az \243j part\241ci\242 m\202ret\202t megab\240jtban."}, {STRING_CREATEPARTITION, " ENTER = Part\241ci\242 l\202trehoz\240sa ESC = M\202gse F3 = Kil\202p\202s"}, + {STRING_NEWPARTITION, + "A telep\241t\213 egy \243j part\241ci\242t hozott l\202tre itt:"}, {STRING_PARTFORMAT, "K\224vetkez\213 l\202p\202sk\202nt ez a part\241ci\242 form\240zva lesz."}, {STRING_NONFORMATTEDPART, @@ -2185,7 +2187,7 @@ MUI_STRING huHUStrings[] = "Ennek leggyakoribb oka az USB-s billenty\373zet haszn\240lata\r\n"}, {STRING_CONSOLEFAIL3, "Az USB-s billenty\373zetek m\202g nincsenek teljesen t\240mogatva\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "A telep\241t\213 form\240zza a merevlemezt"}, {STRING_CHECKINGDISK, "A telep\241t\213 ellen\213rzi a merevlemezt"}, @@ -2195,20 +2197,18 @@ MUI_STRING huHUStrings[] = " Part\241ci\242 form\240z\240sa %S f\240jlrendszerrel "}, {STRING_KEEPFORMAT, " Jelenlegi f\240jlrendszer megtart\240sa (nincs v\240ltoztat\240s) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "itt: %s."}, {STRING_PARTTYPE, "T\241pus 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "%lu. merevlemez (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s %lu. merevlemez (Port=%hu, Bus=%hu, Id=%hu) itt: %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "%lu. merevlemez (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s %lu. merevlemez (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "A telep\241t\213 egy \243j part\241ci\242t hozott l\202tre itt:"}, {STRING_UNPSPACE, "Nem particion\240lt ter\201let"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/id-ID.h b/base/setup/usetup/lang/id-ID.h index 676284f7f67..1bd19e8a23e 100644 --- a/base/setup/usetup/lang/id-ID.h +++ b/base/setup/usetup/lang/id-ID.h @@ -2234,16 +2234,18 @@ MUI_STRING idIDStrings[] = " D = Hapus Partisi F3 = Keluar"}, {STRING_PARTITIONSIZE, "Ukuran partisi baru:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Anda telah memilih untuk membuat partisi primary pada"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Anda telah memilih untuk membuat partisi extended pada"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Anda telah memilih untuk membuat partisi logical pada"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Mohon masukkan ukuran pada partisi baru dalam bentuk megabyte."}, {STRING_CREATEPARTITION, " ENTER = Buat Partisi ESC = Batal F3 = Keluar"}, + {STRING_NEWPARTITION, + "Penyetelan membuat partisi baru pada"}, {STRING_PARTFORMAT, "Partisi ini selanjutnya akan diformat."}, {STRING_NONFORMATTEDPART, @@ -2294,7 +2296,7 @@ MUI_STRING idIDStrings[] = "Secara umum penyebab dari ini adalah menggunakan papan ketik USB\r\n"}, {STRING_CONSOLEFAIL3, "Papan ketik USB belum didukung sepenuhnya\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Penyetelan sedang memformat cakram anda"}, {STRING_CHECKINGDISK, "Penyetelan sedang memeriksa cakram anda"}, @@ -2304,20 +2306,18 @@ MUI_STRING idIDStrings[] = " Format partisi sebagai sistem berkas %S "}, {STRING_KEEPFORMAT, " Tetapkan sistem berkas seperti ini (tanpa perubahan) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "pada %s."}, {STRING_PARTTYPE, "Jenis 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) pada %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Penyetelan membuat partisi baru pada"}, {STRING_UNPSPACE, "Ukuran yang belum dipartisi"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/it-IT.h b/base/setup/usetup/lang/it-IT.h index 8561f381f08..de6aa5c6533 100644 --- a/base/setup/usetup/lang/it-IT.h +++ b/base/setup/usetup/lang/it-IT.h @@ -2240,16 +2240,18 @@ MUI_STRING itITStrings[] = " D = Elimina Partizione F3 = Esci"}, {STRING_PARTITIONSIZE, "Dimensione nuova partizione:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Si \x8A scelto di creare una nuova partizione primaria su"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Si \x8A scelto di creare una nuova partizione estesa su"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Si \x8A scelto di creare una nuova partizione logica su"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Indicare la dimensione della nuova partizione in megabyte."}, {STRING_CREATEPARTITION, " INVIO = Creare la partizione ESC = Annulla F3 = Esci"}, + {STRING_NEWPARTITION, + "Setup ha creato una nuova partizione su"}, {STRING_PARTFORMAT, "Questa partizione sar\x85 formattata successivamente."}, {STRING_NONFORMATTEDPART, @@ -2300,7 +2302,7 @@ MUI_STRING itITStrings[] = "La causa pi\x97 frequente di questo \x8A l'uso di una tastiera USB\r\n"}, {STRING_CONSOLEFAIL3, "le tastiere USB non sono ancora completamente supportate\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Setup sta formattando il disco"}, {STRING_CHECKINGDISK, "Setup sta controllando il disco"}, @@ -2310,20 +2312,18 @@ MUI_STRING itITStrings[] = " Formatta la partizione con file system %S "}, {STRING_KEEPFORMAT, " Mantieni il file system attuale (nessuna modifica) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "su %s."}, {STRING_PARTTYPE, "Tipo 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) su %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Setup ha creato una nuova partizione su"}, {STRING_UNPSPACE, "Spazio non partizionato"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/ja-JP.h b/base/setup/usetup/lang/ja-JP.h index 86ba2f45f9b..7c07986a819 100644 --- a/base/setup/usetup/lang/ja-JP.h +++ b/base/setup/usetup/lang/ja-JP.h @@ -2238,17 +2238,19 @@ MUI_STRING jaJPStrings[] = " D = \312\337\260\303\250\274\256\335 \273\270\274\336\256 F3 = \301\255\263\274"}, {STRING_PARTITIONSIZE, "\261\300\327\274\262 \312\337\260\303\250\274\256\335\311 \273\262\275\336:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "\314\337\327\262\317\330\260 \312\337\260\303\250\274\256\335 \311 \273\270\276\262 \246 \264\327\313\336 \317\274\300"}, // "±À×¼² Ê߰輮ݦ ·ÞÆ »¸¾²½Ù ºÄ¶Þ ¾ÝÀ¸ »ÚϼÀ:"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "\266\270\301\256\263 \312\337\260\303\250\274\256\335 \311 \273\270\276\262 \246 \264\327\313\336 \317\274\300"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "\333\335\330 \312\337\260\303\250\274\256\335 \311 \273\270\276\262 \246 \264\327\313\336 \317\274\300"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "\261\300\327\274\262 \312\337\260\303\250\274\256\335\311 \273\262\275\336\246 \322\266\336\312\336\262\304 \300\335\262\303\336 \306\255\263\330\256\270 \274\303\270\300\336\273\262\241"}, {STRING_CREATEPARTITION, " ENTER = \312\337\260\303\250\274\256\335 \273\270\276\262 ESC = \267\254\335\276\331 F3 = \301\255\263\274"}, + {STRING_NEWPARTITION, + "\276\257\304\261\257\314\337\312 \261\300\327\274\262 \312\337\260\303\250\274\256\335\246 \302\267\336\306 \273\270\276\262\274\317\274\300:"}, {STRING_PARTFORMAT, "\272\311 \312\337\260\303\250\274\256\335\312 \302\267\336\311 \303\274\336\255\335\303\336 \314\253\260\317\257\304 \273\332\317\275\241"}, {STRING_NONFORMATTEDPART, @@ -2299,7 +2301,7 @@ MUI_STRING jaJPStrings[] = "\262\257\312\337\335\303\267\305 \271\336\335\262\335 \304\274\303 USB \267\260\316\336\260\304\336 \246 \302\266\257\303 \262\331\272\304\266\336 \266\335\266\336\264\327\332 \317\275\r\n"}, {STRING_CONSOLEFAIL3, "USB \267\260\316\336\260\304\336 \312 \317\300\336 \266\335\276\336\335\306 \273\316\337\260\304 \273\332\303 \262\317\276\335\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "\276\257\304\261\257\314\337\312 \303\336\250\275\270\246 \314\253\260\317\257\304 \274\303\262\317\275"}, {STRING_CHECKINGDISK, "\276\257\304\261\257\314\337\312 \303\336\250\275\270\246 \271\335\273 \274\303\262\317\275\241"}, @@ -2309,20 +2311,18 @@ MUI_STRING jaJPStrings[] = " \312\337\260\303\250\274\256\335\246 %S \314\247\262\331 \274\275\303\321 \303\336\314\253\260\317\257\304 "}, {STRING_KEEPFORMAT, " \271\336\335\273\336\262\311 \314\247\262\331 \274\275\303\321\311 \317\317 (\315\335\272\263 \274\305\262) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "on %s."}, {STRING_PARTTYPE, "\274\255\331\262 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "\312\260\304\336\303\336\250\275\270 %lu (%I64u %s), \316\337\260\304=%hu, \312\336\275=%hu, Id=%hu (%wZ) [%s]" "%I64u %s \312\260\304\336\303\336\250\275\270 %lu (\316\337\260\304=%hu, \312\336\275=%hu, Id=%hu) on %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "\312\260\304\336\303\336\250\275\270 %lu (%I64u %s), \316\337\260\304=%hu, \312\336\275=%hu, Id=%hu [%s]" "%I64u %s \312\260\304\336\303\336\250\275\270 %lu (\316\337\260\304=%hu, \312\336\275=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "\276\257\304\261\257\314\337\312 \261\300\327\274\262 \312\337\260\303\250\274\256\335\246 \302\267\336\306 \273\270\276\262\274\317\274\300:"}, {STRING_UNPSPACE, "\320\314\336\335\266\302\311 \275\315\337\260\275"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/lt-LT.h b/base/setup/usetup/lang/lt-LT.h index 5e98513d4b8..345c60d450c 100644 --- a/base/setup/usetup/lang/lt-LT.h +++ b/base/setup/usetup/lang/lt-LT.h @@ -2238,16 +2238,18 @@ MUI_STRING ltLTStrings[] = " D = Delete Partition F3 = Quit"}, {STRING_PARTITIONSIZE, "Size of new partition:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "You have chosen to create a primary partition on"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "You have chosen to create an extended partition on"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "You have chosen to create a logical partition on"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Please enter the size of the new partition in megabytes."}, {STRING_CREATEPARTITION, " ENTER = Create Partition ESC = Cancel F3 = Quit"}, + {STRING_NEWPARTITION, + "Setup created a new partition on"}, {STRING_PARTFORMAT, "This Partition will be formatted next."}, {STRING_NONFORMATTEDPART, @@ -2298,7 +2300,7 @@ MUI_STRING ltLTStrings[] = "The most common cause of this is using an USB keyboard\r\n"}, {STRING_CONSOLEFAIL3, "USB keyboards are not fully supported yet\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Setup is formatting your disk"}, {STRING_CHECKINGDISK, "Setup is checking your disk"}, @@ -2308,20 +2310,18 @@ MUI_STRING ltLTStrings[] = " Format partition as %S file system "}, {STRING_KEEPFORMAT, " Keep current file system (no changes) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "on %s."}, {STRING_PARTTYPE, "Type 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Setup created a new partition on"}, {STRING_UNPSPACE, "Unpartitioned space"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/ms-MY.h b/base/setup/usetup/lang/ms-MY.h index 50b6aba84f5..0384a3fc4ef 100644 --- a/base/setup/usetup/lang/ms-MY.h +++ b/base/setup/usetup/lang/ms-MY.h @@ -2219,16 +2219,18 @@ MUI_STRING msMYStrings[] = " D = Menghapuskan Partition F3 = Keluar"}, {STRING_PARTITIONSIZE, "Saiz partition yang baru:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Anda telah memilih untuk mencipta partition yang utama padanya"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Anda telah memilih untuk mencipta partition yang lanjut padanya"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Anda telah memilih untuk mencipta partition yang logik padanya"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Sila masukkan saiz partition yang baru dalam megabait."}, {STRING_CREATEPARTITION, " ENTER = Mencipta Partition ESC = Batalkan F3 = Keluar"}, + {STRING_NEWPARTITION, + "Persediaan yang dicipta partition yang baru di"}, {STRING_PARTFORMAT, "Partition ini akan diformat seterusnya."}, {STRING_NONFORMATTEDPART, @@ -2279,7 +2281,7 @@ MUI_STRING msMYStrings[] = "Punca paling biasa ini menggunakan papan kekunci yang USB\r\n"}, {STRING_CONSOLEFAIL3, "Papan kekunci USB tidak disokong sepenuhnya lagi\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Persediaan sedang format cakera"}, {STRING_CHECKINGDISK, "Persediaan sedang menyemak cakera"}, @@ -2289,20 +2291,18 @@ MUI_STRING msMYStrings[] = " Format partition seperti sistem fail %S "}, {STRING_KEEPFORMAT, " Memastikan sistem fail semasa (tiada perubahan) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "on %s."}, {STRING_PARTTYPE, "Type 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Persediaan yang dicipta partition yang baru di"}, {STRING_UNPSPACE, "Ruang unpartitioned"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/nl-NL.h b/base/setup/usetup/lang/nl-NL.h index b007421627b..c2f994ac24b 100644 --- a/base/setup/usetup/lang/nl-NL.h +++ b/base/setup/usetup/lang/nl-NL.h @@ -2260,17 +2260,19 @@ MUI_STRING nlNLStrings[] = " D = Delete Partition F3 = Quit"}, {STRING_PARTITIONSIZE, "Grootte nieuwe partitie:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "You have chosen to create a primary partition on"}, // "U wilt een nieuwe partitie aanmaken op"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "You have chosen to create an extended partition on"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "You have chosen to create a logical partition on"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Voert u de grootte van de nieuwe partitie in in megabytes."}, {STRING_CREATEPARTITION, " ENTER = Partitie Aanmaken ESC = Annuleren F3 = Afsluiten"}, + {STRING_NEWPARTITION, + "Setup heeft een nieuwe partitie aangemaakt op"}, {STRING_PARTFORMAT, "Deze partitie zal vervolgens geformatteerd worden."}, {STRING_NONFORMATTEDPART, @@ -2321,7 +2323,7 @@ MUI_STRING nlNLStrings[] = "De meest voorkomende oorzaak is het gebruik van een USB toetsenbord.\r\n"}, {STRING_CONSOLEFAIL3, "USB toetsenborden worden nog niet volledig ondersteund.\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Setup is de vaste schijf aan het formatteren."}, {STRING_CHECKINGDISK, "Setup is de vaste schijf aan het controleren."}, @@ -2331,20 +2333,18 @@ MUI_STRING nlNLStrings[] = " Formatteer partitie als %S bestandssysteem "}, {STRING_KEEPFORMAT, " Behoud huidig bestandssysteem (geen wijzigingen) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "op %s."}, {STRING_PARTTYPE, "Type 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Schijf %lu (%I64u %s), Poort=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Schijf %lu (Poort=%hu, Bus=%hu, Id=%hu) op %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Schijf %lu (%I64u %s), Poort=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Schijf %lu (Poort=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Setup heeft een nieuwe partitie aangemaakt op"}, {STRING_UNPSPACE, "Niet gepartitioneerde ruimte"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/pl-PL.h b/base/setup/usetup/lang/pl-PL.h index 2c1407ec554..2c616e1bc59 100644 --- a/base/setup/usetup/lang/pl-PL.h +++ b/base/setup/usetup/lang/pl-PL.h @@ -2246,16 +2246,18 @@ MUI_STRING plPLStrings[] = " D = Usuni\251cie partycji F3 = Wyj\230cie"}, {STRING_PARTITIONSIZE, "Rozmiar nowej partycji:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Wybrane: utworzenie nowej partycji podstawowej na"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Wybrane: utworzenie nowej partycji rozszerzonej na"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Wybrane: utworzenie nowej partycji logicznej na"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Prosz\251 wprowadzi\206 rozmiar nowej partycji w megabajtach."}, {STRING_CREATEPARTITION, " ENTER = Utworzenie partycji ESC = Anulowanie F3 = Wyj\230cie"}, + {STRING_NEWPARTITION, + "Instalator utworzy\210 now\245 partycj\251"}, {STRING_PARTFORMAT, "Nast\251puj\245ca partycja zostanie sformatowana."}, {STRING_NONFORMATTEDPART, @@ -2306,7 +2308,7 @@ MUI_STRING plPLStrings[] = "Najcz\251stsz\245 tego przyczyn\245 jest u\276ycie klawiatury USB.\r\n"}, {STRING_CONSOLEFAIL3, "Nie s\245 obecnie w pe\210ni obs\210ugiwane.\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Instalator formatuje tw\242j dysk"}, {STRING_CHECKINGDISK, "Instalator sprawdza tw\242j dysk"}, @@ -2316,20 +2318,18 @@ MUI_STRING plPLStrings[] = " Formatuj partycj\251 w systemie plik\242w %S "}, {STRING_KEEPFORMAT, " Zachowaj obecny system plik\242w (bez zmian) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "na: %s."}, {STRING_PARTTYPE, "Typ 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Dysk twardy %lu (%I64u %s), Port=%hu, Szyna=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Dysk twardy %lu (Port=%hu, Szyna=%hu, Id=%hu) na %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Dysk twardy %lu (%I64u %s), Port=%hu, Szyna=%hu, Id=%hu [%s]" "%I64u %s Dysk twardy %lu (Port=%hu, Szyna=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Instalator utworzy\210 now\245 partycj\251"}, {STRING_UNPSPACE, "Miejsce poza partycjami"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/pt-BR.h b/base/setup/usetup/lang/pt-BR.h index b4d5b5a448b..bc897c1d224 100644 --- a/base/setup/usetup/lang/pt-BR.h +++ b/base/setup/usetup/lang/pt-BR.h @@ -2273,17 +2273,19 @@ MUI_STRING ptBRStrings[] = " D = Delete Partition F3 = Quit"}, {STRING_PARTITIONSIZE, "Tamanho da nova parti\207\306o:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "You have chosen to create a primary partition on"}, // "Vocˆ solicitou a cria‡Æo de uma nova parti‡Æo em"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "You have chosen to create an extended partition on"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "You have chosen to create a logical partition on"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Por favor, insira o tamanho da nova parti\207\306o em megabytes (MB)."}, {STRING_CREATEPARTITION, " ENTER=Criar parti\207\306o ESC=Cancelar F3=Sair"}, + {STRING_NEWPARTITION, + "O instalador criou uma nova parti\207\306o em"}, {STRING_PARTFORMAT, "Esta parti\207\306o ser\240 formatada logo em seguida."}, {STRING_NONFORMATTEDPART, @@ -2334,7 +2336,7 @@ MUI_STRING ptBRStrings[] = "A causa mais com\243m \202 a utiliza\207\306o de um teclado USB\r\n"}, {STRING_CONSOLEFAIL3, "Os teclados USB ainda n\306o s\306o completamente suportados\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "O instalador est\240 formatando o disco"}, {STRING_CHECKINGDISK, "O instalador est\240 verificando o disco"}, @@ -2344,20 +2346,18 @@ MUI_STRING ptBRStrings[] = " Formatar a parti\207\306o utilizando o sistema de arquivos %S "}, {STRING_KEEPFORMAT, " Manter o sistema de arquivos atual (sem altera\207\344es) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "em %s."}, {STRING_PARTTYPE, "Tipo 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Disco %lu (%I64u %s), Porta=%hu, Barramento=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu) em %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Disco %lu (%I64u %s), Porta=%hu, Barramento=%hu, Id=%hu [%s]" "%I64u %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "O instalador criou uma nova parti\207\306o em"}, {STRING_UNPSPACE, "Espa\207o n\306o particionado"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/pt-PT.h b/base/setup/usetup/lang/pt-PT.h index 41cbb66cd13..f383dbfae68 100644 --- a/base/setup/usetup/lang/pt-PT.h +++ b/base/setup/usetup/lang/pt-PT.h @@ -2272,17 +2272,19 @@ MUI_STRING ptPTStrings[] = " D = Apagar Parti\207\306o F3 = Sair"}, {STRING_PARTITIONSIZE, "Tamanho da nova parti\207\306o:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "Seleccionou criar uma parti\207\306o prim\240ria"}, // "Voc\210 solicitou a cria\207\306o de uma nova parti\207\306o em"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "Seleccionou criar uma parti\207\306o estendida"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "Seleccionou criar uma parti\207\306o l\242gica"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Por favor, insira o tamanho da nova parti\207\306o em megabytes (MB)."}, {STRING_CREATEPARTITION, " ENTER=Criar parti\207\306o ESC=Cancelar F3=Sair"}, + {STRING_NEWPARTITION, + "O instalador criou uma nova parti\207\306o em"}, {STRING_PARTFORMAT, "Esta parti\207\306o ser\240 formatada logo em seguida."}, {STRING_NONFORMATTEDPART, @@ -2333,7 +2335,7 @@ MUI_STRING ptPTStrings[] = "A causa mais com\243m \202 a utiliza\207\306o de um teclado USB\r\n"}, {STRING_CONSOLEFAIL3, "Os teclados USB ainda n\306o s\306o completamente suportados\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "O instalador est\240 a formatar o disco"}, {STRING_CHECKINGDISK, "O instalador est\240 a verificar o disco"}, @@ -2343,20 +2345,18 @@ MUI_STRING ptPTStrings[] = " Formatar a parti\207\306o utilizando o sistema de arquivos %S "}, {STRING_KEEPFORMAT, " Manter o sistema de arquivos actual (sem altera\207\344es) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "em %s."}, {STRING_PARTTYPE, "Tipo 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Disco %lu (%I64u %s), Porta=%hu, Barramento=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu) em %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Disco %lu (%I64u %s), Porta=%hu, Barramento=%hu, Id=%hu [%s]" "%I64u %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "O instalador criou uma nova parti\207\306o em"}, {STRING_UNPSPACE, "Espa\207o n\306o particionado"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/ro-RO.h b/base/setup/usetup/lang/ro-RO.h index 1a543ea2325..7cabee005a3 100644 --- a/base/setup/usetup/lang/ro-RO.h +++ b/base/setup/usetup/lang/ro-RO.h @@ -2288,16 +2288,18 @@ MUI_STRING roROStrings[] = " D = \252tergere parti\376ie F3 = Ie\272ire"}, {STRING_PARTITIONSIZE, "M\343rimea noii parti\376ii:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "A\376i ales crearea unei parti\376ii primare pe"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "A\376i ales crearea unei parti\376ii extinse pe"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "A\376i ales crearea unei parti\376ii logice pe"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Introduce\376i m\343rimea noii parti\376ii \356n megaocte\376i."}, {STRING_CREATEPARTITION, " ENTER = Creare parti\376ie ESC = Anulare F3 = Ie\272ire"}, + {STRING_NEWPARTITION, + "O nou\343 parti\376ie a fost creat\343 \356n"}, {STRING_PARTFORMAT, "Aceast\343 parti\376ie urmeaz\343 s\343 fie formatat\343."}, {STRING_NONFORMATTEDPART, @@ -2348,7 +2350,7 @@ MUI_STRING roROStrings[] = "Cea mai frecvent\343 cauz\343 pentru asta este utilizarea unei tastaturi USB\r\n"}, {STRING_CONSOLEFAIL3, "Tastaturile USB nu sunt \356nc\343 toate acceptate\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Disc \356n curs de formatare..."}, {STRING_CHECKINGDISK, "Disc \356n curs de verificare..."}, @@ -2358,20 +2360,18 @@ MUI_STRING roROStrings[] = " Formateaz\343 parti\376ia ca sistem de fi\272iere %S "}, {STRING_KEEPFORMAT, " P\343streaz\343 sistemul de fi\272iere actual (f\343r\343 schimb\343ri) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "de pe %s."}, {STRING_PARTTYPE, "Tip 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Discul %lu (%I64u %s), Port=%hu, Magistrala=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Discul %lu (Port=%hu, Magistrala=%hu, Id=%hu) de tip %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Discul %lu (%I64u %s), Port=%hu, Magistrala=%hu, Id=%hu [%s]" "%I64u %s Discul %lu (Port=%hu, Magistrala=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "O nou\343 parti\376ie a fost creat\343 \356n"}, {STRING_UNPSPACE, "Spa\376iu neparti\376ionat"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/ru-RU.h b/base/setup/usetup/lang/ru-RU.h index a39c99c22f6..683b130eb15 100644 --- a/base/setup/usetup/lang/ru-RU.h +++ b/base/setup/usetup/lang/ru-RU.h @@ -2257,16 +2257,18 @@ MUI_STRING ruRUStrings[] = " D = \223\244\240\253\250\342\354 \340\240\247\244\245\253 F3 = \202\353\345\256\244"}, {STRING_PARTITIONSIZE, "\220\240\247\254\245\340 \255\256\242\256\243\256 \340\240\247\244\245\253\240:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "\202\353 \345\256\342\250\342\245 \341\256\247\244\240\342\354 \257\245\340\242\250\347\255\353\251 \340\240\247\244\245\253 \255\240"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "\202\353 \345\256\342\250\342\245 \341\256\247\244\240\342\354 \340\240\341\350\250\340\245\255\255\353\251 \340\240\247\244\245\253 \255\240"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "\202\353 \345\256\342\250\342\245 \341\256\247\244\240\342\354 \253\256\243\250\347\245\341\252\250\251 \340\240\247\244\245\253 \255\240"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "\217\256\246\240\253\343\251\341\342\240, \242\242\245\244\250\342\245 \340\240\247\254\245\340 \255\256\242\256\243\256 \340\240\247\244\245\253\240 \242 \254\245\243\240\241\240\251\342\240\345."}, {STRING_CREATEPARTITION, " ENTER = \221\256\247\244\240\342\354 \340\240\247\244\245\253 ESC = \216\342\254\245\255\240 F3 = \202\353\345\256\244"}, + {STRING_NEWPARTITION, + "\217\340\256\243\340\240\254\254\240 \343\341\342\240\255\256\242\252\250 \341\256\247\244\240\253\240 \255\256\242\353\251 \340\240\247\244\245\253 \255\240:"}, {STRING_PARTFORMAT, "\235\342\256\342 \340\240\247\244\245\253 \241\343\244\245\342 \256\342\344\256\340\254\240\342\250\340\256\242\240\255 \244\240\253\245\245."}, {STRING_NONFORMATTEDPART, @@ -2317,7 +2319,7 @@ MUI_STRING ruRUStrings[] = "\215\240\250\241\256\253\245\245 \242\245\340\256\357\342\255\240\357 \257\340\250\347\250\255\240 \355\342\256\243\256 - \250\341\257\256\253\354\247\256\242\240\255\250\245 USB-\252\253\240\242\250\240\342\343\340\353\r\n"}, {STRING_CONSOLEFAIL3, "USB \252\253\240\242\250\240\342\343\340\353 \341\245\251\347\240\341 \257\256\244\244\245\340\246\250\242\240\356\342\341\357 \255\245 \257\256\253\255\256\341\342\354\356\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "\217\340\256\243\340\240\254\254\240 \343\341\342\240\255\256\242\252\250 \344\256\340\254\240\342\250\340\343\245\342 \242\240\350 \244\250\341\252"}, {STRING_CHECKINGDISK, "\217\340\256\243\340\240\254\254\240 \343\341\342\240\255\256\242\252\250 \257\340\256\242\245\340\357\245\342 \242\240\350 \244\250\341\252"}, @@ -2327,20 +2329,18 @@ MUI_STRING ruRUStrings[] = " \224\256\340\254\240\342\250\340\256\242\240\255\250\245 \340\240\247\244\245\253\240 \242 \344\240\251\253\256\242\256\251 \341\250\341\342\245\254\245 %S "}, {STRING_KEEPFORMAT, " \216\341\342\240\242\250\342\354 \341\343\351\245\341\342\242\343\356\351\343\356 \344\240\251\253\256\242\343\356 \341\250\341\342\245\254\343 (\241\245\247 \250\247\254\245\255\245\255\250\251) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "\255\240: %s."}, {STRING_PARTTYPE, "\207\240\257\250\341\354 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "\206\245\341\342\252\250\251 \244\250\341\252 %lu (%I64u %s), \217\256\340\342=%hu, \230\250\255\240=%hu, Id=%hu (%wZ) [%s]" "%I64u %s \206\245\341\342\252\250\251 \244\250\341\252 %lu (\217\256\340\342=%hu, \230\250\255\240=%hu, Id=%hu) \255\240 %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "\206\245\341\342\252\250\251 \244\250\341\252 %lu (%I64u %s), \217\256\340\342=%hu, \230\250\255\240=%hu, Id=%hu [%s]" "%I64u %s \206\245\341\342\252\250\251 \244\250\341\252 %lu (\217\256\340\342=%hu, \230\250\255\240=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "\217\340\256\243\340\240\254\254\240 \343\341\342\240\255\256\242\252\250 \341\256\247\244\240\253\240 \255\256\242\353\251 \340\240\247\244\245\253 \255\240:"}, {STRING_UNPSPACE, "\215\245\340\240\247\254\245\347\245\255\255\256\245 \257\340\256\341\342\340\240\255\341\342\242\256"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/sk-SK.h b/base/setup/usetup/lang/sk-SK.h index b8af569276d..37c06321f56 100644 --- a/base/setup/usetup/lang/sk-SK.h +++ b/base/setup/usetup/lang/sk-SK.h @@ -2247,17 +2247,19 @@ MUI_STRING skSKStrings[] = " D = Delete Partition F3 = Quit"}, {STRING_PARTITIONSIZE, "Ve\226kos\234 novej oblasti:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "You have chosen to create a primary partition on"}, // "Zvolili ste vytvorenie novej oblasti na"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "You have chosen to create an extended partition on"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "You have chosen to create a logical partition on"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Zadajte, pros\241m, ve\226kos\234 novej oblasti v megabajtoch."}, {STRING_CREATEPARTITION, " ENTER = Vytvori\234 oblas\234 ESC = Zru\347i\234 F3 = Skon\237i\234"}, + {STRING_NEWPARTITION, + "In\347tal\240tor vytvoril nov\243 oblas\234 na"}, {STRING_PARTFORMAT, "T\240to oblas\234 sa bude form\240tova\234 ako \324al\347ia."}, {STRING_NONFORMATTEDPART, @@ -2308,7 +2310,7 @@ MUI_STRING skSKStrings[] = "Najbe\247nej\347ou pr\241\237inou tohto je pou\247itie USB kl\240vesnice\r\n"}, {STRING_CONSOLEFAIL3, "USB kl\240vesnica e\347te nie je plne podporovan\240\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "In\347tal\240tor form\240tuje V\240\347 disk"}, {STRING_CHECKINGDISK, "In\347tal\240tor kontroluje V\240\347 disk"}, @@ -2318,20 +2320,18 @@ MUI_STRING skSKStrings[] = " Naform\240tova\234 oblas\234 ako syst\202m s\243borov %S "}, {STRING_KEEPFORMAT, " Ponecha\234 s\243\237asn\354 syst\202m s\243borov (bez zmeny) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "na: %s."}, {STRING_PARTTYPE, "Typ 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "pevn\354 disk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s pevn\354 disk %lu (Port=%hu, Bus=%hu, Id=%hu) na %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "pevn\354 disk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s pevn\354 disk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "In\347tal\240tor vytvoril nov\243 oblas\234 na"}, {STRING_UNPSPACE, "Miesto bez oblast\241"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/sq-AL.h b/base/setup/usetup/lang/sq-AL.h index 6322664d6a7..f5849cade32 100644 --- a/base/setup/usetup/lang/sq-AL.h +++ b/base/setup/usetup/lang/sq-AL.h @@ -2248,17 +2248,19 @@ MUI_STRING sqALStrings[] = " D = Delete Partition F3 = Quit"}, {STRING_PARTITIONSIZE, "Madh\211sia e particionit t\211 ri:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, // "You have chosen to create a primary partition on"}, "Ju keni zgjedhur p\211r t\211 krijuar nj\211 ndarje t\211 re n\211"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "You have chosen to create an extended partition on"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "You have chosen to create a logical partition on"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "Ju lutem, jepini madh\211sin\211 e particionit t\211 ri n\211 megabajt."}, {STRING_CREATEPARTITION, " ENTER = Krijo Particion ESC = Anulo F3 = Dil"}, + {STRING_NEWPARTITION, + "Instalimi krijoj nj\211 particion t\211 ri n\211"}, {STRING_PARTFORMAT, "Ky particion do t\211 formatohet tani."}, {STRING_NONFORMATTEDPART, @@ -2309,7 +2311,7 @@ MUI_STRING sqALStrings[] = "Shkaku m\211 i zakonsh\211m i k\211saj \211sht\211 arsyea e perdorimit t\211 nj\211 tastiere USB\r\n"}, {STRING_CONSOLEFAIL3, "Tastierat USB nuk jan\211 t\211 mb\211shtetura ende plot\211sisht\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Instalimi po formaton diskun tuaj"}, {STRING_CHECKINGDISK, "Instalimi \211sht\211 duke kontrolluar diskun tuaj"}, @@ -2319,20 +2321,18 @@ MUI_STRING sqALStrings[] = " Formato particionin si %S dokumentat e sistemit"}, {STRING_KEEPFORMAT, " Mbaj dokumentat e sistemit siq jan\211 (pa ndryshime) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "on %s."}, {STRING_PARTTYPE, "Tipi 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Harddisku %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s Harddisku %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Harddisku %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s Harddisku %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Instalimi krijoj nj\211 particion t\211 ri n\211"}, {STRING_UNPSPACE, "Hap\211sire e papjesesezuar"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/sv-SE.h b/base/setup/usetup/lang/sv-SE.h index f070d312bd9..95664b2d55a 100644 --- a/base/setup/usetup/lang/sv-SE.h +++ b/base/setup/usetup/lang/sv-SE.h @@ -2237,17 +2237,19 @@ MUI_STRING svSEStrings[] = " D = Delete Partition F3 = Quit"}, {STRING_PARTITIONSIZE, "Storlek p\206 den nya partitionen:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "You have chosen to create a primary partition on"}, // "Du har valt att skapa en ny partition p†"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "You have chosen to create an extended partition on"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "You have chosen to create a logical partition on"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "V\204nligen skriv in storleken av den nya partitionen i megabytes."}, {STRING_CREATEPARTITION, " ENTER = Skapa Partition ESC = Avbryt F3 = Avsluta"}, + {STRING_NEWPARTITION, + "Setup skapade en ny partition p\206"}, {STRING_PARTFORMAT, "Denna Partition kommer att bli formaterad h\204rn\204st."}, {STRING_NONFORMATTEDPART, @@ -2298,7 +2300,7 @@ MUI_STRING svSEStrings[] = "Den vanligaste orsaken till detta \204r att ett USB tangentbord anv\204nds\r\n"}, {STRING_CONSOLEFAIL3, "USB tangentbord \204r itne helt st\224tt \204n\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Setup formaterar din disk"}, {STRING_CHECKINGDISK, "Setup under\224ker din disk"}, @@ -2308,20 +2310,18 @@ MUI_STRING svSEStrings[] = " Formaterar partition som %S filsystem "}, {STRING_KEEPFORMAT, " Beh\206ll nuvarande filsystem (inga f\224r\204ndringar) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "p\206 %s."}, {STRING_PARTTYPE, "Typ 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "H\206rddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ) [%s]" "%I64u %s H\206rddisk %lu (Port=%hu, Bus=%hu, Id=%hu) p\206 %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "H\206rddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu [%s]" "%I64u %s H\206rddisk %lu (Port=%hu, Bus=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Setup skapade en ny partition p\206"}, {STRING_UNPSPACE, "Opartitionerat utrymme"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/tr-TR.h b/base/setup/usetup/lang/tr-TR.h index 3b4a571c66c..59210fc1a56 100644 --- a/base/setup/usetup/lang/tr-TR.h +++ b/base/setup/usetup/lang/tr-TR.h @@ -2211,16 +2211,18 @@ MUI_STRING trTRStrings[] = " D = B\224l\201m\201 Sil F3 = \200\215k"}, {STRING_PARTITIONSIZE, "Yeni b\224l\201m\201n b\201y\201kl\201\247\201:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "\232zerinde bir ana b\224l\201m olu\237turmay\215 se\207tiniz:"}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "\232zerinde bir geni\237letilmi\237 b\224l\201m olu\237turmay\215 se\207tiniz:"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "\232zerinde bir mant\215ksal b\224l\201m olu\237turmay\215 se\207tiniz:"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "L\201tfen yeni b\224l\201m\201n b\201y\201kl\201\247\201n\201 megabayt olarak giriniz."}, {STRING_CREATEPARTITION, " ENTER = B\224l\201m Olu\237tur ESC = \230ptal F3 = \200\215k"}, + {STRING_NEWPARTITION, + "Kur, \201zerinde bir yeni b\224l\201m olu\237turdu:"}, {STRING_PARTFORMAT, "Bu b\224l\201m ileride bi\207imlendirilecektir."}, {STRING_NONFORMATTEDPART, @@ -2271,7 +2273,7 @@ MUI_STRING trTRStrings[] = "Bunun en bilinen nedeni, bir USB klavye kullan\215lmas\215d\215r.\r\n"}, {STRING_CONSOLEFAIL3, "USB klavye daha t\201m\201yle desteklenmemektedir.\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "Kur, diskinizi bi\207imlendiriyor."}, {STRING_CHECKINGDISK, "Kur, diskinizi g\224zden ge\207iriyor."}, @@ -2281,20 +2283,18 @@ MUI_STRING trTRStrings[] = " B\224l\201m\201 %S dosya sistemiyle bi\207imlendir. "}, {STRING_KEEPFORMAT, " \236imdiki dosya sistemini koru. (De\247i\237iklik yok.) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "\232zerinde: %s."}, {STRING_PARTTYPE, "T\201r 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "Sabit Disk %lu (%I64u %s), Giri\237=%hu, Veriyolu=%hu, Kimlik=%hu (%wZ) [%s]" "%I64u %s Disk %lu (Giri\237=%hu, VYolu=%hu, Kimlik=%hu), (%wZ) [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "Sabit Disk %lu (%I64u %s), Giri\237=%hu, Veriyolu=%hu, Kimlik=%hu [%s]" "%I64u %s Disk %lu (Giri\237=%hu, VYolu=%hu, Kimlik=%hu) [%s]"}, - {STRING_NEWPARTITION, - "Kur, \201zerinde bir yeni b\224l\201m olu\237turdu:"}, {STRING_UNPSPACE, "Kullan\215lmayan Alan"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/lang/uk-UA.h b/base/setup/usetup/lang/uk-UA.h index 2e7ecf94c5f..1d65687b697 100644 --- a/base/setup/usetup/lang/uk-UA.h +++ b/base/setup/usetup/lang/uk-UA.h @@ -2244,17 +2244,19 @@ MUI_STRING ukUAStrings[] = " D = \202\250\244\240\253\250\342\250 \340\256\247\244i\253 F3 = \202\250\251\342\250"}, {STRING_PARTITIONSIZE, "\220\256\247\254i\340 \255\256\242\256\243\256 \340\256\247\244i\253\343:"}, - {STRING_CHOOSENEWPARTITION, + {STRING_CHOOSE_NEW_PARTITION, "\202\250 \345\256\347\245\342\245 \341\342\242\256\340\250\342\250 \257\245\340\242\250\255\255\250\251 \340\256\247\244i\253 \255\240"}, // "‚¨ å®ç¥â¥ á⢮à¨â¨ ­®¢¨© ஧¤i« ­ "}, {STRING_CHOOSE_NEW_EXTENDED_PARTITION, "\202\250 \345\256\347\245\342\245 \341\342\242\256\340\250\342\250 \340\256\247\350\250\340\245\255\250\251 \340\256\247\244i\253 \255\240"}, {STRING_CHOOSE_NEW_LOGICAL_PARTITION, "\202\250 \345\256\347\245\342\245 \341\342\242\256\340\250\342\250 \253\256\243i\347\255\250\251 \340\256\247\244i\253 \255\240"}, - {STRING_HDDSIZE, + {STRING_HDPARTSIZE, "\201\343\244\354-\253\240\341\252\240, \242\242\245\244i\342\354 \340\256\247\254i\340 \255\256\242\256\243\256 \340\256\247\244i\253\343 \242 \254\245\243\240\241\240\251\342\240\345."}, {STRING_CREATEPARTITION, " ENTER = \221\342\242\256\340\250\342\250 \340\256\247\244i\253 ESC = \221\252\240\341\343\242\240\342\250 F3 = \202\250\251\342\250"}, + {STRING_NEWPARTITION, + "\202\341\342\240\255\256\242\253\356\242\240\347 \341\342\242\256\340\250\242 \255\256\242\250\251 \340\256\247\244i\253 \255\240"}, {STRING_PARTFORMAT, "\226\245\251 \340\256\247\244i\253 \241\343\244\245 \242i\244\344\256\340\254\240\342\256\242\240\255\256."}, {STRING_NONFORMATTEDPART, @@ -2305,7 +2307,7 @@ MUI_STRING ukUAStrings[] = "\215\240\251\241i\253\354\350 \251\254\256\242i\340\255\240 \257\340\250\347\250\255\240 \346\354\256\243\256 - \242\250\252\256\340\250\341\342\240\255\255\357 USB \252\253\240\242i\240\342\343\340\250\r\n"}, {STRING_CONSOLEFAIL3, "USB \252\253\240\242i\240\342\343\340\250 \351\245 \255\245 \257i\244\342\340\250\254\343\356\342\354\341\357 \257\256\242\255i\341\342\356\r\n"}, - {STRING_FORMATTINGDISK, + {STRING_FORMATTINGPART, "\202\341\342\240\255\256\242\253\356\242\240\347 \344\256\340\254\240\342\343\363 \242\240\350 \244\250\341\252"}, {STRING_CHECKINGDISK, "\202\341\342\240\255\256\242\253\356\242\240\347 \257\245\340\245\242i\340\357\363 \242\240\350 \244\250\341\252"}, @@ -2315,20 +2317,18 @@ MUI_STRING ukUAStrings[] = " \224\256\340\254\240\342\343\242\240\342\250 \340\256\247\244i\253 \242 \344\240\251\253\256\242i\251 \341\250\341\342\245\254i %S "}, {STRING_KEEPFORMAT, " \207\240\253\250\350\250\342\250 i\341\255\343\356\347\343 \344\240\251\253\256\242\343 \341\250\341\342\245\254\343 (\241\245\247 \247\254i\255) "}, - {STRING_HDINFOPARTCREATE_1, + {STRING_HDDISK1, "%s."}, - {STRING_HDINFOPARTDELETE_1, + {STRING_HDDISK2, "\255\240: %s."}, {STRING_PARTTYPE, "Type 0x%02x"}, - {STRING_HDDINFO_1, + {STRING_HDDINFO1, // "\206\256\340\341\342\252\250\251 \244\250\341\252 %lu (%I64u %s), \217\256\340\342=%hu, \230\250\255\240=%hu, Id=%hu (%wZ) [%s]" "%I64u %s \206\256\340\341\342\252\250\251 \244\250\341\252 %lu (\217\256\340\342=%hu, \230\250\255\240=%hu, Id=%hu) \255\240 %wZ [%s]"}, - {STRING_HDDINFO_2, + {STRING_HDDINFO2, // "\206\256\340\341\342\252\250\251 \244\250\341\252 %lu (%I64u %s), \217\256\340\342=%hu, \230\250\255\240=%hu, Id=%hu [%s]" "%I64u %s \206\256\340\341\342\252\250\251 \244\250\341\252 %lu (\217\256\340\342=%hu, \230\250\255\240=%hu, Id=%hu) [%s]"}, - {STRING_NEWPARTITION, - "\202\341\342\240\255\256\242\253\356\242\240\347 \341\342\242\256\340\250\242 \255\256\242\250\251 \340\256\247\244i\253 \255\240"}, {STRING_UNPSPACE, "\215\245\340\256\247\254i\347\245\255\240 \256\241\253\240\341\342\354"}, {STRING_MAXSIZE, diff --git a/base/setup/usetup/mui.h b/base/setup/usetup/mui.h index 224a679f34c..b2b2dc179a4 100644 --- a/base/setup/usetup/mui.h +++ b/base/setup/usetup/mui.h @@ -129,60 +129,60 @@ extern CHAR CharDoubleLowerRightCorner; #define TEXT_ID_FORMAT_PROMPT 1 /* MUI Strings */ -#define STRING_PLEASEWAIT 1 -#define STRING_INSTALLCREATEPARTITION 2 -#define STRING_INSTALLCREATELOGICAL 60 -#define STRING_INSTALLDELETEPARTITION 3 -#define STRING_DELETEPARTITION 59 -#define STRING_PARTITIONSIZE 4 -#define STRING_CHOOSENEWPARTITION 5 -#define STRING_CHOOSE_NEW_EXTENDED_PARTITION 57 -#define STRING_CHOOSE_NEW_LOGICAL_PARTITION 61 -#define STRING_HDDSIZE 6 -#define STRING_CREATEPARTITION 7 -#define STRING_PARTFORMAT 8 -#define STRING_NONFORMATTEDPART 9 -#define STRING_NONFORMATTEDSYSTEMPART 62 -#define STRING_NONFORMATTEDOTHERPART 63 -#define STRING_INSTALLONPART 10 -#define STRING_CONTINUE 12 -#define STRING_QUITCONTINUE 13 -#define STRING_REBOOTCOMPUTER 14 -#define STRING_DELETING 15 -#define STRING_MOVING 16 -#define STRING_RENAMING 17 -#define STRING_COPYING 18 -#define STRING_SETUPCOPYINGFILES 19 -#define STRING_REGHIVEUPDATE 20 -#define STRING_IMPORTFILE 21 -#define STRING_DISPLAYSETTINGSUPDATE 22 -#define STRING_LOCALESETTINGSUPDATE 23 -#define STRING_KEYBOARDSETTINGSUPDATE 24 -#define STRING_CODEPAGEINFOUPDATE 25 -#define STRING_DONE 26 -#define STRING_REBOOTCOMPUTER2 27 -#define STRING_CONSOLEFAIL1 28 -#define STRING_CONSOLEFAIL2 29 -#define STRING_CONSOLEFAIL3 30 -#define STRING_FORMATTINGDISK 31 -#define STRING_CHECKINGDISK 32 -#define STRING_FORMATDISK1 33 -#define STRING_FORMATDISK2 34 -#define STRING_KEEPFORMAT 35 -#define STRING_HDINFOPARTCREATE_1 36 -#define STRING_HDINFOPARTDELETE_1 39 -#define STRING_PARTTYPE 42 -#define STRING_HDDINFO_1 45 -#define STRING_HDDINFO_2 46 -#define STRING_NEWPARTITION 47 -#define STRING_UNPSPACE 48 -#define STRING_MAXSIZE 49 -#define STRING_UNFORMATTED 50 -#define STRING_EXTENDED_PARTITION 58 -#define STRING_FORMATUNUSED 51 -#define STRING_FORMATUNKNOWN 52 -#define STRING_KB 53 -#define STRING_MB 54 -#define STRING_GB 55 -#define STRING_ADDKBLAYOUTS 56 -#define STRING_REBOOTPROGRESSBAR 64 +#define STRING_PLEASEWAIT 1 +#define STRING_INSTALLCREATEPARTITION 2 +#define STRING_INSTALLCREATELOGICAL 3 +#define STRING_INSTALLDELETEPARTITION 4 +#define STRING_DELETEPARTITION 5 +#define STRING_PARTITIONSIZE 6 +#define STRING_CHOOSE_NEW_PARTITION 7 +#define STRING_CHOOSE_NEW_EXTENDED_PARTITION 8 +#define STRING_CHOOSE_NEW_LOGICAL_PARTITION 9 +#define STRING_HDPARTSIZE 10 +#define STRING_CREATEPARTITION 11 +#define STRING_NEWPARTITION 12 +#define STRING_PARTFORMAT 13 +#define STRING_NONFORMATTEDPART 14 +#define STRING_NONFORMATTEDSYSTEMPART 15 +#define STRING_NONFORMATTEDOTHERPART 16 +#define STRING_INSTALLONPART 17 +#define STRING_CONTINUE 18 +#define STRING_QUITCONTINUE 19 +#define STRING_REBOOTCOMPUTER 20 +#define STRING_DELETING 21 +#define STRING_MOVING 22 +#define STRING_RENAMING 23 +#define STRING_COPYING 24 +#define STRING_SETUPCOPYINGFILES 25 +#define STRING_REGHIVEUPDATE 26 +#define STRING_IMPORTFILE 27 +#define STRING_DISPLAYSETTINGSUPDATE 28 +#define STRING_LOCALESETTINGSUPDATE 29 +#define STRING_KEYBOARDSETTINGSUPDATE 30 +#define STRING_CODEPAGEINFOUPDATE 31 +#define STRING_DONE 32 +#define STRING_REBOOTCOMPUTER2 33 +#define STRING_CONSOLEFAIL1 34 +#define STRING_CONSOLEFAIL2 35 +#define STRING_CONSOLEFAIL3 36 +#define STRING_FORMATTINGPART 37 +#define STRING_CHECKINGDISK 38 +#define STRING_FORMATDISK1 39 +#define STRING_FORMATDISK2 40 +#define STRING_KEEPFORMAT 41 +#define STRING_HDDISK1 42 +#define STRING_HDDISK2 43 +#define STRING_PARTTYPE 44 +#define STRING_HDDINFO1 45 +#define STRING_HDDINFO2 46 +#define STRING_UNPSPACE 47 +#define STRING_MAXSIZE 48 +#define STRING_UNFORMATTED 49 +#define STRING_EXTENDED_PARTITION 50 +#define STRING_FORMATUNUSED 51 +#define STRING_FORMATUNKNOWN 52 +#define STRING_KB 53 +#define STRING_MB 54 +#define STRING_GB 55 +#define STRING_ADDKBLAYOUTS 56 +#define STRING_REBOOTPROGRESSBAR 57 diff --git a/base/setup/usetup/partlist.c b/base/setup/usetup/partlist.c index d6c934bc47a..5feaf446529 100644 --- a/base/setup/usetup/partlist.c +++ b/base/setup/usetup/partlist.c @@ -316,7 +316,7 @@ DiskDescription( if (DiskEntry->DriverName.Length > 0) { RtlStringCchPrintfA(strBuffer, cchBuffer, - MUIGetString(STRING_HDDINFO_1), + MUIGetString(STRING_HDDINFO1), DiskSize, Unit, DiskEntry->DiskNumber, @@ -331,7 +331,7 @@ DiskDescription( else { RtlStringCchPrintfA(strBuffer, cchBuffer, - MUIGetString(STRING_HDDINFO_2), + MUIGetString(STRING_HDDINFO2), DiskSize, Unit, DiskEntry->DiskNumber, diff --git a/base/setup/usetup/usetup.c b/base/setup/usetup/usetup.c index 2cc425e9ba1..f0243187454 100644 --- a/base/setup/usetup/usetup.c +++ b/base/setup/usetup/usetup.c @@ -2100,13 +2100,13 @@ CreatePrimaryPartitionPage(PINPUT_RECORD Ir) CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT)); - CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHOOSENEWPARTITION)); + CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHOOSE_NEW_PARTITION)); DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(6, 10, MUIGetString(STRING_HDINFOPARTCREATE_1), + CONSOLE_PrintTextXY(6, 10, MUIGetString(STRING_HDDISK1), LineBuffer); - CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDDSIZE)); + CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDPARTSIZE)); #if 0 CONSOLE_PrintTextXY(8, 10, "Maximum size of the new partition is %I64u MB", @@ -2221,10 +2221,10 @@ CreateExtendedPartitionPage(PINPUT_RECORD Ir) CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHOOSE_NEW_EXTENDED_PARTITION)); DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(6, 10, MUIGetString(STRING_HDINFOPARTCREATE_1), + CONSOLE_PrintTextXY(6, 10, MUIGetString(STRING_HDDISK1), LineBuffer); - CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDDSIZE)); + CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDPARTSIZE)); #if 0 CONSOLE_PrintTextXY(8, 10, "Maximum size of the new partition is %I64u MB", @@ -2338,10 +2338,10 @@ CreateLogicalPartitionPage(PINPUT_RECORD Ir) CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHOOSE_NEW_LOGICAL_PARTITION)); DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(6, 10, MUIGetString(STRING_HDINFOPARTCREATE_1), + CONSOLE_PrintTextXY(6, 10, MUIGetString(STRING_HDDISK1), LineBuffer); - CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDDSIZE)); + CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDPARTSIZE)); #if 0 CONSOLE_PrintTextXY(8, 10, "Maximum size of the new partition is %I64u MB", @@ -2492,7 +2492,7 @@ DeletePartitionPage(PINPUT_RECORD Ir) CONSOLE_PrintTextXY(6, 10, " %s", LineBuffer); DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDINFOPARTDELETE_1), + CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDDISK2), LineBuffer); while (TRUE) @@ -2603,7 +2603,7 @@ SelectFileSystemPage(PINPUT_RECORD Ir) CONSOLE_SetTextXY(8, 10, LineBuffer); DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(8, 14, MUIGetString(STRING_HDINFOPARTCREATE_1), + CONSOLE_PrintTextXY(8, 14, MUIGetString(STRING_HDDISK1), LineBuffer); @@ -2830,7 +2830,7 @@ SelectFileSystemPage(PINPUT_RECORD Ir) #endif DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDINFOPARTCREATE_1), + CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDDISK1), LineBuffer); CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_PARTFORMAT)); @@ -2859,7 +2859,7 @@ SelectFileSystemPage(PINPUT_RECORD Ir) } DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDINFOPARTCREATE_1), + CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDDISK1), LineBuffer); CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_PARTFORMAT)); @@ -2872,7 +2872,7 @@ SelectFileSystemPage(PINPUT_RECORD Ir) CONSOLE_SetTextXY(8, 10, LineBuffer); DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDINFOPARTDELETE_1), + CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDDISK2), LineBuffer); } From 14172406715e0d66c0eed95e8f5d1e466d5f6017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 24 Oct 2023 20:15:57 +0200 Subject: [PATCH 15/39] [USETUP] Simplify display of partitions being formatted. --- base/setup/usetup/usetup.c | 54 +++++++++----------------------------- 1 file changed, 13 insertions(+), 41 deletions(-) diff --git a/base/setup/usetup/usetup.c b/base/setup/usetup/usetup.c index f0243187454..7f2e07032e2 100644 --- a/base/setup/usetup/usetup.c +++ b/base/setup/usetup/usetup.c @@ -2108,11 +2108,6 @@ CreatePrimaryPartitionPage(PINPUT_RECORD Ir) CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDPARTSIZE)); -#if 0 - CONSOLE_PrintTextXY(8, 10, "Maximum size of the new partition is %I64u MB", - CurrentPartition->SectorCount * DiskEntry->BytesPerSector / MB); -#endif - CONSOLE_SetStatusText(MUIGetString(STRING_CREATEPARTITION)); PartEntry = CurrentPartition; @@ -2226,11 +2221,6 @@ CreateExtendedPartitionPage(PINPUT_RECORD Ir) CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDPARTSIZE)); -#if 0 - CONSOLE_PrintTextXY(8, 10, "Maximum size of the new partition is %I64u MB", - CurrentPartition->SectorCount * DiskEntry->BytesPerSector / MB); -#endif - CONSOLE_SetStatusText(MUIGetString(STRING_CREATEPARTITION)); PartEntry = CurrentPartition; @@ -2343,11 +2333,6 @@ CreateLogicalPartitionPage(PINPUT_RECORD Ir) CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDPARTSIZE)); -#if 0 - CONSOLE_PrintTextXY(8, 10, "Maximum size of the new partition is %I64u MB", - CurrentPartition->SectorCount * DiskEntry->BytesPerSector / MB); -#endif - CONSOLE_SetStatusText(MUIGetString(STRING_CREATEPARTITION)); PartEntry = CurrentPartition; @@ -2489,7 +2474,7 @@ DeletePartitionPage(PINPUT_RECORD Ir) MUIDisplayPage(DELETE_PARTITION_PAGE); PartitionDescription(PartEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(6, 10, " %s", LineBuffer); + CONSOLE_SetTextXY(6, 10, LineBuffer); DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDDISK2), @@ -2822,20 +2807,9 @@ SelectFileSystemPage(PINPUT_RECORD Ir) if (PartEntry->AutoCreate) { - CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_NEWPARTITION)); - -#if 0 - PartitionDescription(PartEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_SetTextXY(8, 10, LineBuffer); -#endif - - DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDDISK1), - LineBuffer); - - CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_PARTFORMAT)); - PartEntry->AutoCreate = FALSE; + + CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_NEWPARTITION)); } else if (PartEntry->New) { @@ -2857,24 +2831,22 @@ SelectFileSystemPage(PINPUT_RECORD Ir) ASSERT(FALSE); break; } - - DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDDISK1), - LineBuffer); - - CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_PARTFORMAT)); } else { CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_INSTALLONPART)); + } - PartitionDescription(PartEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_SetTextXY(8, 10, LineBuffer); + PartitionDescription(PartEntry, LineBuffer, ARRAYSIZE(LineBuffer)); + CONSOLE_SetTextXY(6, 10, LineBuffer); - DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDDISK2), - LineBuffer); - } + DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); + CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDDISK2), + LineBuffer); + + /* Show "This Partition will be formatted next" only if it is unformatted */ + if (PartEntry->New || PartEntry->FormatState == Unformatted) + CONSOLE_SetTextXY(6, 14, MUIGetString(STRING_PARTFORMAT)); ASSERT(FileSystemList == NULL); From 280d1d3e53a0f8ca956b542fdb01ad8aaffec4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 24 Oct 2023 22:01:45 +0200 Subject: [PATCH 16/39] [USETUP] Simplify partition creation UI code. Unify CREATE_{PRIMARY,EXTENDED,LOGICAL}_PARTITION_PAGE (i.e. Create{Primary,Extended,Logical}PartitionPage() functions) into a single CREATE_PARTITION_PAGE (i.e. CreatePartitionPage()). A lot of code was duplicated there (display, size input, etc.) just for calling ultimately the Create{Primary,Extended,Logical}Partition() helper functions. This will also help in the future for supporting other platforms, where the concept of "primary", "extended" and "logical" partitions do not exist (basically all platforms except BIOS-based PC-AT). --- base/setup/usetup/usetup.c | 296 +++++-------------------------------- base/setup/usetup/usetup.h | 4 +- 2 files changed, 42 insertions(+), 258 deletions(-) diff --git a/base/setup/usetup/usetup.c b/base/setup/usetup/usetup.c index 7f2e07032e2..492fc9c9d05 100644 --- a/base/setup/usetup/usetup.c +++ b/base/setup/usetup/usetup.c @@ -74,6 +74,11 @@ static PPARTLIST PartitionList = NULL; /* Currently selected partition entry in the list */ static PPARTENTRY CurrentPartition = NULL; +static enum { + PartTypePrimary, + PartTypeExtended, + PartTypeLogical +} PartCreateType = PartTypePrimary; /* List of supported file systems for the partition to be formatted */ static PFILE_SYSTEM_LIST FileSystemList = NULL; @@ -1524,9 +1529,7 @@ IsDiskSizeValid(PPARTENTRY PartEntry) * Next pages: * SelectFileSystemPage (At once if unattended) * SelectFileSystemPage (Default if free space is selected) - * CreatePrimaryPartitionPage - * CreateExtendedPartitionPage - * CreateLogicalPartitionPage + * CreatePartitionPage * ConfirmDeleteSystemPartitionPage (if the selected partition is the system partition, aka with the boot flag set) * DeletePartitionPage * QuitPage @@ -1791,7 +1794,8 @@ SelectPartitionPage(PINPUT_RECORD Ir) return SELECT_PARTITION_PAGE; } - return CREATE_PRIMARY_PARTITION_PAGE; + PartCreateType = PartTypePrimary; + return CREATE_PARTITION_PAGE; } } else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'E') /* E */ @@ -1807,7 +1811,8 @@ SelectPartitionPage(PINPUT_RECORD Ir) return SELECT_PARTITION_PAGE; } - return CREATE_EXTENDED_PARTITION_PAGE; + PartCreateType = PartTypeExtended; + return CREATE_PARTITION_PAGE; } } else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'L') /* L */ @@ -1823,7 +1828,8 @@ SelectPartitionPage(PINPUT_RECORD Ir) return SELECT_PARTITION_PAGE; } - return CREATE_LOGICAL_PARTITION_PAGE; + PartCreateType = PartTypeLogical; + return CREATE_PARTITION_PAGE; } } else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'D') /* D */ @@ -2066,7 +2072,7 @@ ShowPartitionSizeInputBox(SHORT Left, /* - * Displays the CreatePrimaryPartitionPage. + * Displays the CreatePartitionPage. * * Next pages: * SelectPartitionPage @@ -2077,10 +2083,11 @@ ShowPartitionSizeInputBox(SHORT Left, * Number of the next page. */ static PAGE_NUMBER -CreatePrimaryPartitionPage(PINPUT_RECORD Ir) +CreatePartitionPage(PINPUT_RECORD Ir) { PPARTENTRY PartEntry; PDISKENTRY DiskEntry; + ULONG uID; BOOLEAN Quit; BOOLEAN Cancel; ULONG MaxSize; @@ -2095,126 +2102,18 @@ CreatePrimaryPartitionPage(PINPUT_RECORD Ir) return QUIT_PAGE; } - PartEntry = CurrentPartition; - DiskEntry = CurrentPartition->DiskEntry; - - CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT)); - - CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHOOSE_NEW_PARTITION)); - - DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(6, 10, MUIGetString(STRING_HDDISK1), - LineBuffer); + if (PartCreateType == PartTypePrimary) + uID = STRING_CHOOSE_NEW_PARTITION; + else if (PartCreateType == PartTypeExtended) + uID = STRING_CHOOSE_NEW_EXTENDED_PARTITION; + else // if (PartCreateType == PartTypeLogical) + uID = STRING_CHOOSE_NEW_LOGICAL_PARTITION; - CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDPARTSIZE)); - - CONSOLE_SetStatusText(MUIGetString(STRING_CREATEPARTITION)); - - PartEntry = CurrentPartition; - while (TRUE) - { - MaxSize = (PartEntry->SectorCount.QuadPart * DiskEntry->BytesPerSector) / MB; /* in MBytes (rounded) */ - - if (MaxSize > PARTITION_MAXSIZE) - MaxSize = PARTITION_MAXSIZE; - - ShowPartitionSizeInputBox(12, 14, xScreen - 12, 17, /* left, top, right, bottom */ - MaxSize, InputBuffer, &Quit, &Cancel); - - if (Quit) - { - if (ConfirmQuit(Ir)) - return QUIT_PAGE; - - break; - } - else if (Cancel) - { - return SELECT_PARTITION_PAGE; - } - else - { - PartSize = _wcstoui64(InputBuffer, NULL, 10); - - if (PartSize < 1) - { - /* Too small */ - continue; - } - - if (PartSize > MaxSize) - { - /* Too large */ - continue; - } - - /* Convert to bytes */ - if (PartSize == MaxSize) - { - /* Use all of the unpartitioned disk space */ - SectorCount = PartEntry->SectorCount.QuadPart; - } - else - { - /* Calculate the sector count from the size in MB */ - SectorCount = PartSize * MB / DiskEntry->BytesPerSector; - - /* But never get larger than the unpartitioned disk space */ - if (SectorCount > PartEntry->SectorCount.QuadPart) - SectorCount = PartEntry->SectorCount.QuadPart; - } - - DPRINT ("Partition size: %I64u bytes\n", PartSize); - - CreatePrimaryPartition(PartitionList, - CurrentPartition, - SectorCount, - FALSE); - - return SELECT_PARTITION_PAGE; - } - } - - return CREATE_PRIMARY_PARTITION_PAGE; -} - - -/* - * Displays the CreateExtendedPartitionPage. - * - * Next pages: - * SelectPartitionPage (default) - * QuitPage - * - * RETURNS - * Number of the next page. - */ -static PAGE_NUMBER -CreateExtendedPartitionPage(PINPUT_RECORD Ir) -{ - PPARTENTRY PartEntry; - PDISKENTRY DiskEntry; - BOOLEAN Quit; - BOOLEAN Cancel; - ULONG MaxSize; - ULONGLONG PartSize; - ULONGLONG SectorCount; - WCHAR InputBuffer[50]; - CHAR LineBuffer[100]; - - if (PartitionList == NULL || CurrentPartition == NULL) - { - /* FIXME: show an error dialog */ - return QUIT_PAGE; - } + CONSOLE_SetTextXY(6, 8, MUIGetString(uID)); PartEntry = CurrentPartition; DiskEntry = CurrentPartition->DiskEntry; - CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT)); - - CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHOOSE_NEW_EXTENDED_PARTITION)); - DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); CONSOLE_PrintTextXY(6, 10, MUIGetString(STRING_HDDISK1), LineBuffer); @@ -2223,11 +2122,9 @@ CreateExtendedPartitionPage(PINPUT_RECORD Ir) CONSOLE_SetStatusText(MUIGetString(STRING_CREATEPARTITION)); - PartEntry = CurrentPartition; while (TRUE) { MaxSize = (PartEntry->SectorCount.QuadPart * DiskEntry->BytesPerSector) / MB; /* in MBytes (rounded) */ - if (MaxSize > PARTITION_MAXSIZE) MaxSize = PARTITION_MAXSIZE; @@ -2238,7 +2135,6 @@ CreateExtendedPartitionPage(PINPUT_RECORD Ir) { if (ConfirmQuit(Ir)) return QUIT_PAGE; - break; } else if (Cancel) @@ -2249,17 +2145,11 @@ CreateExtendedPartitionPage(PINPUT_RECORD Ir) { PartSize = _wcstoui64(InputBuffer, NULL, 10); + /* Retry if too small or too large */ if (PartSize < 1) - { - /* Too small */ continue; - } - if (PartSize > MaxSize) - { - /* Too large */ continue; - } /* Convert to bytes */ if (PartSize == MaxSize) @@ -2277,130 +2167,34 @@ CreateExtendedPartitionPage(PINPUT_RECORD Ir) SectorCount = PartEntry->SectorCount.QuadPart; } - DPRINT ("Partition size: %I64u bytes\n", PartSize); - - CreateExtendedPartition(PartitionList, - CurrentPartition, - SectorCount); - - return SELECT_PARTITION_PAGE; - } - } - - return CREATE_EXTENDED_PARTITION_PAGE; -} - - -/* - * Displays the CreateLogicalPartitionPage. - * - * Next pages: - * SelectFileSystemPage (default) - * QuitPage - * - * RETURNS - * Number of the next page. - */ -static PAGE_NUMBER -CreateLogicalPartitionPage(PINPUT_RECORD Ir) -{ - PPARTENTRY PartEntry; - PDISKENTRY DiskEntry; - BOOLEAN Quit; - BOOLEAN Cancel; - ULONG MaxSize; - ULONGLONG PartSize; - ULONGLONG SectorCount; - WCHAR InputBuffer[50]; - CHAR LineBuffer[100]; - - if (PartitionList == NULL || CurrentPartition == NULL) - { - /* FIXME: show an error dialog */ - return QUIT_PAGE; - } - - PartEntry = CurrentPartition; - DiskEntry = CurrentPartition->DiskEntry; - - CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT)); - - CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHOOSE_NEW_LOGICAL_PARTITION)); - - DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer)); - CONSOLE_PrintTextXY(6, 10, MUIGetString(STRING_HDDISK1), - LineBuffer); - - CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDPARTSIZE)); - - CONSOLE_SetStatusText(MUIGetString(STRING_CREATEPARTITION)); - - PartEntry = CurrentPartition; - while (TRUE) - { - MaxSize = (PartEntry->SectorCount.QuadPart * DiskEntry->BytesPerSector) / MB; /* in MBytes (rounded) */ - - if (MaxSize > PARTITION_MAXSIZE) - MaxSize = PARTITION_MAXSIZE; - - ShowPartitionSizeInputBox(12, 14, xScreen - 12, 17, /* left, top, right, bottom */ - MaxSize, InputBuffer, &Quit, &Cancel); - - if (Quit) - { - if (ConfirmQuit(Ir)) - return QUIT_PAGE; - - break; - } - else if (Cancel) - { - return SELECT_PARTITION_PAGE; - } - else - { - PartSize = _wcstoui64(InputBuffer, NULL, 10); - - if (PartSize < 1) - { - /* Too small */ - continue; - } + DPRINT("Partition size: %I64u bytes\n", PartSize); - if (PartSize > MaxSize) + if (PartCreateType == PartTypePrimary) { - /* Too large */ - continue; + CreatePrimaryPartition(PartitionList, + CurrentPartition, + SectorCount, + FALSE); } - - /* Convert to bytes */ - if (PartSize == MaxSize) + else if (PartCreateType == PartTypeExtended) { - /* Use all of the unpartitioned disk space */ - SectorCount = PartEntry->SectorCount.QuadPart; + CreateExtendedPartition(PartitionList, + CurrentPartition, + SectorCount); } - else + else // if (PartCreateType == PartTypeLogical) { - /* Calculate the sector count from the size in MB */ - SectorCount = PartSize * MB / DiskEntry->BytesPerSector; - - /* But never get larger than the unpartitioned disk space */ - if (SectorCount > PartEntry->SectorCount.QuadPart) - SectorCount = PartEntry->SectorCount.QuadPart; + CreateLogicalPartition(PartitionList, + CurrentPartition, + SectorCount, + FALSE); } - DPRINT("Partition size: %I64u bytes\n", PartSize); - - CreateLogicalPartition(PartitionList, - CurrentPartition, - SectorCount, - FALSE); - return SELECT_PARTITION_PAGE; } } - return CREATE_LOGICAL_PARTITION_PAGE; + return CREATE_PARTITION_PAGE; } @@ -4541,16 +4335,8 @@ RunUSetup(VOID) Page = SelectPartitionPage(&Ir); break; - case CREATE_PRIMARY_PARTITION_PAGE: - Page = CreatePrimaryPartitionPage(&Ir); - break; - - case CREATE_EXTENDED_PARTITION_PAGE: - Page = CreateExtendedPartitionPage(&Ir); - break; - - case CREATE_LOGICAL_PARTITION_PAGE: - Page = CreateLogicalPartitionPage(&Ir); + case CREATE_PARTITION_PAGE: + Page = CreatePartitionPage(&Ir); break; case CONFIRM_DELETE_SYSTEM_PARTITION_PAGE: diff --git a/base/setup/usetup/usetup.h b/base/setup/usetup/usetup.h index bc5f9e39ae6..54f3ba771e3 100644 --- a/base/setup/usetup/usetup.h +++ b/base/setup/usetup/usetup.h @@ -94,9 +94,7 @@ typedef enum _PAGE_NUMBER LAYOUT_SETTINGS_PAGE, SELECT_PARTITION_PAGE, - CREATE_PRIMARY_PARTITION_PAGE, - CREATE_EXTENDED_PARTITION_PAGE, - CREATE_LOGICAL_PARTITION_PAGE, + CREATE_PARTITION_PAGE, CHANGE_SYSTEM_PARTITION, CONFIRM_DELETE_SYSTEM_PARTITION_PAGE, DELETE_PARTITION_PAGE, From 8e2936c1694f4474f5347ea4a25c2d8eb3a7235d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Wed, 25 Oct 2023 22:19:39 +0200 Subject: [PATCH 17/39] [USETUP] Show the partition description (and its disk) that is being formatted and checked. And improve some strings -- They need to be translated! --- base/setup/usetup/lang/bg-BG.h | 6 +++--- base/setup/usetup/lang/bn-BD.h | 6 +++--- base/setup/usetup/lang/cs-CZ.h | 6 +++--- base/setup/usetup/lang/da-DK.h | 6 +++--- base/setup/usetup/lang/de-DE.h | 6 +++--- base/setup/usetup/lang/el-GR.h | 6 +++--- base/setup/usetup/lang/en-US.h | 6 +++--- base/setup/usetup/lang/es-ES.h | 6 +++--- base/setup/usetup/lang/et-EE.h | 6 +++--- base/setup/usetup/lang/eu-ES.h | 6 +++--- base/setup/usetup/lang/fr-FR.h | 6 +++--- base/setup/usetup/lang/he-IL.h | 6 +++--- base/setup/usetup/lang/hr-HR.h | 6 +++--- base/setup/usetup/lang/hu-HU.h | 6 +++--- base/setup/usetup/lang/id-ID.h | 6 +++--- base/setup/usetup/lang/it-IT.h | 6 +++--- base/setup/usetup/lang/ja-JP.h | 6 +++--- base/setup/usetup/lang/lt-LT.h | 6 +++--- base/setup/usetup/lang/ms-MY.h | 6 +++--- base/setup/usetup/lang/nl-NL.h | 6 +++--- base/setup/usetup/lang/pl-PL.h | 6 +++--- base/setup/usetup/lang/pt-BR.h | 6 +++--- base/setup/usetup/lang/pt-PT.h | 6 +++--- base/setup/usetup/lang/ro-RO.h | 9 ++++++++- base/setup/usetup/lang/ru-RU.h | 6 +++--- base/setup/usetup/lang/sk-SK.h | 6 +++--- base/setup/usetup/lang/sq-AL.h | 6 +++--- base/setup/usetup/lang/sv-SE.h | 6 +++--- base/setup/usetup/lang/tr-TR.h | 6 +++--- base/setup/usetup/lang/uk-UA.h | 6 +++--- base/setup/usetup/usetup.c | 22 ++++++++++++++++++---- 31 files changed, 113 insertions(+), 92 deletions(-) diff --git a/base/setup/usetup/lang/bg-BG.h b/base/setup/usetup/lang/bg-BG.h index f7150ddcaa9..037485c6260 100644 --- a/base/setup/usetup/lang/bg-BG.h +++ b/base/setup/usetup/lang/bg-BG.h @@ -1273,7 +1273,7 @@ static MUI_ENTRY bgBGFormatPartitionEntries[] = }, { 6, - 10, + 16, "\204\357\253\352\342 \351\245 \241\352\244\245 \344\256\340\254\240\342\250\340\240\255. \215\240\342\250\341\255\245\342\245 ENTER \247\240 \244\240 \257\340\256\244\352\253\246\250\342\245.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2316,9 +2316,9 @@ MUI_STRING bgBGStrings[] = {STRING_CONSOLEFAIL3, "\217\256\244\244\340\352\246\252\240\342\240 \255\240 USB \245 \242\341\245 \256\351\245 \255\245\257\352\253\255\240\r\n"}, {STRING_FORMATTINGPART, - "\224\256\340\254\240\342\250\340\240\255\245 \255\240 \244\250\341\252\240"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "\217\340\256\242\245\340\252\240 \255\240 \244\250\341\252\240"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " \224\256\340\254\240\342\250\340\240\255\245 \255\240 \244\357\253\240 \252\240\342\256 %S \344\240\251\253\256\242\240 \341\250\341\342\245\254\240 (\241\352\340\247\256 \344\256\340\254\240\342\250\340\240\255\245) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/bn-BD.h b/base/setup/usetup/lang/bn-BD.h index a8ece049194..1be6aaa9384 100644 --- a/base/setup/usetup/lang/bn-BD.h +++ b/base/setup/usetup/lang/bn-BD.h @@ -1256,7 +1256,7 @@ static MUI_ENTRY bnBDFormatPartitionEntries[] = }, { 6, - 10, + 16, "Setup will now format the partition. Press ENTER to continue.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2290,9 +2290,9 @@ MUI_STRING bnBDStrings[] = {STRING_CONSOLEFAIL3, "USB keyboards are not fully supported yet\r\n"}, {STRING_FORMATTINGPART, - "Setup is formatting your disk"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Setup is checking your disk"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Format partition as %S file system (quick format) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/cs-CZ.h b/base/setup/usetup/lang/cs-CZ.h index e185fa42208..cf56742243e 100644 --- a/base/setup/usetup/lang/cs-CZ.h +++ b/base/setup/usetup/lang/cs-CZ.h @@ -1264,7 +1264,7 @@ static MUI_ENTRY csCZFormatPartitionEntries[] = }, { 6, - 10, + 16, "Tento odd\241l bude nyn\241 zform\240tov\240n. Stisknut\241m kl\240vesy ENTER za\237nete.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2298,9 +2298,9 @@ MUI_STRING csCZStrings[] = {STRING_CONSOLEFAIL3, "USB kl\240vesnice zat\241m nejsou pln\330 podporov\240ny\r\n"}, {STRING_FORMATTINGPART, - "Instalace form\240tuje disk"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Instalace kontroluje disk"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Zform\240tovat odd\241l na souborov\354 syst\202m %S (rychle) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/da-DK.h b/base/setup/usetup/lang/da-DK.h index ab95b478df8..4efb960bb76 100644 --- a/base/setup/usetup/lang/da-DK.h +++ b/base/setup/usetup/lang/da-DK.h @@ -1258,7 +1258,7 @@ static MUI_ENTRY daDKFormatPartitionEntries[] = }, { 6, - 10, + 16, "Installationen vil nu formatere partitionen. Tryk p\206 ENTER for at forts\221tte.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2300,9 +2300,9 @@ MUI_STRING daDKStrings[] = {STRING_CONSOLEFAIL3, "USB-tastatuere er endnu ikke fuldt underst\233ttet\r\n"}, {STRING_FORMATTINGPART, - "Installationen formatere din disk"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Installationen tjekker din disk"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Formater partitionen som %S-filesystemet (hurtigformatering) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/de-DE.h b/base/setup/usetup/lang/de-DE.h index 3834815ea04..78c93ebabea 100644 --- a/base/setup/usetup/lang/de-DE.h +++ b/base/setup/usetup/lang/de-DE.h @@ -1251,7 +1251,7 @@ static MUI_ENTRY deDEFormatPartitionEntries[] = }, { 6, - 10, + 16, "Die gew\201nschte Partition wird nun formatiert.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2302,9 +2302,9 @@ MUI_STRING deDEStrings[] = {STRING_CONSOLEFAIL3, "USB-Tastaturen werden noch nicht vollst\204ndig unterst\201tzt\r\n"}, {STRING_FORMATTINGPART, - "Ihre Festplatte wird formatiert"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Ihre Festplatte wird \201berpr\201ft"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Partition mit dem %S-Dateisystem formatieren (Schnell) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/el-GR.h b/base/setup/usetup/lang/el-GR.h index 6e092a920c7..2a71f69195f 100644 --- a/base/setup/usetup/lang/el-GR.h +++ b/base/setup/usetup/lang/el-GR.h @@ -1273,7 +1273,7 @@ static MUI_ENTRY elGRFormatPartitionEntries[] = }, { 6, - 10, + 16, "\206 \234\232\241\230\253\341\251\253\230\251\236 \253\351\250\230 \237\230 \233\240\230\243\246\250\255\351\251\234\240 \253\246 \233\240\230\243\342\250\240\251\243\230 \217\230\253\343\251\253\234 ENTER \232\240\230 \244\230 \251\254\244\234\256\345\251\234\253\234.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2315,9 +2315,9 @@ MUI_STRING elGRStrings[] = {STRING_CONSOLEFAIL3, "\222\230 USB \247\242\236\241\253\250\246\242\346\232\240\230 \233\234\244 \234\345\244\230\240 \247\242\343\250\340\252 \254\247\246\251\253\236\250\240\235\346\243\234\244\230 \230\241\346\243\230\r\n"}, {STRING_FORMATTINGPART, - "\206 \234\232\241\230\253\341\251\253\230\251\236 \233\240\230\243\246\250\255\351\244\234\240 \253\246 \233\345\251\241\246 \251\230\252"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "\206 \234\232\241\230\253\341\251\253\230\251\236 \234\242\342\232\256\234\240 \253\246 \233\345\251\241\246 \251\230\252"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " \203\240\230\243\346\250\255\340\251\236 \253\246\254 partition \340\252 %S \251\347\251\253\236\243\230 \230\250\256\234\345\340\244 (\232\250\343\232\246\250\236 \233\240\230\243\346\250\255\340\251\236) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/en-US.h b/base/setup/usetup/lang/en-US.h index ae23370e7fa..12c893d6d94 100644 --- a/base/setup/usetup/lang/en-US.h +++ b/base/setup/usetup/lang/en-US.h @@ -1256,7 +1256,7 @@ static MUI_ENTRY enUSFormatPartitionEntries[] = }, { 6, - 10, + 16, "Setup will now format the partition. Press ENTER to continue.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2290,9 +2290,9 @@ MUI_STRING enUSStrings[] = {STRING_CONSOLEFAIL3, "USB keyboards are not fully supported yet\r\n"}, {STRING_FORMATTINGPART, - "Setup is formatting your disk"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Setup is checking your disk"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Format partition as %S file system (quick format) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/es-ES.h b/base/setup/usetup/lang/es-ES.h index 77e54c61860..a74167da57e 100644 --- a/base/setup/usetup/lang/es-ES.h +++ b/base/setup/usetup/lang/es-ES.h @@ -1262,7 +1262,7 @@ static MUI_ENTRY esESFormatPartitionEntries[] = }, { 6, - 10, + 16, "El instalador formatear\240 la partici\242n. Pulse INTRO para continuar.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2303,9 +2303,9 @@ MUI_STRING esESStrings[] = {STRING_CONSOLEFAIL3, "Todav\241a no hay soporte del todo para los teclados USB\r\n"}, {STRING_FORMATTINGPART, - "El instalador est\240 formateando el disco"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "El instalador est\240 verificando el disco"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Formatear la partici\242n con sistema de archivos %S (formato r\240pido) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/et-EE.h b/base/setup/usetup/lang/et-EE.h index 9e78d2b53c1..59f189eefd7 100644 --- a/base/setup/usetup/lang/et-EE.h +++ b/base/setup/usetup/lang/et-EE.h @@ -1259,7 +1259,7 @@ static MUI_ENTRY etEEFormatPartitionEntries[] = }, { 6, - 10, + 16, "N\201\201d vormindatakse partitsioon. Vajuta ENTER j\204tkamiseks.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2292,9 +2292,9 @@ MUI_STRING etEEStrings[] = {STRING_CONSOLEFAIL3, "USB klaviatuurid ei ole veel toetatud\r\n"}, {STRING_FORMATTINGPART, - "K\344vaketta vormindamine"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "K\344vaketta kontrollimine"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Vorminda partitsioon %S failis\201steemiga (kiire vormindus) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/eu-ES.h b/base/setup/usetup/lang/eu-ES.h index b225211ebcf..b0dc02adacd 100644 --- a/base/setup/usetup/lang/eu-ES.h +++ b/base/setup/usetup/lang/eu-ES.h @@ -1257,7 +1257,7 @@ static MUI_ENTRY euESFormatPartitionEntries[] = }, { 6, - 10, + 16, "Orain instalazioa formatuko du partizioa. Sakatu SARTU jarraitzeko.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2298,9 +2298,9 @@ MUI_STRING euESStrings[] = {STRING_CONSOLEFAIL3, "USB teklatua ez dago oraindik osoan euskarri\r\n"}, {STRING_FORMATTINGPART, - "Instalazioa zure disko formateatzen ari da"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Instalazioa zure disko ikusten ari da"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Formatu partizioa %S sistemaren fitxategia (format azkar) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/fr-FR.h b/base/setup/usetup/lang/fr-FR.h index 77c51003330..a566b159c46 100644 --- a/base/setup/usetup/lang/fr-FR.h +++ b/base/setup/usetup/lang/fr-FR.h @@ -1293,7 +1293,7 @@ static MUI_ENTRY frFRFormatPartitionEntries[] = }, { 6, - 10, + 16, "Setup va formater la partition. Appuyer sur ENTR\220E pour continuer.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2327,9 +2327,9 @@ MUI_STRING frFRStrings[] = {STRING_CONSOLEFAIL3, "Les claviers USB ne sont pas compl\212tement support\202s actuellement\r\n"}, {STRING_FORMATTINGPART, - "Setup formate votre disque"}, + "Setup formate la partition..."}, {STRING_CHECKINGDISK, - "Setup v\202rifie votre disque"}, + "Setup v\202rifie le disque..."}, {STRING_FORMATDISK1, " Formater la partition comme syst\212me de fichiers %S (formatage rapide) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/he-IL.h b/base/setup/usetup/lang/he-IL.h index 6b644999fc8..7a149ee68cb 100644 --- a/base/setup/usetup/lang/he-IL.h +++ b/base/setup/usetup/lang/he-IL.h @@ -1260,7 +1260,7 @@ static MUI_ENTRY heILFormatPartitionEntries[] = }, { 6, - 10, + 16, ".\212\211\231\216\204\214 \211\203\213 ENTER \225\207\214 .\204\226\211\207\216\204 \232\200 \214\207\232\200\232 \205\211\231\213\222 \204\220\227\232\204\204", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2292,9 +2292,9 @@ MUI_STRING heILStrings[] = {STRING_CONSOLEFAIL3, "\200\214\216 \217\224\205\200\201 \232\205\213\216\232\220 \200\214 \217\211\211\203\222 USB \232\205\203\214\227\216\r\n"}, {STRING_FORMATTINGPART, - "\217\220\205\213\204 \232\200 \232\214\207\232\200\216 \204\220\227\232\204\204 \232\211\220\213\232"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "\217\220\205\213\204 \232\200 \232\227\203\205\201 \204\220\227\232\204\204 \232\211\220\213\232"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " (\230\211\204\216 \214\205\207\232\200) %S \215\211\226\201\227 \232\213\230\222\216 \215\222 \204\226\211\207\216 \214\205\207\232\200 "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/hr-HR.h b/base/setup/usetup/lang/hr-HR.h index 9f0c2bd47d8..335343c3dc5 100644 --- a/base/setup/usetup/lang/hr-HR.h +++ b/base/setup/usetup/lang/hr-HR.h @@ -1266,7 +1266,7 @@ static MUI_ENTRY hrHRFormatPartitionEntries[] = }, { 6, - 10, + 16, "Instalacijski program \206e sada formatirati particiju.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2321,9 +2321,9 @@ MUI_STRING hrHRStrings[] = {STRING_CONSOLEFAIL3, "USB tipkovnice nisu jo\347 potupuno podr\247ane\r\n"}, {STRING_FORMATTINGPART, - "Instalacijski program formatira va\347 disk"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Instalacijski sustav provjerava va\347 disk"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Formatiraj particiju kao %S sustav datoteka (brzo formatiranje) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/hu-HU.h b/base/setup/usetup/lang/hu-HU.h index cb913f4b792..aa108d1a212 100644 --- a/base/setup/usetup/lang/hu-HU.h +++ b/base/setup/usetup/lang/hu-HU.h @@ -1150,7 +1150,7 @@ static MUI_ENTRY huHUFormatPartitionEntries[] = }, { 6, - 10, + 16, "A telep\241t\213 form\240zni fogja a part\241ci\242t. Nyomjon ENTER-t a folytat\240shoz.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2188,9 +2188,9 @@ MUI_STRING huHUStrings[] = {STRING_CONSOLEFAIL3, "Az USB-s billenty\373zetek m\202g nincsenek teljesen t\240mogatva\r\n"}, {STRING_FORMATTINGPART, - "A telep\241t\213 form\240zza a merevlemezt"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "A telep\241t\213 ellen\213rzi a merevlemezt"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Part\241ci\242 form\240z\240sa %S f\240jlrendszerrel (gyorsform\240z\240s) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/id-ID.h b/base/setup/usetup/lang/id-ID.h index 1bd19e8a23e..768b335145a 100644 --- a/base/setup/usetup/lang/id-ID.h +++ b/base/setup/usetup/lang/id-ID.h @@ -1256,7 +1256,7 @@ static MUI_ENTRY idIDFormatPartitionEntries[] = }, { 6, - 10, + 16, "Penyetelan akan memformat partisi. Tekan ENTER untuk lanjut.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2297,9 +2297,9 @@ MUI_STRING idIDStrings[] = {STRING_CONSOLEFAIL3, "Papan ketik USB belum didukung sepenuhnya\r\n"}, {STRING_FORMATTINGPART, - "Penyetelan sedang memformat cakram anda"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Penyetelan sedang memeriksa cakram anda"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Format partisi sebagai sistem berkas %S (format cepat) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/it-IT.h b/base/setup/usetup/lang/it-IT.h index de6aa5c6533..c428d18ccde 100644 --- a/base/setup/usetup/lang/it-IT.h +++ b/base/setup/usetup/lang/it-IT.h @@ -1262,7 +1262,7 @@ static MUI_ENTRY itITFormatPartitionEntries[] = }, { 6, - 10, + 16, "Setup formatter\x85 la partizione. Premere INVIO per continuare.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2303,9 +2303,9 @@ MUI_STRING itITStrings[] = {STRING_CONSOLEFAIL3, "le tastiere USB non sono ancora completamente supportate\r\n"}, {STRING_FORMATTINGPART, - "Setup sta formattando il disco"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Setup sta controllando il disco"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Formatta la partizione con file system %S (formattazione rapida) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/ja-JP.h b/base/setup/usetup/lang/ja-JP.h index 7c07986a819..7d4153bdbab 100644 --- a/base/setup/usetup/lang/ja-JP.h +++ b/base/setup/usetup/lang/ja-JP.h @@ -1259,7 +1259,7 @@ static MUI_ENTRY jaJPFormatPartitionEntries[] = }, { 6, - 10, + 16, "\276\257\304\261\257\314\337\312 \312\337\260\303\250\274\256\335\246 \314\253\260\317\257\304 \274\317\275\241 \277\336\257\272\263 \275\331\306\312 ENTER \267\260\246 \265\274\303 \270\300\336\273\262\241", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2302,9 +2302,9 @@ MUI_STRING jaJPStrings[] = {STRING_CONSOLEFAIL3, "USB \267\260\316\336\260\304\336 \312 \317\300\336 \266\335\276\336\335\306 \273\316\337\260\304 \273\332\303 \262\317\276\335\r\n"}, {STRING_FORMATTINGPART, - "\276\257\304\261\257\314\337\312 \303\336\250\275\270\246 \314\253\260\317\257\304 \274\303\262\317\275"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "\276\257\304\261\257\314\337\312 \303\336\250\275\270\246 \271\335\273 \274\303\262\317\275\241"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " \312\337\260\303\250\274\256\335\246 %S \314\247\262\331 \274\275\303\321 \303\336\314\253\260\317\257\304 (\270\262\257\270 \314\253\260\317\257\304) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/lt-LT.h b/base/setup/usetup/lang/lt-LT.h index 345c60d450c..050b9ddcbe7 100644 --- a/base/setup/usetup/lang/lt-LT.h +++ b/base/setup/usetup/lang/lt-LT.h @@ -1267,7 +1267,7 @@ static MUI_ENTRY ltLTFormatPartitionEntries[] = }, { 6, - 10, + 16, "Setup will now format the partition. Press ENTER to continue.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2301,9 +2301,9 @@ MUI_STRING ltLTStrings[] = {STRING_CONSOLEFAIL3, "USB keyboards are not fully supported yet\r\n"}, {STRING_FORMATTINGPART, - "Setup is formatting your disk"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Setup is checking your disk"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Format partition as %S file system (quick format) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/ms-MY.h b/base/setup/usetup/lang/ms-MY.h index 0384a3fc4ef..2eef8828a02 100644 --- a/base/setup/usetup/lang/ms-MY.h +++ b/base/setup/usetup/lang/ms-MY.h @@ -1248,7 +1248,7 @@ static MUI_ENTRY msMYFormatPartitionEntries[] = }, { 6, - 10, + 16, "Persediaan sekarang akan format partition. Tekan ENTER untuk teruskan.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2282,9 +2282,9 @@ MUI_STRING msMYStrings[] = {STRING_CONSOLEFAIL3, "Papan kekunci USB tidak disokong sepenuhnya lagi\r\n"}, {STRING_FORMATTINGPART, - "Persediaan sedang format cakera"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Persediaan sedang menyemak cakera"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Format partition seperti sistem fail %S (format ringkas) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/nl-NL.h b/base/setup/usetup/lang/nl-NL.h index c2f994ac24b..bd732c31b45 100644 --- a/base/setup/usetup/lang/nl-NL.h +++ b/base/setup/usetup/lang/nl-NL.h @@ -1271,7 +1271,7 @@ static MUI_ENTRY nlNLFormatPartitionEntries[] = }, { 6, - 10, + 16, "Setup gaat nu de partitie formatteren. Druk op ENTER om door te gaan.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2324,9 +2324,9 @@ MUI_STRING nlNLStrings[] = {STRING_CONSOLEFAIL3, "USB toetsenborden worden nog niet volledig ondersteund.\r\n"}, {STRING_FORMATTINGPART, - "Setup is de vaste schijf aan het formatteren."}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Setup is de vaste schijf aan het controleren."}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Formatteer partitie als %S bestandssysteem (snel) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/pl-PL.h b/base/setup/usetup/lang/pl-PL.h index 2c616e1bc59..a0e3f8624ed 100644 --- a/base/setup/usetup/lang/pl-PL.h +++ b/base/setup/usetup/lang/pl-PL.h @@ -1268,7 +1268,7 @@ static MUI_ENTRY plPLFormatPartitionEntries[] = }, { 6, - 10, + 16, "Instalator sformatuje teraz partycj\251. Naci\230nij ENTER, aby kontynuowa\206.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2309,9 +2309,9 @@ MUI_STRING plPLStrings[] = {STRING_CONSOLEFAIL3, "Nie s\245 obecnie w pe\210ni obs\210ugiwane.\r\n"}, {STRING_FORMATTINGPART, - "Instalator formatuje tw\242j dysk"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Instalator sprawdza tw\242j dysk"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Formatuj partycj\251 w systemie plik\242w %S (szybkie formatowanie) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/pt-BR.h b/base/setup/usetup/lang/pt-BR.h index bc897c1d224..c2255c54091 100644 --- a/base/setup/usetup/lang/pt-BR.h +++ b/base/setup/usetup/lang/pt-BR.h @@ -1273,7 +1273,7 @@ static MUI_ENTRY ptBRFormatPartitionEntries[] = }, { 6, - 10, + 16, "O instalador ir\240 formatar a parti\207\306o. Para continuar, pressione ENTER.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2337,9 +2337,9 @@ MUI_STRING ptBRStrings[] = {STRING_CONSOLEFAIL3, "Os teclados USB ainda n\306o s\306o completamente suportados\r\n"}, {STRING_FORMATTINGPART, - "O instalador est\240 formatando o disco"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "O instalador est\240 verificando o disco"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Formatar a parti\207\306o utilizando o sistema de arquivos %S (R\240pido) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/pt-PT.h b/base/setup/usetup/lang/pt-PT.h index f383dbfae68..ed6f90de2b0 100644 --- a/base/setup/usetup/lang/pt-PT.h +++ b/base/setup/usetup/lang/pt-PT.h @@ -1273,7 +1273,7 @@ static MUI_ENTRY ptPTFormatPartitionEntries[] = }, { 6, - 10, + 16, "O instalador ir\240 formatar a parti\207\306o. Para continuar, pressione ENTER.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2336,9 +2336,9 @@ MUI_STRING ptPTStrings[] = {STRING_CONSOLEFAIL3, "Os teclados USB ainda n\306o s\306o completamente suportados\r\n"}, {STRING_FORMATTINGPART, - "O instalador est\240 a formatar o disco"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "O instalador est\240 a verificar o disco"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Formatar a parti\207\306o utilizando o sistema de arquivos %S (R\240pido) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/ro-RO.h b/base/setup/usetup/lang/ro-RO.h index 7cabee005a3..762cd357331 100644 --- a/base/setup/usetup/lang/ro-RO.h +++ b/base/setup/usetup/lang/ro-RO.h @@ -1297,6 +1297,13 @@ static MUI_ENTRY roROFormatPartitionEntries[] = { 6, 8, + "Urmeaz\343 formatarea parti\376iei.", + TEXT_STYLE_NORMAL, + TEXT_ID_STATIC + }, + { + 6, + 16, "Urmeaz\343 formatarea parti\376iei. Tasta\376i ENTER pentru a continua.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2351,7 +2358,7 @@ MUI_STRING roROStrings[] = {STRING_CONSOLEFAIL3, "Tastaturile USB nu sunt \356nc\343 toate acceptate\r\n"}, {STRING_FORMATTINGPART, - "Disc \356n curs de formatare..."}, + "Parti\376ia \356n curs de formatare..."}, {STRING_CHECKINGDISK, "Disc \356n curs de verificare..."}, {STRING_FORMATDISK1, diff --git a/base/setup/usetup/lang/ru-RU.h b/base/setup/usetup/lang/ru-RU.h index 683b130eb15..55fd4484777 100644 --- a/base/setup/usetup/lang/ru-RU.h +++ b/base/setup/usetup/lang/ru-RU.h @@ -1279,7 +1279,7 @@ static MUI_ENTRY ruRUFormatPartitionEntries[] = }, { 6, - 10, + 16, "\204\253\357 \343\341\342\240\255\256\242\252\250 \340\240\247\244\245\253 \241\343\244\245\342 \256\342\344\256\340\254\240\342\250\340\256\242\240\255. \215\240\246\254\250\342\245 ENTER \244\253\357 \257\340\256\244\256\253\246\245\255\250\357.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2320,9 +2320,9 @@ MUI_STRING ruRUStrings[] = {STRING_CONSOLEFAIL3, "USB \252\253\240\242\250\240\342\343\340\353 \341\245\251\347\240\341 \257\256\244\244\245\340\246\250\242\240\356\342\341\357 \255\245 \257\256\253\255\256\341\342\354\356\r\n"}, {STRING_FORMATTINGPART, - "\217\340\256\243\340\240\254\254\240 \343\341\342\240\255\256\242\252\250 \344\256\340\254\240\342\250\340\343\245\342 \242\240\350 \244\250\341\252"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "\217\340\256\243\340\240\254\254\240 \343\341\342\240\255\256\242\252\250 \257\340\256\242\245\340\357\245\342 \242\240\350 \244\250\341\252"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " \224\256\340\254\240\342\250\340\256\242\240\255\250\245 \340\240\247\244\245\253\240 \242 \344\240\251\253\256\242\256\251 \341\250\341\342\245\254\245 %S (\241\353\341\342\340\256\245) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/sk-SK.h b/base/setup/usetup/lang/sk-SK.h index 37c06321f56..5568b004e3a 100644 --- a/base/setup/usetup/lang/sk-SK.h +++ b/base/setup/usetup/lang/sk-SK.h @@ -1265,7 +1265,7 @@ static MUI_ENTRY skSKFormatPartitionEntries[] = }, { 6, - 10, + 16, "In\347tal\240tor teraz naform\240tuje oblas\234. Stla\237te ENTER pre pokra\237ovanie.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2311,9 +2311,9 @@ MUI_STRING skSKStrings[] = {STRING_CONSOLEFAIL3, "USB kl\240vesnica e\347te nie je plne podporovan\240\r\n"}, {STRING_FORMATTINGPART, - "In\347tal\240tor form\240tuje V\240\347 disk"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "In\347tal\240tor kontroluje V\240\347 disk"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Naform\240tova\234 oblas\234 ako syst\202m s\243borov %S (r\354chly form\240t) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/sq-AL.h b/base/setup/usetup/lang/sq-AL.h index f5849cade32..0124a1be7b3 100644 --- a/base/setup/usetup/lang/sq-AL.h +++ b/base/setup/usetup/lang/sq-AL.h @@ -1263,7 +1263,7 @@ static MUI_ENTRY sqALFormatPartitionEntries[] = }, { 6, - 10, + 16, "Instalimi tani do t\211 formatoj\211 particionin. Kliko ENTER p\211r t\211 vazhduar.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2312,9 +2312,9 @@ MUI_STRING sqALStrings[] = {STRING_CONSOLEFAIL3, "Tastierat USB nuk jan\211 t\211 mb\211shtetura ende plot\211sisht\r\n"}, {STRING_FORMATTINGPART, - "Instalimi po formaton diskun tuaj"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Instalimi \211sht\211 duke kontrolluar diskun tuaj"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Formato particionin si %S dokumentat e sistemit (formatim i shpejt\211) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/sv-SE.h b/base/setup/usetup/lang/sv-SE.h index 95664b2d55a..dd7d985cf47 100644 --- a/base/setup/usetup/lang/sv-SE.h +++ b/base/setup/usetup/lang/sv-SE.h @@ -1265,7 +1265,7 @@ static MUI_ENTRY svSEFormatPartitionEntries[] = }, { 6, - 10, + 16, "Partitionen kommer nu att formaters Tryck ENTER f\224r att forts\204tta.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2301,9 +2301,9 @@ MUI_STRING svSEStrings[] = {STRING_CONSOLEFAIL3, "USB tangentbord \204r itne helt st\224tt \204n\r\n"}, {STRING_FORMATTINGPART, - "Setup formaterar din disk"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Setup under\224ker din disk"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " Formaterar partition som %S filsystem (snabbformatering) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/tr-TR.h b/base/setup/usetup/lang/tr-TR.h index 59210fc1a56..8a29c17be35 100644 --- a/base/setup/usetup/lang/tr-TR.h +++ b/base/setup/usetup/lang/tr-TR.h @@ -1247,7 +1247,7 @@ static MUI_ENTRY trTRFormatPartitionEntries[] = }, { 6, - 10, + 16, "Kur, \237imdi b\224l\201m\201 bi\207imlendirecek. Devam etmek i\207in ENTER'e bas\215n\215z.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2274,9 +2274,9 @@ MUI_STRING trTRStrings[] = {STRING_CONSOLEFAIL3, "USB klavye daha t\201m\201yle desteklenmemektedir.\r\n"}, {STRING_FORMATTINGPART, - "Kur, diskinizi bi\207imlendiriyor."}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "Kur, diskinizi g\224zden ge\207iriyor."}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " B\224l\201m\201 %S dosya sistemiyle h\215zl\215 bi\207imlendir. "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/lang/uk-UA.h b/base/setup/usetup/lang/uk-UA.h index 1d65687b697..6baefe35d65 100644 --- a/base/setup/usetup/lang/uk-UA.h +++ b/base/setup/usetup/lang/uk-UA.h @@ -1264,7 +1264,7 @@ static MUI_ENTRY ukUAFormatPartitionEntries[] = }, { 6, - 10, + 16, "\207\240\340\240\247 \242\341\342\240\255\256\242\253\356\242\240\347 \242i\244\344\256\340\254\240\342\343\363 \340\256\247\244i\253. \215\240\342\250\341\255i\342\354 ENTER \244\253\357 \257\340\256\244\256\242\246\245\255\255\357.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT @@ -2308,9 +2308,9 @@ MUI_STRING ukUAStrings[] = {STRING_CONSOLEFAIL3, "USB \252\253\240\242i\240\342\343\340\250 \351\245 \255\245 \257i\244\342\340\250\254\343\356\342\354\341\357 \257\256\242\255i\341\342\356\r\n"}, {STRING_FORMATTINGPART, - "\202\341\342\240\255\256\242\253\356\242\240\347 \344\256\340\254\240\342\343\363 \242\240\350 \244\250\341\252"}, + "Setup is formatting the partition..."}, {STRING_CHECKINGDISK, - "\202\341\342\240\255\256\242\253\356\242\240\347 \257\245\340\245\242i\340\357\363 \242\240\350 \244\250\341\252"}, + "Setup is checking the disk..."}, {STRING_FORMATDISK1, " \224\256\340\254\240\342\343\242\240\342\250 \340\256\247\244i\253 \242 \344\240\251\253\256\242i\251 \341\250\341\342\245\254i %S (\350\242\250\244\252\245 \344\256\340\254\240\342\343\242\240\255\255\357) "}, {STRING_FORMATDISK2, diff --git a/base/setup/usetup/usetup.c b/base/setup/usetup/usetup.c index 492fc9c9d05..10bf53553dd 100644 --- a/base/setup/usetup/usetup.c +++ b/base/setup/usetup/usetup.c @@ -2784,8 +2784,6 @@ FormatPartitionPage(PINPUT_RECORD Ir) DPRINT("FormatPartitionPage()\n"); - MUIDisplayPage(FORMAT_PARTITION_PAGE); - if (PartitionList == NULL || TempPartition == NULL) { /* FIXME: show an error dialog */ @@ -2800,6 +2798,15 @@ FormatPartitionPage(PINPUT_RECORD Ir) SelectedFileSystem = FileSystemList->Selected; ASSERT(SelectedFileSystem && SelectedFileSystem->FileSystem); + MUIDisplayPage(FORMAT_PARTITION_PAGE); + + PartitionDescription(PartEntry, Buffer, ARRAYSIZE(Buffer)); + CONSOLE_SetTextXY(6, 10, Buffer); + + DiskDescription(DiskEntry, Buffer, ARRAYSIZE(Buffer)); + CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDDISK2), + Buffer); + while (TRUE) { if (!IsUnattendedSetup) @@ -2929,8 +2936,6 @@ CheckFileSystemPage(PINPUT_RECORD Ir) PPARTENTRY PartEntry; CHAR Buffer[MAX_PATH]; - MUIDisplayPage(CHECK_FILE_SYSTEM_PAGE); - if (PartitionList == NULL) { /* FIXME: show an error dialog */ @@ -2947,6 +2952,15 @@ CheckFileSystemPage(PINPUT_RECORD Ir) DPRINT1("CheckFileSystemPage -- PartitionType: 0x%02X ; FileSystem: %S\n", PartEntry->PartitionType, (*PartEntry->FileSystem ? PartEntry->FileSystem : L"n/a")); + MUIDisplayPage(CHECK_FILE_SYSTEM_PAGE); + + PartitionDescription(PartEntry, Buffer, ARRAYSIZE(Buffer)); + CONSOLE_SetTextXY(6, 10, Buffer); + + DiskDescription(PartEntry->DiskEntry, Buffer, ARRAYSIZE(Buffer)); + CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDDISK2), + Buffer); + /* Check the partition */ Status = DoChkdsk(PartEntry); if (Status == STATUS_NOT_SUPPORTED) From 3ce8d909d05c34bedc7afc29c078f771fa21f599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 26 Oct 2023 21:44:41 +0200 Subject: [PATCH 18/39] [USETUP] Blur the boundaries between "Primary" and "Logical" partitions (in MBR disks) Do not do that yet for extended partitions (containers). This is possible, because when creating partitions, we do that on unpartitioned space that is already "tagged" as either being "logical" or not, and the partition style is inherited from that. The resulting code is simpler, yet working as it should. This will also help in the future for supporting other platforms, where the concept of "primary", "extended" and "logical" partitions do not exist (basically all platforms except BIOS-based PC-AT). --- base/setup/lib/utils/partlist.c | 219 +++++++++++++------------------- base/setup/lib/utils/partlist.h | 43 +++---- base/setup/usetup/usetup.c | 136 +++++++------------- 3 files changed, 153 insertions(+), 245 deletions(-) diff --git a/base/setup/lib/utils/partlist.c b/base/setup/lib/utils/partlist.c index c917aada568..5f1044335ed 100644 --- a/base/setup/lib/utils/partlist.c +++ b/base/setup/lib/utils/partlist.c @@ -2782,16 +2782,92 @@ GetNextUnpartitionedEntry( return NULL; } +ERROR_NUMBER +PartitionCreationChecks( + _In_ PPARTENTRY PartEntry) +{ + PDISKENTRY DiskEntry = PartEntry->DiskEntry; + + if (DiskEntry->DiskStyle == PARTITION_STYLE_GPT) + { + DPRINT1("GPT-partitioned disk detected, not currently supported by SETUP!\n"); + return ERROR_WARN_PARTITION; + } + + /* Fail if the partition is already in use */ + if (PartEntry->IsPartitioned) + return ERROR_NEW_PARTITION; + + /* + * For primary partitions + */ + if (!PartEntry->LogicalPartition) + { + /* Only one primary partition is allowed on super-floppy */ + if (IsSuperFloppy(DiskEntry)) + return ERROR_PARTITION_TABLE_FULL; + + /* Fail if there are already 4 primary partitions in the list */ + if (GetPrimaryPartitionCount(DiskEntry) >= 4) + return ERROR_PARTITION_TABLE_FULL; + } + /* + * For logical partitions + */ + else + { + // TODO: Check that we are inside an extended partition!! + // Then the following check will be useless. + + /* Only one (primary) partition is allowed on super-floppy */ + if (IsSuperFloppy(DiskEntry)) + return ERROR_PARTITION_TABLE_FULL; + } + + return ERROR_SUCCESS; +} + +ERROR_NUMBER +ExtendedPartitionCreationChecks( + _In_ PPARTENTRY PartEntry) +{ + PDISKENTRY DiskEntry = PartEntry->DiskEntry; + + if (DiskEntry->DiskStyle == PARTITION_STYLE_GPT) + { + DPRINT1("GPT-partitioned disk detected, not currently supported by SETUP!\n"); + return ERROR_WARN_PARTITION; + } + + /* Fail if the partition is already in use */ + if (PartEntry->IsPartitioned) + return ERROR_NEW_PARTITION; + + /* Only one primary partition is allowed on super-floppy */ + if (IsSuperFloppy(DiskEntry)) + return ERROR_PARTITION_TABLE_FULL; + + /* Fail if there are already 4 primary partitions in the list */ + if (GetPrimaryPartitionCount(DiskEntry) >= 4) + return ERROR_PARTITION_TABLE_FULL; + + /* Fail if there is another extended partition in the list */ + if (DiskEntry->ExtendedPartition != NULL) + return ERROR_ONLY_ONE_EXTENDED; + + return ERROR_SUCCESS; +} + BOOLEAN -CreatePrimaryPartition( - IN PPARTLIST List, - IN OUT PPARTENTRY PartEntry, - IN ULONGLONG SectorCount, - IN BOOLEAN AutoCreate) +CreatePartition( + _In_ PPARTLIST List, + _Inout_ PPARTENTRY PartEntry, + _In_ ULONGLONG SectorCount, + _In_ BOOLEAN AutoCreate) { ERROR_NUMBER Error; - DPRINT1("CreatePrimaryPartition(%I64u)\n", SectorCount); + DPRINT1("CreatePartition(%I64u)\n", SectorCount); if (List == NULL || PartEntry == NULL || PartEntry->DiskEntry == NULL || PartEntry->IsPartitioned) @@ -2799,10 +2875,10 @@ CreatePrimaryPartition( return FALSE; } - Error = PrimaryPartitionCreationChecks(PartEntry); + Error = PartitionCreationChecks(PartEntry); if (Error != NOT_AN_ERROR) { - DPRINT1("PrimaryPartitionCreationChecks() failed with error %lu\n", Error); + DPRINT1("PartitionCreationChecks() failed with error %lu\n", Error); return FALSE; } @@ -2810,8 +2886,6 @@ CreatePrimaryPartition( if (!InitializePartitionEntry(PartEntry, SectorCount, AutoCreate)) return FALSE; - ASSERT(PartEntry->LogicalPartition == FALSE); - UpdateDiskLayout(PartEntry->DiskEntry); AssignDriveLetters(List); @@ -2821,7 +2895,7 @@ CreatePrimaryPartition( static VOID AddLogicalDiskSpace( - IN PDISKENTRY DiskEntry) + _In_ PDISKENTRY DiskEntry) { ULONGLONG StartSector; ULONGLONG SectorCount; @@ -2848,9 +2922,9 @@ AddLogicalDiskSpace( BOOLEAN CreateExtendedPartition( - IN PPARTLIST List, - IN OUT PPARTENTRY PartEntry, - IN ULONGLONG SectorCount) + _In_ PPARTLIST List, + _Inout_ PPARTENTRY PartEntry, + _In_ ULONGLONG SectorCount) { ERROR_NUMBER Error; @@ -2900,42 +2974,6 @@ CreateExtendedPartition( return TRUE; } -BOOLEAN -CreateLogicalPartition( - IN PPARTLIST List, - IN OUT PPARTENTRY PartEntry, - IN ULONGLONG SectorCount, - IN BOOLEAN AutoCreate) -{ - ERROR_NUMBER Error; - - DPRINT1("CreateLogicalPartition(%I64u)\n", SectorCount); - - if (List == NULL || PartEntry == NULL || - PartEntry->DiskEntry == NULL || PartEntry->IsPartitioned) - { - return FALSE; - } - - Error = LogicalPartitionCreationChecks(PartEntry); - if (Error != NOT_AN_ERROR) - { - DPRINT1("LogicalPartitionCreationChecks() failed with error %lu\n", Error); - return FALSE; - } - - /* Initialize the partition entry, inserting a new blank region if needed */ - if (!InitializePartitionEntry(PartEntry, SectorCount, AutoCreate)) - return FALSE; - - ASSERT(PartEntry->LogicalPartition == TRUE); - - UpdateDiskLayout(PartEntry->DiskEntry); - AssignDriveLetters(List); - - return TRUE; -} - NTSTATUS DismountVolume( IN PPARTENTRY PartEntry) @@ -3950,87 +3988,6 @@ SetMBRPartitionType( DiskEntry->LayoutBuffer->PartitionEntry[PartEntry->PartitionIndex].RewritePartition = TRUE; } -ERROR_NUMBER -PrimaryPartitionCreationChecks( - IN PPARTENTRY PartEntry) -{ - PDISKENTRY DiskEntry = PartEntry->DiskEntry; - - if (DiskEntry->DiskStyle == PARTITION_STYLE_GPT) - { - DPRINT1("GPT-partitioned disk detected, not currently supported by SETUP!\n"); - return ERROR_WARN_PARTITION; - } - - /* Fail if the partition is already in use */ - if (PartEntry->IsPartitioned) - return ERROR_NEW_PARTITION; - - /* Only one primary partition is allowed on super-floppy */ - if (IsSuperFloppy(DiskEntry)) - return ERROR_PARTITION_TABLE_FULL; - - /* Fail if there are already 4 primary partitions in the list */ - if (GetPrimaryPartitionCount(DiskEntry) >= 4) - return ERROR_PARTITION_TABLE_FULL; - - return ERROR_SUCCESS; -} - -ERROR_NUMBER -ExtendedPartitionCreationChecks( - IN PPARTENTRY PartEntry) -{ - PDISKENTRY DiskEntry = PartEntry->DiskEntry; - - if (DiskEntry->DiskStyle == PARTITION_STYLE_GPT) - { - DPRINT1("GPT-partitioned disk detected, not currently supported by SETUP!\n"); - return ERROR_WARN_PARTITION; - } - - /* Fail if the partition is already in use */ - if (PartEntry->IsPartitioned) - return ERROR_NEW_PARTITION; - - /* Only one primary partition is allowed on super-floppy */ - if (IsSuperFloppy(DiskEntry)) - return ERROR_PARTITION_TABLE_FULL; - - /* Fail if there are already 4 primary partitions in the list */ - if (GetPrimaryPartitionCount(DiskEntry) >= 4) - return ERROR_PARTITION_TABLE_FULL; - - /* Fail if there is another extended partition in the list */ - if (DiskEntry->ExtendedPartition != NULL) - return ERROR_ONLY_ONE_EXTENDED; - - return ERROR_SUCCESS; -} - -ERROR_NUMBER -LogicalPartitionCreationChecks( - IN PPARTENTRY PartEntry) -{ - PDISKENTRY DiskEntry = PartEntry->DiskEntry; - - if (DiskEntry->DiskStyle == PARTITION_STYLE_GPT) - { - DPRINT1("GPT-partitioned disk detected, not currently supported by SETUP!\n"); - return ERROR_WARN_PARTITION; - } - - /* Fail if the partition is already in use */ - if (PartEntry->IsPartitioned) - return ERROR_NEW_PARTITION; - - /* Only one primary partition is allowed on super-floppy */ - if (IsSuperFloppy(DiskEntry)) - return ERROR_PARTITION_TABLE_FULL; - - return ERROR_SUCCESS; -} - BOOLEAN GetNextUnformattedPartition( IN PPARTLIST List, diff --git a/base/setup/lib/utils/partlist.h b/base/setup/lib/utils/partlist.h index cce21d2eede..c59b5e1f4b7 100644 --- a/base/setup/lib/utils/partlist.h +++ b/base/setup/lib/utils/partlist.h @@ -294,25 +294,26 @@ GetPrevPartition( IN PPARTLIST List, IN PPARTENTRY CurrentPart OPTIONAL); -BOOLEAN -CreatePrimaryPartition( - IN PPARTLIST List, - IN OUT PPARTENTRY PartEntry, - IN ULONGLONG SectorCount, - IN BOOLEAN AutoCreate); +ERROR_NUMBER +PartitionCreationChecks( + _In_ PPARTENTRY PartEntry); + +ERROR_NUMBER +ExtendedPartitionCreationChecks( + _In_ PPARTENTRY PartEntry); BOOLEAN -CreateExtendedPartition( - IN PPARTLIST List, - IN OUT PPARTENTRY PartEntry, - IN ULONGLONG SectorCount); +CreatePartition( + _In_ PPARTLIST List, + _Inout_ PPARTENTRY PartEntry, + _In_ ULONGLONG SectorCount, + _In_ BOOLEAN AutoCreate); BOOLEAN -CreateLogicalPartition( - IN PPARTLIST List, - IN OUT PPARTENTRY PartEntry, - IN ULONGLONG SectorCount, - IN BOOLEAN AutoCreate); +CreateExtendedPartition( + _In_ PPARTLIST List, + _Inout_ PPARTENTRY PartEntry, + _In_ ULONGLONG SectorCount); NTSTATUS DismountVolume( @@ -360,18 +361,6 @@ SetMBRPartitionType( IN PPARTENTRY PartEntry, IN UCHAR PartitionType); -ERROR_NUMBER -PrimaryPartitionCreationChecks( - IN PPARTENTRY PartEntry); - -ERROR_NUMBER -ExtendedPartitionCreationChecks( - IN PPARTENTRY PartEntry); - -ERROR_NUMBER -LogicalPartitionCreationChecks( - IN PPARTENTRY PartEntry); - BOOLEAN GetNextUnformattedPartition( IN PPARTLIST List, diff --git a/base/setup/usetup/usetup.c b/base/setup/usetup/usetup.c index 10bf53553dd..447616b74d3 100644 --- a/base/setup/usetup/usetup.c +++ b/base/setup/usetup/usetup.c @@ -75,10 +75,9 @@ static PPARTLIST PartitionList = NULL; /* Currently selected partition entry in the list */ static PPARTENTRY CurrentPartition = NULL; static enum { - PartTypePrimary, - PartTypeExtended, - PartTypeLogical -} PartCreateType = PartTypePrimary; + PartTypeData, // On MBR-disks, primary or logical partition + PartTypeExtended // MBR-disk container +} PartCreateType = PartTypeData; /* List of supported file systems for the partition to be formatted */ static PFILE_SYSTEM_LIST FileSystemList = NULL; @@ -1607,20 +1606,10 @@ SelectPartitionPage(PINPUT_RECORD Ir) ASSERT(CurrentPartition != NULL); ASSERT(!IsContainerPartition(CurrentPartition->PartitionType)); - if (CurrentPartition->LogicalPartition) - { - CreateLogicalPartition(PartitionList, - CurrentPartition, - CurrentPartition->SectorCount.QuadPart, - TRUE); - } - else - { - CreatePrimaryPartition(PartitionList, - CurrentPartition, - CurrentPartition->SectorCount.QuadPart, - TRUE); - } + CreatePartition(PartitionList, + CurrentPartition, + CurrentPartition->SectorCount.QuadPart, + TRUE); // FIXME?? Aren't we going to enter an infinite loop, if this test fails?? if (!IsDiskSizeValid(CurrentPartition)) @@ -1654,42 +1643,35 @@ SelectPartitionPage(PINPUT_RECORD Ir) while (TRUE) { + ULONG uID; + CurrentPartition = ListUi.CurrentPartition; /* Update status text */ if (CurrentPartition == NULL) { - CONSOLE_SetStatusText(MUIGetString(STRING_INSTALLCREATEPARTITION)); - } - else if (CurrentPartition->LogicalPartition) - { - if (CurrentPartition->IsPartitioned) - { - CONSOLE_SetStatusText(MUIGetString(STRING_DELETEPARTITION)); - } - else - { - CONSOLE_SetStatusText(MUIGetString(STRING_INSTALLCREATELOGICAL)); - } + ASSERT(FALSE); // TEST TEST + uID = STRING_INSTALLCREATEPARTITION; } else { if (CurrentPartition->IsPartitioned) { - if (IsContainerPartition(CurrentPartition->PartitionType)) + uID = STRING_INSTALLDELETEPARTITION; + if (!CurrentPartition->LogicalPartition && + IsContainerPartition(CurrentPartition->PartitionType)) { - CONSOLE_SetStatusText(MUIGetString(STRING_DELETEPARTITION)); - } - else - { - CONSOLE_SetStatusText(MUIGetString(STRING_INSTALLDELETEPARTITION)); + uID = STRING_DELETEPARTITION; } } else { - CONSOLE_SetStatusText(MUIGetString(STRING_INSTALLCREATEPARTITION)); + uID = STRING_INSTALLCREATEPARTITION; + if (CurrentPartition->LogicalPartition) + uID = STRING_INSTALLCREATELOGICAL; } } + CONSOLE_SetStatusText(MUIGetString(uID)); CONSOLE_ConInKey(Ir); @@ -1741,34 +1723,17 @@ SelectPartitionPage(PINPUT_RECORD Ir) if (CurrentPartition->IsPartitioned == FALSE) { - if (CurrentPartition->LogicalPartition) + Error = PartitionCreationChecks(CurrentPartition); + if (Error != NOT_AN_ERROR) { - Error = LogicalPartitionCreationChecks(CurrentPartition); - if (Error != NOT_AN_ERROR) - { - MUIDisplayError(Error, Ir, POPUP_WAIT_ANY_KEY); - return SELECT_PARTITION_PAGE; - } - - CreateLogicalPartition(PartitionList, - CurrentPartition, - 0ULL, - TRUE); + MUIDisplayError(Error, Ir, POPUP_WAIT_ANY_KEY); + return SELECT_PARTITION_PAGE; } - else - { - Error = PrimaryPartitionCreationChecks(CurrentPartition); - if (Error != NOT_AN_ERROR) - { - MUIDisplayError(Error, Ir, POPUP_WAIT_ANY_KEY); - return SELECT_PARTITION_PAGE; - } - CreatePrimaryPartition(PartitionList, - CurrentPartition, - 0ULL, - TRUE); - } + CreatePartition(PartitionList, + CurrentPartition, + 0ULL, + TRUE); } if (!IsDiskSizeValid(CurrentPartition)) @@ -1787,14 +1752,14 @@ SelectPartitionPage(PINPUT_RECORD Ir) if (CurrentPartition->LogicalPartition == FALSE) { - Error = PrimaryPartitionCreationChecks(CurrentPartition); + Error = PartitionCreationChecks(CurrentPartition); if (Error != NOT_AN_ERROR) { MUIDisplayError(Error, Ir, POPUP_WAIT_ANY_KEY); return SELECT_PARTITION_PAGE; } - PartCreateType = PartTypePrimary; + PartCreateType = PartTypeData; return CREATE_PARTITION_PAGE; } } @@ -1821,14 +1786,14 @@ SelectPartitionPage(PINPUT_RECORD Ir) if (CurrentPartition->LogicalPartition) { - Error = LogicalPartitionCreationChecks(CurrentPartition); + Error = PartitionCreationChecks(CurrentPartition); if (Error != NOT_AN_ERROR) { MUIDisplayError(Error, Ir, POPUP_WAIT_ANY_KEY); return SELECT_PARTITION_PAGE; } - PartCreateType = PartTypeLogical; + PartCreateType = PartTypeData; return CREATE_PARTITION_PAGE; } } @@ -2102,12 +2067,16 @@ CreatePartitionPage(PINPUT_RECORD Ir) return QUIT_PAGE; } - if (PartCreateType == PartTypePrimary) + if (PartCreateType == PartTypeData) + { uID = STRING_CHOOSE_NEW_PARTITION; - else if (PartCreateType == PartTypeExtended) + if (CurrentPartition->LogicalPartition) + uID = STRING_CHOOSE_NEW_LOGICAL_PARTITION; + } + else // if (PartCreateType == PartTypeExtended) + { uID = STRING_CHOOSE_NEW_EXTENDED_PARTITION; - else // if (PartCreateType == PartTypeLogical) - uID = STRING_CHOOSE_NEW_LOGICAL_PARTITION; + } CONSOLE_SetTextXY(6, 8, MUIGetString(uID)); @@ -2169,26 +2138,19 @@ CreatePartitionPage(PINPUT_RECORD Ir) DPRINT("Partition size: %I64u bytes\n", PartSize); - if (PartCreateType == PartTypePrimary) + if (PartCreateType == PartTypeData) { - CreatePrimaryPartition(PartitionList, - CurrentPartition, - SectorCount, - FALSE); + CreatePartition(PartitionList, + CurrentPartition, + SectorCount, + FALSE); } - else if (PartCreateType == PartTypeExtended) + else // if (PartCreateType == PartTypeExtended) { CreateExtendedPartition(PartitionList, CurrentPartition, SectorCount); } - else // if (PartCreateType == PartTypeLogical) - { - CreateLogicalPartition(PartitionList, - CurrentPartition, - SectorCount, - FALSE); - } return SELECT_PARTITION_PAGE; } @@ -2443,10 +2405,10 @@ SelectFileSystemPage(PINPUT_RECORD Ir) */ if (!SystemPartition->IsPartitioned) { - CreatePrimaryPartition(PartitionList, - SystemPartition, - 0LL, // SystemPartition->SectorCount.QuadPart, - TRUE); + CreatePartition(PartitionList, + SystemPartition, + 0LL, // SystemPartition->SectorCount.QuadPart, + TRUE); ASSERT(SystemPartition->IsPartitioned); } From cc08577ab8c7afc8dca40ac9ab60e405c463c28a Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 26 Oct 2023 22:18:02 +0900 Subject: [PATCH 19/39] improve --- dll/win32/imm32/CtfImeTable.h | 9 ++ dll/win32/imm32/ctf.c | 257 ++++++++++++++++++++++-------- dll/win32/imm32/imm32.spec | 3 +- dll/win32/imm32/precomp.h | 4 +- sdk/include/reactos/imm32_undoc.h | 5 +- win32ss/include/ntuser.h | 6 +- 6 files changed, 212 insertions(+), 72 deletions(-) diff --git a/dll/win32/imm32/CtfImeTable.h b/dll/win32/imm32/CtfImeTable.h index ae100ac93ac..be317143db1 100644 --- a/dll/win32/imm32/CtfImeTable.h +++ b/dll/win32/imm32/CtfImeTable.h @@ -1,3 +1,12 @@ +/* + * PROJECT: ReactOS IMM32 + * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) + * PURPOSE: Defining the CTF IME DLL file interface + * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ + */ + +/* A CTF IME file contains the following functions: */ + /* DEFINE_CTF_IME_FN(func_name, ret_type, params) */ DEFINE_CTF_IME_FN(CtfImeCreateThreadMgr, HRESULT, (VOID)) DEFINE_CTF_IME_FN(CtfImeDestroyThreadMgr, HRESULT, (VOID)) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index 3cf1bc12384..d2efa0577f9 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -2,7 +2,7 @@ * PROJECT: ReactOS IMM32 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) * PURPOSE: Implementing the IMM32 Cicero-aware Text Framework (CTF) - * COPYRIGHT: Copyright 2022 Katayama Hirofumi MZ + * COPYRIGHT: Copyright 2022-2023 Katayama Hirofumi MZ */ #include "precomp.h" @@ -17,178 +17,263 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm); * https://googleprojectzero.blogspot.com/2019/08/down-rabbit-hole.html */ -/* Define the function types FN_... for CTF IME functions */ +/* + * TSF stands for "Text Services Framework". "Cicero" is the code name of TSF. + * CTF stands for "Cicero-aware Text Framework". + * + * The CTF IME file is a DLL file. The export functions of the CTF IME file are + * defined in "CtfImeTable.h" of this folder. + */ + +/* The instance of the CTF IME file */ +HINSTANCE g_hCtfIme = NULL; + +/* Define the function types (FN_...) for CTF IME functions */ #undef DEFINE_CTF_IME_FN #define DEFINE_CTF_IME_FN(func_name, ret_type, params) \ typedef ret_type (WINAPI *FN_##func_name)params; #include "CtfImeTable.h" -HINSTANCE g_hCtfIme = NULL; - -#define CTF_IME_FN(func_name) g_p##func_name - -/* Define the global variables for CTF IME functions */ +/* Define the global variables (g_pfn...) for CTF IME functions */ #undef DEFINE_CTF_IME_FN #define DEFINE_CTF_IME_FN(func_name, ret_type, params) \ - FN_##func_name g_p##func_name = NULL; + FN_##func_name g_pfn##func_name = NULL; #include "CtfImeTable.h" -typedef BOOL (WINAPI *FN_ApphelpCheckIME)(LPCWSTR); +/* The macro that gets the variable name from the CTF IME function name */ +#define CTF_IME_FN(func_name) g_pfn##func_name -/* FIXME: This is kernel32.dll function */ -BOOL -WINAPI -BaseCheckAppcompatCache(IN LPCWSTR ApplicationName, - IN HANDLE FileHandle, - IN LPCWSTR Environment, - OUT PULONG Reason); +/* The type of ApphelpCheckIME function in apphelp.dll */ +typedef BOOL (WINAPI *FN_ApphelpCheckIME)(_In_z_ LPCWSTR AppName); + +/* FIXME: This is kernel32 function. We have to declare this in some header. */ +BOOL WINAPI +BaseCheckAppcompatCache(_In_z_ LPCWSTR ApplicationName, + _In_ HANDLE FileHandle, + _In_opt_z_ LPCWSTR Environment, + _Out_ PULONG pdwReason); -BOOL Imm32CheckAndApplyAppCompat(ULONG dwReason, LPCWSTR pszAppName) +/*********************************************************************** + * This function checks whether the app's IME is disabled by application + * compatibility patcher. + */ +BOOL +Imm32CheckAndApplyAppCompat( + _In_ ULONG dwReason, + _In_z_ LPCWSTR pszAppName) { HINSTANCE hinstApphelp; FN_ApphelpCheckIME pApphelpCheckIME; + /* Query the application compatibility patcher */ if (BaseCheckAppcompatCache(pszAppName, INVALID_HANDLE_VALUE, NULL, &dwReason)) - return TRUE; + return TRUE; /* The app's IME is not disabled */ + /* Load apphelp.dll if necessary */ hinstApphelp = GetModuleHandleW(L"apphelp.dll"); if (!hinstApphelp) { hinstApphelp = LoadLibraryW(L"apphelp.dll"); if (!hinstApphelp) - return TRUE; + return TRUE; /* There is no apphelp.dll. The app's IME is not disabled */ } + /* Is ApphelpCheckIME implemented? */ pApphelpCheckIME = (FN_ApphelpCheckIME)GetProcAddress(hinstApphelp, "ApphelpCheckIME"); if (!pApphelpCheckIME) - return TRUE; + return TRUE; /* Not implemented. The app's IME is not disabled */ + /* Is the app's IME disabled or not? */ return pApphelpCheckIME(pszAppName); } -HMODULE APIENTRY Imm32LoadCtfIme(VOID) +/*********************************************************************** + * This function loads the CTF IME file if necessary and establishes + * communication with the CTF IME. + */ +HINSTANCE +Imm32LoadCtfIme(VOID) { BOOL bSuccess = FALSE; IMEINFOEX ImeInfoEx; WCHAR szImeFile[MAX_PATH]; + /* Lock the IME interface */ RtlEnterCriticalSection(&gcsImeDpi); + do { - if (g_hCtfIme) + if (g_hCtfIme) /* Already loaded? */ + { + bSuccess = TRUE; break; + } /* * NOTE: (HKL)0x04090409 is English US keyboard (default). - * The Cicero keyboard uses English US keyboard. + * The Cicero keyboard logically uses English US keyboard. */ if (!ImmLoadLayout((HKL)ULongToHandle(0x04090409), &ImeInfoEx)) break; + /* Build a path string in system32. The IME file must be in system32. */ Imm32GetSystemLibraryPath(szImeFile, _countof(szImeFile), ImeInfoEx.wszImeFile); + /* Is the CTF IME disabled by app compatibility patcher? */ if (!Imm32CheckAndApplyAppCompat(0, szImeFile)) - break; + break; /* The app's IME is disabled */ + /* Load a CTF IME file */ g_hCtfIme = LoadLibraryW(szImeFile); if (!g_hCtfIme) break; + /* Assume success */ bSuccess = TRUE; + /* Retrieve the CTF IME functions */ #undef DEFINE_CTF_IME_FN #define DEFINE_CTF_IME_FN(func_name, ret_type, params) \ CTF_IME_FN(func_name) = (FN_##func_name)GetProcAddress(g_hCtfIme, #func_name); \ if (!CTF_IME_FN(func_name)) \ { \ - bSuccess = FALSE; \ + bSuccess = FALSE; /* Failed */ \ break; \ } #include "CtfImeTable.h" } while (0); - if (g_hCtfIme && !bSuccess) + /* Unload the CTF IME if failed */ + if (!bSuccess) { + /* Set NULL to the function pointers */ #undef DEFINE_CTF_IME_FN -#define DEFINE_CTF_IME_FN(func_name, ret_type, params) \ - CTF_IME_FN(func_name) = NULL; +#define DEFINE_CTF_IME_FN(func_name, ret_type, params) CTF_IME_FN(func_name) = NULL; #include "CtfImeTable.h" - FreeLibrary(g_hCtfIme); - g_hCtfIme = NULL; + if (g_hCtfIme) + { + FreeLibrary(g_hCtfIme); + g_hCtfIme = NULL; + } } + /* Unlock the IME interface */ RtlLeaveCriticalSection(&gcsImeDpi); + return g_hCtfIme; } -HRESULT Imm32CtfImeCreateThreadMgr(VOID) +/*********************************************************************** + * This function calls CTF IME's CtfImeCreateThreadMgr function. + */ +HRESULT +CtfImeCreateThreadMgr(VOID) { - if (!Imm32LoadCtfIme() || CTF_IME_FN(CtfImeCreateThreadMgr) == NULL) + if (!Imm32LoadCtfIme()) return E_FAIL; + return CTF_IME_FN(CtfImeCreateThreadMgr)(); } -HRESULT Imm32CtfImeCreateInputContext(HIMC hIMC) +/*********************************************************************** + * This function calls CTF IME's CtfImeDestroyThreadMgr function. + */ +HRESULT +CtfImeDestroyThreadMgr(VOID) { - if (!Imm32LoadCtfIme() || CTF_IME_FN(CtfImeCreateInputContext) == NULL) + if (!Imm32LoadCtfIme()) return E_FAIL; + + return CTF_IME_FN(CtfImeDestroyThreadMgr)(); +} + +/*********************************************************************** + * This function calls CTF IME's CtfImeCreateInputContext function. + */ +HRESULT +CtfImeCreateInputContext( + _In_ HIMC hIMC) +{ + if (!Imm32LoadCtfIme()) + return E_FAIL; + return CTF_IME_FN(CtfImeCreateInputContext)(hIMC); } -BOOL CALLBACK Imm32EnumIMC(HIMC hIMC, LPARAM lParam) +/*********************************************************************** + * The callback function to activate CTF IMEs. Used in CtfAImmActivate. + */ +static BOOL CALLBACK +Imm32EnumCreateCtfICProc( + _In_ HIMC hIMC, + _In_ LPARAM lParam) { - Imm32CtfImeCreateInputContext(hIMC); - return TRUE; + UNREFERENCED_PARAMETER(lParam); + CtfImeCreateInputContext(hIMC); + return TRUE; /* Continue */ } -// Win: Internal_CtfImeDestroyInputContext -HRESULT APIENTRY Imm32CtfImeDestroyInputContext(HIMC hIMC) +/*********************************************************************** + * This function calls CTF IME's CtfImeDestroyInputContext function. + */ +HRESULT +CtfImeDestroyInputContext(_In_ HIMC hIMC) { if (!Imm32LoadCtfIme()) return E_FAIL; -#if 1 - FIXME("(%p)\n", hIMC); - return E_NOTIMPL; -#else - return g_pfnCtfImeDestroyInputContext(hIMC); -#endif + return CTF_IME_FN(CtfImeDestroyInputContext)(hIMC); } -// Win: CtfImmTIMDestroyInputContext -HRESULT APIENTRY CtfImmTIMDestroyInputContext(HIMC hIMC) +/*********************************************************************** + * This function calls CTF IME's CtfImeDestroyInputContext function if necessary. + */ +HRESULT +CtfImmTIMDestroyInputContext( + _In_ HIMC hIMC) { if (!IS_CICERO_MODE() || (GetWin32ClientInfo()->dwCompatFlags2 & 2)) return E_NOINTERFACE; - return Imm32CtfImeDestroyInputContext(hIMC); + return CtfImeDestroyInputContext(hIMC); } -// Win: CtfImmTIMCreateInputContext -HRESULT APIENTRY CtfImmTIMCreateInputContext(HIMC hIMC) +HRESULT +CtfImmTIMCreateInputContext( + _In_ HIMC hIMC) { TRACE("(%p)\n", hIMC); return E_NOTIMPL; } /*********************************************************************** - * CtfAImmActivate (IMM32.1) + * CtfAImmActivate (IMM32.@) + * + * This function activates "Active IMM" (AIMM). */ -HRESULT WINAPI CtfAImmActivate(HINSTANCE *phinstCtfIme) +HRESULT WINAPI +CtfAImmActivate( + _Out_opt_ HINSTANCE *phinstCtfIme) { - HINSTANCE hinstCtfIme; HRESULT hr; + HINSTANCE hinstCtfIme; TRACE("(%p)\n", phinstCtfIme); + /* Load a CTF IME file if necessary */ hinstCtfIme = Imm32LoadCtfIme(); - hr = Imm32CtfImeCreateThreadMgr(); + + /* Create a thread manager of the CTF IME */ + hr = CtfImeCreateThreadMgr(); if (hr == S_OK) { - GetWin32ClientInfo()->CI_flags |= 0x800; /* FIXME */ - GetWin32ClientInfo()->CI_flags &= ~CI_TFSDISABLED; - ImmEnumInputContext(0, Imm32EnumIMC, 0); + /* Update CI_... flags of the thread client info */ + GetWin32ClientInfo()->CI_flags |= CI_AIMMACTIVATED; /* Activate AIMM */ + GetWin32ClientInfo()->CI_flags &= ~CI_TSFDISABLED; /* Enable TSF */ + + /* Create the CTF input contexts */ + ImmEnumInputContext(0, Imm32EnumCreateCtfICProc, 0); } if (phinstCtfIme) @@ -197,10 +282,35 @@ HRESULT WINAPI CtfAImmActivate(HINSTANCE *phinstCtfIme) return hr; } +/*********************************************************************** + * CtfAImmDeactivate (IMM32.@) + * + * This function de-activates "Active IMM" (AIMM). + */ +HRESULT WINAPI +CtfAImmDeactivate( + _In_ BOOL bDestroy) +{ + HRESULT hr; + + if (!bDestroy) + return E_FAIL; + + hr = CtfImeDestroyThreadMgr(); + if (hr == S_OK) + { + GetWin32ClientInfo()->CI_flags &= ~CI_AIMMACTIVATED; /* Deactivate AIMM */ + GetWin32ClientInfo()->CI_flags |= CI_TSFDISABLED; /* Disable TSF */ + } + + return hr; +} + /*********************************************************************** * CtfImmIsCiceroEnabled (IMM32.@) */ -BOOL WINAPI CtfImmIsCiceroEnabled(VOID) +BOOL WINAPI +CtfImmIsCiceroEnabled(VOID) { return IS_CICERO_MODE(); } @@ -208,15 +318,17 @@ BOOL WINAPI CtfImmIsCiceroEnabled(VOID) /*********************************************************************** * CtfImmIsTextFrameServiceDisabled(IMM32.@) */ -BOOL WINAPI CtfImmIsTextFrameServiceDisabled(VOID) +BOOL WINAPI +CtfImmIsTextFrameServiceDisabled(VOID) { - return !!(GetWin32ClientInfo()->CI_flags & CI_TFSDISABLED); + return !!(GetWin32ClientInfo()->CI_flags & CI_TSFDISABLED); } /*********************************************************************** * CtfImmTIMActivate(IMM32.@) */ -HRESULT WINAPI CtfImmTIMActivate(HKL hKL) +HRESULT WINAPI +CtfImmTIMActivate(_In_ HKL hKL) { FIXME("(%p)\n", hKL); return E_NOTIMPL; @@ -225,7 +337,8 @@ HRESULT WINAPI CtfImmTIMActivate(HKL hKL) /*********************************************************************** * CtfImmRestoreToolbarWnd(IMM32.@) */ -VOID WINAPI CtfImmRestoreToolbarWnd(DWORD dwStatus) +VOID WINAPI +CtfImmRestoreToolbarWnd(_In_ DWORD dwStatus) { FIXME("(0x%lx)\n", dwStatus); } @@ -233,7 +346,8 @@ VOID WINAPI CtfImmRestoreToolbarWnd(DWORD dwStatus) /*********************************************************************** * CtfImmHideToolbarWnd(IMM32.@) */ -DWORD WINAPI CtfImmHideToolbarWnd(VOID) +DWORD WINAPI +CtfImmHideToolbarWnd(VOID) { FIXME("()\n"); return 0; @@ -242,7 +356,12 @@ DWORD WINAPI CtfImmHideToolbarWnd(VOID) /*********************************************************************** * CtfImmDispatchDefImeMessage(IMM32.@) */ -LRESULT WINAPI CtfImmDispatchDefImeMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +LRESULT WINAPI +CtfImmDispatchDefImeMessage( + _In_ HWND hWnd, + _In_ UINT uMsg, + _In_ WPARAM wParam, + _In_ LPARAM lParam) { /* FIXME("(%p, %u, %p, %p)\n", hWnd, uMsg, wParam, lParam); */ return 0; @@ -251,7 +370,9 @@ LRESULT WINAPI CtfImmDispatchDefImeMessage(HWND hWnd, UINT uMsg, WPARAM wParam, /*********************************************************************** * CtfImmIsGuidMapEnable(IMM32.@) */ -BOOL WINAPI CtfImmIsGuidMapEnable(HIMC hIMC) +BOOL WINAPI +CtfImmIsGuidMapEnable( + _In_ HIMC hIMC) { DWORD dwThreadId; HKL hKL; @@ -282,7 +403,11 @@ BOOL WINAPI CtfImmIsGuidMapEnable(HIMC hIMC) /*********************************************************************** * CtfImmGetGuidAtom(IMM32.@) */ -HRESULT WINAPI CtfImmGetGuidAtom(HIMC hIMC, DWORD dwUnknown, LPDWORD pdwGuidAtom) +HRESULT WINAPI +CtfImmGetGuidAtom( + _In_ HIMC hIMC, + _In_ DWORD dwUnknown, + _Out_ LPDWORD pdwGuidAtom) { HRESULT hr = E_FAIL; PIMEDPI pImeDpi; diff --git a/dll/win32/imm32/imm32.spec b/dll/win32/imm32/imm32.spec index b5e78e79577..eec7202482a 100644 --- a/dll/win32/imm32/imm32.spec +++ b/dll/win32/imm32/imm32.spec @@ -1,4 +1,5 @@ -1 stdcall CtfAImmActivate(ptr) +@ stdcall CtfAImmActivate(ptr) +@ stdcall CtfAImmDeactivate(long) @ stdcall CtfImmIsCiceroEnabled() @ stdcall CtfImmIsTextFrameServiceDisabled() @ stdcall CtfImmTIMActivate(ptr) diff --git a/dll/win32/imm32/precomp.h b/dll/win32/imm32/precomp.h index 6db1f8d6e4d..6e0512af409 100644 --- a/dll/win32/imm32/precomp.h +++ b/dll/win32/imm32/precomp.h @@ -143,7 +143,6 @@ BOOL WINAPI Imm32IsImcAnsi(HIMC hIMC); #define IS_CROSS_THREAD_HIMC(hIMC) IS_TRUE_UNEXPECTEDLY(Imm32IsCrossThreadAccess(hIMC)) #define IS_CROSS_PROCESS_HWND(hWnd) IS_TRUE_UNEXPECTEDLY(Imm32IsCrossProcessAccess(hWnd)) #define ImeDpi_IsUnicode(pImeDpi) ((pImeDpi)->ImeInfo.fdwProperty & IME_PROP_UNICODE) -#define IS_16BIT_MODE() (GetWin32ClientInfo()->dwTIFlags & TIF_16BIT) DWORD APIENTRY CandidateListWideToAnsi(const CANDIDATELIST *pWideCL, LPCANDIDATELIST pAnsiCL, DWORD dwBufLen, @@ -189,3 +188,6 @@ PTHREADINFO FASTCALL Imm32CurrentPti(VOID); HBITMAP Imm32LoadBitmapFromBytes(const BYTE *pb); BOOL Imm32StoreBitmapToBytes(HBITMAP hbm, LPBYTE pbData, DWORD cbDataMax); + +HRESULT CtfImmTIMCreateInputContext(_In_ HIMC hIMC); +HRESULT CtfImmTIMDestroyInputContext(_In_ HIMC hIMC); diff --git a/sdk/include/reactos/imm32_undoc.h b/sdk/include/reactos/imm32_undoc.h index d742f32f66d..49cb047182a 100644 --- a/sdk/include/reactos/imm32_undoc.h +++ b/sdk/include/reactos/imm32_undoc.h @@ -19,10 +19,11 @@ PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc); VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc); PIMEDPI WINAPI ImmLockImeDpi(HKL hKL); VOID WINAPI ImmUnlockImeDpi(PIMEDPI pImeDpi); -HRESULT APIENTRY CtfImmTIMCreateInputContext(HIMC hIMC); -HRESULT APIENTRY CtfImmTIMDestroyInputContext(HIMC hIMC); HRESULT WINAPI CtfImmTIMActivate(HKL hKL); +HRESULT WINAPI CtfAImmActivate(_Out_opt_ HINSTANCE *phinstCtfIme); +HRESULT WINAPI CtfAImmDeactivate(_In_ BOOL bDestroy); + #ifdef __cplusplus } // extern "C" #endif diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h index e1a3ee9788a..5603231a92c 100644 --- a/win32ss/include/ntuser.h +++ b/win32ss/include/ntuser.h @@ -302,8 +302,9 @@ typedef struct _CALLBACKWND #define CI_INITTHREAD 0x00000008 #define CI_CURTHPRHOOK 0x00000010 #define CI_CLASSESREGISTERED 0x00000020 -#define CI_IMMACTIVATE 0x00000040 -#define CI_TFSDISABLED 0x00000400 +#define CI_IMMACTIVATE 0x00000040 /* IMM/IME (Asian input) enabled */ +#define CI_TSFDISABLED 0x00000400 /* TSF (Text Services Framework a.k.a. Cicero) */ +#define CI_AIMMACTIVATED 0x00000800 /* Active IMM (AIMM) */ /* * CLIENTINFO structure. @@ -1231,6 +1232,7 @@ typedef enum IMEINFOEXCLASS #define IS_IME_HKL(hkl) ((((ULONG_PTR)(hkl)) & 0xF0000000) == 0xE0000000) #define IS_IMM_MODE() (gpsi && (gpsi->dwSRVIFlags & SRVINFO_IMM32)) #define IS_CICERO_MODE() (gpsi && (gpsi->dwSRVIFlags & SRVINFO_CICERO_ENABLED)) +#define IS_16BIT_MODE() (GetWin32ClientInfo()->dwTIFlags & TIF_16BIT) typedef struct tagIMEUI { From 3f4be325248df5ff9a8235aef29f42ed78786f44 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 11:47:28 +0900 Subject: [PATCH 20/39] improve 23 --- dll/win32/imm32/CtfImeTable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/imm32/CtfImeTable.h b/dll/win32/imm32/CtfImeTable.h index be317143db1..59700b20c75 100644 --- a/dll/win32/imm32/CtfImeTable.h +++ b/dll/win32/imm32/CtfImeTable.h @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS IMM32 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) - * PURPOSE: Defining the CTF IME DLL file interface + * PURPOSE: Defining the CTF IME file interface * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ */ From 4d4c1632cd8a3aaee95b59fc9c005116d1658b5a Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 11:49:40 +0900 Subject: [PATCH 21/39] improve 2 --- dll/win32/imm32/CtfImeTable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/imm32/CtfImeTable.h b/dll/win32/imm32/CtfImeTable.h index 59700b20c75..14f701b6c46 100644 --- a/dll/win32/imm32/CtfImeTable.h +++ b/dll/win32/imm32/CtfImeTable.h @@ -5,7 +5,7 @@ * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ */ -/* A CTF IME file contains the following functions: */ +/* The valid CTF IME file contains the following functions: */ /* DEFINE_CTF_IME_FN(func_name, ret_type, params) */ DEFINE_CTF_IME_FN(CtfImeCreateThreadMgr, HRESULT, (VOID)) From f7adaf1661e79d87d420c90291c1fa6fc11c6476 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 11:59:54 +0900 Subject: [PATCH 22/39] improve 3 --- dll/win32/imm32/ctf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index d2efa0577f9..7d2ad432647 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -116,7 +116,7 @@ Imm32LoadCtfIme(VOID) if (!ImmLoadLayout((HKL)ULongToHandle(0x04090409), &ImeInfoEx)) break; - /* Build a path string in system32. The IME file must be in system32. */ + /* Build a path string in system32. The installed IME file must be in system32. */ Imm32GetSystemLibraryPath(szImeFile, _countof(szImeFile), ImeInfoEx.wszImeFile); /* Is the CTF IME disabled by app compatibility patcher? */ From eefdde49b4206f7024ab5cb69954b6eb0a16fdaf Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 12:03:11 +0900 Subject: [PATCH 23/39] improve 4 --- win32ss/include/ntuser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h index 5603231a92c..1cb0fb2db4c 100644 --- a/win32ss/include/ntuser.h +++ b/win32ss/include/ntuser.h @@ -302,7 +302,7 @@ typedef struct _CALLBACKWND #define CI_INITTHREAD 0x00000008 #define CI_CURTHPRHOOK 0x00000010 #define CI_CLASSESREGISTERED 0x00000020 -#define CI_IMMACTIVATE 0x00000040 /* IMM/IME (Asian input) enabled */ +#define CI_IMMACTIVATE 0x00000040 /* IMM/IME (Asian input) */ #define CI_TSFDISABLED 0x00000400 /* TSF (Text Services Framework a.k.a. Cicero) */ #define CI_AIMMACTIVATED 0x00000800 /* Active IMM (AIMM) */ From e02deab54ce704f3f8fe361ca57d6795274e8999 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 12:08:12 +0900 Subject: [PATCH 24/39] improve 5 --- dll/win32/imm32/ctf.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index 7d2ad432647..b65f7bc9460 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -165,7 +165,7 @@ Imm32LoadCtfIme(VOID) } /*********************************************************************** - * This function calls CTF IME's CtfImeCreateThreadMgr function. + * This function calls the same name function of the CTF IME side. */ HRESULT CtfImeCreateThreadMgr(VOID) @@ -177,7 +177,7 @@ CtfImeCreateThreadMgr(VOID) } /*********************************************************************** - * This function calls CTF IME's CtfImeDestroyThreadMgr function. + * This function calls the same name function of the CTF IME side. */ HRESULT CtfImeDestroyThreadMgr(VOID) @@ -189,7 +189,7 @@ CtfImeDestroyThreadMgr(VOID) } /*********************************************************************** - * This function calls CTF IME's CtfImeCreateInputContext function. + * This function calls the same name function of the CTF IME side. */ HRESULT CtfImeCreateInputContext( @@ -201,6 +201,18 @@ CtfImeCreateInputContext( return CTF_IME_FN(CtfImeCreateInputContext)(hIMC); } +/*********************************************************************** + * This function calls the same name function of the CTF IME side. + */ +HRESULT +CtfImeDestroyInputContext(_In_ HIMC hIMC) +{ + if (!Imm32LoadCtfIme()) + return E_FAIL; + + return CTF_IME_FN(CtfImeDestroyInputContext)(hIMC); +} + /*********************************************************************** * The callback function to activate CTF IMEs. Used in CtfAImmActivate. */ @@ -214,18 +226,6 @@ Imm32EnumCreateCtfICProc( return TRUE; /* Continue */ } -/*********************************************************************** - * This function calls CTF IME's CtfImeDestroyInputContext function. - */ -HRESULT -CtfImeDestroyInputContext(_In_ HIMC hIMC) -{ - if (!Imm32LoadCtfIme()) - return E_FAIL; - - return CTF_IME_FN(CtfImeDestroyInputContext)(hIMC); -} - /*********************************************************************** * This function calls CTF IME's CtfImeDestroyInputContext function if necessary. */ From da870049b25474294f2f4ded114f0f775089bcae Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 12:17:13 +0900 Subject: [PATCH 25/39] improve 6 --- dll/win32/imm32/ctf.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index b65f7bc9460..011d25d1e81 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -121,7 +121,7 @@ Imm32LoadCtfIme(VOID) /* Is the CTF IME disabled by app compatibility patcher? */ if (!Imm32CheckAndApplyAppCompat(0, szImeFile)) - break; /* The app's IME is disabled */ + break; /* This IME is disabled */ /* Load a CTF IME file */ g_hCtfIme = LoadLibraryW(szImeFile); @@ -227,7 +227,7 @@ Imm32EnumCreateCtfICProc( } /*********************************************************************** - * This function calls CTF IME's CtfImeDestroyInputContext function if necessary. + * This function calls CtfImeDestroyInputContext if possible. */ HRESULT CtfImmTIMDestroyInputContext( @@ -250,7 +250,7 @@ CtfImmTIMCreateInputContext( /*********************************************************************** * CtfAImmActivate (IMM32.@) * - * This function activates "Active IMM" (AIMM). + * This function activates "Active IMM" (AIMM) and TSF. */ HRESULT WINAPI CtfAImmActivate( @@ -285,7 +285,7 @@ CtfAImmActivate( /*********************************************************************** * CtfAImmDeactivate (IMM32.@) * - * This function de-activates "Active IMM" (AIMM). + * This function de-activates "Active IMM" (AIMM) and TSF. */ HRESULT WINAPI CtfAImmDeactivate( @@ -308,6 +308,8 @@ CtfAImmDeactivate( /*********************************************************************** * CtfImmIsCiceroEnabled (IMM32.@) + * + * @return TRUE if Cicero is enabled. */ BOOL WINAPI CtfImmIsCiceroEnabled(VOID) @@ -317,6 +319,8 @@ CtfImmIsCiceroEnabled(VOID) /*********************************************************************** * CtfImmIsTextFrameServiceDisabled(IMM32.@) + * + * @return TRUE if TSF is disabled. */ BOOL WINAPI CtfImmIsTextFrameServiceDisabled(VOID) From 944d23f780ed4a23abcdd439775509a43b8450e9 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 12:29:54 +0900 Subject: [PATCH 26/39] SHOpenPropSheetW --- dll/win32/shell32/stubs.cpp | 19 +++++++++++++++++++ dll/win32/shell32/utils.cpp | 19 ------------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/dll/win32/shell32/stubs.cpp b/dll/win32/shell32/stubs.cpp index 4d66865f90c..a9083ab61e9 100644 --- a/dll/win32/shell32/stubs.cpp +++ b/dll/win32/shell32/stubs.cpp @@ -218,6 +218,25 @@ SHGetSetFolderCustomSettingsA(LPSHFOLDERCUSTOMSETTINGSA pfcs, return E_FAIL; } +/************************************************************************* + * SHOpenPropSheetW [SHELL32.80] + * + * @see https://learn.microsoft.com/en-us/windows/win32/api/shlobj/nf-shlobj-shopenpropsheetw + */ +BOOL WINAPI +SHOpenPropSheetW( + _In_opt_z_ LPCWSTR pszCaption, + _In_opt_ HKEY *ahKeys, + _In_ UINT cKeys, + _In_ const CLSID *pclsidDefault, + _In_ IDataObject *pDataObject, + _In_opt_ IShellBrowser *pShellBrowser, + _In_opt_z_ LPCWSTR pszStartPage) +{ + FIXME("SHOpenPropSheetW() stub\n"); + return FALSE; +} + /* * Unimplemented */ diff --git a/dll/win32/shell32/utils.cpp b/dll/win32/shell32/utils.cpp index fbabcc0a90f..ca71640e5f4 100644 --- a/dll/win32/shell32/utils.cpp +++ b/dll/win32/shell32/utils.cpp @@ -490,22 +490,3 @@ SHOpenPropSheetA( return SHOpenPropSheetW(pszCaptionW, ahKeys, cKeys, pclsidDefault, pDataObject, pShellBrowser, pszStartPageW); } - -/************************************************************************* - * SHOpenPropSheetW [SHELL32.80] - * - * @see https://learn.microsoft.com/en-us/windows/win32/api/shlobj/nf-shlobj-shopenpropsheetw - */ -BOOL WINAPI -SHOpenPropSheetW( - _In_opt_z_ LPCWSTR pszCaption, - _In_opt_ HKEY *ahKeys, - _In_ UINT cKeys, - _In_ const CLSID *pclsidDefault, - _In_ IDataObject *pDataObject, - _In_opt_ IShellBrowser *pShellBrowser, - _In_opt_z_ LPCWSTR pszStartPage) -{ - FIXME("SHOpenPropSheetW() stub\n"); - return FALSE; -} From 8f6b01696316bd4213f4f8b2157f032f3c8a1047 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 12:34:51 +0900 Subject: [PATCH 27/39] [SHELL32] Fix copyto/moveto actions of Search Results (#5816) - Extend CDefView::InvokeContextMenuCommand 2nd parameter to LPCSTR. - Add CDefView::_DoCopyToMoveToFolder method. - Use CDefView::_DoCopyToMoveToFolder for FCIDM_SHVIEW_COPYTO and FCIDM_SHVIEW_MOVETO command actions. CORE-18426 --- dll/win32/shell32/CDefView.cpp | 47 +++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/dll/win32/shell32/CDefView.cpp b/dll/win32/shell32/CDefView.cpp index 9f12fd09549..a06feb085b4 100644 --- a/dll/win32/shell32/CDefView.cpp +++ b/dll/win32/shell32/CDefView.cpp @@ -163,6 +163,7 @@ class CDefView : INT _FindInsertableIndexFromPoint(POINT pt); void _HandleStatusBarResize(int width); void _ForceStatusBarResize(); + void _DoCopyToMoveToFolder(BOOL bCopy); public: CDefView(); @@ -197,7 +198,7 @@ class CDefView : void OnDeactivate(); void DoActivate(UINT uState); HRESULT drag_notify_subitem(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); - HRESULT InvokeContextMenuCommand(CComPtr &pCM, UINT uCommand, POINT* pt); + HRESULT InvokeContextMenuCommand(CComPtr& pCM, LPCSTR lpVerb, POINT* pt = NULL); LRESULT OnExplorerCommand(UINT uCommand, BOOL bUseSelection); // *** IOleWindow methods *** @@ -1513,14 +1514,14 @@ UINT CDefView::GetSelections() return m_cidl; } -HRESULT CDefView::InvokeContextMenuCommand(CComPtr &pCM, UINT uCommand, POINT* pt) +HRESULT CDefView::InvokeContextMenuCommand(CComPtr& pCM, LPCSTR lpVerb, POINT* pt) { CMINVOKECOMMANDINFOEX cmi; ZeroMemory(&cmi, sizeof(cmi)); cmi.cbSize = sizeof(cmi); - cmi.lpVerb = MAKEINTRESOURCEA(uCommand); cmi.hwnd = m_hWnd; + cmi.lpVerb = lpVerb; if (GetKeyState(VK_SHIFT) & 0x8000) cmi.fMask |= CMIC_MASK_SHIFT_DOWN; @@ -1583,7 +1584,7 @@ HRESULT CDefView::OpenSelectedItems() return E_FAIL; } - InvokeContextMenuCommand(pCM, uCommand, NULL); + InvokeContextMenuCommand(pCM, MAKEINTRESOURCEA(uCommand), NULL); return hResult; } @@ -1682,7 +1683,7 @@ LRESULT CDefView::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &b if (uCommand == FCIDM_SHVIEW_OPEN && OnDefaultCommand() == S_OK) return 0; - InvokeContextMenuCommand(m_pCM, uCommand - CONTEXT_MENU_BASE_ID, &pt); + InvokeContextMenuCommand(m_pCM, MAKEINTRESOURCEA(uCommand - CONTEXT_MENU_BASE_ID), &pt); return 0; } @@ -1731,7 +1732,7 @@ LRESULT CDefView::OnExplorerCommand(UINT uCommand, BOOL bUseSelection) } // FIXME: We should probably use the objects position? - InvokeContextMenuCommand(pCM, uCommand, NULL); + InvokeContextMenuCommand(pCM, MAKEINTRESOURCEA(uCommand), NULL); return 0; } @@ -1818,6 +1819,29 @@ void CDefView::DoActivate(UINT uState) TRACE("--\n"); } +void CDefView::_DoCopyToMoveToFolder(BOOL bCopy) +{ + if (!GetSelections()) + return; + + SFGAOF rfg = SFGAO_CANCOPY | SFGAO_CANMOVE | SFGAO_FILESYSTEM; + HRESULT hr = m_pSFParent->GetAttributesOf(m_cidl, m_apidl, &rfg); + if (FAILED_UNEXPECTEDLY(hr)) + return; + + if (!bCopy && !(rfg & SFGAO_CANMOVE)) + return; + if (bCopy && !(rfg & SFGAO_CANCOPY)) + return; + + CComPtr pCM; + hr = m_pSFParent->GetUIObjectOf(m_hWnd, m_cidl, m_apidl, IID_IContextMenu, 0, (void **)&pCM); + if (FAILED_UNEXPECTEDLY(hr)) + return; + + InvokeContextMenuCommand(pCM, (bCopy ? "copyto" : "moveto"), NULL); +} + /********************************************************** * ShellView_OnActivate() */ @@ -1954,26 +1978,31 @@ LRESULT CDefView::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHand case FCIDM_SHVIEW_COPY: case FCIDM_SHVIEW_RENAME: case FCIDM_SHVIEW_PROPERTIES: - case FCIDM_SHVIEW_COPYTO: - case FCIDM_SHVIEW_MOVETO: if (SHRestricted(REST_NOVIEWCONTEXTMENU)) return 0; return OnExplorerCommand(dwCmdID, TRUE); + case FCIDM_SHVIEW_COPYTO: + case FCIDM_SHVIEW_MOVETO: + _DoCopyToMoveToFolder(dwCmdID == FCIDM_SHVIEW_COPYTO); + return 0; + case FCIDM_SHVIEW_INSERT: case FCIDM_SHVIEW_UNDO: case FCIDM_SHVIEW_INSERTLINK: case FCIDM_SHVIEW_NEWFOLDER: return OnExplorerCommand(dwCmdID, FALSE); default: + { /* WM_COMMAND messages from the file menu are routed to the CDefView so as to let m_pFileMenu handle the command */ if (m_pFileMenu && dwCmd == 0) { HMENU Dummy = NULL; MenuCleanup _(m_pFileMenu, Dummy); - InvokeContextMenuCommand(m_pFileMenu, dwCmdID, NULL); + InvokeContextMenuCommand(m_pFileMenu, MAKEINTRESOURCEA(dwCmdID), NULL); } + } } return 0; From 32c1a38f187736546a051c1b44d7a1524b84a2f3 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 12:40:20 +0900 Subject: [PATCH 28/39] multi-line --- sdk/include/reactos/undocshell.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/include/reactos/undocshell.h b/sdk/include/reactos/undocshell.h index ea2a7e02e17..60979576330 100644 --- a/sdk/include/reactos/undocshell.h +++ b/sdk/include/reactos/undocshell.h @@ -684,7 +684,10 @@ LargeIntegerToString( _In_opt_ const NUMBERFMTW *pNumberFormat, _In_ DWORD dwNumberFlags); -LPWSTR WINAPI ShortSizeFormatW(_In_ DWORD dwNumber, _Out_writes_z_(0x8FFF) LPWSTR pszBuffer); +LPWSTR WINAPI +ShortSizeFormatW( + _In_ DWORD dwNumber, + _Out_writes_z_(0x8FFF) LPWSTR pszBuffer); BOOL WINAPI SHOpenEffectiveToken(_Out_ LPHANDLE phToken); DWORD WINAPI SHGetUserSessionId(_In_opt_ HANDLE hToken); From e11caccebb3d5ada8e72ffbb5332d6f1a0d8f898 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 12:52:35 +0900 Subject: [PATCH 29/39] improve --- dll/win32/imm32/ctf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index 011d25d1e81..a7b23539a83 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -20,6 +20,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm); /* * TSF stands for "Text Services Framework". "Cicero" is the code name of TSF. * CTF stands for "Cicero-aware Text Framework". + * The combination of CTF IME and TSF provides high-level input. * * The CTF IME file is a DLL file. The export functions of the CTF IME file are * defined in "CtfImeTable.h" of this folder. From 92340a76d1ec4eb8b4b77a6e6296424c0cf49829 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 12:57:39 +0900 Subject: [PATCH 30/39] improve 2 --- dll/win32/imm32/ctf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index a7b23539a83..0abf3eedc65 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -20,7 +20,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm); /* * TSF stands for "Text Services Framework". "Cicero" is the code name of TSF. * CTF stands for "Cicero-aware Text Framework". - * The combination of CTF IME and TSF provides high-level input. + * Comparing with old-style IMM IME, the combination of CTF IME and TSF provides + * high-level input method. * * The CTF IME file is a DLL file. The export functions of the CTF IME file are * defined in "CtfImeTable.h" of this folder. From eab05921d7f88c8bcd68d9b5556ff1b74e160c58 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 12:58:50 +0900 Subject: [PATCH 31/39] improve 3 --- dll/win32/imm32/ctf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index 0abf3eedc65..b79336bbe12 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -21,7 +21,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm); * TSF stands for "Text Services Framework". "Cicero" is the code name of TSF. * CTF stands for "Cicero-aware Text Framework". * Comparing with old-style IMM IME, the combination of CTF IME and TSF provides - * high-level input method. + * new-style and high-level input method. * * The CTF IME file is a DLL file. The export functions of the CTF IME file are * defined in "CtfImeTable.h" of this folder. From ae780547607a1ee05960b806dff96b6de104de5c Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 13:08:27 +0900 Subject: [PATCH 32/39] improve 4 --- dll/win32/imm32/ctf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index b79336bbe12..eeeae62b588 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -20,11 +20,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm); /* * TSF stands for "Text Services Framework". "Cicero" is the code name of TSF. * CTF stands for "Cicero-aware Text Framework". + * * Comparing with old-style IMM IME, the combination of CTF IME and TSF provides * new-style and high-level input method. * - * The CTF IME file is a DLL file. The export functions of the CTF IME file are - * defined in "CtfImeTable.h" of this folder. + * The CTF IME file is a DLL file that the software developer distributes. + * The export functions of the CTF IME file are defined in "CtfImeTable.h" of + * this folder. */ /* The instance of the CTF IME file */ From ea4424c61b72186cc87d806379521c55e9b98df3 Mon Sep 17 00:00:00 2001 From: Thamatip Chitpong Date: Mon, 23 Oct 2023 21:16:00 +0700 Subject: [PATCH 33/39] [HOTPLUG] Add device removal function --- dll/cpl/hotplug/hotplug.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/dll/cpl/hotplug/hotplug.c b/dll/cpl/hotplug/hotplug.c index 15dea9c7583..6d82b560637 100644 --- a/dll/cpl/hotplug/hotplug.c +++ b/dll/cpl/hotplug/hotplug.c @@ -407,6 +407,23 @@ ShowDeviceProperties( HeapFree(GetProcessHeap(), 0, pszDevId); } +static +VOID +SafeRemoveDevice( + _In_ DEVINST DevInst) +{ + PNP_VETO_TYPE VetoType = PNP_VetoTypeUnknown; + CONFIGRET cr; + + cr = CM_Request_Device_EjectW(DevInst, &VetoType, NULL, 0, 0); + if (cr != CR_SUCCESS && VetoType == PNP_VetoTypeUnknown) + { + WCHAR szError[64]; + swprintf(szError, L"Failed to remove device (0x%x)", cr); + MessageBoxW(NULL, szError, NULL, MB_ICONEXCLAMATION | MB_OK); + } +} + INT_PTR CALLBACK SafeRemovalDlgProc( @@ -505,6 +522,14 @@ SafeRemovalDlgProc( ShowDeviceProperties(hwndDlg, GetSelectedDeviceInst(hwndDevTree)); break; } + + case IDC_SAFE_REMOVE_STOP: + case IDM_STOP: + { + HWND hwndDevTree = GetDlgItem(hwndDlg, IDC_SAFE_REMOVE_DEVICE_TREE); + SafeRemoveDevice(GetSelectedDeviceInst(hwndDevTree)); + break; + } } break; From ba889e1fc3db6e43f02f7a3de81099ed5bd8a12b Mon Sep 17 00:00:00 2001 From: Thamatip Chitpong Date: Fri, 27 Oct 2023 11:21:17 +0700 Subject: [PATCH 34/39] [HOTPLUG] **WIP** Implement "Stop a Hardware Device" dialog --- dll/cpl/hotplug/CMakeLists.txt | 1 + dll/cpl/hotplug/eject.c | 62 ++++++++++++++++++++++++++++++++++ dll/cpl/hotplug/hotplug.c | 23 +++---------- dll/cpl/hotplug/hotplug.h | 8 +++++ dll/cpl/hotplug/lang/en-US.rc | 12 +++++++ dll/cpl/hotplug/resource.h | 1 + 6 files changed, 89 insertions(+), 18 deletions(-) create mode 100644 dll/cpl/hotplug/eject.c diff --git a/dll/cpl/hotplug/CMakeLists.txt b/dll/cpl/hotplug/CMakeLists.txt index ec6588697c5..c5e636d8938 100644 --- a/dll/cpl/hotplug/CMakeLists.txt +++ b/dll/cpl/hotplug/CMakeLists.txt @@ -3,6 +3,7 @@ spec2def(hotplug.dll hotplug.spec) list(APPEND SOURCE hotplug.c + eject.c enum.c) file(GLOB hotplug_rc_deps resources/*.*) diff --git a/dll/cpl/hotplug/eject.c b/dll/cpl/hotplug/eject.c new file mode 100644 index 00000000000..2de314ba50e --- /dev/null +++ b/dll/cpl/hotplug/eject.c @@ -0,0 +1,62 @@ +/* + * PROJECT: ReactOS Safely Remove Hardware Applet + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) + * PURPOSE: Hardware safe removal support + * COPYRIGHT: Copyright 2023 Thamatip Chitpong + */ + +#include "hotplug.h" + +static +VOID +SafeRemoveDevice( + _In_ DEVINST DevInst) +{ + PNP_VETO_TYPE VetoType = PNP_VetoTypeUnknown; + CONFIGRET cr; + + cr = CM_Request_Device_EjectW(DevInst, &VetoType, NULL, 0, 0); + if (cr != CR_SUCCESS && VetoType == PNP_VetoTypeUnknown) + { + WCHAR szError[64]; + swprintf(szError, L"Failed to remove device (0x%x)", cr); + MessageBoxW(NULL, szError, NULL, MB_ICONEXCLAMATION | MB_OK); + } +} + +INT_PTR +CALLBACK +ConfirmRemovalDlgProc( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + static DEVINST selectedDev; + + switch (uMsg) + { + case WM_INITDIALOG: + selectedDev = lParam; + return TRUE; + + case WM_COMMAND: + { + switch (LOWORD(wParam)) + { + case IDOK: + SafeRemoveDevice(selectedDev); + EndDialog(hwndDlg, TRUE); + break; + + case IDCANCEL: + EndDialog(hwndDlg, TRUE); + break; + } + + break; + } + } + + return FALSE; +} diff --git a/dll/cpl/hotplug/hotplug.c b/dll/cpl/hotplug/hotplug.c index 6d82b560637..a74728abf99 100644 --- a/dll/cpl/hotplug/hotplug.c +++ b/dll/cpl/hotplug/hotplug.c @@ -407,23 +407,6 @@ ShowDeviceProperties( HeapFree(GetProcessHeap(), 0, pszDevId); } -static -VOID -SafeRemoveDevice( - _In_ DEVINST DevInst) -{ - PNP_VETO_TYPE VetoType = PNP_VetoTypeUnknown; - CONFIGRET cr; - - cr = CM_Request_Device_EjectW(DevInst, &VetoType, NULL, 0, 0); - if (cr != CR_SUCCESS && VetoType == PNP_VetoTypeUnknown) - { - WCHAR szError[64]; - swprintf(szError, L"Failed to remove device (0x%x)", cr); - MessageBoxW(NULL, szError, NULL, MB_ICONEXCLAMATION | MB_OK); - } -} - INT_PTR CALLBACK SafeRemovalDlgProc( @@ -527,7 +510,11 @@ SafeRemovalDlgProc( case IDM_STOP: { HWND hwndDevTree = GetDlgItem(hwndDlg, IDC_SAFE_REMOVE_DEVICE_TREE); - SafeRemoveDevice(GetSelectedDeviceInst(hwndDevTree)); + DialogBoxParamW(hApplet, + MAKEINTRESOURCEW(IDD_CONFIRM_STOP_HARDWARE_DIALOG), + hwndDlg, + ConfirmRemovalDlgProc, + (LPARAM)GetSelectedDeviceInst(hwndDevTree)); break; } } diff --git a/dll/cpl/hotplug/hotplug.h b/dll/cpl/hotplug/hotplug.h index 8e11875c613..47cf851b93a 100644 --- a/dll/cpl/hotplug/hotplug.h +++ b/dll/cpl/hotplug/hotplug.h @@ -39,6 +39,14 @@ typedef struct }APPLET, *PAPPLET; +// eject.c +INT_PTR +CALLBACK +ConfirmRemovalDlgProc( + HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam); // hotplug.c LONG diff --git a/dll/cpl/hotplug/lang/en-US.rc b/dll/cpl/hotplug/lang/en-US.rc index f0728860bba..fc6cc0c9f19 100644 --- a/dll/cpl/hotplug/lang/en-US.rc +++ b/dll/cpl/hotplug/lang/en-US.rc @@ -17,6 +17,18 @@ BEGIN PUSHBUTTON "&Close", IDCLOSE, 216, 224, 55, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END +IDD_CONFIRM_STOP_HARDWARE_DIALOG DIALOGEX 32, 10, 256, 148 +CAPTION "Stop a Hardware Device" +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUP | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS will attempt to stop the following devices. After the devices are stopped they may be removed safely.", IDC_STATIC, 7, 8, 240, 18, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "Choose OK to continue.", IDC_STATIC, 7, 32, 240, 18, WS_CHILD | WS_VISIBLE | WS_GROUP + CONTROL "", IDC_CONFIRM_STOP_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP, 8, 45, 240, 78 + DEFPUSHBUTTON "OK", IDOK, 144, 127, 50, 14 + PUSHBUTTON "Cancel", IDCANCEL, 198, 127, 50, 14 +END + /* Menus */ diff --git a/dll/cpl/hotplug/resource.h b/dll/cpl/hotplug/resource.h index af8d359670d..e848a0f926a 100644 --- a/dll/cpl/hotplug/resource.h +++ b/dll/cpl/hotplug/resource.h @@ -15,6 +15,7 @@ #define IDC_SAFE_REMOVE_DISPLAY_COMPONENTS 306 #define IDD_CONFIRM_STOP_HARDWARE_DIALOG 310 +#define IDC_CONFIRM_STOP_DEVICE_LIST 311 /* Menu IDs */ #define IDM_POPUP_DEVICE_TREE 500 From 8893a88d5be684c6ac970cc7aad080486b007e1f Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 16:08:22 +0900 Subject: [PATCH 35/39] [NTUSER] Toggle language Alt+Shift or Ctrl+Shift --- win32ss/user/ntuser/defwnd.c | 49 +++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/win32ss/user/ntuser/defwnd.c b/win32ss/user/ntuser/defwnd.c index de4b4e12e18..e221f7bbb3e 100644 --- a/win32ss/user/ntuser/defwnd.c +++ b/win32ss/user/ntuser/defwnd.c @@ -528,10 +528,34 @@ DefWndScreenshot(PWND pWnd) UserCloseClipboard(); } +/** + * Toggle the language on Alt+Shift or Ctrl+Shift. + * The behaviour depends on key "HKCU\Keyboard Layout\Toggle", value "Language Hotkey". + * @see https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc976564%28v=technet.10%29 + */ +static VOID FASTCALL IntLanguageToggle(PWND Wnd) +{ + RTL_ATOM ClassAtom = 0; + UNICODE_STRING ustrClass, ustrWindow; + HWND hwndSwitch; + + RtlInitUnicodeString(&ustrClass, L"kbswitcher"); + RtlInitUnicodeString(&ustrWindow, L""); + + IntGetAtomFromStringOrAtom(&ustrClass, &ClassAtom); + + hwndSwitch = IntFindWindow(UserGetDesktopWindow(), NULL, ClassAtom, &ustrWindow); + if (!hwndSwitch) + return; + +#define ID_NEXTLAYOUT 10003 + UserPostMessage(hwndSwitch, WM_COMMAND, ID_NEXTLAYOUT, (LPARAM)UserHMGetHandle(Wnd)); +#undef ID_NEXTLAYOUT +} + /* Win32k counterpart of User DefWindowProc */ -/* Win: xxxRealDefWindowProc */ LRESULT FASTCALL IntDefWindowProc( PWND Wnd, @@ -946,25 +970,16 @@ IntDefWindowProc( wParamTmp = UserGetKeyState(VK_SHIFT) & 0x8000 ? SC_PREVWINDOW : SC_NEXTWINDOW; co_IntSendMessage( Active, WM_SYSCOMMAND, wParamTmp, wParam ); } - else if (wParam == VK_SHIFT) // Alt+Shift + else if (wParam == VK_SHIFT && gdwLanguageToggleKey == 1) // Alt+Shift { - RTL_ATOM ClassAtom = 0; - UNICODE_STRING ustrClass, ustrWindow; - HWND hwndSwitch; - - RtlInitUnicodeString(&ustrClass, L"kbswitcher"); - RtlInitUnicodeString(&ustrWindow, L""); - - IntGetAtomFromStringOrAtom(&ustrClass, &ClassAtom); - - hwndSwitch = IntFindWindow(UserGetDesktopWindow(), NULL, ClassAtom, &ustrWindow); - if (hwndSwitch) - { -#define ID_NEXTLAYOUT 10003 - UserPostMessage(hwndSwitch, WM_COMMAND, ID_NEXTLAYOUT, (LPARAM)UserHMGetHandle(Wnd)); - } + IntLanguageToggle(Wnd); } } + else if (wParam == VK_SHIFT && (UserGetKeyState(VK_CONTROL) & 0x8000) && + gdwLanguageToggleKey == 2) // Ctrl+Shift + { + IntLanguageToggle(Wnd); + } else if( wParam == VK_F10 ) { if (UserGetKeyState(VK_SHIFT) & 0x8000) From 30f71a7a74aa29e6f7aaacace8c304922af1365e Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 16:14:19 +0900 Subject: [PATCH 36/39] WM_KEYDOWN --- win32ss/user/ntuser/defwnd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/win32ss/user/ntuser/defwnd.c b/win32ss/user/ntuser/defwnd.c index e221f7bbb3e..bd9d3875928 100644 --- a/win32ss/user/ntuser/defwnd.c +++ b/win32ss/user/ntuser/defwnd.c @@ -812,6 +812,12 @@ IntDefWindowProc( co_IntSendMessage(UserHMGetHandle(Wnd), WM_CONTEXTMENU, (WPARAM)UserHMGetHandle(Wnd), MAKELPARAM(-1, -1)); } } + else if (wParam == VK_SHIFT && gdwLanguageToggleKey == 2 && + (UserGetKeyState(VK_CONTROL) & 0x8000)) // Ctrl+Shift + { + IntLanguageToggle(Wnd); + break; + } if (g_bWindowSnapEnabled && (IS_KEY_DOWN(gafAsyncKeyState, VK_LWIN) || IS_KEY_DOWN(gafAsyncKeyState, VK_RWIN))) { BOOL IsTaskBar; @@ -975,11 +981,6 @@ IntDefWindowProc( IntLanguageToggle(Wnd); } } - else if (wParam == VK_SHIFT && (UserGetKeyState(VK_CONTROL) & 0x8000) && - gdwLanguageToggleKey == 2) // Ctrl+Shift - { - IntLanguageToggle(Wnd); - } else if( wParam == VK_F10 ) { if (UserGetKeyState(VK_SHIFT) & 0x8000) From 72cba3b6f00fc06232186e0cce3a365de3677404 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 16:18:15 +0900 Subject: [PATCH 37/39] WM_KEYDOWN 2 --- win32ss/user/ntuser/defwnd.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/win32ss/user/ntuser/defwnd.c b/win32ss/user/ntuser/defwnd.c index bd9d3875928..725be97063f 100644 --- a/win32ss/user/ntuser/defwnd.c +++ b/win32ss/user/ntuser/defwnd.c @@ -812,11 +812,13 @@ IntDefWindowProc( co_IntSendMessage(UserHMGetHandle(Wnd), WM_CONTEXTMENU, (WPARAM)UserHMGetHandle(Wnd), MAKELPARAM(-1, -1)); } } - else if (wParam == VK_SHIFT && gdwLanguageToggleKey == 2 && - (UserGetKeyState(VK_CONTROL) & 0x8000)) // Ctrl+Shift + else if (wParam == VK_SHIFT && (UserGetKeyState(VK_CONTROL) & 0x8000)) // Ctrl+Shift { - IntLanguageToggle(Wnd); - break; + if (gdwLanguageToggleKey == 2) + { + IntLanguageToggle(Wnd); + break; + } } if (g_bWindowSnapEnabled && (IS_KEY_DOWN(gafAsyncKeyState, VK_LWIN) || IS_KEY_DOWN(gafAsyncKeyState, VK_RWIN))) { @@ -976,9 +978,13 @@ IntDefWindowProc( wParamTmp = UserGetKeyState(VK_SHIFT) & 0x8000 ? SC_PREVWINDOW : SC_NEXTWINDOW; co_IntSendMessage( Active, WM_SYSCOMMAND, wParamTmp, wParam ); } - else if (wParam == VK_SHIFT && gdwLanguageToggleKey == 1) // Alt+Shift + else if (wParam == VK_SHIFT) // Alt+Shift { - IntLanguageToggle(Wnd); + if (gdwLanguageToggleKey == 1) + { + IntLanguageToggle(Wnd); + break; + } } } else if( wParam == VK_F10 ) From 0b81f07e2bdee757464402a26f8a76b21d66dee3 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 16:19:46 +0900 Subject: [PATCH 38/39] IntToggleInputLanguage --- win32ss/user/ntuser/defwnd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win32ss/user/ntuser/defwnd.c b/win32ss/user/ntuser/defwnd.c index 725be97063f..105a4889738 100644 --- a/win32ss/user/ntuser/defwnd.c +++ b/win32ss/user/ntuser/defwnd.c @@ -529,11 +529,11 @@ DefWndScreenshot(PWND pWnd) } /** - * Toggle the language on Alt+Shift or Ctrl+Shift. + * Toggle the input language on Alt+Shift or Ctrl+Shift. * The behaviour depends on key "HKCU\Keyboard Layout\Toggle", value "Language Hotkey". * @see https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc976564%28v=technet.10%29 */ -static VOID FASTCALL IntLanguageToggle(PWND Wnd) +static VOID FASTCALL IntToggleInputLanguage(PWND Wnd) { RTL_ATOM ClassAtom = 0; UNICODE_STRING ustrClass, ustrWindow; @@ -816,7 +816,7 @@ IntDefWindowProc( { if (gdwLanguageToggleKey == 2) { - IntLanguageToggle(Wnd); + IntToggleInputLanguage(Wnd); break; } } @@ -982,7 +982,7 @@ IntDefWindowProc( { if (gdwLanguageToggleKey == 1) { - IntLanguageToggle(Wnd); + IntToggleInputLanguage(Wnd); break; } } From c80c7ae3b4b38c00d57c8f00b41f8e3d47e0dd20 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Fri, 27 Oct 2023 16:25:06 +0900 Subject: [PATCH 39/39] improve 4 --- win32ss/user/ntuser/defwnd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/win32ss/user/ntuser/defwnd.c b/win32ss/user/ntuser/defwnd.c index 105a4889738..5034fa9ea9d 100644 --- a/win32ss/user/ntuser/defwnd.c +++ b/win32ss/user/ntuser/defwnd.c @@ -539,11 +539,10 @@ static VOID FASTCALL IntToggleInputLanguage(PWND Wnd) UNICODE_STRING ustrClass, ustrWindow; HWND hwndSwitch; + /* Use kbswitcher window of kbswitch.exe */ RtlInitUnicodeString(&ustrClass, L"kbswitcher"); - RtlInitUnicodeString(&ustrWindow, L""); - IntGetAtomFromStringOrAtom(&ustrClass, &ClassAtom); - + RtlInitUnicodeString(&ustrWindow, L""); hwndSwitch = IntFindWindow(UserGetDesktopWindow(), NULL, ClassAtom, &ustrWindow); if (!hwndSwitch) return;