From 1503e2b8c93f0549cf3002f4aa5370958f7e45c6 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Mon, 17 May 2010 02:15:50 +0000 Subject: [PATCH] [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. svn path=/trunk/; revision=47251 --- reactos/base/applications/regedit/find.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/reactos/base/applications/regedit/find.c b/reactos/base/applications/regedit/find.c index ad495efdd63..226da07ea5b 100644 --- a/reactos/base/applications/regedit/find.c +++ b/reactos/base/applications/regedit/find.c @@ -629,6 +629,12 @@ BOOL FindNext(HWND hWnd) 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 @@ BOOL FindNext(HWND hWnd) 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 @@ void FindDialog(HWND hWnd) 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); } }