Author: mjmartin
Date: Mon May 17 04:15:50 2010
New Revision: 47251
URL:
http://svn.reactos.org/svn/reactos?rev=47251&view=rev
Log:
[regedit]
- If a search was never done, show the find dialog when pressing F3. Patch by Radek Liska.
See Bug #5391.
- Return the result of the FindNext and if it is false inform the user that search is
complete.
Modified:
trunk/reactos/base/applications/regedit/find.c
Modified: trunk/reactos/base/applications/regedit/find.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
==============================================================================
--- trunk/reactos/base/applications/regedit/find.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/find.c [iso-8859-1] Mon May 17 04:15:50 2010
@@ -629,6 +629,12 @@
LPCTSTR pszValueName;
LPTSTR pszFoundSubKey, pszFoundValueName;
+ if (_tcslen(s_szFindWhat) == 0)
+ {
+ FindDialog(hWnd);
+ return TRUE;
+ }
+
s_dwFlags = GetFindFlags();
pszKeyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
@@ -678,7 +684,7 @@
free(pszFoundValueName);
SetFocus(g_pChildWnd->hListWnd);
}
- return TRUE;
+ return fSuccess;
}
static INT_PTR CALLBACK FindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
lParam)
@@ -801,7 +807,9 @@
if (DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_FIND),
hWnd, FindDialogProc, 0) != 0)
{
- FindNext(hWnd);
- }
-}
-
+ if (FindNext(hWnd) == FALSE)
+ MessageBoxW(NULL,L"Finished searching through the registry\n",
+ L"Registry Editor", MB_ICONINFORMATION);
+ }
+}
+