[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
This commit is contained in:
Michael Martin 2010-05-17 02:15:50 +00:00
parent 6666b6b68b
commit 1503e2b8c9

View file

@ -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);
}
}