- use ID_SELECT_FONT in german menu

- move string constants into string resources
This commit is contained in:
Martin Fuchs 2004-10-21 19:51:31 +00:00 committed by Alexandre Julliard
parent b80d1d5d92
commit 1573382dd6
4 changed files with 116 additions and 15 deletions

View File

@ -99,7 +99,7 @@ IDM_WINEFILE MENU FIXED IMPURE
POPUP "&Optionen" {
MENUITEM "&Bestätigen..." , -1
MENUITEM "Schrift&art..." , -1
MENUITEM "Schrift&art..." , ID_SELECT_FONT
MENUITEM "Symbolleiste &definieren..." , -1
MENUITEM SEPARATOR
MENUITEM "Sy&mbolleiste" , ID_VIEW_TOOL_BAR, CHECKED
@ -160,3 +160,36 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "Abbrechen" , 2, 158, 23, 47, 14
PUSHBUTTON "&Hilfe" , 254, 158, 43, 47, 14
}
STRINGTABLE
{
IDS_FONT_SEL_DLG_NAME "Anwenden der Schriftarteinstellung"
IDS_FONT_SEL_ERROR "Fehler während der Schriftart-Auswahl."
}
STRINGTABLE
{
IDS_WINEFILE "Winefile"
IDS_ERROR "Fehler"
IDS_ROOT_FS "root fs"
IDS_UNIXFS "unixfs"
IDS_DESKTOP "Desktop"
IDS_SHELL "Shell"
IDS_TITLEFMT "%s - %s"
IDS_NO_IMPL "Noch nicht implementiert"
IDS_WINE "WINE"
IDS_WINE_FILE "Wine File"
}
STRINGTABLE
{
IDS_COL_NAME "Name"
IDS_COL_SIZE "Größe"
IDS_COL_CDATE "CDatum"
IDS_COL_ADATE "ZDatum"
IDS_COL_MDATE "ÄDatum"
IDS_COL_IDX "Index/Inode"
IDS_COL_LINKS "Links"
IDS_COL_ATTR "Attribute"
IDS_COL_SEC "Sicherheit"
}

View File

@ -183,3 +183,30 @@ STRINGTABLE
IDS_FONT_SEL_DLG_NAME "Applying font settings"
IDS_FONT_SEL_ERROR "Error while selecting new font."
}
STRINGTABLE
{
IDS_WINEFILE "Winefile"
IDS_ERROR "Error"
IDS_ROOT_FS "root fs"
IDS_UNIXFS "unixfs"
IDS_DESKTOP "Desktop"
IDS_SHELL "Shell"
IDS_TITLEFMT "%s - %s"
IDS_NO_IMPL "Not yet implemented"
IDS_WINE "WINE"
IDS_WINE_FILE "Wine File"
}
STRINGTABLE
{
IDS_COL_NAME "Name"
IDS_COL_SIZE "Size"
IDS_COL_CDATE "CDate"
IDS_COL_ADATE "ADate"
IDS_COL_MDATE "MDate"
IDS_COL_IDX "Index/Inode"
IDS_COL_LINKS "Links"
IDS_COL_ATTR "Attributes"
IDS_COL_SEC "Security"
}

View File

@ -74,6 +74,27 @@
#define IDS_FONT_SEL_DLG_NAME 1101
#define IDS_FONT_SEL_ERROR 1103
#define IDS_WINEFILE 1200
#define IDS_ERROR 1201
#define IDS_ROOT_FS 1202
#define IDS_UNIXFS 1203
#define IDS_DESKTOP 1204
#define IDS_SHELL 1205
#define IDS_TITLEFMT 1206
#define IDS_NO_IMPL 1207
#define IDS_WINE 1208
#define IDS_WINE_FILE 1209
#define IDS_COL_NAME 1210
#define IDS_COL_SIZE 1211
#define IDS_COL_CDATE 1212
#define IDS_COL_ADATE 1213
#define IDS_COL_MDATE 1214
#define IDS_COL_IDX 1215
#define IDS_COL_LINKS 1216
#define IDS_COL_ATTR 1217
#define IDS_COL_SEC 1218
/* range for drive bar command ids: 0x9000..0x90FF */
#ifdef __WINE__
#define ID_DRIVE_UNIX_FS 0x9000

View File

