notepad: Allow only one search/replace dialog to open.

oldstable
Rico Schüller 2009-04-25 17:54:03 +02:00 committed by Alexandre Julliard
parent 3137600651
commit ac6a18f1f6
1 changed files with 14 additions and 0 deletions

View File

@ -724,6 +724,13 @@ VOID DIALOG_SelectFont(VOID)
VOID DIALOG_Search(VOID)
{
/* Allow only one search/replace dialog to open */
if(Globals.hFindReplaceDlg != NULL)
{
SetActiveWindow(Globals.hFindReplaceDlg);
return;
}
ZeroMemory(&Globals.find, sizeof(Globals.find));
Globals.find.lStructSize = sizeof(Globals.find);
Globals.find.hwndOwner = Globals.hMainWnd;
@ -749,6 +756,13 @@ VOID DIALOG_SearchNext(VOID)
VOID DIALOG_Replace(VOID)
{
/* Allow only one search/replace dialog to open */
if(Globals.hFindReplaceDlg != NULL)
{
SetActiveWindow(Globals.hFindReplaceDlg);
return;
}
ZeroMemory(&Globals.find, sizeof(Globals.find));
Globals.find.lStructSize = sizeof(Globals.find);
Globals.find.hwndOwner = Globals.hMainWnd;