Author: hbelusca
Date: Mon Jul 18 22:27:17 2016
New Revision: 71966
URL:
http://svn.reactos.org/svn/reactos?rev=71966&view=rev
Log:
[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! :)
Modified:
trunk/reactos/base/applications/regedit/main.c
trunk/reactos/base/applications/regedit/regedit.c
Modified: trunk/reactos/base/applications/regedit/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
==============================================================================
--- trunk/reactos/base/applications/regedit/main.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/main.c [iso-8859-1] Mon Jul 18 22:27:17 2016
@@ -196,26 +196,25 @@
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;
-
- default:
- break;
- }
+ {
+ case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
+ SetProcessDefaultLayout(LAYOUT_RTL);
+ break;
+
+ default:
+ break;
+ }
/* Store instance handle in our global variable */
hInst = hInstance;
Modified: trunk/reactos/base/applications/regedit/regedit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
==============================================================================
--- trunk/reactos/base/applications/regedit/regedit.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/regedit.c [iso-8859-1] Mon Jul 18 22:27:17
2016
@@ -138,7 +138,7 @@
{
case ACTION_ADD:
{
- WCHAR szTitle[512], szText[512];
+ WCHAR szText[512];
WCHAR filename[MAX_PATH];
FILE *fp;
@@ -146,11 +146,9 @@
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])
{
@@ -217,7 +215,7 @@
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 @@
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 @@
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: