- make "Network connection" translatable

- fixes spacer for centered progressbar in minitui

svn path=/trunk/; revision=51761
This commit is contained in:
Matthias Kupfer 2011-05-15 14:00:08 +00:00
parent b5f0e8d7a8
commit 179f453e06
2 changed files with 7 additions and 2 deletions

View file

@ -52,7 +52,7 @@ VOID MiniTuiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressTex
VOID MiniTuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText) VOID MiniTuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText)
{ {
ULONG i; ULONG i;
ULONG ProgressBarWidth = (Right - Left) - 3; ULONG ProgressBarWidth = (Right - Left) - 4;
// First make sure the progress bar text fits // First make sure the progress bar text fits
UiTruncateStringEllipsis(ProgressText, ProgressBarWidth - 4); UiTruncateStringEllipsis(ProgressText, ProgressBarWidth - 4);

View file

@ -337,6 +337,7 @@ InstallNetDevice(
HKEY hLinkageKey = NULL; HKEY hLinkageKey = NULL;
HKEY hConnectionKey = NULL; HKEY hConnectionKey = NULL;
DWORD dwShowIcon, dwLength, dwValue; DWORD dwShowIcon, dwLength, dwValue;
WCHAR szBuffer[300];
/* Get Instance ID */ /* Get Instance ID */
if (SetupDiGetDeviceInstanceIdW(DeviceInfoSet, DeviceInfoData, NULL, 0, &dwLength)) if (SetupDiGetDeviceInstanceIdW(DeviceInfoSet, DeviceInfoData, NULL, 0, &dwLength))
@ -514,7 +515,11 @@ InstallNetDevice(
DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc);
goto cleanup; goto cleanup;
} }
rc = RegSetValueExW(hConnectionKey, L"Name", 0, REG_SZ, (const BYTE*)L"Network connection", (wcslen(L"Network connection") + 1) * sizeof(WCHAR)); if (!LoadStringW(netcfgx_hInstance, IDS_NET_CONNECT, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)))
{
wcscpy(szBuffer,L"Network connection");
}
rc = RegSetValueExW(hConnectionKey, L"Name", 0, REG_SZ, (const BYTE*)szBuffer, (wcslen(szBuffer) + 1) * sizeof(WCHAR));
if (rc != ERROR_SUCCESS) if (rc != ERROR_SUCCESS)
{ {
DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc);