Author: tfaber
Date: Wed Nov 28 11:20:13 2012
New Revision: 57773
URL:
http://svn.reactos.org/svn/reactos?rev=57773&view=rev
Log:
[REGEDIT]
- Allow canceling import operations. Patch by Lee Schroeder.
CORE-6766 #resolve
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] Wed Nov 28 11:20:13 2012
@@ -213,7 +213,7 @@
/* Perform application initialization */
if (!InitInstance(hInstance, nCmdShow))
{
- return FALSE;
+ return 0;
}
hAccel = LoadAcceleratorsW(hInstance, MAKEINTRESOURCEW(ID_ACCEL));
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] Wed Nov 28 11:20:13
2012
@@ -158,10 +158,25 @@
/* Request import confirmation */
if (!silent)
{
+ int choice;
+
LoadStringW(hInst, IDS_IMPORT_PROMPT, szText, COUNT_OF(szText));
- if (InfoMessageBox(NULL, MB_YESNO | MB_ICONWARNING, szTitle, szText,
filename) != IDYES)
- goto cont;
+ choice = InfoMessageBox(NULL, MB_YESNOCANCEL | MB_ICONWARNING,
szTitle, szText, filename);
+
+ switch (choice)
+ {
+ case IDNO:
+ goto cont;
+ case IDCANCEL:
+ /* The cancel case is useful if the user is importing more
than one registry file
+ at a time, and wants to back out anytime during the import
process. This way, the
+ user doesn't have to resort to ending the regedit process
abruptly just to cancel
+ the operation. */
+ return TRUE;
+ default:
+ break;
+ }
}
/* Open the file */