@ -177,16 +177,28 @@ LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam);
/* load resource string */
static LPTSTR load_string(LPTSTR buffer, UINT id)
{
LoadString(Globals.hInstance, id, buffer, BUFFER_LEN);
return buffer;
}
#define RS(b, i) load_string(b, i)
/* display error message for the specified WIN32 error code */
static void display_error(HWND hwnd, DWORD error)
{
TCHAR b1[BUFFER_LEN], b2[BUFFER_LEN];
PTSTR msg;
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
0, error, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (PTSTR)&msg, 0, NULL))
MessageBox(hwnd, msg, TEXT("Winefile"), MB_OK);
MessageBox(hwnd, msg, RS(b2,IDS_WINEFILE), MB_OK);
else
MessageBox(hwnd, TEXT("Error"), TEXT("Winefile"), MB_OK);
MessageBox(hwnd, RS(b1,IDS_ERROR), RS(b2,IDS_WINEFILE), MB_OK);
LocalFree(msg);
}
@ -1226,6 +1238,8 @@ static void read_directory(Entry* dir, LPCTSTR path, SORT_ORDER sortOrder, HWND
static ChildWnd* alloc_child_window(LPCTSTR path, LPITEMIDLIST pidl, HWND hwnd)
{
TCHAR drv[_MAX_DRIVE+1], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT];
TCHAR b1[BUFFER_LEN];
ChildWnd* child = (ChildWnd*) malloc(sizeof(ChildWnd));
Root* root = &child->root;
Entry* entry;
@ -1304,10 +1318,10 @@ static ChildWnd* alloc_child_window(LPCTSTR path, LPITEMIDLIST pidl, HWND hwnd)
#ifdef _SHELL_FOLDERS
if (root->entry.etype == ET_SHELL)
lstrcpy(root->entry.data.cFileName, TEXT("Desktop"));
load_string(root->entry.data.cFileName, IDS_DESKTOP);
else
#endif
wsprintf(root->entry.data.cFileName, TEXT("%s - %s"), drv, root->fs);
wsprintf(root->entry.data.cFileName, RS(b1,IDS_TITLEFMT), drv, root->fs);
root->entry.data.dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY;
@ -1547,6 +1561,8 @@ static BOOL CALLBACK ExecuteDialogWndProg(HWND hwnd, UINT nmsg, WPARAM wparam, L
static BOOL CALLBACK DestinationDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
{
TCHAR b1[BUFFER_LEN], b2[BUFFER_LEN];
switch(nmsg) {
case WM_INITDIALOG:
SetWindowLong(hwnd, GWL_USERDATA, lparam);
@ -1567,7 +1583,7 @@ static BOOL CALLBACK DestinationDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPA
break;
case 254:
MessageBox(hwnd, TEXT("Not yet implemented"), TEXT("Winefile"), MB_OK);
MessageBox(hwnd, RS(b1,IDS_NO_IMPL), RS(b2,IDS_WINEFILE), MB_OK);
break;
}
@ -1745,6 +1761,8 @@ BOOL activate_fs_window(LPCTSTR filesys)
LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
{
TCHAR b1[BUFFER_LEN], b2[BUFFER_LEN];
switch(nmsg) {
case WM_CLOSE:
DestroyWindow(hwnd);
@ -1903,7 +1921,7 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
break;}
case ID_HELP:
WinHelp(hwnd, TEXT("winfile"), HELP_INDEX, 0);
WinHelp(hwnd, RS(b1,IDS_WINEFILE), HELP_INDEX, 0);
break;
#ifndef _NO_EXTENSIONS
@ -1916,7 +1934,7 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
TCHAR path[MAX_PATH];
ChildWnd* child;
if (activate_fs_window(TEXT("unixfs")))
if (activate_fs_window(RS(b1,IDS_UNIXFS)))
break;
getcwd(path, MAX_PATH);
@ -1931,7 +1949,7 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
TCHAR path[MAX_PATH];
ChildWnd* child;
if (activate_fs_window(TEXT("Shell")))
if (activate_fs_window(RS(b1,IDS_SHELL)))
break;
GetCurrentDirectory(MAX_PATH, path);
@ -1957,11 +1975,11 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
#endif
case ID_ABOUT_WINE:
ShellAbout(hwnd, TEXT("WINE"), TEXT("Winefile"), 0);
ShellAbout(hwnd, RS(b2,IDS_WINE), RS(b1,IDS_WINEFILE), 0);
break;
case ID_ABOUT: /*ID_ABOUT_WINE: */
ShellAbout(hwnd, TEXT("Winefile"), NULL, 0);
ShellAbout(hwnd, RS(b1,IDS_WINEFILE), NULL, 0);
break;
#endif /* _NO_EXTENSIONS */
@ -1970,7 +1988,7 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
STRING_SelectLanguageByNumber(wParam - PM_FIRST_LANGUAGE);
else */if ((cmd<IDW_FIRST_CHILD || cmd>=IDW_FIRST_CHILD+0x100) &&
(cmd<SC_SIZE || cmd>SC_RESTORE))
MessageBox(hwnd, TEXT("Not yet implemented"), TEXT("Winefile"), MB_OK);
MessageBox(hwnd, RS(b2,IDS_NO_IMPL), RS(b1,IDS_WINEFILE), MB_OK);
return DefFrameProc(hwnd, Globals.hmdiclient, nmsg, wparam, lparam);
}
@ -3764,7 +3782,7 @@ static void InitInstance(HINSTANCE hinstance)
void show_frame(HWND hwndParent, int cmdshow)
{
TCHAR path[MAX_PATH];
TCHAR path[MAX_PATH], b1[BUFFER_LEN];
ChildWnd* child;
HMENU hMenuFrame, hMenuWindow;
@ -3787,7 +3805,7 @@ void show_frame(HWND hwndParent, int cmdshow)
/* create main window */
Globals.hMainWnd = CreateWindowEx(0, (LPCTSTR)(int)Globals.hframeClass, TEXT("Wine File"), WS_OVERLAPPEDWINDOW,
Globals.hMainWnd = CreateWindowEx(0, (LPCTSTR)(int)Globals.hframeClass, RS(b1,IDS_WINE_FILE), WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
hwndParent, Globals.hMenuFrame, Globals.hInstance, 0/*lpParam*/);
@ -3823,7 +3841,9 @@ void show_frame(HWND hwndParent, int cmdshow)
#endif
#ifdef _SHELL_FOLDERS
/* insert shell namespace button */
SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)TEXT("Shell\0"));
load_string(b1, IDS_SHELL);
b1[lstrlen(b1)+1] = '\0';
SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)b1);
drivebarBtn.idCommand = ID_DRIVE_SHELL_NS;
SendMessage(Globals.hdrivebar, TB_INSERTBUTTON, btn++, (LPARAM)&drivebarBtn);