- make "Network connection" translatable
authorMatthias Kupfer <mkupfer@reactos.org>
Sun, 15 May 2011 14:00:08 +0000 (14:00 +0000)
committerMatthias Kupfer <mkupfer@reactos.org>
Sun, 15 May 2011 14:00:08 +0000 (14:00 +0000)
- fixes spacer for centered progressbar in minitui

svn path=/trunk/; revision=51761

reactos/boot/freeldr/freeldr/ui/minitui.c
reactos/dll/win32/netcfgx/netcfgx.c

index adaa68c..d38f7a5 100644 (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)
 {
        ULONG           i;
-       ULONG           ProgressBarWidth = (Right - Left) - 3;
+       ULONG           ProgressBarWidth = (Right - Left) - 4;
 
        // First make sure the progress bar text fits
        UiTruncateStringEllipsis(ProgressText, ProgressBarWidth - 4);
index 1fb9fc1..eb59418 100644 (file)
@@ -337,6 +337,7 @@ InstallNetDevice(
        HKEY hLinkageKey = NULL;
        HKEY hConnectionKey = NULL;
        DWORD dwShowIcon, dwLength, dwValue;
+       WCHAR szBuffer[300];
 
        /* Get Instance ID */
        if (SetupDiGetDeviceInstanceIdW(DeviceInfoSet, DeviceInfoData, NULL, 0, &dwLength))
@@ -514,7 +515,11 @@ InstallNetDevice(
                DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc);
                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)
        {
                DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc);