1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

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

This commit is contained in:
Rico Schüller 2009-04-25 17:54:03 +02:00 committed by Alexandre Julliard
parent 3137600651
commit ac6a18f1f6

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;