mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[REGEDIT]
- Minor whitespace fixes in main.c - Use a correct info msgbox title when showing regedit command-line usage. Something to think about: translate the cmdline usage! :) svn path=/trunk/; revision=71966
This commit is contained in:
parent
17cc3322a5
commit
280b976e35
2 changed files with 17 additions and 20 deletions
|
@ -196,26 +196,25 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
|
|||
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
|
||||
/* Initialize global strings */
|
||||
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
|
||||
LoadStringW(hInstance, IDC_REGEDIT_FRAME, szFrameClass, COUNT_OF(szFrameClass));
|
||||
LoadStringW(hInstance, IDC_REGEDIT, szChildClass, COUNT_OF(szChildClass));
|
||||
|
||||
if (ProcessCmdLine(lpCmdLine))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Initialize global strings */
|
||||
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
|
||||
LoadStringW(hInstance, IDC_REGEDIT_FRAME, szFrameClass, MAX_LOADSTRING);
|
||||
LoadStringW(hInstance, IDC_REGEDIT, szChildClass, MAX_LOADSTRING);
|
||||
|
||||
|
||||
switch (GetUserDefaultUILanguage())
|
||||
{
|
||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||
SetProcessDefaultLayout(LAYOUT_RTL);
|
||||
break;
|
||||
{
|
||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||
SetProcessDefaultLayout(LAYOUT_RTL);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* Store instance handle in our global variable */
|
||||
hInst = hInstance;
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPWSTR s, BOOL silent)
|
|||
{
|
||||
case ACTION_ADD:
|
||||
{
|
||||
WCHAR szTitle[512], szText[512];
|
||||
WCHAR szText[512];
|
||||
WCHAR filename[MAX_PATH];
|
||||
FILE *fp;
|
||||
|
||||
|
@ -146,12 +146,10 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPWSTR s, BOOL silent)
|
|||
if (!filename[0])
|
||||
{
|
||||
InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, L"No file name is specified.");
|
||||
InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, usage);
|
||||
InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, szTitle, usage);
|
||||
exit(4);
|
||||
}
|
||||
|
||||
LoadStringW(hInst, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
|
||||
|
||||
while (filename[0])
|
||||
{
|
||||
/* Request import confirmation */
|
||||
|
@ -217,7 +215,7 @@ cont:
|
|||
if (!reg_key_name[0])
|
||||
{
|
||||
InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, L"No registry key is specified for removal.");
|
||||
InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, usage);
|
||||
InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, szTitle, usage);
|
||||
exit(6);
|
||||
}
|
||||
delete_registry_key(reg_key_name);
|
||||
|
@ -233,7 +231,7 @@ cont:
|
|||
if (!filename[0])
|
||||
{
|
||||
InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, L"No file name is specified.");
|
||||
InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, usage);
|
||||
InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, szTitle, usage);
|
||||
exit(7);
|
||||
}
|
||||
|
||||
|
@ -318,7 +316,7 @@ BOOL ProcessCmdLine(LPWSTR lpCmdLine)
|
|||
action = ACTION_EXPORT;
|
||||
break;
|
||||
case L'?':
|
||||
InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, NULL, usage);
|
||||
InfoMessageBox(NULL, MB_OK | MB_ICONINFORMATION, szTitle, usage);
|
||||
exit(3);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue