Moved save* strings to resources.
This commit is contained in:
parent
45cf31b7ac
commit
8414668401
|
@ -146,6 +146,11 @@ typedef struct {
|
|||
#define IDS_COLOR_WHITE 1055
|
||||
|
||||
#define IDS_FONT_SIZE 1200
|
||||
#define IDS_SAVE_BUTTON 1201
|
||||
#define IDS_SAVE_IN 1202
|
||||
#define IDS_SAVE 1203
|
||||
#define IDS_SAVE_AS 1204
|
||||
#define IDS_OPEN_FILE 1205
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
|
|
|
@ -463,6 +463,11 @@ STRINGTABLE DISCARDABLE /* Color names */
|
|||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_FONT_SIZE "Select a font size between %d and %d points."
|
||||
IDS_SAVE_BUTTON "&Save"
|
||||
IDS_SAVE_IN "Save &in:"
|
||||
IDS_SAVE "Save"
|
||||
IDS_SAVE_AS "Save as"
|
||||
IDS_OPEN_FILE "Open File"
|
||||
}
|
||||
|
||||
/****************************************************************/
|
||||
|
|
|
@ -439,6 +439,11 @@ STRINGTABLE DISCARDABLE
|
|||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_FONT_SIZE "Wybierz czcionkę o rozmiarze pomiędzy %d a %d punktami."
|
||||
IDS_SAVE_BUTTON "&Zapisz"
|
||||
IDS_SAVE_IN "Zapisz &w:"
|
||||
IDS_SAVE "Zapisz"
|
||||
IDS_SAVE_AS "Zapisz jako"
|
||||
IDS_OPEN_FILE "Otwórz Plik"
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE /* Color names */
|
||||
|
|
|
@ -1164,7 +1164,9 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
|
|||
}
|
||||
else if (fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
|
||||
{
|
||||
SetWindowTextA(hwnd,"Save");
|
||||
WCHAR buf[16];
|
||||
LoadStringW(COMDLG32_hInstance, IDS_SAVE, buf, sizeof(buf)/sizeof(WCHAR));
|
||||
SetWindowTextW(hwnd, buf);
|
||||
}
|
||||
|
||||
/* Initialise the file name edit control */
|
||||
|
@ -1388,11 +1390,14 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
|
|||
(rectDlg.bottom-rectDlg.top) - (rectHelp.bottom - rectCancel.bottom),
|
||||
SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOZORDER);
|
||||
}
|
||||
/* change Open to Save FIXME: use resources */
|
||||
/* change Open to Save */
|
||||
if (fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
|
||||
{
|
||||
SetDlgItemTextA(hwnd,IDOK,"&Save");
|
||||
SetDlgItemTextA(hwnd,IDC_LOOKINSTATIC,"Save &in");
|
||||
WCHAR buf[16];
|
||||
LoadStringW(COMDLG32_hInstance, IDS_SAVE_BUTTON, buf, sizeof(buf)/sizeof(WCHAR));
|
||||
SetDlgItemTextW(hwnd, IDOK, buf);
|
||||
LoadStringW(COMDLG32_hInstance, IDS_SAVE_IN, buf, sizeof(buf)/sizeof(WCHAR));
|
||||
SetDlgItemTextW(hwnd, IDC_LOOKINSTATIC, buf);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -1684,14 +1689,14 @@ BOOL FILEDLG95_OnOpenMultipleFiles(HWND hwnd, LPWSTR lpstrFileList, UINT nFileCo
|
|||
#define ONOPEN_SEARCH 3
|
||||
static void FILEDLG95_OnOpenMessage(HWND hwnd, int idCaption, int idText)
|
||||
{
|
||||
char strMsgTitle[MAX_PATH];
|
||||
char strMsgText [MAX_PATH];
|
||||
WCHAR strMsgTitle[MAX_PATH];
|
||||
WCHAR strMsgText [MAX_PATH];
|
||||
if (idCaption)
|
||||
LoadStringA(COMDLG32_hInstance, idCaption, strMsgTitle, sizeof(strMsgTitle));
|
||||
LoadStringW(COMDLG32_hInstance, idCaption, strMsgTitle, sizeof(strMsgTitle)/sizeof(WCHAR));
|
||||
else
|
||||
strMsgTitle[0] = '\0';
|
||||
LoadStringA(COMDLG32_hInstance, idText, strMsgText, sizeof(strMsgText));
|
||||
MessageBoxA(hwnd,strMsgText, strMsgTitle, MB_OK | MB_ICONHAND);
|
||||
LoadStringW(COMDLG32_hInstance, idText, strMsgText, sizeof(strMsgText)/sizeof(WCHAR));
|
||||
MessageBoxW(hwnd,strMsgText, strMsgTitle, MB_OK | MB_ICONHAND);
|
||||
}
|
||||
|
||||
BOOL FILEDLG95_OnOpen(HWND hwnd)
|
||||
|
@ -3208,7 +3213,6 @@ HRESULT GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl,DWORD dwFlags,LPSTR lpstrF
|
|||
|
||||
if(!lpsf)
|
||||
{
|
||||
HRESULT hRes;
|
||||
SHGetDesktopFolder(&lpsf);
|
||||
hRes = GetName(lpsf,pidl,dwFlags,lpstrFileName);
|
||||
IShellFolder_Release(lpsf);
|
||||
|
|
|
@ -586,11 +586,8 @@ static LRESULT FD31_DiskChange( PFD31_DATA lfs )
|
|||
static LRESULT FD31_FileTypeChange( PFD31_DATA lfs )
|
||||
{
|
||||
LONG lRet;
|
||||
WCHAR diskname[BUFFILE];
|
||||
LPWSTR pstr;
|
||||
|
||||
diskname[0] = 0;
|
||||
|
||||
lRet = SendDlgItemMessageW(lfs->hwnd, cmb1, CB_GETCURSEL, 0, 0);
|
||||
if (lRet == LB_ERR)
|
||||
return TRUE;
|
||||
|
@ -705,7 +702,6 @@ static LPWSTR FD31_DupToW(LPCSTR str, DWORD size)
|
|||
*/
|
||||
void FD31_MapOfnStructA(LPOPENFILENAMEA ofnA, LPOPENFILENAMEW ofnW, BOOL open)
|
||||
{
|
||||
LPCSTR str;
|
||||
UNICODE_STRING usBuffer;
|
||||
|
||||
ofnW->lStructSize = sizeof(OPENFILENAMEW);
|
||||
|
@ -727,13 +723,18 @@ void FD31_MapOfnStructA(LPOPENFILENAMEA ofnA, LPOPENFILENAMEW ofnW, BOOL open)
|
|||
RtlCreateUnicodeStringFromAsciiz (&usBuffer,ofnA->lpstrInitialDir);
|
||||
ofnW->lpstrInitialDir = usBuffer.Buffer;
|
||||
}
|
||||
if (ofnA->lpstrTitle)
|
||||
str = ofnA->lpstrTitle;
|
||||
else
|
||||
/* Allocates default title (FIXME : get it from resource) */
|
||||
str = open ? "Open File" : "Save as";
|
||||
RtlCreateUnicodeStringFromAsciiz (&usBuffer,str);
|
||||
ofnW->lpstrTitle = usBuffer.Buffer;
|
||||
if (ofnA->lpstrTitle) {
|
||||
RtlCreateUnicodeStringFromAsciiz (&usBuffer, ofnA->lpstrTitle);
|
||||
ofnW->lpstrTitle = usBuffer.Buffer;
|
||||
} else {
|
||||
WCHAR buf[16];
|
||||
int len;
|
||||
LoadStringW(COMDLG32_hInstance, open ? IDS_OPEN_FILE : IDS_SAVE_AS,
|
||||
buf, sizeof(buf)/sizeof(WCHAR));
|
||||
len = lstrlenW(buf)+1;
|
||||
ofnW->lpstrTitle = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
|
||||
memcpy((void*)ofnW->lpstrTitle, buf, len*sizeof(WCHAR));
|
||||
}
|
||||
ofnW->Flags = ofnA->Flags;
|
||||
ofnW->nFileOffset = ofnA->nFileOffset;
|
||||
ofnW->nFileExtension = ofnA->nFileExtension;
|
||||
|
|
Loading…
Reference in New Issue