shell32: RunFileDlg: move strings to resources.
This commit is contained in:
parent
adc72977f7
commit
0e2b5c7605
|
@ -104,7 +104,7 @@ void WINAPI RunFileDlgW(
|
||||||
!(template = LoadResource(shell32_hInstance, hRes)))
|
!(template = LoadResource(shell32_hInstance, hRes)))
|
||||||
{
|
{
|
||||||
ERR("Couldn't load SHELL_RUN_DLG resource\n");
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,16 +183,16 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
|
||||||
LPFNOFN ofnProc = NULL ;
|
LPFNOFN ofnProc = NULL ;
|
||||||
static const WCHAR comdlg32W[] = {'c','o','m','d','l','g','3','2',0};
|
static const WCHAR comdlg32W[] = {'c','o','m','d','l','g','3','2',0};
|
||||||
WCHAR szFName[1024] = {0};
|
WCHAR szFName[1024] = {0};
|
||||||
WCHAR szFilter[MAX_PATH], szCaption[MAX_PATH];
|
WCHAR *pszFilter, szCaption[MAX_PATH];
|
||||||
static const char ansiFilter[] = "Executable Files\0*.exe\0All Files\0*.*\0\0\0\0";
|
|
||||||
OPENFILENAMEW ofn;
|
OPENFILENAMEW ofn;
|
||||||
|
|
||||||
MultiByteToWideChar(CP_UTF8, 0, ansiFilter, sizeof(ansiFilter), szFilter, MAX_PATH);
|
LoadStringW(shell32_hInstance, IDS_RUNDLG_BROWSE_FILTER, (LPWSTR)&pszFilter, 0);
|
||||||
MultiByteToWideChar(CP_UTF8, 0, "Browse", -1, szCaption, MAX_PATH);
|
LoadStringW(shell32_hInstance, IDS_RUNDLG_BROWSE_CAPTION, szCaption, MAX_PATH);
|
||||||
|
|
||||||
ZeroMemory(&ofn, sizeof(ofn));
|
ZeroMemory(&ofn, sizeof(ofn));
|
||||||
ofn.lStructSize = sizeof(OPENFILENAMEW);
|
ofn.lStructSize = sizeof(OPENFILENAMEW);
|
||||||
ofn.hwndOwner = hwnd;
|
ofn.hwndOwner = hwnd;
|
||||||
ofn.lpstrFilter = szFilter;
|
ofn.lpstrFilter = pszFilter;
|
||||||
ofn.lpstrFile = szFName;
|
ofn.lpstrFile = szFName;
|
||||||
ofn.nMaxFile = 1023;
|
ofn.nMaxFile = 1023;
|
||||||
ofn.lpstrTitle = szCaption;
|
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")))
|
NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameW")))
|
||||||
{
|
{
|
||||||
ERR("Couldn't get GetOpenFileName function entry (lib=%p, proc=%p)\n", hComdlg, ofnProc);
|
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 ;
|
return TRUE ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ofnProc(&ofn))
|
if (ofnProc(&ofn))
|
||||||
{
|
{
|
||||||
|
|
||||||
SetFocus (GetDlgItem (hwnd, IDOK)) ;
|
SetFocus (GetDlgItem (hwnd, IDOK)) ;
|
||||||
SetWindowTextW (GetDlgItem (hwnd, 12298), szFName) ;
|
SetWindowTextW (GetDlgItem (hwnd, 12298), szFName) ;
|
||||||
SendMessageW (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ;
|
SendMessageW (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ;
|
||||||
|
|
|
@ -220,6 +220,12 @@ STRINGTABLE
|
||||||
IDS_SHUTDOWN_TITLE "Shutdown"
|
IDS_SHUTDOWN_TITLE "Shutdown"
|
||||||
IDS_SHUTDOWN_PROMPT "Do you want to shutdown your Wine session?"
|
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 */
|
/* shell folder path default values */
|
||||||
IDS_PROGRAMS "Start Menu\\Programs"
|
IDS_PROGRAMS "Start Menu\\Programs"
|
||||||
IDS_PERSONAL "My Documents"
|
IDS_PERSONAL "My Documents"
|
||||||
|
|
|
@ -158,7 +158,7 @@ CAPTION ""
|
||||||
FONT 8, "MS Shell Dlg"
|
FONT 8, "MS Shell Dlg"
|
||||||
{
|
{
|
||||||
ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE
|
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 "&Otwórz:", 12305, 7, 39, 24, 10
|
LTEXT "&Otwórz:", 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
|
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
|
DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP
|
||||||
|
@ -221,6 +221,12 @@ STRINGTABLE
|
||||||
IDS_SHUTDOWN_TITLE "Wy³¹cz"
|
IDS_SHUTDOWN_TITLE "Wy³¹cz"
|
||||||
IDS_SHUTDOWN_PROMPT "Czy chcesz wy³¹czyæ sesjê Wine'a?"
|
IDS_SHUTDOWN_PROMPT "Czy chcesz wy³¹czyæ sesjê Wine'a?"
|
||||||
|
|
||||||
|
/* Run File dialog */
|
||||||
|
IDS_RUNDLG_ERROR "Nie można wyświetlić okna dialogowego Uruchom (błąd wewnętrzny)"
|
||||||
|
IDS_RUNDLG_BROWSE_ERROR "Nie można wyświetlić okna dialogowego Przeglądaj (błąd wewnętrzny)"
|
||||||
|
IDS_RUNDLG_BROWSE_CAPTION "Przeglądaj"
|
||||||
|
IDS_RUNDLG_BROWSE_FILTER "Pliki wykonywalne\0*.exe\0Wszystkie pliki\0*.*\0\0"
|
||||||
|
|
||||||
/* shell folder path default values */
|
/* shell folder path default values */
|
||||||
IDS_PROGRAMS "Menu Start\\Programy"
|
IDS_PROGRAMS "Menu Start\\Programy"
|
||||||
IDS_PERSONAL "Moje dokumenty"
|
IDS_PERSONAL "Moje dokumenty"
|
||||||
|
|
|
@ -97,6 +97,11 @@
|
||||||
|
|
||||||
#define IDS_NEWFOLDER 142
|
#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 256
|
||||||
#define IDS_LICENSE_CAPTION 257
|
#define IDS_LICENSE_CAPTION 257
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue