added wxWindowDisabler ctor for conditionally disabling all windows and use it in WaitForChild()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-03-22 03:06:57 +00:00
parent 1d57de4858
commit 2ecd1756e4
4 changed files with 44 additions and 8 deletions

View File

@@ -1447,8 +1447,7 @@ int wxGUIAppTraits::WaitForChild(wxExecuteData& execData)
// prepare to wait for the child termination: show to the user that we're
// busy and refuse all input unless explicitly told otherwise
wxBusyCursor bc;
wxWindowDisabler *wd = flags & wxEXEC_NODISABLE ? NULL
: new wxWindowDisabler;
wxWindowDisabler wd(!(flags & wxEXEC_NODISABLE));
// endProcData.pid will be set to 0 from wxHandleProcessTermination() when
// the process terminates
@@ -1480,8 +1479,6 @@ int wxGUIAppTraits::WaitForChild(wxExecuteData& execData)
wxYield();
}
delete wd;
return endProcData.exitcode;
}