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

shell32: RunFileDlg: move strings to resources.

parent adc72977
......@@ -104,7 +104,7 @@ void WINAPI RunFileDlgW(
!(template = LoadResource(shell32_hInstance, hRes)))
{
ERR("Couldn't load SHELL_RUN_DLG resource\n");
MessageBoxA(hwndOwner, "Unable to display Run File dialog box (internal error)", NULL, MB_OK | MB_ICONERROR);
ShellMessageBoxW(shell32_hInstance, hwndOwner, MAKEINTRESOURCEW(IDS_RUNDLG_ERROR), NULL, MB_OK | MB_ICONERROR);
return;
}
......@@ -183,16 +183,16 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
LPFNOFN ofnProc = NULL ;
static const WCHAR comdlg32W[] = {'c','o','m','d','l','g','3','2',0};
WCHAR szFName[1024] = {0};
WCHAR szFilter[MAX_PATH], szCaption[MAX_PATH];
static const char ansiFilter[] = "Executable Files\0*.exe\0All Files\0*.*\0\0\0\0";
WCHAR *pszFilter, szCaption[MAX_PATH];
OPENFILENAMEW ofn;
MultiByteToWideChar(CP_UTF8, 0, ansiFilter, sizeof(ansiFilter), szFilter, MAX_PATH);
MultiByteToWideChar(CP_UTF8, 0, "Browse", -1, szCaption, MAX_PATH);
LoadStringW(shell32_hInstance, IDS_RUNDLG_BROWSE_FILTER, (LPWSTR)&pszFilter, 0);
LoadStringW(shell32_hInstance, IDS_RUNDLG_BROWSE_CAPTION, szCaption, MAX_PATH);
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(OPENFILENAMEW);
ofn.hwndOwner = hwnd;
ofn.lpstrFilter = szFilter;
ofn.lpstrFilter = pszFilter;
ofn.lpstrFile = szFName;
ofn.nMaxFile = 1023;
ofn.lpstrTitle = szCaption;
......@@ -202,13 +202,12 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameW")))
{
ERR("Couldn't get GetOpenFileName function entry (lib=%p, proc=%p)\n", hComdlg, ofnProc);
MessageBoxA(hwnd, "Unable to display Browse dialog box (internal error)", NULL, MB_OK | MB_ICONERROR);
ShellMessageBoxW(shell32_hInstance, hwnd, MAKEINTRESOURCEW(IDS_RUNDLG_BROWSE_ERROR), NULL, MB_OK | MB_ICONERROR);
return TRUE ;
}
if (ofnProc(&ofn))
{
SetFocus (GetDlgItem (hwnd, IDOK)) ;
SetWindowTextW (GetDlgItem (hwnd, 12298), szFName) ;
SendMessageW (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ;
......
......@@ -220,6 +220,12 @@ STRINGTABLE
IDS_SHUTDOWN_TITLE "Shutdown"
IDS_SHUTDOWN_PROMPT "Do you want to shutdown your Wine session?"
/* Run File dialog */
IDS_RUNDLG_ERROR "Unable to display Run File dialog box (internal error)"
IDS_RUNDLG_BROWSE_ERROR "Unable to display Browse dialog box (internal error)"
IDS_RUNDLG_BROWSE_CAPTION "Browse"
IDS_RUNDLG_BROWSE_FILTER "Executable Files\0*.exe\0All Files\0*.*\0\0"
/* shell folder path default values */
IDS_PROGRAMS "Start Menu\\Programs"
IDS_PERSONAL "My Documents"
......
......@@ -158,7 +158,7 @@ CAPTION ""
FONT 8, "MS Shell Dlg"
{
ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE
LTEXT "Wpisz nazw programu, katalogu, dokumentu, a Wine otworzy go dla ciebie.", 12289, 36, 11, 182, 18
LTEXT "Wpisz nazw programu, katalogu lub dokumentu, a Wine otworzy go dla ciebie.", 12289, 36, 11, 182, 18
LTEXT "&Otwrz:", 12305, 7, 39, 24, 10
CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100
DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP
......@@ -221,6 +221,12 @@ STRINGTABLE
IDS_SHUTDOWN_TITLE "Wycz"
IDS_SHUTDOWN_PROMPT "Czy chcesz wyczy sesj Wine'a?"
/* Run File dialog */
IDS_RUNDLG_ERROR "Nie mona wywietli okna dialogowego Uruchom (bd wewntrzny)"
IDS_RUNDLG_BROWSE_ERROR "Nie mona wywietli okna dialogowego Przegldaj (bd wewntrzny)"
IDS_RUNDLG_BROWSE_CAPTION "Przegldaj"
IDS_RUNDLG_BROWSE_FILTER "Pliki wykonywalne\0*.exe\0Wszystkie pliki\0*.*\0\0"
/* shell folder path default values */
IDS_PROGRAMS "Menu Start\\Programy"
IDS_PERSONAL "Moje dokumenty"
......
......@@ -97,6 +97,11 @@
#define IDS_NEWFOLDER 142
#define IDS_RUNDLG_ERROR 160
#define IDS_RUNDLG_BROWSE_ERROR 161
#define IDS_RUNDLG_BROWSE_CAPTION 162
#define IDS_RUNDLG_BROWSE_FILTER 163
#define IDS_LICENSE 256
#define IDS_LICENSE_CAPTION 257
......
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