Commit c0e6c94a authored by Mikołaj Zalewski's avatar Mikołaj Zalewski Committed by Alexandre Julliard

shlwapi: Store the "%ld bytes" string as a resource.

parent 47b40c58
......@@ -20,6 +20,8 @@
#ifndef WINE_SHLWAPI_RESOURCE_H
#define WINE_SHLWAPI_RESOURCE_H
#define IDS_BYTES_FORMAT 64
/* These numbers match native ID's and shouldn't be abitrarily changed */
#define IDD_ERR_DIALOG 0x1200
#define IDS_ERR_USER_MSG 0x1201
......
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nein" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Yes" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Jes" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Ne" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&S" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Kyll" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Ei" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Oui" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Non" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Igen" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nem" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Si" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 9, "MS UI Gothic"
PUSHBUTTON L"はい(&Y)" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"いいえ(&N)" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"예(&Y)" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"아니오(&N)" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nee" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Nei" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Sim" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Não" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON L"&Evet" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
PUSHBUTTON L"&Hayr" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_BYTES_FORMAT "%ld bytes"
}
......@@ -42,6 +42,8 @@
#include "wine/unicode.h"
#include "wine/debug.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
/* Get a function pointer from a DLL handle */
......@@ -55,6 +57,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
} while (0)
extern HMODULE SHLWAPI_hmlang;
extern HINSTANCE shlwapi_hInstance;
typedef HRESULT (WINAPI *fnpConvertINetUnicodeToMultiByte)(LPDWORD,DWORD,LPCWSTR,LPINT,LPSTR,LPINT);
static fnpConvertINetUnicodeToMultiByte pConvertINetUnicodeToMultiByte;
......@@ -2230,7 +2233,6 @@ typedef struct tagSHLWAPI_BYTEFORMATS
*/
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
{
static const WCHAR wszBytes[] = {'%','l','d',' ','b','y','t','e','s',0};
static const WCHAR wsz3_0[] = {'%','3','.','0','f',0};
static const WCHAR wsz3_1[] = {'%','3','.','1','f',0};
static const WCHAR wsz3_2[] = {'%','3','.','2','f',0};
......@@ -2272,7 +2274,9 @@ LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
if (llBytes < 1024) /* 1K */
{
snprintfW(lpszDest, cchMax, wszBytes, (long)llBytes);
WCHAR wszBytesFormat[64];
LoadStringW(shlwapi_hInstance, IDS_BYTES_FORMAT, wszBytesFormat, 64);
snprintfW(lpszDest, cchMax, wszBytesFormat, (long)llBytes);
return lpszDest;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment