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